git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@93 97e9348a-65ac-dc4b-aefc-98561f571b83
90 lines
3.0 KiB
PHP
90 lines
3.0 KiB
PHP
<?php /* -*- mode:PHP -*- */ ?>
|
|
|
|
<div class="ledger-entry view">
|
|
|
|
<?php
|
|
; // Editor alignment
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* LedgerEntry Detail Main Section
|
|
*/
|
|
|
|
$transaction = $entry['Transaction'];
|
|
$debit_ledger = $entry['DebitLedger'];
|
|
$credit_ledger = $entry['CreditLedger'];
|
|
$source = $entry['MonetarySource'];
|
|
$entry = $entry['LedgerEntry'];
|
|
|
|
$rows = array(array('ID', $entry['id']),
|
|
array('Transaction', $html->link('#'.$transaction['id'],
|
|
array('controller' => 'transactions',
|
|
'action' => 'view',
|
|
$transaction['id']))),
|
|
array('Timestamp', FormatHelper::datetime($transaction['stamp'])),
|
|
array('Monetary Source', (isset($source['id'])
|
|
? $html->link('#'.$source['id'],
|
|
array('controller' => 'monetary_sources',
|
|
'action' => 'view',
|
|
$source['id']))
|
|
: null)),
|
|
array('Amount', FormatHelper::currency($entry['amount'])),
|
|
array('Debit', ($html->link($debit_ledger['Account']['name'],
|
|
array('controller' => 'accounts',
|
|
'action' => 'view',
|
|
$debit_ledger['Account']['id']))
|
|
. ' ('
|
|
. $html->link('#' . $debit_ledger['Account']['id']
|
|
. '-' . $debit_ledger['sequence'],
|
|
array('controller' => 'ledgers',
|
|
'action' => 'view',
|
|
$debit_ledger['id']))
|
|
. ')')),
|
|
array('Credit', ($html->link($credit_ledger['Account']['name'],
|
|
array('controller' => 'accounts',
|
|
'action' => 'view',
|
|
$credit_ledger['Account']['id']))
|
|
. ' ('
|
|
. $html->link('#' . $credit_ledger['Account']['id']
|
|
. '-' . $credit_ledger['sequence'],
|
|
array('controller' => 'ledgers',
|
|
'action' => 'view',
|
|
$credit_ledger['id']))
|
|
. ')')),
|
|
array('Comment', $entry['comment']));
|
|
|
|
|
|
echo $this->element('table',
|
|
array('class' => 'item ledger-entry detail',
|
|
'caption' => 'Ledger Entry Detail',
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value')));
|
|
|
|
|
|
/**********************************************************************
|
|
* LedgerEntry Info Box
|
|
*/
|
|
|
|
?>
|
|
<DIV CLASS="infobox">
|
|
</DIV>
|
|
|
|
<DIV CLASS="detail supporting">
|
|
<?php
|
|
; // Editor alignment
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Supporting Elements Section
|
|
*/
|
|
|
|
|
|
/* End "detail supporting" DIV */ ?>
|
|
</DIV>
|
|
|
|
</div>
|