Use Item Sales Account as default when creating new branch. Customer Branch Sales...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 2 Aug 2008 09:08:00 +0000 (09:08 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 2 Aug 2008 09:08:00 +0000 (09:08 +0000)
CHANGELOG.txt
sales/manage/customer_branches.php

index 191dbf8edebf6dccc4a9a2b878ad905c7f39d848..73e24bbe0620b04d9a492629f72ecf409f587d9c 100644 (file)
@@ -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
index cad472e24c8264c3b646f5bdf2a15830ce1b3d30..bd3015695fb75677edb57449a700bba7b320d1e0 100644 (file)
@@ -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'];