First pass at a charge waiver implementation. It hasn't been tested but for a tiny bit.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@471 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-03 03:46:58 +00:00
parent fe66241ca1
commit a59d93ebee
4 changed files with 114 additions and 52 deletions

View File

@@ -183,6 +183,18 @@ class StatementEntriesController extends AppController {
}
/**************************************************************************
**************************************************************************
**************************************************************************
* action: waive the ledger entry
*/
function waive($id) {
$this->StatementEntry->waive($id);
//$this->redirect(array('action'=>'view', $id));
}
/**************************************************************************
**************************************************************************
**************************************************************************
@@ -256,6 +268,19 @@ class StatementEntriesController extends AppController {
else
$stats = $stats['Payment'];
if (strtoupper($entry['StatementEntry']['type']) === 'CHARGE' &&
$stats['reconciled'] == 0) {
// Set up dynamic menu items
$this->sidemenu_links[] =
array('name' => 'Operations', 'header' => true);
$this->sidemenu_links[] =
array('name' => 'Waive',
'url' => array('action' => 'waive',
$id));
}
// Prepare to render.
$title = "Statement Entry #{$entry['StatementEntry']['id']}";
$this->set(compact('entry', 'title', 'reconciled', 'stats'));