get_stock_gl_code function called twice in the add_supp_invoice. Fixed.
authorJoe <joe.hunt.consulting@gmail.com>
Fri, 15 Jul 2022 06:41:18 +0000 (08:41 +0200)
committerJoe <joe.hunt.consulting@gmail.com>
Fri, 15 Jul 2022 06:41:18 +0000 (08:41 +0200)
purchasing/includes/db/invoice_db.inc

index 545f064fa216941a1e516b7a0f34a856aaaf4a7b..04909404a5ec6c6c5df946c8c5eab37dd5a28402 100644 (file)
@@ -343,7 +343,6 @@ function add_supp_invoice(&$supp_trans)
                                                $ref = $Refs->get_next(ST_JOURNAL, null, $date_);
                                                add_journal(ST_JOURNAL, $id, $diff, $date_, get_company_currency(), $ref);
                                                $stock_id = $entered_grn->item_code;
-                                               $stock_gl_code = get_stock_gl_code($stock_id);
                                                $memo = _("Supplier invoice adjustment for zero inventory of ").$stock_id." "._("Invoice")." ".$supp_trans->reference;
                                                //Reverse the inventory effect if $qoh <=0
                                                add_gl_trans_std_cost(ST_JOURNAL, $id, $date_,