git-svn-id: file:///svn-source/pmgr/branches/v0.3_work/site@998 97e9348a-65ac-dc4b-aefc-98561f571b83
158 lines
5.0 KiB
PHP
158 lines
5.0 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('Since', FormatHelper::date($since, true));
|
|
if (!empty($until))
|
|
$rows[] = array('Until', FormatHelper::date($until, true));
|
|
$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('Charges:', FormatHelper::currency($stats['charges']));
|
|
//$rows[] = array('Payments:', FormatHelper::currency($stats['disbursements']));
|
|
$rows[] = array('Balance Owed:', 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";
|
|
|
|
|
|
/**********************************************************************
|
|
* Unpaid Charges
|
|
*/
|
|
|
|
echo $this->element('statement_entries', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => 'Outstanding Charges',
|
|
'limit' => 10,
|
|
'action' => 'unreconciled',
|
|
'filter' => array('StatementEntry.customer_id' => $customer['Customer']['id']),
|
|
'exclude' => array('Customer'),
|
|
)));
|
|
|
|
|
|
/**********************************************************************
|
|
* Customer Credits
|
|
*/
|
|
|
|
echo $this->element('statement_entries', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => 'Oustanding Credits',
|
|
'grid_div_id' => 'surplus',
|
|
'limit' => 10,
|
|
'filter' => array('Customer.id' => $customer['Customer']['id'],
|
|
'StatementEntry.type' => 'SURPLUS'),
|
|
'exclude' => array('Entry', 'Effective', 'Customer', 'Unit', 'Account', 'Debit', 'Credit'),
|
|
'include' => array('Transaction', 'Amount'),
|
|
'remap' => array('Transaction' => 'Receipt'),
|
|
)));
|
|
|
|
|
|
/**********************************************************************
|
|
* Receipt History
|
|
*/
|
|
|
|
echo $this->element('ledger_entries', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => 'Receipts',
|
|
'limit' => 5,
|
|
'filter' => array('Customer.id' => $customer['Customer']['id'],
|
|
'Transaction.type' => 'RECEIPT',
|
|
'Tender.id !=' => null,
|
|
//'Account.id !=' => '-AR-'
|
|
),
|
|
'include' => array('Transaction'),
|
|
'exclude' => array('Entry', 'Account', 'Cr/Dr'),
|
|
'remap' => array('Transaction' => 'Receipt'),
|
|
)));
|
|
|
|
|
|
/**********************************************************************
|
|
* Lease History
|
|
*/
|
|
|
|
echo $this->element('leases', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => 'Lease History',
|
|
'limit' => 5,
|
|
'filter' => array('Customer.id' => $customer['Customer']['id']),
|
|
'exclude' => array('Customer'),
|
|
'sort_column' => 'Move-In',
|
|
'sort_order' => 'DESC',
|
|
)));
|
|
|
|
|
|
/**********************************************************************
|
|
* Contacts
|
|
*/
|
|
|
|
echo $this->element('contacts', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => 'Customer Contacts',
|
|
'limit' => 5,
|
|
'filter' => array('Customer.id' => $customer['Customer']['id']),
|
|
'include' => array('Relationship'),
|
|
)));
|
|
|
|
|
|
/**********************************************************************
|
|
* Customer Account History
|
|
*/
|
|
|
|
echo $this->element('statement_entries', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => 'Customer Statement',
|
|
'filter' => array('Customer.id' => $customer['Customer']['id'],
|
|
'type !=' => 'VOID'),
|
|
//'include' => array('Sub-Total'),
|
|
'exclude' => array('Customer'),
|
|
)));
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|