+ $bal = get_open_balance($myrow['supplier_id'], $from, $convert);
+ $init[0] = $init[1] = 0.0;
+ $rep->TextCol(3, 4, _("Open Balance"));
+ $init[0] = round2(abs($bal['charges']), $dec);
+ $rep->AmountCol(4, 5, $init[0], $dec);
+ $init[1] = round2(Abs($bal['credits']), $dec);
+ $rep->AmountCol(5, 6, $init[1], $dec);
+ $init[2] = round2($bal['Allocated'], $dec);
+ $rep->AmountCol(6, 7, $init[2], $dec);
+ $init[3] = round2($bal['OutStanding'], $dec);;
+ $rep->AmountCol(7, 8, $init[3], $dec);
+ $total = array(0,0,0,0);
+ for ($i = 0; $i < 4; $i++)
+ {
+ $total[$i] += $init[$i];
+ $grandtotal[$i] += $init[$i];
+ }