Files
pmgr/site/views/customers/view.ctp
2009-08-04 22:12:32 +00:00

124 lines
3.9 KiB
PHP

<?php /* -*- mode:PHP -*- */
echo '<div class="customer view">' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Customer Detail Main Section
*/
$rows = array();
$rows[] = array('Name', $customer['Customer']['name']);
$rows[] = array('Comment', $customer['Customer']['comment']);
echo $this->element('table',
array('class' => 'item customer detail',
'caption' => 'Customer Info',
'rows' => $rows,
'column_class' => array('field', 'value')));
/**********************************************************************
* Customer Info Box
*/
echo '<div class="infobox">' . "\n";
$rows = array();
$rows[] = array('Security Deposit:', FormatHelper::currency($outstandingDeposit));
$rows[] = array('Balance:', FormatHelper::currency($outstandingBalance));
echo $this->element('table',
array('class' => 'summary',
'rows' => $rows,
'column_class' => array('field', 'value'),
'suppress_alternate_rows' => true,
));
echo '</div>' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Supporting Elements Section
*/
echo '<div CLASS="detail supporting">' . "\n";
/**********************************************************************
* Contacts
*/
echo $this->element('contacts', array
(// Grid configuration
'config' => array
('caption' => 'Customer Contacts',
'filter' => array('Customer.id' => $customer['Customer']['id']),
'include' => array('Type', 'Active'),
)));
/**********************************************************************
* Lease History
*/
echo $this->element('leases', array
(// Grid configuration
'config' => array
('caption' => 'Lease History',
'filter' => array('Customer.id' => $customer['Customer']['id']),
'exclude' => array('Customer'),
)));
/**********************************************************************
* Customer Account History
*/
echo $this->element('statement_entries', array
(// Grid configuration
'config' => array
('caption' => 'Account',
'filter' => array('Customer.id' => $customer['Customer']['id'],
'type !=' => 'VOID'),
'exclude' => array('Customer'),
'sort_column' => 'Date',
'sort_order' => 'DESC',
)));
/**********************************************************************
* Customer Ledger History
*/
/*
* REVISIT <AP>: 20090724
* It's not my intention to really include this, as I believe it
* just will confuse folks. However, I've added it at the moment
* to help me see the picture of what's happening. It may prove
* useful with respect to identifying pre-payments, so after using
* it for a while, maybe we can get a feeling for that. I suspect
* it will be MUCH more useful just to add the pre-pay amount to
* the info box, or provide a list of ledger entries that are JUST
* pre-payments. We'll see...
*/
echo $this->element('ledger_entries', array
(// Grid configuration
'config' => array
('caption' => 'Ledger Entries',
'filter' => array('Customer.id' => $customer['Customer']['id'],
'Account.id !=' => '-AR-'),
'exclude' => array('Customer'),
'sort_column' => 'Date',
'sort_order' => 'DESC',
)));
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";