X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_payments.php;h=f00a88dab6364a8a6e51674adb1531c8e4047e3f;hb=389721f442ea4dc96ba1cafd65919e717e0d8746;hp=27c29ccedfa7b5d9076765a917bea36866fd4715;hpb=dca46563d3e8b7546e7095b7d96b40d9838c4c75;p=fa-stable.git diff --git a/sales/customer_payments.php b/sales/customer_payments.php index 27c29cce..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'])) @@ -207,7 +203,7 @@ function read_customer_data() start_form(); - start_outer_table($table_style2, 5); + start_outer_table("$table_style2 width=60%", 5); table_section(1); customer_list_row(_("From Customer:"), 'customer_id', null, false, true);