' . "\n"; /********************************************************************** ********************************************************************** ********************************************************************** ********************************************************************** * LedgerEntry Detail Main Section */ $transaction = $entry['Transaction']; $debit_ledger = $entry['DebitLedger']; $credit_ledger = $entry['CreditLedger']; $source = $entry['MonetarySource']; $entry = $entry['LedgerEntry']; $rows = array(array('ID', $entry['id']), array('Transaction', $html->link('#'.$transaction['id'], array('controller' => 'transactions', 'action' => 'view', $transaction['id']))), array('Timestamp', FormatHelper::datetime($transaction['stamp'])), array('Monetary Source', (isset($source['id']) ? $html->link('#'.$source['id'], array('controller' => 'monetary_sources', 'action' => 'view', $source['id'])) : null)), array('Amount', FormatHelper::currency($entry['amount'])), array('Debit', ($html->link($debit_ledger['Account']['name'], array('controller' => 'accounts', 'action' => 'view', $debit_ledger['Account']['id'])) . ' (' . $html->link('#' . $debit_ledger['Account']['id'] . '-' . $debit_ledger['sequence'], array('controller' => 'ledgers', 'action' => 'view', $debit_ledger['id'])) . ')')), array('Credit', ($html->link($credit_ledger['Account']['name'], array('controller' => 'accounts', 'action' => 'view', $credit_ledger['Account']['id'])) . ' (' . $html->link('#' . $credit_ledger['Account']['id'] . '-' . $credit_ledger['sequence'], array('controller' => 'ledgers', 'action' => 'view', $credit_ledger['id'])) . ')')), array('Comment', $entry['comment'])); echo $this->element('table', array('class' => 'item ledger-entry detail', 'caption' => 'Ledger Entry Detail', 'rows' => $rows, 'column_class' => array('field', 'value'))); /********************************************************************** * LedgerEntry Info Box */ echo '
' . "\n"; $rows = array(); if ($debit_ledger['Account']['trackable']) { $rows[] = array('Debit Amount Reconciled:', FormatHelper::currency($stats['debit_amount_reconciled'])); $rows[] = array('Debit Amount Remaining:', FormatHelper::currency($stats['debit_amount_remaining'])); } if ($credit_ledger['Account']['trackable']) { $rows[] = array('Credit Amount Reconciled:', FormatHelper::currency($stats['credit_amount_reconciled'])); $rows[] = array('Credit Amount Remaining:', FormatHelper::currency($stats['credit_amount_remaining'])); } 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"; /********************************************************************** * Reconciliation Ledger Entries */ echo $this->element('ledger_entries', array('caption' => "Debit Applications", 'grid_div_id' => 'debit_reconciliation_ledger_entries', //'ledger_id' => $debit_ledger['id'], //'account_type' => $debit_ledger['Account']['type'], 'account_ftype' => 'debit', 'reconcile_id' => $entry['id'], 'ledger_entries' => $reconciled['debit']['entry'], )); echo $this->element('ledger_entries', array('caption' => "Credit Applications", 'grid_div_id' => 'credit_reconciliation_ledger_entries', //'ledger_id' => $credit_ledger['id'], //'account_type' => $credit_ledger['Account']['type'], //'account_ftype' => 'debit', // Looking for debits to match this credit 'account_ftype' => 'credit', 'reconcile_id' => $entry['id'], 'ledger_entries' => $reconciled['credit']['entry'], )); /* End "detail supporting" div */ echo '
' . "\n"; /* End page div */ echo '' . "\n";