From: Joe Hunt Date: Wed, 2 May 2012 23:03:08 +0000 (+0200) Subject: Cosmetic fix in viewing supp invoice payments section. X-Git-Tag: 2.3-final~451 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=ed57b5fc67cb84b4e5929f3a9c40054714aff40c;p=fa-stable.git Cosmetic fix in viewing supp invoice payments section. --- 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();