Got the ledger closings to work again. This seems to work ok, although I notice closing the ledger after deposit results in a balance forward entry of $0.00 . I'll work on it next
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@421 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -63,7 +63,7 @@ class LedgersController extends AppController {
|
||||
array(// Models
|
||||
'Account',
|
||||
'LedgerEntry',
|
||||
'Close',
|
||||
'CloseTransaction',
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -79,10 +79,10 @@ class LedgersController extends AppController {
|
||||
$conditions = parent::gridDataConditions($params, $model);
|
||||
|
||||
if ($params['action'] === 'current') {
|
||||
$conditions[] = array('NOT' => array('Ledger.closed'));
|
||||
$conditions[] = array('Ledger.close_transaction_id' => null);
|
||||
}
|
||||
elseif ($params['action'] === 'closed') {
|
||||
$conditions[] = 'Ledger.closed';
|
||||
$conditions[] = array('Ledger.close_transaction_id !=' => null);
|
||||
}
|
||||
|
||||
return $conditions;
|
||||
|
||||
Reference in New Issue
Block a user