On move-out, redirecting back to the customer instead of the closed lease
git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@976 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -176,16 +176,20 @@ class LeasesController extends AppController {
|
|||||||
function move_out($id = null) {
|
function move_out($id = null) {
|
||||||
if ($this->data) {
|
if ($this->data) {
|
||||||
// Handle the move out based on the data given
|
// Handle the move out based on the data given
|
||||||
//pr($this->data);
|
|
||||||
|
|
||||||
$this->Lease->moveOut($this->data['Lease']['id'],
|
$this->Lease->moveOut($this->data['Lease']['id'],
|
||||||
'VACANT',
|
'VACANT',
|
||||||
$this->data['Lease']['moveout_date']
|
$this->data['Lease']['moveout_date']
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->redirect(array('controller' => 'leases',
|
$lease = $this->Lease->find
|
||||||
|
('first', array
|
||||||
|
('contain' => array('Customer.id'),
|
||||||
|
'conditions' => array(array('Lease.id' => $this->data['Lease']['id'])),
|
||||||
|
));
|
||||||
|
|
||||||
|
$this->redirect(array('controller' => 'customers',
|
||||||
'action' => 'view',
|
'action' => 'view',
|
||||||
$this->data['Lease']['id']));
|
$lease['Customer']['id']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($id)) {
|
if (isset($id)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user