Bug. Dimensions on credit note should also be set on balance accounts. Fixed.
authorJoe <joe.hunt.consulting@gmail.com>
Tue, 1 Nov 2022 19:25:55 +0000 (20:25 +0100)
committerJoe <joe.hunt.consulting@gmail.com>
Tue, 1 Nov 2022 19:25:55 +0000 (20:25 +0100)
sales/includes/db/sales_credit_db.inc

index 0bdbf7072f2239c0bb5175c3f6d9a6265be5d24f..7d8a3ca8050ea3fad64a647a1322e65637639102 100644 (file)
@@ -229,7 +229,7 @@ function add_gl_trans_credit_costs($order, $order_line, $credit_no, $date_,
                        $stock_entry_account = $stock_gl_code["inventory_account"];
                }
 
-               $total += add_gl_trans_std_cost(ST_CUSTCREDIT, $credit_no, $date_, $stock_entry_account, 0, 0,
+               $total += add_gl_trans_std_cost(ST_CUSTCREDIT, $credit_no, $date_, $stock_entry_account, $dim, $dim2,
                        "", ($unit_cost * $order_line->qty_dispatched),
                        PT_CUSTOMER, $order->customer_id,
                        "The stock side (or write off) of the cost of sales GL posting could not be inserted");