X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fincludes%2Fdb%2Fpo_db.inc;h=b0709ee21f4d9af1be4a9528a1abd559ea017ee5;hb=05b1dfa59ebab4c769f916135289918fe43d3932;hp=fbc3a8cc984987c496ea701ab153815266755063;hpb=e9ad9e87f5eb2682d2e91c93134250fd8a8d2ad9;p=fa-stable.git diff --git a/purchasing/includes/db/po_db.inc b/purchasing/includes/db/po_db.inc index fbc3a8cc..b0709ee2 100644 --- a/purchasing/includes/db/po_db.inc +++ b/purchasing/includes/db/po_db.inc @@ -148,7 +148,7 @@ function update_po(&$po_obj) db_query($sql, "One of the purchase order detail records could not be updated"); } - reallocate_payments($po_obj->order_no, ST_PURCHORDER, $po_obj->orig_order_date, $po_obj->get_trans_total(), $po_obj->prepayments); + reallocate_payments($po_obj->order_no, ST_PURCHORDER, $po_obj->orig_order_date, $po_obj->get_trans_total(), $po_obj->prepayments, $po_obj->supplier_id); add_audit_trail($po_obj->trans_type, $po_obj->order_no, Today(), _("Updated.")); hook_db_postwrite($po_obj, ST_PURCHORDER); @@ -192,7 +192,7 @@ function read_po_header($order_no, &$order) $order->delivery_address = $myrow["delivery_address"]; $order->alloc = $myrow["alloc"]; $order->prep_amount = $myrow["prep_amount"]; - $order->prepayments = get_payments_for($order_no, ST_PURCHORDER); + $order->prepayments = get_payments_for($order_no, ST_PURCHORDER, $myrow["supplier_id"]); return true; }