X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep101.php;h=0ea49173927f9df340daa5f106b76f273f328aab;hb=b14f304532b7d124e79ee2a03d60a0850c8a417d;hp=667604c86c32621c7f72cd7e67ca95b5ce35c719;hpb=1b9208f6334e4371fa433d3b6cdc506ae0f95f98;p=fa-stable.git diff --git a/reporting/rep101.php b/reporting/rep101.php index 667604c8..0ea49173 100644 --- a/reporting/rep101.php +++ b/reporting/rep101.php @@ -172,16 +172,16 @@ function print_customer_balances() $bal = get_open_balance($myrow['debtor_no'], $from); $init = array(); - $init[0] = round2(abs($bal['charges']*$rate), $dec); - $init[1] = round2(abs($bal['credits']*$rate), $dec); - $init[2] = round2($bal['Allocated']*$rate, $dec); + $init[0] = round2(($bal != false ? abs($bal['charges']) : 0)*$rate, $dec); + $init[1] = round2(($bal != false ? abs($bal['credits']) : 0)*$rate, $dec); + $init[2] = round2(($bal != false ? $bal['Allocated'] : 0)*$rate, $dec); if ($show_balance) { $init[3] = $init[0] - $init[1]; $accumulate += $init[3]; } else - $init[3] = round2($bal['OutStanding']*$rate, $dec); + $init[3] = round2(($bal != false ? $bal['OutStanding'] : 0)*$rate, $dec); $res = get_transactions($myrow['debtor_no'], $from, $to); if ($no_zeros && db_num_rows($res) == 0) continue;