A working version of the collected report for accounts. There is still some error checking to do, since we don't want this report for just any account. Also, we may wish to do away with the form to prevent accidental submittal. Finally, it would be nice to do away with the button, and automatically update on date changes.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@324 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -64,8 +64,10 @@ foreach ($fields AS $field => $config) {
|
||||
elseif (isset($field_prefix) && !isset($config['no_prefix']))
|
||||
$field = $field_prefix . '.' . $field;
|
||||
|
||||
$config['opts']['label'] = false;
|
||||
$config['opts']['div'] = false;
|
||||
if (!isset($config['opts']['label']))
|
||||
$config['opts']['label'] = false;
|
||||
if (!isset($config['opts']['div']))
|
||||
$config['opts']['div'] = false;
|
||||
|
||||
$cells = array();
|
||||
if ($include_before) {
|
||||
|
||||
@@ -88,6 +88,12 @@ if (isset($account_ftype))
|
||||
$grid->invalidFields('Sub-Total');
|
||||
|
||||
|
||||
// Now that columns are defined, establish basic grid parameters
|
||||
$grid
|
||||
->columns($cols)
|
||||
->sortField('Date')
|
||||
->defaultFields(array('Entry', 'Date', 'Amount', 'Credit', 'Debit'));
|
||||
|
||||
|
||||
if (!isset($config['rows']) && !isset($collected_account_id)) {
|
||||
$config['action'] = 'ledger';
|
||||
@@ -99,7 +105,9 @@ if (isset($reconcile_id)) {
|
||||
}
|
||||
|
||||
if (isset($collected_account_id)) {
|
||||
$config['action'] = 'collected';
|
||||
$grid->customData(compact('collected_account_id'))->limit(500);
|
||||
$grid->sortField('Paid');
|
||||
}
|
||||
|
||||
// Set up search fields if requested by caller
|
||||
@@ -113,9 +121,6 @@ $grid->customData(compact('ledger_id', 'account_id', 'ar_account',
|
||||
|
||||
// Render the grid
|
||||
$grid
|
||||
->columns($cols)
|
||||
->sortField('Date')
|
||||
->defaultFields(array('Entry', 'Date', 'Amount', 'Credit', 'Debit'))
|
||||
->render($this, isset($config) ? $config : null,
|
||||
array('Transaction', 'Entry', 'Date', 'Effective', 'Paid',
|
||||
'Account', 'Debit Account', 'Credit Account',
|
||||
|
||||
Reference in New Issue
Block a user