From 4cab2c09c16a0a67041b2a808015f68daec60499 Mon Sep 17 00:00:00 2001 From: abijah Date: Thu, 23 Jul 2009 23:54:40 +0000 Subject: [PATCH] Fixed some minor display issues and tweaks to compensate for the new stats() algorithm. More are necessary, I'm sure. git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@375 97e9348a-65ac-dc4b-aefc-98561f571b83 --- controllers/statement_entries_controller.php | 6 +++++- views/statement_entries/view.ctp | 14 +++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/controllers/statement_entries_controller.php b/controllers/statement_entries_controller.php index 21660a2..b272472 100644 --- a/controllers/statement_entries_controller.php +++ b/controllers/statement_entries_controller.php @@ -244,7 +244,11 @@ class StatementEntriesController extends AppController { /* } */ $stats = $this->StatementEntry->stats($id); - //pr($stats); + + if (strtoupper($entry['StatementEntry']['type']) === 'CHARGE') + $stats = $stats['Charge']; + else + $stats = $stats['Payment']; // Prepare to render. $title = "Statement Entry #{$entry['StatementEntry']['id']}"; diff --git a/views/statement_entries/view.ctp b/views/statement_entries/view.ctp index 12ed4df..d1211a3 100644 --- a/views/statement_entries/view.ctp +++ b/views/statement_entries/view.ctp @@ -55,10 +55,18 @@ echo $this->element('table', * Entry Info Box */ -echo '
' . "\n"; +if (strtoupper($entry['type']) === 'CHARGE') { + $applied_caption = "Payments Applied"; + //$remaining_caption = "Charge Balance"; +} +else { + $applied_caption = "Applied to Charges"; + //$remaining_caption = "Payment Balance"; +} -$applied_caption = "Applied"; -$remaining_caption = "Balance"; +$remaining_caption = "Remaining Balance"; + +echo '
' . "\n"; $rows = array(); $rows[] = array($applied_caption,