projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ea7d1f
)
DataObjects/Core_company.php
author
Edward
<edward@roojs.com>
Wed, 27 Feb 2019 05:04:17 +0000
(13:04 +0800)
committer
Edward
<edward@roojs.com>
Wed, 27 Feb 2019 05:04:17 +0000
(13:04 +0800)
DataObjects/Core_company.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_company.php
b/DataObjects/Core_company.php
index
aafd057
..
aca5be8
100644
(file)
--- a/
DataObjects/Core_company.php
+++ b/
DataObjects/Core_company.php
@@
-255,6
+255,18
@@
class Pman_Core_DataObjects_Core_Company extends DB_DataObject
{
// we still use comptype in some old systems...
+ if(!empty($q['comptype']) && empty($q['comptype_id'])) {
+ $en = DB_DataObject::Factory('core_enum');
+ $en->setFrom(array(
+ 'etype' => 'COMPTYPE',
+ 'name' => $q['comptype'],
+ 'active' => 1
+ ));
+ if($en->find(true)) {
+ $this->comptype_id = $en->id;
+ }
+ }
+
if (!empty($q['comptype_id'])) {
$en = DB_DataObject::Factory('core_enum');
$en->get($q['comptype_id']);