From 4e8581eb9ae1c83d9deaea66a9542e814132ad62 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sat, 2 Aug 2008 09:08:00 +0000 Subject: [PATCH] Use Item Sales Account as default when creating new branch. Customer Branch Sales Account overrides Item Sales Accounts. --- CHANGELOG.txt | 4 ++++ sales/manage/customer_branches.php | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 191dbf8e..73e24bbe 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +02-Aug-2008 Joe Hunt +# Use Item Sales Account as default when creating new branch. Customer Branch Sales Account overrides Item Sales Accounts. +$ /sales/manage/customer_branches.php + 01-Aug-2008 Joe Hunt ! Customer Dimension overrides an Item Dimension when creating GL transactions $ /sales/includes/db/customers_db.inc diff --git a/sales/manage/customer_branches.php b/sales/manage/customer_branches.php index cad472e2..bd301569 100644 --- a/sales/manage/customer_branches.php +++ b/sales/manage/customer_branches.php @@ -37,7 +37,7 @@ if (isset($_GET['SelectedBranch'])) //----------------------------------------------------------------------------------------------- -if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') +if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { //initialise no input errors assumed initially before we test @@ -54,7 +54,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($input_error != 1) { - if ($selected_id != -1) + if ($selected_id != -1) { /*SelectedBranch could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ @@ -256,7 +256,9 @@ elseif ($Mode != 'ADD_ITEM') { $company_record = get_company_prefs(); - $_POST['sales_account'] = $company_record["default_sales_act"]; + // We use the Item Sales Account as default! + // $_POST['sales_account'] = $company_record["default_sales_act"]; + $_POST['sales_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']; -- 2.30.2