From 13fae1ba1d78cff66e326a006be2f538dd404248 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Wed, 29 Jan 2020 08:49:29 +0100 Subject: [PATCH] [0004904] Customer Credit Note: fixed invalid inventory GL postings for service items. --- sales/includes/db/sales_credit_db.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sales/includes/db/sales_credit_db.inc b/sales/includes/db/sales_credit_db.inc index 5f0382a6..171c0a7e 100644 --- a/sales/includes/db/sales_credit_db.inc +++ b/sales/includes/db/sales_credit_db.inc @@ -211,7 +211,8 @@ function add_gl_trans_credit_costs($order, $order_line, $credit_no, $date_, $total = 0; /* insert gl_trans to credit stock and debit cost of sales at standard cost*/ $unit_cost = get_unit_cost($order_line->stock_id); - if ($unit_cost != 0) { + + if ($stock_gl_codes['mb_flag'] != 'D' && $unit_cost != 0) { /*first the cost of sales entry*/ $total += add_gl_trans_std_cost(ST_CUSTCREDIT, $credit_no, $date_, $stock_gl_codes["cogs_account"], -- 2.30.2