Implemented edit functionality for customer. Like with contacts, the interface leaves much to be desired, since it's limited in functionality. Namely, you can add a contact, but you can't add contact methods (phone/mail/email). Also, it doesn't use jqGrid to present the selection choices, and so the user is stuck with the fields we've chosen to display, as well as the sort order we've chosen. Enhancement is possible someday, but for now, it gets the job done.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@219 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-06 02:06:23 +00:00
parent ab0e85824b
commit 09cb297dc7
5 changed files with 379 additions and 1 deletions

View File

@@ -1,7 +1,8 @@
<?php
class Contact extends AppModel {
var $name = 'Contact';
var $displayField = 'display_name';
var $validate = array(
'id' => array('numeric'),
'display_name' => array('notempty'),
@@ -11,6 +12,7 @@ class Contact extends AppModel {
var $hasMany = array(
'ContactsMethod',
'ContactsCustomer',
);
var $hasAndBelongsToMany = array(
@@ -35,5 +37,12 @@ class Contact extends AppModel {
),
);
function contactList() {
return $this->find('list',
array('order' =>
//array('last_name', 'first_name', 'middle_name'),
array('display_name'),
));
}
}
?>