Fixed focus issues on hyperlinks.
[fa-stable.git] / sales / customer_payments.php
index 27c29ccedfa7b5d9076765a917bea36866fd4715..f00a88dab6364a8a6e51674adb1531c8e4047e3f 100644 (file)
@@ -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);