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/site@565 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user