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/site@204 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-03 06:53:41 +00:00
parent 6adf7e2358
commit 3a1fb00527
14 changed files with 448 additions and 63 deletions

View File

@@ -9,15 +9,25 @@ echo '<div class="unit view">' . "\n";
* Unit Detail Main Section
*/
$rows = array(array('Name', $unit['Unit']['name']),
array('Status', $unit['Unit']['status']),
array('Comment', $unit['Unit']['comment']));
$leases = $unit['Lease'];
$current_lease = $unit['CurrentLease'];
$unit_size = $unit['UnitSize'];
if (isset($unit['Unit']))
$unit = $unit['Unit'];
$rows = array(array('Name', $unit['name']),
array('Status', $unit['status']),
array('Size', $unit_size['name']),
array('Deposit', FormatHelper::currency($unit['deposit'])),
array('Rent', FormatHelper::currency($unit['rent'])),
array('Comment', $unit['comment']));
echo $this->element('table',
array('class' => 'item unit detail',
'caption' => 'Unit Info',
'rows' => $rows,
'column_class' => array('field', 'value')));
'caption' => 'Unit Info',
'rows' => $rows,
'column_class' => array('field', 'value')));
/**********************************************************************
@@ -52,22 +62,22 @@ echo '<div CLASS="detail supporting">' . "\n";
*/
echo $this->element('leases',
array('caption' => 'Lease History',
'leases' => $unit['Lease']));
array('caption' => 'Lease History',
'leases' => $leases));
/**********************************************************************
* Current Tenant Lease Account History
*/
if (isset($unit['CurrentLease']['id'])) {
if (isset($current_lease['id'])) {
echo $this->element('ledger_entries',
array('caption' =>
('Current Lease Account ('
. $unit['CurrentLease']['Customer']['name']
. ')'),
'ar_account' => true,
'lease_id' => $unit['CurrentLease']['id'],
));
array('caption' =>
('Current Lease Account ('
. $current_lease['Customer']['name']
. ')'),
'ar_account' => true,
'lease_id' => $current_lease['id'],
));
}