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+
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'=>''),
_("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'),