diff --git a/views/accounts/deposit.ctp b/views/accounts/deposit.ctp index fd402d4..d60924e 100644 --- a/views/accounts/deposit.ctp +++ b/views/accounts/deposit.ctp @@ -48,14 +48,20 @@ foreach ($tillableAccount AS $acct) { echo "\n"; $grid_div_id = 'ledger_entries'.$acct['CurrentLedger']['id'].'-list'; - echo $this->element('ledger_entries', - array('grid_div_id' => $grid_div_id, - 'caption' => ('Items in '.$acct['Account']['name'].' Ledger'), - 'ledger_id' => $acct['CurrentLedger']['id'], - 'no_account' => true, - 'grid_setup' => $grid_setup, - )); + echo $this->element('ledger_entries', array + (// Element configuration + 'ledger_id' => $acct['CurrentLedger']['id'], + 'no_account' => true, + + // Grid configuration + 'config' => array + ( + 'grid_div_id' => $grid_div_id, + 'caption' => ('Items in '.$acct['Account']['name'].' Ledger'), + 'grid_setup' => $grid_setup, + ), + )); } $options = array(); diff --git a/views/accounts/view.ctp b/views/accounts/view.ctp index cf21063..a041e52 100644 --- a/views/accounts/view.ctp +++ b/views/accounts/view.ctp @@ -55,20 +55,32 @@ echo '
' . "\n"; * Ledgers */ -echo $this->element('ledgers', - array('caption' => $account['Account']['name'] . " Ledgers", - 'ledgers' => $account['Ledger'])); +echo $this->element('ledgers', array + ('config' => array + ('caption' => $account['Account']['name'] . " Ledgers", + 'rows' => $account['Ledger'], + ))); /********************************************************************** * Current Ledger */ -echo $this->element('ledger_entries', - array('caption' => "Current Ledger: (#{$account['Account']['id']}-{$account['CurrentLedger']['sequence']})", - 'ledger_id' => $account['CurrentLedger']['id'], - 'account_type' => $account['Account']['type'], - )); +echo $this->element('ledger_entries', array + (// Element configuration + 'ledger_id' => $account['CurrentLedger']['id'], + 'account_type' => $account['Account']['type'], + + // Grid configuration + 'config' => array + ('caption' => + "Current Ledger: (" . + "#{$account['Account']['id']}" . + "-" . + "{$account['CurrentLedger']['sequence']}" . + ")", + ), + )); /* End "detail supporting" div */ echo '
' . "\n"; diff --git a/views/contacts/view.ctp b/views/contacts/view.ctp index 6ceacdf..dcf2f0c 100644 --- a/views/contacts/view.ctp +++ b/views/contacts/view.ctp @@ -121,9 +121,12 @@ echo $this->element('table', /********************************************************************** * Customers */ -echo $this->element('customers', array('heading' => '', - 'caption' => 'Related Customers', - 'customers' => $contact['Customer'])); + +echo $this->element('customers', array + ('config' => array + ('caption' => 'Related Customers', + 'rows' => $contact['Customer'], + ))); /* End "detail supporting" div */ diff --git a/views/customers/receipt.ctp b/views/customers/receipt.ctp index a22f50a..111d48b 100644 --- a/views/customers/receipt.ctp +++ b/views/customers/receipt.ctp @@ -323,15 +323,16 @@ function updateCharges(id) { ; // align //echo '
' . "\n"; -echo $this->element('customers', - array('grid_div_id' => 'customers-list', - 'grid_div_class' => 'text-below', - 'caption' => ('Select Customer'), - 'grid_setup' => $grid_setup, - 'nolinks' => true, - 'limit' => 10, - )); +echo $this->element('customers', array + ('config' => array + ('grid_div_id' => 'customers-list', + 'grid_div_class' => 'text-below', + 'caption' => ('Select Customer'), + 'grid_setup' => $grid_setup, + 'nolinks' => true, + 'limit' => 10, + ))); echo ('

' . '