Fix to the sub-total column, which wasn't working for ledgers that have both debits and credits (and thus need a sub-total of balance, not amount
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@325 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -65,10 +65,13 @@ else
|
|||||||
if (isset($no_account) || $group_by_tx || isset($collected_account_id))
|
if (isset($no_account) || $group_by_tx || isset($collected_account_id))
|
||||||
$grid->invalidFields(array('Account', 'Debit Account', 'Credit Account'));
|
$grid->invalidFields(array('Account', 'Debit Account', 'Credit Account'));
|
||||||
|
|
||||||
if (isset($ledger_id) || isset($account_id) || isset($ar_account))
|
if (isset($ledger_id) || isset($account_id) || isset($ar_account)) {
|
||||||
$grid->invalidFields('Amount');
|
$grid->invalidFields('Amount');
|
||||||
else
|
$cols['Sub-Total']['index'] = 'subtotal-balance';
|
||||||
|
} else {
|
||||||
$grid->invalidFields(array('Debit', 'Credit'));
|
$grid->invalidFields(array('Debit', 'Credit'));
|
||||||
|
$cols['Sub-Total']['index'] = 'subtotal-LedgerEntry.amount';
|
||||||
|
}
|
||||||
|
|
||||||
// group_by_tx SHOULD wipe out Customer, but the reality
|
// group_by_tx SHOULD wipe out Customer, but the reality
|
||||||
// is that it works good at the present, so we'll leave it.
|
// is that it works good at the present, so we'll leave it.
|
||||||
@@ -80,8 +83,7 @@ if (isset($lease_id) || $group_by_tx)
|
|||||||
|
|
||||||
if (!isset($reconcile_id) && !isset($collected_account_id))
|
if (!isset($reconcile_id) && !isset($collected_account_id))
|
||||||
$grid->invalidFields('Applied');
|
$grid->invalidFields('Applied');
|
||||||
|
else
|
||||||
if (isset($collected_account_id))
|
|
||||||
$cols['Sub-Total']['index'] = 'subtotal-applied';
|
$cols['Sub-Total']['index'] = 'subtotal-applied';
|
||||||
|
|
||||||
if (isset($account_ftype))
|
if (isset($account_ftype))
|
||||||
|
|||||||
Reference in New Issue
Block a user