Getting closer on the reversal issue. There is definitely more testing to do, and some tweaks as well, but this may be approximately what we will finally settle on.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@565 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-15 03:11:16 +00:00
parent 30f755cf42
commit 4f85dc243e
4 changed files with 150 additions and 55 deletions

View File

@@ -245,19 +245,14 @@ class StatementEntriesController extends AppController {
if (strtoupper($entry['StatementEntry']['type']) === 'CHARGE') {
$reversal = $this->StatementEntry->find
('first',
array('link' => array('DisbursementEntry'),
'conditions' => array(array('StatementEntry.id' => $id),
array('DisbursementEntry.type' => 'REVERSAL')),
));
$reversable = $this->StatementEntry->reversable($id);
// Set up dynamic menu items
if (empty($reversal) || $stats['balance'] > 0)
if ($reversable || $stats['balance'] > 0)
$this->sidemenu_links[] =
array('name' => 'Operations', 'header' => true);
if (empty($reversal))
if ($reversable)
$this->sidemenu_links[] =
array('name' => 'Reverse',
'url' => array('action' => 'reverse',