git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1032 97e9348a-65ac-dc4b-aefc-98561f571b83
76 lines
2.3 KiB
PHP
76 lines
2.3 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
//style="display:inline;
|
|
echo('<H2 style="display:inline;">Deposit Slip: ' .
|
|
FormatHelper::date($deposit['Transaction']['stamp'])
|
|
. '</H2><br>' . "\n");
|
|
/* echo('(' . */
|
|
/* FormatHelper::age($deposit['Transaction']['stamp'], 60) */
|
|
/* . ')<BR>' . "\n"); */
|
|
if ($deposit['Account']['external_name'] || $deposit['Account']['external_account']) {
|
|
echo('<H2 style="display:inline;">' .
|
|
($deposit['Account']['external_name'] ? $deposit['Account']['external_name'] : '') .
|
|
($deposit['Account']['external_name'] && $deposit['Account']['external_account'] ? ': ' : '') .
|
|
($deposit['Account']['external_account'] ? 'Account #' . $deposit['Account']['external_account'] : '') .
|
|
'</H2><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',
|
|
'sort_column' => 'Item',
|
|
'filter' => array('deposit_transaction_id'
|
|
=> $deposit['Transaction']['id'],
|
|
),
|
|
)));
|
|
}
|
|
|
|
/* End page div */
|
|
//echo '</div>' . "\n";
|