X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fsales_db.inc;h=d58d8cf76988ab7fec955717a503bf9e88e1b573;hb=ad0504645e3632d169d0f253bb5eb4db8b7e18b9;hp=2177d2e7afbc70b239fb6d389bbc9d3a94008748;hpb=fc449c48a8d4ba23bfb18318dff08746340a440c;p=fa-stable.git diff --git a/sales/includes/sales_db.inc b/sales/includes/sales_db.inc index 2177d2e7..d58d8cf7 100644 --- a/sales/includes/sales_db.inc +++ b/sales/includes/sales_db.inc @@ -279,7 +279,7 @@ function read_sales_trans($doc_type, $trans_no, &$cart) @$myrow["src_id"]); } } - $cart->prepayments = get_payments_for($trans_no, $doc_type); + $cart->prepayments = get_payments_for($trans_no, $doc_type, $myrow["debtor_no"]); } // !newdoc @@ -368,7 +368,7 @@ function get_sales_child_documents($trans_type, $trans_no) // FIXME - credit notes retrieved here should be those linked to invoices containing // at least one line from related invoice - if (!count($trans_no)) + if (!count_array($trans_no)) return false; $childs = get_sales_child_numbers($trans_type, $trans_no, false); if (!count($childs))