Added ability to move an existing customer into a vacant unit. Changed out all of the 'amount' fields with 'rent', since it's much more self-explanatory. We still need the ability to add customers and contacts. I'll consider doing this by using the insert row ability of jqGrid.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@204 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-03 06:53:41 +00:00
parent a796e9e82d
commit d77dcfca75
16 changed files with 498 additions and 75 deletions

View File

@@ -140,6 +140,28 @@ class CustomersController extends AppController {
}
/**************************************************************************
**************************************************************************
**************************************************************************
* action: move_in
* - Sets up the move-in page for the given customer.
*/
function move_in($id = null) {
$customer = array();
$unit = array();
if (isset($id)) {
$this->Customer->recursive = -1;
$customer = current($this->Customer->read(null, $id));
}
$title = 'Customer Move-In';
$this->set(compact('customer', 'unit', 'title'));
$this->render('/leases/move_in');
}
/**************************************************************************
**************************************************************************
**************************************************************************
@@ -205,19 +227,26 @@ class CustomersController extends AppController {
}
// Set up dynamic menu items
if ($show_moveout || $show_payment) {
$this->sidemenu_links[] =
array('name' => 'Operations', 'header' => true);
$this->sidemenu_links[] =
array('name' => 'Operations', 'header' => true);
if ($show_moveout) {
$this->sidemenu_links[] =
array('name' => 'Move-Out', 'url' => array('action' => 'move_out',
$id));
}
$this->sidemenu_links[] =
array('name' => 'Move-In',
'url' => array('action' => 'move_in',
$id));
if ($show_moveout) {
$this->sidemenu_links[] =
array('name' => 'Payment', 'url' => array('action' => 'payment',
$id));
array('name' => 'Move-Out',
'url' => array('action' => 'move_out',
$id));
}
if ($show_payment) {
$this->sidemenu_links[] =
array('name' => 'Payment',
'url' => array('action' => 'payment',
$id));
}
// Prepare to render.