' . "\n"; /********************************************************************** ********************************************************************** ********************************************************************** ********************************************************************** * Account Detail Main Section */ $ledger = $account['Ledger']; $current_ledger = $account['CurrentLedger']; if (isset($account['Account'])) $account = $account['Account']; $rows = array(); $rows[] = array('Name', $account['name']); $rows[] = array('Type', $account['type']); $rows[] = array('External Name', $account['external_name']); $rows[] = array('External Account', $account['external_account']); $rows[] = array('Comment', $account['comment']); echo $this->element('table', array('class' => 'item account detail', 'caption' => 'Account Detail', 'rows' => $rows, 'column_class' => array('field', 'value'))); /********************************************************************** * Account Info Box */ echo '
' . "\n"; $rows = array(); $rows[] = array('Debits:', FormatHelper::currency($stats['debits'])); $rows[] = array('Credits:', FormatHelper::currency($stats['credits'])); $rows[] = array('Account 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"; /********************************************************************** * Ledgers */ echo $this->element('ledgers', array (// Grid configuration 'config' => array ('caption' => $account['name'] . " Ledgers", 'filter' => array('Account.id' => $account['id']), ))); /********************************************************************** * Current Ledger */ echo $this->element('ledger_entries', array (// Grid configuration 'config' => array ('grid_div_id' => 'ledger-ledger-entry-list', 'caption' => "Current Ledger: #{$current_ledger['sequence']}", 'filter' => array('Ledger.id' => $current_ledger['id']), 'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance', empty($account['receipts']) ? 'Tender' : null), 'include' => array('Debit', 'Credit', 'Sub-Total'), 'limit' => 50, ))); /********************************************************************** * Entire Account */ echo $this->element('ledger_entries', array (// Grid configuration 'config' => array ('grid_div_id' => 'account-ledger-entry-list', 'grid_setup' => array('hiddengrid' => true), 'caption' => "Entire Ledger", 'filter' => array('Account.id' => $account['id']), 'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance', empty($account['receipts']) ? 'Tender' : null), 'include' => array('Transaction', 'Debit', 'Credit', 'Sub-Total'), 'limit' => 50, ))); /* End "detail supporting" div */ echo '
' . "\n"; /* End page div */ echo '' . "\n";