! -> 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
//-----------------------------------------------------------------------------------------------
-if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
+if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
{
//initialise no input errors assumed initially before we test
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*/
{
$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'];