' . "\n"; /********************************************************************** ********************************************************************** ********************************************************************** ********************************************************************** * Transaction Detail Main Section */ $account = $transaction['Account']; $ledger = $transaction['Ledger']; $nsf_tender = $transaction['NsfTender']; if (isset($transaction['Transaction'])) $transaction = $transaction['Transaction']; $rows = array(); $rows[] = array('ID', $transaction['id']); $rows[] = array('Type', str_replace('_', ' ', $transaction['type'])); $rows[] = array('Timestamp', FormatHelper::datetime($transaction['stamp'])); $rows[] = array('Amount', FormatHelper::currency($transaction['amount'])); $rows[] = array('Account', ($account['link'] ? $html->link($account['name'], array('controller' => 'accounts', 'action' => 'view', $account['id'])) : $account['name'])); if (!empty($nsf_tender['id'])) $rows[] = array('NSF Tender', $html->link($nsf_tender['name'], array('controller' => 'tenders', 'action' => 'view', $nsf_tender['id']))); $rows[] = array('Comment', $transaction['comment']); echo $this->element('table', array('class' => 'item transaction detail', 'caption' => 'Transaction Detail', 'rows' => $rows, 'column_class' => array('field', 'value'))); /********************************************************************** * Transaction Info Box */ echo '
' . "\n"; $rows = array(); $rows[] = array('Total:', FormatHelper::currency($transaction['amount'])); 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"; /********************************************************************** * Statement Entries */ if ($transaction['type'] === 'INVOICE' || $transaction['type'] === 'RECEIPT' || $transaction['type'] === 'CREDIT_NOTE' || $transaction['type'] === 'PAYMENT' ) { echo $this->element('statement_entries', array (// Grid configuration 'config' => array ( 'caption' => 'Statement Entries', 'filter' => array('Transaction.id' => $transaction['id'], 'type !=' => 'VOID'), 'exclude' => array('Transaction', 'Debit', 'Credit'), 'include' => array('Amount'), ))); } /********************************************************************** * Ledger Entries */ echo $this->element('ledger_entries', array (// Grid configuration 'config' => array ( 'caption' => 'Ledger Entries', 'filter' => array('Transaction.id' => $transaction['id'], 'Account.id !=' => $account['id']), 'exclude' => array('Transaction'), ))); /* /\********************************************************************** */ /* * Tenders Deposited */ /* *\/ */ /* if ($transaction['type'] === 'DEPOSIT') { */ /* echo $this->element('tenders', array */ /* (// Grid configuration */ /* 'config' => array */ /* ( */ /* 'caption' => 'Deposited Items', */ /* 'filter' => array('deposit_transaction_id' => $transaction['id']), */ /* ))); */ /* } */ /* End "detail supporting" div */ echo '
' . "\n"; /* End page div */ echo '' . "\n";