X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=sales%2Fmanage%2Fcustomer_branches.php;h=374d2f57d74fc1512645f382fd976d5b2658b1b9;hb=0c760ea65c8c6f0a45ea8328abab53be649f2105;hp=537a589130bb089a88e047e376bf16547357b87e;hpb=7b295ebee702b5b957362997d26106e482253da5;p=fa-stable.git diff --git a/sales/manage/customer_branches.php b/sales/manage/customer_branches.php index 537a5891..374d2f57 100644 --- a/sales/manage/customer_branches.php +++ b/sales/manage/customer_branches.php @@ -81,7 +81,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') $_POST['br_address'], $_POST['salesman'], $_POST['area'], $_POST['tax_group_id'], $_POST['sales_account'], $_POST['sales_discount_account'], $_POST['receivables_account'], $_POST['payment_discount_account'], $_POST['default_location'], $_POST['br_post_address'], $_POST['disable_trans'], $_POST['group_no'], - $_POST['default_ship_via'], $_POST['notes']); + $_POST['default_ship_via'], $_POST['notes'], $_POST['bank_account']); // update_record_status($_POST['supplier_id'], $_POST['inactive'], // 'cust_branch', 'branch_code'); @@ -93,7 +93,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') $_POST['br_address'], $_POST['salesman'], $_POST['area'], $_POST['tax_group_id'], $_POST['sales_account'], $_POST['sales_discount_account'], $_POST['receivables_account'], $_POST['payment_discount_account'], $_POST['default_location'], $_POST['br_post_address'], 0, $_POST['group_no'], - $_POST['default_ship_via'], $_POST['notes']); + $_POST['default_ship_via'], $_POST['notes'], $_POST['bank_account']); $selected_id = db_insert_id(); add_crm_person($_POST['contact_name'], $_POST['contact_name'], '', $_POST['br_post_address'], @@ -177,8 +177,7 @@ function branch_settings($selected_id) { $_POST['email'] = ""; if ($selected_id != -1) { - if ($Mode == 'Edit') { - + if ($Mode == 'Edit' || !isset($_POST['br_name'])) { //editing an existing branch $myrow = get_cust_branch($_POST['customer_id'], $_POST['branch_code']); set_focus('br_name'); @@ -205,6 +204,7 @@ function branch_settings($selected_id) { $_POST['payment_discount_account'] = $myrow['payment_discount_account']; $_POST['group_no'] = $myrow["group_no"]; $_POST['notes'] = $myrow["notes"]; + $_POST['bank_account'] = $myrow["bank_account"]; } } @@ -225,7 +225,7 @@ function branch_settings($selected_id) { // We use the Item Sales Account as default! // $_POST['sales_account'] = $company_record["default_sales_act"]; - $_POST['sales_account'] = $_POST['notes'] = ''; + $_POST['sales_account'] = $_POST['notes'] = $_POST['bank_account'] = ''; $_POST['sales_discount_account'] = $company_record['default_sales_discount_act']; $_POST['receivables_account'] = $company_record['debtors_act']; $_POST['payment_discount_account'] = $company_record['default_prompt_payment_act']; @@ -250,8 +250,9 @@ function branch_settings($selected_id) { // 2006-06-14. Changed gl_al_accounts_list to have an optional all_option 'Use Item Sales Accounts' gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', null, false, false, true); gl_all_accounts_list_row(_("Sales Discount Account:"), 'sales_discount_account'); - gl_all_accounts_list_row(_("Accounts Receivable Account:"), 'receivables_account'); + gl_all_accounts_list_row(_("Accounts Receivable Account:"), 'receivables_account', null, true); gl_all_accounts_list_row(_("Prompt Payment Discount Account:"), 'payment_discount_account'); + text_row(_("Bank Account Number:"), 'bank_account', null, 30, 60); table_section(2); @@ -344,6 +345,6 @@ tabbed_content_end(); end_form(); -end_page(); +end_page(@$_REQUEST['popup']); ?>