X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=purchasing%2Fincludes%2Fdb%2Fgrn_db.inc;h=3a9e45955515ffca5dbc8f67e97b680160807871;hb=80dd97a37f674cc3691fa04af4c29607067566b2;hp=7e7d5510bb890cdd7398273d9480492f2b1a08be;hpb=5e645e8c7492625677178e8b52da9456299a7411;p=fa-stable.git diff --git a/purchasing/includes/db/grn_db.inc b/purchasing/includes/db/grn_db.inc index 7e7d5510..3a9e4595 100644 --- a/purchasing/includes/db/grn_db.inc +++ b/purchasing/includes/db/grn_db.inc @@ -53,6 +53,8 @@ function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, function add_grn(&$po, $date_, $reference, $location) { + global $Refs; + begin_transaction(); $grn = add_grn_batch($po->order_no, $po->supplier_id, $reference, $location, $date_); @@ -93,7 +95,7 @@ function add_grn(&$po, $date_, $reference, $location) } /*quantity received is != 0 */ } /*end of order_line loop */ - references::save(25, $grn, $reference); + $Refs->save(25, $grn, $reference); add_audit_trail(25, $grn, $date_);