Added unit area to the grid display; removed the hyperlink to unit size (which is not yet implemented), and added an overlocked report.
git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@759 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -26,9 +26,13 @@ class UnitsController extends AppController {
|
|||||||
function unavailable() { $this->gridView('Unavailable Units'); }
|
function unavailable() { $this->gridView('Unavailable Units'); }
|
||||||
function vacant() { $this->gridView('Vacant Units'); }
|
function vacant() { $this->gridView('Vacant Units'); }
|
||||||
function occupied() { $this->gridView('Occupied Units'); }
|
function occupied() { $this->gridView('Occupied Units'); }
|
||||||
|
function locked() { $this->gridView('Overlocked Units'); }
|
||||||
function all() { $this->gridView('All Units', 'all'); }
|
function all() { $this->gridView('All Units', 'all'); }
|
||||||
|
|
||||||
function gridView($title, $action = null, $element = null) {
|
function gridView($title, $action = null, $element = null) {
|
||||||
|
$this->addSideMenuLink('Overlocked',
|
||||||
|
array('controller' => 'units', 'action' => 'locked'), null,
|
||||||
|
'CONTROLLER');
|
||||||
$this->addSideMenuLink('Occupied',
|
$this->addSideMenuLink('Occupied',
|
||||||
array('controller' => 'units', 'action' => 'occupied'), null,
|
array('controller' => 'units', 'action' => 'occupied'), null,
|
||||||
'CONTROLLER');
|
'CONTROLLER');
|
||||||
@@ -89,6 +93,7 @@ class UnitsController extends AppController {
|
|||||||
function gridDataFields(&$params, &$model) {
|
function gridDataFields(&$params, &$model) {
|
||||||
$fields = parent::gridDataFields($params, $model);
|
$fields = parent::gridDataFields($params, $model);
|
||||||
|
|
||||||
|
$fields[] = 'ROUND(UnitSize.width/12 * UnitSize.depth/12, 0) AS sqft';
|
||||||
return array_merge($fields,
|
return array_merge($fields,
|
||||||
$this->Unit->Lease->StatementEntry->chargeDisbursementFields(true));
|
$this->Unit->Lease->StatementEntry->chargeDisbursementFields(true));
|
||||||
}
|
}
|
||||||
@@ -108,6 +113,9 @@ class UnitsController extends AppController {
|
|||||||
elseif ($params['action'] === 'unoccupied') {
|
elseif ($params['action'] === 'unoccupied') {
|
||||||
$conditions[] = array('NOT' => array($this->Unit->conditionOccupied()));
|
$conditions[] = array('NOT' => array($this->Unit->conditionOccupied()));
|
||||||
}
|
}
|
||||||
|
elseif ($params['action'] === 'locked') {
|
||||||
|
$conditions[] = array('Unit.status' => 'LOCKED');
|
||||||
|
}
|
||||||
|
|
||||||
return $conditions;
|
return $conditions;
|
||||||
}
|
}
|
||||||
@@ -131,7 +139,7 @@ class UnitsController extends AppController {
|
|||||||
|
|
||||||
function gridDataPostProcessLinks(&$params, &$model, &$records, $links) {
|
function gridDataPostProcessLinks(&$params, &$model, &$records, $links) {
|
||||||
$links['Unit'] = array('name');
|
$links['Unit'] = array('name');
|
||||||
$links['UnitSize'] = array('name');
|
//$links['UnitSize'] = array('name');
|
||||||
return parent::gridDataPostProcessLinks($params, $model, $records, $links);
|
return parent::gridDataPostProcessLinks($params, $model, $records, $links);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ $cols['Sort'] = array('index' => 'Unit.sort_order', 'hidden' => true);
|
|||||||
$cols['Walk'] = array('index' => 'Unit.walk_order', 'formatter' => 'number');
|
$cols['Walk'] = array('index' => 'Unit.walk_order', 'formatter' => 'number');
|
||||||
$cols['Unit'] = array('index' => 'Unit.name', 'formatter' => 'shortname');
|
$cols['Unit'] = array('index' => 'Unit.name', 'formatter' => 'shortname');
|
||||||
$cols['Size'] = array('index' => 'UnitSize.name', 'formatter' => 'shortname');
|
$cols['Size'] = array('index' => 'UnitSize.name', 'formatter' => 'shortname');
|
||||||
|
$cols['Area'] = array('index' => 'sqft', 'formatter' => 'number');
|
||||||
$cols['Rent'] = array('index' => 'Unit.rent', 'formatter' => 'currency');
|
$cols['Rent'] = array('index' => 'Unit.rent', 'formatter' => 'currency');
|
||||||
$cols['Deposit'] = array('index' => 'Unit.deposit', 'formatter' => 'currency');
|
$cols['Deposit'] = array('index' => 'Unit.deposit', 'formatter' => 'currency');
|
||||||
$cols['Status'] = array('index' => 'Unit.status', 'formatter' => 'name'); // We have enough real estate
|
$cols['Status'] = array('index' => 'Unit.status', 'formatter' => 'name'); // We have enough real estate
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ was in early (VERY early) implementations. At that time, I
|
|||||||
had to a use temporary variable to keep a running total. It
|
had to a use temporary variable to keep a running total. It
|
||||||
worked, but was MySQL specific.
|
worked, but was MySQL specific.
|
||||||
|
|
||||||
Unit Size has no controller. Either remove the link from the
|
|
||||||
units grid, or implement the controller.
|
|
||||||
|
|
||||||
Add a move-out charges field to the move-out page.
|
Add a move-out charges field to the move-out page.
|
||||||
Otherwise, if the balance is zero, the lease will automatically
|
Otherwise, if the balance is zero, the lease will automatically
|
||||||
be closed and no more charges are possible. The other option
|
be closed and no more charges are possible. The other option
|
||||||
@@ -192,4 +189,7 @@ Add explanatory information on the New Customer page
|
|||||||
- Customer name can be omitted and will come from primary tenant.
|
- Customer name can be omitted and will come from primary tenant.
|
||||||
- Phone numbers, etc can be added later directly to the contact
|
- Phone numbers, etc can be added later directly to the contact
|
||||||
|
|
||||||
|
Unit Size has no controller. Either remove the link from the
|
||||||
|
units grid, or implement the controller.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user