0003954: RB not correct in Customer Transactions Inquiry. Removed RB from customer...
[fa-stable.git] / sales / includes / db / cust_trans_db.inc
index 5cba6490a1d0da2ef6f0326590c1d269899eb5e2..52fce9e2df8d243ae24eb4c281bb28061e506a98 100644 (file)
@@ -320,8 +320,8 @@ function get_sql_for_customer_inquiry($from, $to, $cust_id = ALL_TEXT, $filter =
                debtor.debtor_no,
                IF(prep_amount, prep_amount, trans.ov_amount + trans.ov_gst + trans.ov_freight 
                        + trans.ov_freight_tax + trans.ov_discount)     AS TotalAmount, "; 
-       if ($filter != ALL_TEXT)
-               $sql .= "@bal := @bal+IF(prep_amount, prep_amount, trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount), ";
+//     if ($filter != ALL_TEXT)
+//             $sql .= "@bal := @bal+IF(prep_amount, prep_amount, trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount), ";
 
 //     else
 //             $sql .= "IF(trans.type=".ST_CUSTDELIVERY.",'', IF(trans.type=".ST_SALESINVOICE." OR trans.type=".ST_BANKPAYMENT.",@bal := @bal+