Eliminated (at least temporarily) the single ledger entry view, redirecting to the double entry view instead.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@601 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-17 06:30:01 +00:00
parent a44654ec01
commit 73c5a20158
2 changed files with 18 additions and 4 deletions

View File

@@ -202,6 +202,13 @@ class LedgerEntriesController extends AppController {
else
$entry['DoubleEntry'] = $entry['DebitDoubleEntry'];
// REVISIT <AP>: 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'));

View File

@@ -103,10 +103,17 @@ echo ('<DIV CLASS="ledger-double-entry">' . "\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 <AP>: 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',