Files
pmgr/site/views/ledger_entries/view.ctp

79 lines
2.7 KiB
PHP

<?php /* -*- mode:PHP -*- */
echo '<div class="ledger-entry view">' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Ledger Entry Detail Main Section
*/
$transaction = $entry['Transaction'];
$ledger = $entry['Ledger'];
$account = $ledger['Account'];
$tender = $entry['Tender'];
$matching = $entry['MatchingEntry'];
$entry = $entry['LedgerEntry'];
$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('Amount', FormatHelper::currency($entry['amount']));
$rows[] = array('Tender', $html->link($tender['name'],
array('controller' => 'tenders',
'action' => 'view',
$tender['id'])));
$rows[] = array('Account', $html->link($account['name'],
array('controller' => 'accounts',
'action' => 'view',
$account['id'])));
$rows[] = array('Ledger', $html->link($ledger['name'],
array('controller' => 'ledgers',
'action' => 'view',
$ledger['id'])));
$rows[] = array('Cr/Dr', ($entry['crdr'] .
' (Matching ' . $matching['crdr'] . ': ' .
$html->link('#'.$matching['id'],
array('controller' => 'ledger_entries',
'action' => 'view',
$matching['id'])) .
')'));
$rows[] = array('Comment', $entry['comment']);
echo $this->element('table',
array('class' => 'item entry detail',
'caption' => 'Ledger Entry Detail',
'rows' => $rows,
'column_class' => array('field', 'value')));
/**********************************************************************
* Entry Info Box
*/
echo '<div class="infobox">' . "\n";
echo '</div>' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Supporting Elements Section
*/
echo '<div CLASS="detail supporting">' . "\n";
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";