X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fdb%2Fcust_trans_details_db.inc;h=f34226241ca5c1a7cfe4f51c92c8c549436e62a2;hb=df671df0181c7b578bb75e07e581c5e9878e2aaa;hp=a4c76b11f3b4159fce50f8c32780e7cea0bb610e;hpb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;p=fa-stable.git diff --git a/sales/includes/db/cust_trans_details_db.inc b/sales/includes/db/cust_trans_details_db.inc index a4c76b11..f3422624 100644 --- a/sales/includes/db/cust_trans_details_db.inc +++ b/sales/includes/db/cust_trans_details_db.inc @@ -16,11 +16,15 @@ function get_customer_trans_details($debtor_trans_type, $debtor_trans_no) if (!is_array($debtor_trans_no)) $debtor_trans_no = array( 0=>$debtor_trans_no ); - $sql = "SELECT ".TB_PREF."debtor_trans_details.*, - ".TB_PREF."debtor_trans_details.unit_price+".TB_PREF."debtor_trans_details.unit_tax AS FullUnitPrice, - ".TB_PREF."debtor_trans_details.description As StockDescription, - ".TB_PREF."stock_master.units, ".TB_PREF."stock_master.mb_flag - FROM ".TB_PREF."debtor_trans_details, ".TB_PREF."stock_master + $sql = "SELECT line.*, + line.unit_price+line.unit_tax AS FullUnitPrice, + line.unit_price AS UnitPriceExTax, + line.description AS StockDescription, + item.long_description AS StockLongDescription, + item.units, item.mb_flag + FROM " + .TB_PREF."debtor_trans_details line," + .TB_PREF."stock_master item WHERE ("; $tr=array(); @@ -31,7 +35,7 @@ if (!is_array($debtor_trans_no)) $sql.= ") AND debtor_trans_type=".db_escape($debtor_trans_type)." - AND ".TB_PREF."stock_master.stock_id=".TB_PREF."debtor_trans_details.stock_id + AND item.stock_id=line.stock_id ORDER BY id"; return db_query($sql, "The debtor transaction detail could not be queried"); }