Finally, a working NSF implementation. Ledger Entry tracking stops at the Bank account, since we switch from positive to negative ledger entries. However, we're not going to reconcile debits to credits in the bank account anyway, so I just disabled tracking on the account.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@334 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-15 03:06:59 +00:00
parent 2588fd6a91
commit c4942b922b
5 changed files with 79 additions and 42 deletions

View File

@@ -26,6 +26,11 @@ function resetForm() {
/* datepickerBOM(null, 'TxFromDate'); */
/* datepickerNow('TxThroughDate', false); */
// REVISIT <AP>: 20090714
// Figure out how to just prevent jqGrid
// from loading in the first place
/* $('#collected-entries-jqGrid').clearGridData(); */
/* updateEntriesGrid(); */
}

View File

@@ -24,7 +24,7 @@ $cols['Amount'] = array('index' => 'LedgerEntry.amount', 'formatter' =>
$cols['Debit'] = array('index' => 'debit', 'formatter' => 'currency');
$cols['Credit'] = array('index' => 'credit', 'formatter' => 'currency');
$cols['Paid'] = array('index' => 'ReceiptTransaction.stamp', 'formatter' => 'date');
$cols['Last Payment'] = array('index' => 'last_paid', 'formatter' => 'date');
$cols['Applied'] = array('index' => "applied", 'formatter' => 'currency');
$cols['Sub-Total'] = array('index' => 'subtotal-LedgerEntry.amount', 'formatter' => 'currency', 'sortable' => false);
@@ -55,7 +55,7 @@ if ($group_by_tx)
$grid->invalidFields(array('Effective', 'Through'));
if (!isset($collected_account_id))
$grid->invalidFields('Paid');
$grid->invalidFields('Last Payment');
if (isset($account_ftype) || isset($ledger_id) || isset($account_id) || isset($ar_account))
$grid->invalidFields(array('Debit Account', 'Credit Account'));
@@ -109,7 +109,7 @@ if (isset($reconcile_id)) {
if (isset($collected_account_id)) {
$config['action'] = 'collected';
$grid->customData(compact('collected_account_id'))->limit(500);
$grid->sortField('Paid');
$grid->sortField('Last Payment');
}
// Set up search fields if requested by caller
@@ -124,7 +124,7 @@ $grid->customData(compact('ledger_id', 'account_id', 'ar_account',
// Render the grid
$grid
->render($this, isset($config) ? $config : null,
array('Transaction', 'Entry', 'Date', 'Effective', 'Paid',
array('Transaction', 'Entry', 'Date', 'Effective', 'Last Payment',
'Account', 'Debit Account', 'Credit Account',
'Customer', 'Unit',
'Comment',