From 2d3b962fe197866cd1b6826b2e74c16705b0afc9 Mon Sep 17 00:00:00 2001 From: abijah Date: Sun, 23 Aug 2009 01:08:30 +0000 Subject: [PATCH] Removing, or at least phasing out the ledger name field. Account name is always needed and nearby, so ledger name is just confusing. git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@740 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/controllers/transactions_controller.php | 2 +- site/views/accounts/view.ctp | 5 ++--- site/views/ledger_entries/view.ctp | 2 +- site/views/transactions/view.ctp | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/site/controllers/transactions_controller.php b/site/controllers/transactions_controller.php index 0ea74b9..e80085c 100644 --- a/site/controllers/transactions_controller.php +++ b/site/controllers/transactions_controller.php @@ -398,7 +398,7 @@ class TransactionsController extends AppController { array('contain' => array(// Models 'Account(id,name)', - 'Ledger(id,name)', + 'Ledger(id,sequence)', 'NsfTender(id,name)', ), 'conditions' => array(array('Transaction.id' => $id), diff --git a/site/views/accounts/view.ctp b/site/views/accounts/view.ctp index a5d7377..6ced628 100644 --- a/site/views/accounts/view.ctp +++ b/site/views/accounts/view.ctp @@ -77,9 +77,8 @@ echo $this->element('ledger_entries', array (// Grid configuration 'config' => array ('grid_div_id' => 'ledger-ledger-entry-list', - 'caption' => ("Current Ledger: " . - "(". $current_ledger['name'] .")"), - 'filter' => array('Ledger.id' => $current_ledger['id']), + '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'), diff --git a/site/views/ledger_entries/view.ctp b/site/views/ledger_entries/view.ctp index 5e23907..90efa2c 100644 --- a/site/views/ledger_entries/view.ctp +++ b/site/views/ledger_entries/view.ctp @@ -33,7 +33,7 @@ $rows[] = array('Account', $html->link($account['name'], array('controller' => 'accounts', 'action' => 'view', $account['id']))); -$rows[] = array('Ledger', $html->link($ledger['name'], +$rows[] = array('Ledger', $html->link('#' . $ledger['sequence'], array('controller' => 'ledgers', 'action' => 'view', $ledger['id']))); diff --git a/site/views/transactions/view.ctp b/site/views/transactions/view.ctp index e6f1835..f2fc83b 100644 --- a/site/views/transactions/view.ctp +++ b/site/views/transactions/view.ctp @@ -25,7 +25,7 @@ $rows[] = array('Account', $html->link($account['name'], array('controller' => 'accounts', 'action' => 'view', $account['id']))); -$rows[] = array('Ledger', $html->link($ledger['name'], +$rows[] = array('Ledger', $html->link('#' . $ledger['sequence'], array('controller' => 'ledgers', 'action' => 'view', $ledger['id'])));