From 99a98cbc7dd6577d3f1b9d40e8ff8511fb6b2851 Mon Sep 17 00:00:00 2001 From: abijah Date: Sat, 17 Nov 2012 18:18:36 +0000 Subject: [PATCH] Added some minor view tweaks git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1018 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/views/customers/view.ctp | 21 +++++++++++++++++++++ site/views/elements/transactions.ctp | 2 +- site/views/transactions/view.ctp | 21 +++++++++++---------- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/site/views/customers/view.ctp b/site/views/customers/view.ctp index 4489a93..0bd6200 100644 --- a/site/views/customers/view.ctp +++ b/site/views/customers/view.ctp @@ -105,6 +105,27 @@ echo $this->element('ledger_entries', array ))); +/********************************************************************** + * Invoice History + */ + +/* NOT COMPLETED +echo $this->element('transactions', array + (// Grid configuration + 'config' => array + ('caption' => 'Invoices', + 'limit' => 5, + 'filter' => array('Customer.id' => $customer['Customer']['id'], + 'Transaction.type' => 'INVOICE', + ), + //'include' => array(), + 'exclude' => array('Type'), + 'remap' => array('ID' => 'Invoice', + //'Timestamp' => 'Date', + 'Entries' => 'Charges'), + ))); +NOT COMPLETED */ + /********************************************************************** * Lease History */ diff --git a/site/views/elements/transactions.ctp b/site/views/elements/transactions.ctp index afa4275..6fad163 100644 --- a/site/views/elements/transactions.ctp +++ b/site/views/elements/transactions.ctp @@ -11,8 +11,8 @@ $cols['ID'] = array('index' => 'Transaction.id', 'formatter' = $cols['Type'] = array('index' => 'Transaction.type', 'formatter' => 'enum'); $cols['Customer'] = array('index' => 'Customer.name', 'formatter' => 'longname'); $cols['Timestamp'] = array('index' => 'Transaction.stamp', 'formatter' => 'date'); -$cols['Amount'] = array('index' => 'Transaction.amount', 'formatter' => 'currency'); $cols['Entries'] = array('index' => 'entries', 'formatter' => 'number'); +$cols['Amount'] = array('index' => 'Transaction.amount', 'formatter' => 'currency'); $cols['Comment'] = array('index' => 'Transaction.comment', 'formatter' => 'comment'); // Render the grid diff --git a/site/views/transactions/view.ctp b/site/views/transactions/view.ctp index 6bbb9ab..301c442 100644 --- a/site/views/transactions/view.ctp +++ b/site/views/transactions/view.ctp @@ -95,16 +95,17 @@ if ($transaction['type'] === 'INVOICE' || * 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'), - ))); - +if (0) { + 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 */