Files
pmgr/views/statement_entries/view.ctp
abijah f52fba96c1 Making progress. Much still to do, but there are hints of functionality finally returning so I'm snapshotting.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@360 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-07-21 10:23:52 +00:00

115 lines
3.7 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'];
$rows = array();
$rows[] = array('ID', $entry['id']);
$rows[] = array('Transaction', $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']));
$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['id'],
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
*/
echo '<div class="infobox">' . "\n";
$applied_caption = "Applied";
$remaining_caption = "Balance";
$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' => 'Entries Applied',
),
));
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";