X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fsales_db.inc;h=08175b186e7fddf9db0dc560491e654f1c67f918;hb=1b9351ae81a67726e757eba55895a4f059c7f128;hp=e9410251065c33cf4a966ad902055fdcd00711d7;hpb=be0955fe194770ed26f9cfd81565dffa02f38ee1;p=fa-stable.git diff --git a/sales/includes/sales_db.inc b/sales/includes/sales_db.inc index e9410251..08175b18 100644 --- a/sales/includes/sales_db.inc +++ b/sales/includes/sales_db.inc @@ -11,6 +11,7 @@ ***********************************************************************/ include_once($path_to_root . "/includes/banking.inc"); include_once($path_to_root . "/includes/db/inventory_db.inc"); +include_once($path_to_root . "/includes/db/allocations_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_order_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_credit_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_invoice_db.inc"); @@ -273,6 +274,7 @@ function read_sales_trans($doc_type, $trans_no, &$cart) $myrow["tax_group_name"]); $cart->reference = $myrow["reference"]; + $cart->prepaid = $myrow["prepaid"]; $cart->order_no = $myrow["order_"]; $cart->due_date = sql2date($myrow["due_date"]); $cart->document_date = sql2date($myrow["tran_date"]); @@ -306,6 +308,8 @@ function read_sales_trans($doc_type, $trans_no, &$cart) @$myrow["src_id"]); } } + $cart->prepayments = get_payments_for($trans_no, $doc_type); + } // !newdoc return true; @@ -405,5 +409,4 @@ function get_sales_child_documents($trans_type, $trans_no) return db_query($sql,"The related credit notes could not be retreived"); } - ?> \ No newline at end of file