X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_payments.php;h=f00a88dab6364a8a6e51674adb1531c8e4047e3f;hb=389721f442ea4dc96ba1cafd65919e717e0d8746;hp=8ef48c17f92e4d2d9e41394c26e89efaf1889e70;hpb=da23a4fdc0501edbce8fb74d194fa816e89dd3d6;p=fa-stable.git diff --git a/sales/customer_payments.php b/sales/customer_payments.php index 8ef48c17..f00a88da 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -38,16 +38,12 @@ check_db_has_customers(_("There are no customers defined in the system.")); check_db_has_bank_accounts(_("There are no bank accounts defined in the system.")); //---------------------------------------------------------------------------------------- -if ($ret = context_restore()) { - if(isset($ret['customer_id'])) - $_POST['customer_id'] = $ret['customer_id']; - if(isset($ret['branch_id'])) - $_POST['BranchID'] = $ret['branch_id']; -} -if (isset($_POST['_customer_id_editor'])) { - context_call($path_to_root.'/sales/manage/customers.php?debtor_no='.$_POST['customer_id'], - array( 'customer_id', 'BranchID', 'bank_account', 'DateBanked', - 'ref', 'amount', 'discount', 'memo_') ); + +if (list_updated('BranchID')) { + // when branch is selected via external editor also customer can change + $br = get_branch(get_post('BranchID')); + $_POST['customer_id'] = $br['debtor_no']; + $Ajax->activate('customer_id'); } if (!isset($_POST['customer_id']))