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:
abijah
2009-07-30 01:59:10 +00:00
parent eb209a455b
commit 25e3c87213
10 changed files with 181 additions and 174 deletions

View File

@@ -81,8 +81,8 @@ echo $this->element('ledger_entries', array
'caption' => ("Current Ledger: " .
"(". $current_ledger['name'] .")"),
'filter' => array('ledger_id' => $current_ledger['id']),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Debit', 'Credit'),
'include' => array('Balance', 'Sub-Total'),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance'),
'include' => array('Debit', 'Credit', 'Sub-Total'),
)));
@@ -98,8 +98,8 @@ echo $this->element('ledger_entries', array
'grid_setup' => array('hiddengrid' => true),
'caption' => "Entire Ledger",
'filter' => array('account_id' => $account['id']),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Debit', 'Credit'),
'include' => array('Balance', 'Sub-Total'),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance'),
'include' => array('Debit', 'Credit', 'Sub-Total'),
)));

View File

@@ -5,8 +5,8 @@ $cols = array();
$cols['ID'] = array('index' => 'id_sequence', 'formatter' => 'id');
$cols['Name'] = array('index' => 'Ledger.name', 'formatter' => 'name');
$cols['Account'] = array('index' => 'Account.name', 'formatter' => 'longname');
$cols['Open Date'] = array('index' => 'PriorClose.stamp', 'formatter' => 'date');
$cols['Close Date'] = array('index' => 'Close.stamp', 'formatter' => 'date');
$cols['Open Date'] = array('index' => 'PriorCloseTransaction.stamp', 'formatter' => 'date');
$cols['Close Date'] = array('index' => 'CloseTransaction.stamp', 'formatter' => 'date');
$cols['Comment'] = array('index' => 'Ledger.comment', 'formatter' => 'comment');
$cols['Entries'] = array('index' => 'entries', 'formatter' => 'number');
$cols['Debits'] = array('index' => 'debits', 'formatter' => 'currency');

View File

@@ -10,7 +10,7 @@ echo '<div class="ledger view">' . "\n";
*/
$account = $ledger['Account'];
//$close = $ledger['Close'];
//$close = $ledger['CloseTransaction'];
if (isset($ledger['Ledger']))
$ledger = $ledger['Ledger'];
@@ -23,7 +23,7 @@ $rows[] = array('Account', $html->link($account['name'],
'action' => 'view',
$account['id'])));
$rows[] = array('Sequence', $ledger['sequence']);
$rows[] = array('Status', $ledger['close_id'] ? 'Closed' : 'Open');
$rows[] = array('Status', $ledger['close_transaction_id'] ? 'Closed' : 'Open');
$rows[] = array('Comment', $ledger['comment']);
echo $this->element('table',
@@ -70,10 +70,8 @@ echo $this->element('ledger_entries', array
'config' => array
('caption' => "Ledger Entries",
'filter' => array('ledger_id' => $ledger['id']),
'exclude' => array('Ledger', 'Account', 'Amount', 'Cr/Dr', 'Debit', 'Credit'),
'include' => array('Balance', 'Sub-Total'),
/* 'exclude' => array('Ledger', 'Account', 'Amount', 'Cr/Dr', 'Balance'), */
/* 'include' => array('Debit', 'Credit', 'Sub-Total'), */
'exclude' => array('Ledger', 'Account', 'Amount', 'Cr/Dr', 'Balance'),
'include' => array('Debit', 'Credit', 'Sub-Total'),
)));

View File

@@ -34,7 +34,7 @@ foreach ($depositTypes AS $type) {
echo "\n";
echo $form->input("TenderType.{$type['id']}.close",
array('type' => 'hidden',
'value' => false,
'value' => true,
));
echo "\n";