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:
@@ -111,7 +111,11 @@ class AccountsController extends AppController {
|
||||
*/
|
||||
|
||||
function newledger($id = null) {
|
||||
if (!$this->Account->closeCurrentLedger($id)) {
|
||||
$result = $this->Account->closeCurrentLedgers($id);
|
||||
|
||||
if ($result['error']) {
|
||||
pr(compact('result'));
|
||||
die("Unable to create new ledger.");
|
||||
$this->Session->setFlash(__('Unable to create new Ledger.', true));
|
||||
}
|
||||
if ($id)
|
||||
@@ -172,8 +176,8 @@ class AccountsController extends AppController {
|
||||
array('fields' => array('id', 'sequence', 'name')),
|
||||
|
||||
'Ledger' =>
|
||||
array('Close' => array
|
||||
('order' => array('Close.stamp' => 'DESC'))),
|
||||
array('CloseTransaction' => array
|
||||
('order' => array('CloseTransaction.stamp' => 'DESC'))),
|
||||
),
|
||||
'conditions' => array(array('Account.id' => $id)),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user