diff --git a/controllers/ledger_entries_controller.php b/controllers/ledger_entries_controller.php index 15ab9d9..d1e7805 100644 --- a/controllers/ledger_entries_controller.php +++ b/controllers/ledger_entries_controller.php @@ -202,6 +202,13 @@ class LedgerEntriesController extends AppController { else $entry['DoubleEntry'] = $entry['DebitDoubleEntry']; + // REVISIT : 20090816 + // This page doesn't seem very useful, let's just keep it + // all to the double entry view. + $this->redirect(array('controller' => 'double_entries', + 'action' => 'view', + $entry['DoubleEntry']['id'])); + // Prepare to render. $title = "Ledger Entry #{$entry['LedgerEntry']['id']}"; $this->set(compact('entry', 'title')); diff --git a/views/double_entries/view.ctp b/views/double_entries/view.ctp index 495fee8..0d1bb44 100644 --- a/views/double_entries/view.ctp +++ b/views/double_entries/view.ctp @@ -103,10 +103,17 @@ echo ('
' . "\n"); foreach ($ledgers AS $type => $ledger) { $rows = array(); - $rows[] = array('ID', $html->link('#' . $entries[$type]['id'], - array('controller' => 'entries', - 'action' => 'view', - $entries[$type]['id']))); + // REVISIT : 20090816 + // Due to low priority, the ledger_entry/double_entry stuff + // is a bit piecemeal at the moment (trying to reuse old + // code as much as possible). So, LedgerEntry view is just + // redirecting here. Of course, presenting a link for the + // LedgerEntry then is, well, quite pointless. + $rows[] = array('ID', '#' . $entries[$type]['id']); +/* $rows[] = array('ID', $html->link('#' . $entries[$type]['id'], */ +/* array('controller' => 'entries', */ +/* 'action' => 'view', */ +/* $entries[$type]['id']))); */ $rows[] = array('Account', $html->link($ledger['Account']['name'], array('controller' => 'accounts', 'action' => 'view',