FIX default value for partnership status
This commit is contained in:
parent
ec29a6a608
commit
150f4c45d8
@ -9007,7 +9007,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
// Clean and check mandatory
|
// Clean and check mandatory
|
||||||
foreach ($keys as $key) {
|
foreach ($keys as $key) {
|
||||||
// If field is an implicit foreign key field
|
// If field is an implicit foreign key field (so type = 'integer:...')
|
||||||
if (preg_match('/^integer:/i', $this->fields[$key]['type']) && $values[$key] == '-1') {
|
if (preg_match('/^integer:/i', $this->fields[$key]['type']) && $values[$key] == '-1') {
|
||||||
$values[$key] = '';
|
$values[$key] = '';
|
||||||
}
|
}
|
||||||
@ -9027,7 +9027,7 @@ abstract class CommonObject
|
|||||||
$values[$key] = $this->quote($this->fields[$key]['default'], $this->fields[$key]);
|
$values[$key] = $this->quote($this->fields[$key]['default'], $this->fields[$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If field is an implicit foreign key field
|
// If field is an implicit foreign key field (so type = 'integer:...')
|
||||||
if (preg_match('/^integer:/i', $this->fields[$key]['type']) && empty($values[$key])) {
|
if (preg_match('/^integer:/i', $this->fields[$key]['type']) && empty($values[$key])) {
|
||||||
if (isset($this->fields[$key]['default'])) {
|
if (isset($this->fields[$key]['default'])) {
|
||||||
$values[$key] = ((int) $this->fields[$key]['default']);
|
$values[$key] = ((int) $this->fields[$key]['default']);
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
CREATE TABLE llx_partnership(
|
CREATE TABLE llx_partnership(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||||
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
||||||
status smallint NOT NULL DEFAULT '0',
|
status smallint DEFAULT 0 NOT NULL,
|
||||||
fk_type integer DEFAULT 0 NOT NULL,
|
fk_type integer DEFAULT 0 NOT NULL,
|
||||||
fk_soc integer,
|
fk_soc integer,
|
||||||
fk_member integer,
|
fk_member integer,
|
||||||
|
|||||||
@ -118,7 +118,7 @@ class Partnership extends CommonObject
|
|||||||
'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
|
'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
|
||||||
'date_partnership_start' => array('type'=>'date', 'label'=>'DatePartnershipStart', 'enabled'=>'1', 'position'=>52, 'notnull'=>1, 'visible'=>1,),
|
'date_partnership_start' => array('type'=>'date', 'label'=>'DatePartnershipStart', 'enabled'=>'1', 'position'=>52, 'notnull'=>1, 'visible'=>1,),
|
||||||
'date_partnership_end' => array('type'=>'date', 'label'=>'DatePartnershipEnd', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>1,),
|
'date_partnership_end' => array('type'=>'date', 'label'=>'DatePartnershipEnd', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>1,),
|
||||||
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>2, 'index'=>1, 'arrayofkeyval'=>array('-1'=>'','0'=>'Draft', '1'=>'Accepted', '2'=>'Refused', '9'=>'Terminated'),),
|
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>2, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('-1'=>'','0'=>'Draft', '1'=>'Accepted', '2'=>'Refused', '9'=>'Terminated'),),
|
||||||
'url_to_check' => array('type'=>'varchar(255)', 'label'=>'UrlToCheck', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1),
|
'url_to_check' => array('type'=>'varchar(255)', 'label'=>'UrlToCheck', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1),
|
||||||
'count_last_url_check_error' => array('type'=>'integer', 'label'=>'CountLastUrlCheckError', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>-2, 'default'=>'0',),
|
'count_last_url_check_error' => array('type'=>'integer', 'label'=>'CountLastUrlCheckError', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>-2, 'default'=>'0',),
|
||||||
'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>-2,),
|
'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>-2,),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user