git-svn-id: file:///svn-source/pmgr/branches/initial_20090526/site@15 97e9348a-65ac-dc4b-aefc-98561f571b83
58 lines
2.2 KiB
PHP
58 lines
2.2 KiB
PHP
<div class="ledgers view">
|
|
<h2><?php __('Ledgers'); ?></h2>
|
|
|
|
<table cellpadding="0" cellspacing="0">
|
|
<?php
|
|
if (isset($paginator)) {
|
|
echo $paginator->counter(array(
|
|
'format' => __('Page %page% of %pages%, showing %current% records (%start% - %end%) of %count% total', true)));
|
|
|
|
$cells = array($paginator->sort('id'),
|
|
$paginator->sort('charge_type_id'),
|
|
$paginator->sort('lease_id'),
|
|
$paginator->sort('charge_date'),
|
|
$paginator->sort('charge_to_date'),
|
|
$paginator->sort('due_date'),
|
|
$paginator->sort('amount'),
|
|
$paginator->sort('tax'),
|
|
$paginator->sort('total'),
|
|
$paginator->sort('comment'));
|
|
} else {
|
|
$cells = array('Id', 'Type', 'Lease', 'Date', 'Through', 'Due', 'Amount', 'Tax', 'Total', 'Comment');
|
|
}
|
|
echo $html->tableHeaders($cells);
|
|
|
|
$cells = array();
|
|
foreach ($ledgers as $ledger) {
|
|
$cells[] = array($html->link($ledger['Charge']['id'],
|
|
array('controller' => 'transactions',
|
|
'action' => 'view',
|
|
$ledger['Charge']['id'])),
|
|
$ledger['Charge']['charge_type_id'],
|
|
$ledger['Charge']['lease_id'],
|
|
$ledger['Charge']['charge_date'],
|
|
$ledger['Charge']['charge_to_date'],
|
|
$ledger['Charge']['due_date'],
|
|
$ledger['Charge']['amount'],
|
|
$ledger['Charge']['tax'],
|
|
$ledger['Charge']['total'],
|
|
$ledger['Charge']['comment']);
|
|
}
|
|
echo $html->tableCells($cells, null, array('class' => "altrow"));
|
|
?>
|
|
</table>
|
|
|
|
<?php
|
|
if (isset($paginator)) {
|
|
echo('<div class="paging">' . "\n");
|
|
echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));
|
|
echo(' | ');
|
|
echo $paginator->numbers();
|
|
echo(' | ');
|
|
echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));
|
|
echo('</div>' . "\n");
|
|
}
|
|
?>
|
|
|
|
|
|
</DIV>
|