Rerun. 0003864: [Fixed Assets] GL Transactions for Fixed Asset Sales are wrong (patch...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 15 May 2017 13:08:39 +0000 (15:08 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 15 May 2017 13:08:39 +0000 (15:08 +0200)
sales/includes/db/sales_delivery_db.inc

index 273de917756c42006b4f25c4f47be154f3b3084e..8276eb5113d335a30e46aa0c9d61cbb51fd2c7f5 100644 (file)
@@ -143,7 +143,7 @@ function write_sales_delivery(&$delivery,$bo_policy)
                                                "The stock side of the cost of sales GL posting could not be inserted");
                                        /*finally adjust sales account with the remaining*/
                                        add_gl_trans_std_cost(ST_CUSTDELIVERY, $delivery_no, $delivery->document_date,
-                                               $stock_gl_code["sales_account"], 0, 0, "",
+                                               $stock_gl_code["cogs_account"], 0, 0, "",
                                                ($fa_purchase_cost - $fa_depreciation),
                                                PT_CUSTOMER, $delivery->customer_id,
                                                "The stock side of the cost of sales GL posting could not be inserted");