Moved all grid elements onto the grid helper. Basic testing done, but more testing needs to be done.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@262 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -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' => ('<A HREF="#" ONCLICK="$(\'#'.$grid_div_id.' .HeaderButton\').click();'.
|
||||
' return false;">Items in '.$acct['Account']['name'].' Ledger</A>'),
|
||||
'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' => ('<A HREF="#" ONCLICK="$(\'#'.$grid_div_id.' .HeaderButton\').click();'.
|
||||
' return false;">Items in '.$acct['Account']['name'].' Ledger</A>'),
|
||||
'grid_setup' => $grid_setup,
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
$options = array();
|
||||
|
||||
@@ -55,20 +55,32 @@ echo '<div CLASS="detail supporting">' . "\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 '</div>' . "\n";
|
||||
|
||||
Reference in New Issue
Block a user