X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fsales_db.inc;h=4f98c78fc6ab5df0774ae38db8edd43026f9c213;hb=b41f81ed2c825462ec293ff11521320606bdeb8e;hp=acdc245cc0acca3be287c904422dd41ed11135f0;hpb=b985bcd1e2fc62418513612fcc7eb1c8b353f0f5;p=fa-stable.git diff --git a/sales/includes/sales_db.inc b/sales/includes/sales_db.inc index acdc245c..4f98c78f 100644 --- a/sales/includes/sales_db.inc +++ b/sales/includes/sales_db.inc @@ -7,6 +7,7 @@ include_once($path_to_root . "/sales/includes/db/sales_credit_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_invoice_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_delivery_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_types_db.inc"); +include_once($path_to_root . "/sales/includes/db/sales_points_db.inc"); include_once($path_to_root . "/sales/includes/db/custalloc_db.inc"); include_once($path_to_root . "/sales/includes/db/cust_trans_db.inc"); include_once($path_to_root . "/sales/includes/db/cust_trans_details_db.inc"); @@ -54,7 +55,7 @@ function get_price ($stock_id, $currency, $sales_type_id, $factor=null, $date=nu if ($factor === null) { - $myrow = get_sales_type(get_post('sales_type_id')); + $myrow = get_sales_type($sales_type_id); $factor = $myrow['factor']; } @@ -125,7 +126,7 @@ function set_document_parent($cart) if (count($cart->src_docs) == 1) { // if this child document has only one parent - update child link - $del_no = key($cart->src_docs); + $del_no = reset(array_keys($cart->src_docs)); $sql = 'UPDATE '.TB_PREF.'debtor_trans SET trans_link = ' . $del_no . ' WHERE type='.$cart->trans_type.' AND trans_no='. $inv_no ; @@ -169,7 +170,7 @@ function update_parent_line($doc_type, $line_id, $qty_dispatched) { $doc_type = get_parent_type($doc_type); - //echo "update line: $line_id, $doc_type, $qty_dispatch"; +// echo "update line: $line_id, $doc_type, $qty_dispatched"; if ($doc_type==0) return false; else {