From: Janusz Dobrowolski Date: Thu, 18 Sep 2008 19:41:52 +0000 (+0000) Subject: Add/view on F4 in customer/supplier selectors X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=d375f07725326b7cf2df4419d148dd9d16f3e989;p=textcart.git Add/view on F4 in customer/supplier selectors --- diff --git a/gl/gl_bank.php b/gl/gl_bank.php index d827877..3bb0e9e 100644 --- a/gl/gl_bank.php +++ b/gl/gl_bank.php @@ -33,6 +33,30 @@ check_db_has_bank_accounts(_("There are no bank accounts defined in the system." check_db_has_bank_trans_types(_("There are no bank payment types 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', 'type', 'ref', 'memo_') ); +} //-------------------------------------------------------------------------------------------------- function line_start_focus() { global $Ajax;