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");
if ($factor === null)
{
- $myrow = get_sales_type(get_post('sales_type_id'));
+ $myrow = get_sales_type($sales_type_id);
$factor = $myrow['factor'];
}
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 ;
{
$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 {