Took some of the new learnings from invoice generation and put into receipt generations. Also moved some shared functions to pmgr.js, and renamed things for consistency.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@239 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-07 02:55:55 +00:00
parent 8491d81496
commit 807dc48375
7 changed files with 189 additions and 217 deletions

View File

@@ -251,7 +251,7 @@ class CustomersController extends AppController {
if ($show_payment) {
$this->sidemenu_links[] =
array('name' => 'Payment',
'url' => array('action' => 'payment',
'url' => array('action' => 'receipt',
$id));
}
@@ -352,11 +352,11 @@ class CustomersController extends AppController {
/**************************************************************************
**************************************************************************
**************************************************************************
* action: payment
* - Sets up the payment entry page for the given customer.
* action: receipt
* - Sets up the receipt entry page for the given customer.
*/
function payment($id = null) {
function receipt($id = null) {
/* if (!$id) { */
/* $this->Session->setFlash(__('Invalid Item.', true)); */
/* $this->redirect(array('action'=>'index')); */
@@ -379,7 +379,7 @@ class CustomersController extends AppController {
$charges = array('balance' => 0, 'entry' => array());
}
$title = 'Payment Entry';
$title = ($customer['name'] . ': Payment Entry');
$this->set(compact('customer', 'charges', 'title'));
}