0003954: RB not correct in Customer Transactions Inquiry. Removed RB from customer...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 30 Jul 2017 11:15:04 +0000 (13:15 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 30 Jul 2017 11:15:04 +0000 (13:15 +0200)
sales/includes/db/cust_trans_db.inc
sales/inquiry/customer_inquiry.php

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+
index 7a1cc62b1853c1983a51665024f5b12e87762ed9..d6851aa027d473dad652b79910306dc0f12106b3 100644 (file)
@@ -186,7 +186,7 @@ $sql = get_sql_for_customer_inquiry(get_post('TransAfterDate'), get_post('TransT
        get_post('customer_id'), get_post('filterType'));
 
 //------------------------------------------------------------------------------------------------
-db_query("set @bal:=0");
+//db_query("set @bal:=0");
 
 $cols = array(
        _("Type") => array('fun'=>'systype_name', 'ord'=>''),
@@ -199,7 +199,7 @@ $cols = array(
        _("Branch") => array('ord'=>''), 
        _("Currency") => array('align'=>'center'),
        _("Amount") => array('align'=>'right', 'fun'=>'fmt_amount'), 
-       _("RB") => array('align'=>'right', 'type'=>'amount'),
+//     _("RB") => array('align'=>'right', 'type'=>'amount'),
                array('insert'=>true, 'fun'=>'gl_view'),
                array('insert'=>true, 'fun'=>'credit_link'),
                array('insert'=>true, 'fun'=>'edit_link'),