Preliminary work on NSF. It's far from working, but we're headed in the right direction.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@426 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-30 06:29:41 +00:00
parent 6e759e8589
commit 56e6aa1f34
3 changed files with 226 additions and 16 deletions

View File

@@ -132,21 +132,18 @@ class TendersController extends AppController {
('contain' => array('TenderType', 'Customer', 'LedgerEntry' => array('Transaction')),
));
// REVISIT <AP>: 20090713
// Consider allowing the NSF operation only if the source is used on
// a ledger entry that is debited on a "payable" account (perhaps
// even restricted to "payable" ASSET accounts), credited on Receipt
// (or A/R), and reconciles the credit to an entry that debits on a
// "depositable" account.
// Set up dynamic menu items
$this->sidemenu_links[] =
array('name' => 'Operations', 'header' => true);
if (!empty($tender['Tender']['deposit_transaction_id']) &&
empty($tender['Tender']['nsf_transaction_id'])) {
// Set up dynamic menu items
$this->sidemenu_links[] =
array('name' => 'Operations', 'header' => true);
$this->sidemenu_links[] =
array('name' => 'NSF',
'url' => array('action' => 'nsf',
$id));
$this->sidemenu_links[] =
array('name' => 'NSF',
'url' => array('action' => 'nsf',
$id));
}
// Prepare to render.
$title = "Tender #{$tender['Tender']['id']}";