Removed possibility to use bank account in Direct Invoice. This
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 28 Nov 2010 13:06:12 +0000 (13:06 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 28 Nov 2010 13:06:12 +0000 (13:06 +0000)
was an old method for handling Cash Payment. We now have better options.

CHANGELOG.txt
sales/includes/db/sales_invoice_db.inc
sales/manage/customer_branches.php

index ffb7eef51c97e3d520dac087bd4e11f64f700bd3..4e4c485fe1563ebf9c93d2e4183ddeab5b03439a 100644 (file)
@@ -19,6 +19,12 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+28-Nov-2010 Joe Hunt
+- Removed possibility to use bank account in Direct Invoice. This
+  was an old method for handling Cash Payment. We now have better options.
+$ /sales/includes/db/sales_invoice_db.inc
+  /sales/manage/customer_branches.php
+  
 26-Nov-2010 Janusz Dobrowolski
 ! [0000282] Improved reports menu display.
 $ /js/inserts.js
index 95d5e396c9d2ad9a96cd42d503269c9cc373461c..df56eb4d5d5d18ed2a534339f06dfc4cb1914f26 100644 (file)
@@ -53,12 +53,6 @@ function write_sales_invoice(&$invoice)
            $items_added_tax = 0;
            $freight_added_tax = 0;
        }
-       // 2006-06-14. If the Customer Branch AR Account is set to a Bank Account,
-       // the transaction will be settled at once.
-       if (is_bank_account($branch_data['receivables_account']))
-               $alloc = $items_total + $items_added_tax + $invoice->freight_cost + $freight_added_tax;
-       else
-               $alloc = 0;
 
        /* Insert/update the debtor_trans */
        $sales_order = $invoice->order_no;
@@ -69,7 +63,7 @@ function write_sales_invoice(&$invoice)
                $invoice->Branch, $date_, $invoice->reference, $items_total, 0,
                $items_added_tax, $invoice->freight_cost, $freight_added_tax,
                $invoice->sales_type, $sales_order, $invoice->ship_via, 
-               $invoice->due_date, $alloc, 0, $invoice->dimension_id, 
+               $invoice->due_date, 0, 0, $invoice->dimension_id, 
                $invoice->dimension2_id, $invoice->payment); 
                // 2008-06-14 extra $alloc, 2008-11-12 added dimension_id Joe Hunt
 
index 2d36736031313ad5cefecedc2869b62144c24cfe..5ab27166df15c9213085aa2b1e7653602e6d2edd 100644 (file)
@@ -249,7 +249,7 @@ 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');
 
        table_section(2);