X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fincludes%2Fdb%2Fgrn_db.inc;h=065b2c7d04fa0162df19529e402d9282c09d5fa4;hb=9ff22040ec9e77b56c71df9bd95f9b2c2d50bd7e;hp=832787d05fac080a0af86845073070bb17e10ce6;hpb=2778621096dd6e321f75f9587a6c18b6e50669ef;p=fa-stable.git diff --git a/purchasing/includes/db/grn_db.inc b/purchasing/includes/db/grn_db.inc index 832787d0..065b2c7d 100644 --- a/purchasing/includes/db/grn_db.inc +++ b/purchasing/includes/db/grn_db.inc @@ -140,9 +140,6 @@ function add_grn(&$po) $po->line_items[$line_no]->grn_item_id = $grn_item; /* Update location stock records - NB a po cannot be entered for a service/kit parts done automatically */ - //add_stock_move(ST_SUPPRECEIVE, $order_line->stock_id, $grn, $po->Location, $date_, "", - // $order_line->receive_qty, $order_line->standard_cost, - // $po->supplier_id, 1, $order_line->taxfree_charge_value($po)/$order_line->receive_qty); add_stock_move(ST_SUPPRECEIVE, $order_line->stock_id, $grn, $po->Location, $date_, "", $order_line->receive_qty, $order_line->standard_cost, $order_line->taxfree_charge_value($po)/$order_line->receive_qty); @@ -150,8 +147,9 @@ function add_grn(&$po) } /*end of order_line loop */ if ($clearing_act && $total != 0.0) { + $accs = get_supplier_accounts($po->supplier_id); $total += add_gl_trans_supplier(ST_SUPPRECEIVE, $grn, $date_, $clearing_act, - 0, 0, -$total, null); + $accs['dimension_id'], $accs['dimension2_id'], -$total, null); } $Refs->save(ST_SUPPRECEIVE, $grn, $po->reference);