Charge/Invoice assessment is working fairly well. Still need to accept multiple charges on a single invoice, have client side validation, and post through ajax to allow posting repeated invoices.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@236 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -174,15 +174,6 @@ class LeasesController extends AppController {
|
||||
*/
|
||||
|
||||
function assess($id = null, $type = null) {
|
||||
if ($this->data) {
|
||||
// Assess the charges based on the given data
|
||||
pr($this->data);
|
||||
|
||||
$this->Lease->addCharge($this->data['Lease']['id'], $this->data['Charge']);
|
||||
//$this->redirect($this->data['redirect']);
|
||||
$this->render('/empty');
|
||||
return;
|
||||
}
|
||||
|
||||
$lease = $this->Lease->find
|
||||
('first', array
|
||||
@@ -206,11 +197,16 @@ class LeasesController extends AppController {
|
||||
$charge['type'] = $type;
|
||||
if ($type == 'rent')
|
||||
$charge['amount'] = $lease['Lease']['rent'];
|
||||
else
|
||||
elseif ($type == 'rent')
|
||||
// REVISIT <AP> 20090705:
|
||||
// Of course, the late charge should come from the late_schedule
|
||||
$charge['amount'] = 10.00;
|
||||
|
||||
$redirect = array('controller' => 'leases',
|
||||
'action' => 'view',
|
||||
$id);
|
||||
$this->set(compact('redirect'));
|
||||
|
||||
$title = ('Lease #' . $lease['Lease']['number'] . ': ' .
|
||||
$lease['Unit']['name'] . ': ' .
|
||||
$lease['Customer']['name'] . ': Assess Charges');
|
||||
|
||||
Reference in New Issue
Block a user