From: Janusz Dobrowolski Date: Wed, 29 Jan 2020 07:49:29 +0000 (+0100) Subject: [0004904] Customer Credit Note: fixed invalid inventory GL postings for service items. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=13fae1ba1d78cff66e326a006be2f538dd404248 [0004904] Customer Credit Note: fixed invalid inventory GL postings for service items. --- 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"],