Files
pmgr/site/views/transactions/deposit_slip.ctp

68 lines
1.8 KiB
PHP

<?php /* -*- mode:PHP -*- */
//style="display:inline;
echo('<H2 style="display:inline;">Deposit Slip: ' .
FormatHelper::datetime($deposit['Transaction']['stamp'])
. '</H2>' . "\n");
/* echo('(' . */
/* FormatHelper::age($deposit['Transaction']['stamp'], 60) */
/* . ')<BR>' . "\n"); */
//pr(compact('deposit'));
// Handle account summaries
$rows = array();
$row_class = array();
foreach ($deposit['types'] AS $type) {
$row_class[] = array();
$rows[] = array($type['name'].':',
FormatHelper::_n($type['count'], 'Item'),
FormatHelper::currency($type['total'], true));
}
$row_class[] = 'grand';
$rows[] = array('Deposit Total:',
null,
FormatHelper::currency($deposit['Transaction']['amount'], true));
echo $this->element('table',
array('class' => 'deposit-summary',
'rows' => $rows,
'row_class' => $row_class,
'column_class' => array('account', 'quantity', 'total'),
'suppress_alternate_rows' => true,
));
// Print out the items of each ledger
if (0) {
foreach ($deposit['types'] AS $type) {
echo $this->element('tenders', array
(// Grid configuration
'config' => array
(
'grid_div_id' => "tenders-{$type['id']}-list",
'caption' => $type['name'] . ' Items',
'filter' => array('deposit_transaction_id'
=> $deposit['Transaction']['id'],
'TenderType.id'
=> $type['id'],
),
'exclude' => array('Type'),
)));
}
}
else {
echo $this->element('tenders', array
(// Grid configuration
'config' => array
(
'caption' => 'Deposited Items',
'filter' => array('deposit_transaction_id'
=> $deposit['Transaction']['id'],
),
)));
}
/* End page div */
//echo '</div>' . "\n";