' . "\n"; /********************************************************************** ********************************************************************** ********************************************************************** ********************************************************************** * Ledger Detail Main Section */ $account = $ledger['Account']; //$close = $ledger['CloseTransaction']; if (isset($ledger['Ledger'])) $ledger = $ledger['Ledger']; $rows = array(); $rows[] = array('Account', $html->link($account['name'], array('controller' => 'accounts', 'action' => 'view', $account['id']))); $rows[] = array('Sequence', $ledger['sequence']); $rows[] = array('Status', $ledger['close_transaction_id'] ? 'Closed' : 'Open'); $rows[] = array('Comment', $ledger['comment']); echo $this->element('table', array('class' => 'item ledger detail', 'caption' => 'Ledger Detail', 'rows' => $rows, 'column_class' => array('field', 'value'))); /********************************************************************** * Ledger Info Box */ echo '
' . "\n"; $rows = array(); $rows[] = array('Debits:', FormatHelper::currency($stats['debits'])); $rows[] = array('Credits:', FormatHelper::currency($stats['credits'])); $rows[] = array('Ledger Balance:', FormatHelper::currency($stats['balance'])); echo $this->element('table', array('class' => 'summary', 'rows' => $rows, 'column_class' => array('field', 'value'), 'suppress_alternate_rows' => true, )); echo '
' . "\n"; /********************************************************************** ********************************************************************** ********************************************************************** ********************************************************************** * Supporting Elements Section */ echo '
' . "\n"; /********************************************************************** * Ledger Entries */ echo $this->element('ledger_entries', array (// Grid configuration 'config' => array ('caption' => "Ledger Entries", 'filter' => array('Ledger.id' => $ledger['id']), 'exclude' => array('Ledger', 'Account', 'Amount', 'Cr/Dr', 'Balance', empty($account['receipts']) ? 'Tender' : null), 'include' => array('Debit', 'Credit', 'Sub-Total'), 'limit' => 50, ))); /* End "detail supporting" div */ echo '
' . "\n"; /* End page div */ echo '' . "\n";