Files
pmgr/views/transactions/view.ctp

76 lines
2.4 KiB
PHP

<?php /* -*- mode:PHP -*- */
echo '<div class="transaction view">' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Transaction Detail Main Section
*/
$rows = array(array('ID', $transaction['Transaction']['id']),
array('Timestamp', FormatHelper::datetime($transaction['Transaction']['stamp'])),
array('Due', FormatHelper::date($transaction['Transaction']['due_date'])),
array('Comment', $transaction['Transaction']['comment']));
echo $this->element('table',
array('class' => 'item transaction detail',
'caption' => 'Transaction Detail',
'rows' => $rows,
'column_class' => array('field', 'value')));
/**********************************************************************
* Transaction Info Box
*/
echo '<div class="infobox">' . "\n";
$rows = array();
$rows[] = array('Total:', FormatHelper::currency($total));
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";
/**********************************************************************
* Entries
*/
echo $this->element('ledger_entries', array
(// Element configuration
'transaction_id' => $transaction['Transaction']['id'],
// Default for grouping by transaction is already false,
// but we'll get explicit here, since we clearly want to
// see all of the ledger entries not grouped by tx.
'group_by_tx' => false,
// Grid configuration
'config' => array
(
'caption' => 'Entries in Transaction',
),
));
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";