git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@737 97e9348a-65ac-dc4b-aefc-98561f571b83
127 lines
4.2 KiB
PHP
127 lines
4.2 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="statement-entry view">' . "\n";
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Entry Detail Main Section
|
|
*/
|
|
|
|
$transaction = $entry['Transaction'];
|
|
$account = $entry['Account'];
|
|
$customer = $entry['Customer'];
|
|
$lease = $entry['Lease'];
|
|
$entry = $entry['StatementEntry'];
|
|
|
|
$Ttype = ucwords(strtolower(str_replace('_', ' ', $transaction['type'])));
|
|
|
|
$rows = array();
|
|
$rows[] = array('ID', $entry['id']);
|
|
$rows[] = array($Ttype, $html->link('#'.$transaction['id'],
|
|
array('controller' => 'transactions',
|
|
'action' => 'view',
|
|
$transaction['id'])));
|
|
$rows[] = array('Timestamp', FormatHelper::datetime($transaction['stamp']));
|
|
$rows[] = array('Effective', FormatHelper::date($entry['effective_date']));
|
|
if (in_array($entry['type'], array('CHARGE', 'PAYMENT')))
|
|
$rows[] = array('Through', FormatHelper::date($entry['through_date']));
|
|
$rows[] = array('Type', $entry['type']);
|
|
$rows[] = array('Amount', FormatHelper::currency($entry['amount']));
|
|
$rows[] = array('Account', $html->link($account['name'],
|
|
array('controller' => 'accounts',
|
|
'action' => 'view',
|
|
$account['id'])));
|
|
$rows[] = array('Customer', (isset($customer['name'])
|
|
? $html->link($customer['name'],
|
|
array('controller' => 'customers',
|
|
'action' => 'view',
|
|
$customer['id']))
|
|
: null));
|
|
$rows[] = array('Lease', (isset($lease['id'])
|
|
? $html->link('#'.$lease['number'],
|
|
array('controller' => 'leases',
|
|
'action' => 'view',
|
|
$lease['id']))
|
|
: null));
|
|
$rows[] = array('Comment', $entry['comment']);
|
|
|
|
echo $this->element('table',
|
|
array('class' => 'item statement-entry detail',
|
|
'caption' => 'Statement Entry Detail',
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value')));
|
|
|
|
|
|
/**********************************************************************
|
|
* Entry Info Box
|
|
*/
|
|
|
|
if (strtoupper($entry['type']) === 'CHARGE') {
|
|
$applied_caption = "Disbursements Applied";
|
|
//$remaining_caption = "Charge Balance";
|
|
}
|
|
else {
|
|
$applied_caption = "Disbursed to Charges";
|
|
//$remaining_caption = "Disbursement Balance";
|
|
}
|
|
|
|
$remaining_caption = "Remaining Balance";
|
|
|
|
echo '<div class="infobox">' . "\n";
|
|
|
|
$rows = array();
|
|
$rows[] = array($applied_caption,
|
|
'<SPAN id="statement-entry-applied">' .
|
|
FormatHelper::currency($stats['reconciled']) .
|
|
'</SPAN>');
|
|
$rows[] = array($remaining_caption,
|
|
'<SPAN id="statement-entry-balance">' .
|
|
FormatHelper::currency($stats['balance']) .
|
|
'</SPAN>');
|
|
|
|
echo $this->element('table',
|
|
array('class' => 'item summary',
|
|
'caption' => null,
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value'),
|
|
//'suppress_alternate_rows' => true,
|
|
));
|
|
|
|
echo '</div>' . "\n";
|
|
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Supporting Elements Section
|
|
*/
|
|
|
|
echo '<div CLASS="detail supporting">' . "\n";
|
|
|
|
|
|
/**********************************************************************
|
|
* Reconciliation Ledger Entries
|
|
*/
|
|
|
|
echo $this->element('statement_entries', array
|
|
(// Element configuration
|
|
'statement_entry_id' => $entry['id'],
|
|
/* 'action' => 'reconcile', */
|
|
|
|
// Grid configuration
|
|
'config' => array
|
|
('caption' => $applied_caption,
|
|
//'filter' => array('id' => $entry['id']),
|
|
'exclude' => array('Transaction'),
|
|
)));
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|