Cleaned up and got rid of the word Tenant in most places. The original thought was to minimize confusion in our specific case (since we don't sell POS items) by simply refering to customers as tenants. However, I don't think customers is a very confusing term and so I decided to clear up the inconsistency. I did leave it in a couple places, where the customers in questions are clearly tenants
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@222 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
class CustomersController extends AppController {
|
class CustomersController extends AppController {
|
||||||
var $sidemenu_links =
|
var $sidemenu_links =
|
||||||
array(array('name' => 'Tenants', 'header' => true),
|
array(array('name' => 'Customers', 'header' => true),
|
||||||
array('name' => 'Current', 'url' => array('controller' => 'customers', 'action' => 'current')),
|
array('name' => 'Current', 'url' => array('controller' => 'customers', 'action' => 'current')),
|
||||||
array('name' => 'Past', 'url' => array('controller' => 'customers', 'action' => 'past')),
|
array('name' => 'Past', 'url' => array('controller' => 'customers', 'action' => 'past')),
|
||||||
array('name' => 'All', 'url' => array('controller' => 'customers', 'action' => 'all')),
|
array('name' => 'All', 'url' => array('controller' => 'customers', 'action' => 'all')),
|
||||||
array('name' => 'Add Tenant', 'url' => array('controller' => 'customers', 'action' => 'add')),
|
array('name' => 'Add Customer', 'url' => array('controller' => 'customers', 'action' => 'add')),
|
||||||
);
|
);
|
||||||
|
|
||||||
//var $components = array('RequestHandler');
|
//var $components = array('RequestHandler');
|
||||||
@@ -27,13 +27,13 @@ class CustomersController extends AppController {
|
|||||||
**************************************************************************
|
**************************************************************************
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
* action: index / current / past / all
|
* action: index / current / past / all
|
||||||
* - Creates a list of tenants
|
* - Creates a list of customers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function index() { $this->current(); }
|
function index() { $this->current(); }
|
||||||
function current() { $this->jqGridView('Current Tenants'); }
|
function current() { $this->jqGridView('Current Tenants'); }
|
||||||
function past() { $this->jqGridView('Past Tenants'); }
|
function past() { $this->jqGridView('Past Tenants'); }
|
||||||
function all() { $this->jqGridView('All Tenants', 'all'); }
|
function all() { $this->jqGridView('All Customers', 'all'); }
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
@@ -236,12 +236,6 @@ class CustomersController extends AppController {
|
|||||||
'url' => array('action' => 'edit',
|
'url' => array('action' => 'edit',
|
||||||
$id));
|
$id));
|
||||||
|
|
||||||
$this->sidemenu_links[] =
|
|
||||||
array('name' => 'Add Contact',
|
|
||||||
'url' => array('controller' => 'contacts',
|
|
||||||
'action' => 'add',
|
|
||||||
$id));
|
|
||||||
|
|
||||||
$this->sidemenu_links[] =
|
$this->sidemenu_links[] =
|
||||||
array('name' => 'Move-In',
|
array('name' => 'Move-In',
|
||||||
'url' => array('action' => 'move_in',
|
'url' => array('action' => 'move_in',
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ function contactMethodDiv($obj, $type, $legend, $values = null) {
|
|||||||
' CLASS="'.$type.'-method-%{id}-source" ' . "\n" .
|
' CLASS="'.$type.'-method-%{id}-source" ' . "\n" .
|
||||||
' ID="'.$type.'-method-%{id}-source-'.$stype.'"' . "\n" .
|
' ID="'.$type.'-method-%{id}-source-'.$stype.'"' . "\n" .
|
||||||
' VALUE="'.$stype.'"' . "\n" .
|
' VALUE="'.$stype.'"' . "\n" .
|
||||||
//' CHECKED' . "\n" .
|
|
||||||
' />' . "\n" .
|
' />' . "\n" .
|
||||||
' <LABEL FOR="'.$type.'-method-%{id}-source-'.$stype.'">'.$sname.'</LABEL>' . "\n" .
|
' <LABEL FOR="'.$type.'-method-%{id}-source-'.$stype.'">'.$sname.'</LABEL>' . "\n" .
|
||||||
' ';
|
' ';
|
||||||
@@ -70,10 +69,6 @@ function contactMethodDiv($obj, $type, $legend, $values = null) {
|
|||||||
// BEGIN method-div
|
// BEGIN method-div
|
||||||
'<div id="'.$type.'-%{id}-method-div"' . "\n" .
|
'<div id="'.$type.'-%{id}-method-div"' . "\n" .
|
||||||
|
|
||||||
/* (isset($values) */
|
|
||||||
/* ? '<input type="hidden" name="data[Contact'.ucfirst($type).'][%{id}][ContactsMethod][id]" value="'.$values['ContactsMethod']['id'].'"/>' . "\n" */
|
|
||||||
/* : '') . */
|
|
||||||
|
|
||||||
$obj->element
|
$obj->element
|
||||||
('form_table',
|
('form_table',
|
||||||
array('class' => "item contact-{$type} entry",
|
array('class' => "item contact-{$type} entry",
|
||||||
@@ -348,7 +343,7 @@ echo $form->input('id') . "\n";
|
|||||||
echo($this->element
|
echo($this->element
|
||||||
('form_table',
|
('form_table',
|
||||||
array('class' => 'item contact detail',
|
array('class' => 'item contact detail',
|
||||||
'caption' => $this->data ? 'Edit Contact' : 'New Contact',
|
'caption' => isset($this->data['Contact']) ? 'Edit Contact' : 'New Contact',
|
||||||
'fields' => array
|
'fields' => array
|
||||||
('first_name' => null,
|
('first_name' => null,
|
||||||
'last_name' => null,
|
'last_name' => null,
|
||||||
@@ -361,8 +356,6 @@ echo($this->element
|
|||||||
/* 'id_local_exp' => array('name' => 'ID Expiration', */
|
/* 'id_local_exp' => array('name' => 'ID Expiration', */
|
||||||
/* 'opts' => array('empty' => true)), */
|
/* 'opts' => array('empty' => true)), */
|
||||||
'comment' => null,
|
'comment' => null,
|
||||||
//'' => null,
|
|
||||||
//'' => '',
|
|
||||||
))) . "\n");
|
))) . "\n");
|
||||||
|
|
||||||
echo $form->submit('Update') . "\n";
|
echo $form->submit('Update') . "\n";
|
||||||
|
|||||||
@@ -67,16 +67,6 @@ function customerContactDiv($obj, $values = null, $primary = false) {
|
|||||||
// BEGIN contact-div
|
// BEGIN contact-div
|
||||||
'<div id="contact-%{id}-contact-div"' . "\n" .
|
'<div id="contact-%{id}-contact-div"' . "\n" .
|
||||||
|
|
||||||
/* '<INPUT TYPE="radio" ' . "\n" . */
|
|
||||||
/* ' NAME="data[Customer][primary_contact_entry]"' . "\n" . */
|
|
||||||
/* ' CLASS="contact-primary" ' . "\n" . */
|
|
||||||
/* ' ID="contact-primary-%{id}"' . "\n" . */
|
|
||||||
/* ' VALUE="%{id}"' . "\n" . */
|
|
||||||
/* //($primary ? ' CHECKED' . "\n" : "(\$(#contact-entry-id).val() == 1 ? ' CHECKED' : '')") . */
|
|
||||||
/* ($primary ? ' CHECKED' . "\n" : '' ) . */
|
|
||||||
/* ' />' . "\n" . */
|
|
||||||
/* ' <LABEL FOR="contact-primary-%{id}">Primary Contact</LABEL>' . "\n" . */
|
|
||||||
|
|
||||||
$obj->element
|
$obj->element
|
||||||
('form_table',
|
('form_table',
|
||||||
array('class' => "item contact entry",
|
array('class' => "item contact entry",
|
||||||
@@ -148,14 +138,8 @@ function customerContactTypeDiv($obj, $stype, $values = null) {
|
|||||||
$class = 'detail';
|
$class = 'detail';
|
||||||
$column_class = array('field', 'value');
|
$column_class = array('field', 'value');
|
||||||
$rows = array(array('First Name', $values['first_name']),
|
$rows = array(array('First Name', $values['first_name']),
|
||||||
//array('Middle Name', $values['middle_name']),
|
|
||||||
array('Last Name', $values['last_name']),
|
array('Last Name', $values['last_name']),
|
||||||
array('Company', $values['company_name']),
|
array('Company', $values['company_name']),
|
||||||
//array('SSN', $values['id_federal']),
|
|
||||||
/* array('ID', ($values['id_local'] */
|
|
||||||
/* . ($values['id_local'] */
|
|
||||||
/* ? " - ".$values['id_local_state'] */
|
|
||||||
/* : ""))), */
|
|
||||||
array('Comment', $values['comment']));
|
array('Comment', $values['comment']));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -261,7 +245,7 @@ echo $form->input('id') . "\n";
|
|||||||
echo($this->element
|
echo($this->element
|
||||||
('form_table',
|
('form_table',
|
||||||
array('class' => 'item customer detail',
|
array('class' => 'item customer detail',
|
||||||
'caption' => $this->data ? 'Edit Customer' : 'New Customer',
|
'caption' => isset($this->data['Customer']) ? 'Edit Customer' : 'New Customer',
|
||||||
'fields' => array
|
'fields' => array
|
||||||
('name' => null,
|
('name' => null,
|
||||||
'comment' => null,
|
'comment' => null,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $rows = array(array('Name', $customer['Customer']['name']),
|
|||||||
|
|
||||||
echo $this->element('table',
|
echo $this->element('table',
|
||||||
array('class' => 'item customer detail',
|
array('class' => 'item customer detail',
|
||||||
'caption' => 'Tenant Info',
|
'caption' => 'Customer Info',
|
||||||
'rows' => $rows,
|
'rows' => $rows,
|
||||||
'column_class' => array('field', 'value')));
|
'column_class' => array('field', 'value')));
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ echo $this->element('leases',
|
|||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Current Tenant Lease Account History
|
* Current Customer Lease Account History
|
||||||
*/
|
*/
|
||||||
if (isset($current_lease['id'])) {
|
if (isset($current_lease['id'])) {
|
||||||
echo $this->element('ledger_entries',
|
echo $this->element('ledger_entries',
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ td.center { text-align: center; }
|
|||||||
/************************************************************
|
/************************************************************
|
||||||
************************************************************
|
************************************************************
|
||||||
* Item detail formats
|
* Item detail formats
|
||||||
* (such as Tenant Info, Unit Info, etc)
|
* (such as Customer Info, Unit Info, etc)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
table.detail { width : 60%;
|
table.detail { width : 60%;
|
||||||
|
|||||||
Reference in New Issue
Block a user