Consistent use of return , payment refund handling

This commit is contained in:
Deon George
2013-04-05 23:50:08 +11:00
parent 43dfd88bce
commit 52d9005b64
30 changed files with 255 additions and 210 deletions

View File

@@ -22,7 +22,7 @@ class Controller_Admin_Statement extends Controller_TemplateDefault_Admin {
$ta = array();
foreach ($ao->payment->find_all() as $o) {
if (round($o->total_amt-$o->refund_status,0) == 0)
if ( ! $o->total())
continue;
$i = count($ta);
@@ -49,7 +49,7 @@ class Controller_Admin_Statement extends Controller_TemplateDefault_Admin {
if (isset($v['invoice']))
$t += $v['invoice']->total();
elseif (isset($v['payment']))
$t -= $v['payment']->total_amt-$v['payment']->refund_status;
$t -= $v['payment']->total();
$ta[$k]['total'] = $t;
$a = $v['time'];