From: Janusz Dobrowolski Date: Wed, 6 Feb 2008 18:56:42 +0000 (+0000) Subject: Sql TB_PREF corrections X-Git-Tag: v2.4.2~19^2~2234 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=a1e1eb5f69391bf58de97795390399535bfc2532;p=fa-stable.git Sql TB_PREF corrections --- diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index ac892394..c97930ee 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -179,7 +179,6 @@ if (isset($_GET['InvoiceNumber']) && $_GET['InvoiceNumber'] > 0) $myrow["FullUnitPrice"],$myrow["discount_percent"],$myrow["qty_done"], $myrow["standard_cost"],$myrow["description"],$myrow["id"]); - $_SESSION['Items']->line_items[$_SESSION['Items']->lines_on_order]->standard_cost = $myrow["standard_cost"]; } diff --git a/sales/includes/db/sales_delivery_db.inc b/sales/includes/db/sales_delivery_db.inc index 5ab4180b..a53a8de0 100644 --- a/sales/includes/db/sales_delivery_db.inc +++ b/sales/includes/db/sales_delivery_db.inc @@ -123,7 +123,8 @@ function void_sales_delivery($type, $type_no) function get_sales_delivery($trans_no) { - $sql = "SELECT ".TB_PREF."debtor_trans.*, cust_branch.*, + $sql = "SELECT ".TB_PREF."debtor_trans.*, + ".TB_PREF."cust_branch.*, ".TB_PREF."debtors_master.name, ".TB_PREF."debtors_master.curr_code, ".TB_PREF."debtors_master.payment_terms, diff --git a/sales/includes/db/sales_invoice_db.inc b/sales/includes/db/sales_invoice_db.inc index 49f9252f..55dc0bb0 100644 --- a/sales/includes/db/sales_invoice_db.inc +++ b/sales/includes/db/sales_invoice_db.inc @@ -4,7 +4,7 @@ function set_invoice_links(&$cart, $invoice) { $del = $cart->trans_no; if(is_array($del)) $del = $del[0]; - $sql = 'UPDATE debtor_trans SET trans_link = ' . $del . + $sql = 'UPDATE '.TB_PREF.'debtor_trans SET trans_link = ' . $del . ' WHERE type=10 AND trans_no='.$invoice; db_query($sql, 'Invoice link cannot be updated'); @@ -17,7 +17,7 @@ function set_invoice_links(&$cart, $invoice) { } - $sql = 'UPDATE debtor_trans SET trans_link = ' . $invoice . + $sql = 'UPDATE '.TB_PREF.'debtor_trans SET trans_link = ' . $invoice . ' WHERE type=13 AND ('; $deliveries = $cart->trans_no;