Display of newlines in memo show as html
[fa-stable.git] / purchasing / includes / db / po_db.inc
index fbc3a8cc984987c496ea701ab153815266755063..dd4929ed38fd0d89e9a16c49e86219ff62528319 100644 (file)
@@ -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);
@@ -185,14 +185,14 @@ function read_po_header($order_no, &$order)
                $order->credit = get_current_supp_credit($order->supplier_id);
 
        $order->orig_order_date = sql2date($myrow["ord_date"]);
-       $order->Comments = nl2br($myrow["comments"]);
+       $order->Comments = $myrow["comments"];
        $order->Location = $myrow["into_stock_location"];
        $order->supp_ref = $myrow["requisition_no"];
        $order->reference = $myrow["reference"];
        $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;
        }