From ed57b5fc67cb84b4e5929f3a9c40054714aff40c Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Thu, 3 May 2012 01:03:08 +0200 Subject: [PATCH] Cosmetic fix in viewing supp invoice payments section. --- includes/ui/ui_view.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index e366af36..8ffad405 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -500,9 +500,10 @@ function display_allocations($alloc_result, $total, $payments=false) label_cell(sql2date($alloc_row['tran_date'])); $alloc_row['Total'] = round2($alloc_row['Total'], user_price_dec()); $alloc_row['amt'] = round2($alloc_row['amt'], user_price_dec()); + if ($payments && ($alloc_row['type'] == ST_SUPPAYMENT || $alloc_row['type'] == ST_BANKPAYMENT)) + $alloc_row['Total'] = -$alloc_row['Total']; amount_cell($alloc_row['Total']); - //amount_cell($alloc_row['Total'] - $alloc_row['PrevAllocs'] - $alloc_row['amt']); - amount_cell($alloc_row['Total'] - $alloc_row['amt']); + amount_cell($alloc_row['Total'] - $alloc_row['amt']); amount_cell($alloc_row['amt']); end_row(); -- 2.30.2