Got rid of the temporary function to determine unit status enums, and switched over to actually querying the database. Eliminated a legend entry for DELETED since no one should ever see a unit like that given that it should be, well, deleted. Modified the legend algorithm slightly to fix the number of rows instead of columns, since the placement algorithm works through the rows before moving to the next column.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@206 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -40,6 +40,10 @@ class Unit extends AppModel {
|
||||
return $status_enums;
|
||||
}
|
||||
|
||||
function activeStatusEnums() {
|
||||
return array_diff_key($this->statusEnums(), array(''=>1, 'DELETED'=>1));
|
||||
}
|
||||
|
||||
function statusValue($enum) {
|
||||
$enums = $this->statusEnums();
|
||||
return $enums[$enum];
|
||||
|
||||
Reference in New Issue
Block a user