projects
/
Pman.Xtuple
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93384c6
)
DataObjects/Custinfo.php
author
Alan Knowles
<alan@roojs.com>
Wed, 25 Feb 2015 06:18:46 +0000
(14:18 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 25 Feb 2015 06:18:46 +0000
(14:18 +0800)
DataObjects/Custinfo.php
patch
|
blob
|
history
diff --git
a/DataObjects/Custinfo.php
b/DataObjects/Custinfo.php
index
4ea8fd6
..
c74a417
100644
(file)
--- a/
DataObjects/Custinfo.php
+++ b/
DataObjects/Custinfo.php
@@
-487,7
+487,7
@@
class Pman_Xtuple_DataObjects_Custinfo extends DB_DataObject
}
- function initDatabase()
+ function initDatabase(
$roo
)
{
if ($this->count()) {
return;
@@
-510,11
+510,12
@@
class Pman_Xtuple_DataObjects_Custinfo extends DB_DataObject
$companies->find(true);
- $this->setFrom($this->defaults());
+
$this->setFrom(array(
'cust_name' => $companies->name,
'cust_number' => empty($companies->code) ? strtoupper(preg_replace('/[^a-z0-9]+/i', '', $companies->name)) : $companies->code,
));
+ $this->beforeInsert(array(), $roo);
$this->insert();