X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fgl_bank.php;h=a9d969a2ec77657f326903d63e5cb086ff2875f0;hb=f018643dc04ce130f1729e16a65458af443308a0;hp=fc6c50e67f0129a5b3a6bbd3525b095b1665e087;hpb=69618fda8c54d2eacfee99a008060d20934a8212;p=fa-stable.git diff --git a/gl/gl_bank.php b/gl/gl_bank.php index fc6c50e6..a9d969a2 100644 --- a/gl/gl_bank.php +++ b/gl/gl_bank.php @@ -41,29 +41,16 @@ page($_SESSION['page_title'], false, false, '', $js); check_db_has_bank_accounts(_("There are no bank accounts defined in the system.")); //---------------------------------------------------------------------------------------- -if ($ret = context_restore()) { - if(isset($ret['supplier_id'])) - $_POST['person_id'] = $ret['supplier_id']; - if(isset($ret['customer_id'])) - $_POST['person_id'] = $ret['customer_id']; - set_focus('person_id'); - if(isset($ret['branch_id'])) { - $_POST['PersonDetailID'] = $ret['branch_id']; - set_focus('PersonDetailID'); - } -} -if (isset($_POST['_person_id_editor'])) { - if ($_POST['PayType']==payment_person_types::supplier()) - $editor = '/purchasing/manage/suppliers.php?supplier_id='; - else - $editor = '/sales/manage/customers.php?debtor_no='; - -// $_SESSION['pay_items'] should stay unchanged during call -// -context_call($path_to_root.$editor.$_POST['person_id'], - array('bank_account', 'date_', 'PayType', 'person_id', - 'PersonDetailID', 'ref', 'memo_') ); +set_editor('supplier', 'person_id' , 'ref'); +set_editor('customer', 'person_id' , 'ref'); +set_editor('branch', 'PersonDetailID' , 'ref'); + +if (list_updated('PersonDetailID')) { + $br = get_branch(get_post('PersonDetailID')); + $_POST['person_id'] = $br['debtor_no']; + $Ajax->activate('person_id'); } + //-------------------------------------------------------------------------------------------------- function line_start_focus() { global $Ajax;