Merge branch '13.0' of https://github.com/SylvainLegrand/dolibarr into 13.0
This commit is contained in:
commit
70c85cfd72
@ -3120,8 +3120,7 @@ class Societe extends CommonObject
|
|||||||
setEventMessages('la maison mère choisie est déjà filiale de ce tiers', null, 'warnings');
|
setEventMessages('la maison mère choisie est déjà filiale de ce tiers', null, 'warnings');
|
||||||
return -1;
|
return -1;
|
||||||
} // elseif ($sameparent == 1)
|
} // elseif ($sameparent == 1)
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.$this->id;
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.$this->id;
|
||||||
dol_syslog(get_class($this).'::set_parent', LOG_DEBUG);
|
dol_syslog(get_class($this).'::set_parent', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@ -3130,7 +3129,7 @@ class Societe extends CommonObject
|
|||||||
$this->parent = $id;
|
$this->parent = $id;
|
||||||
return 1;
|
return 1;
|
||||||
} // if ($resql)
|
} // if ($resql)
|
||||||
else return -1;
|
else return -1;
|
||||||
} // else // elseif ($sameparent == 1)
|
} // else // elseif ($sameparent == 1)
|
||||||
} // if ($this->id)
|
} // if ($this->id)
|
||||||
else return -1;
|
else return -1;
|
||||||
@ -3157,10 +3156,10 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
if ($obj->parent == '') return 0;
|
if ($obj->parent == '') return 0;
|
||||||
elseif ($obj->parent == $idchild) return 1;
|
elseif ($obj->parent == $idchild) return 1;
|
||||||
else $sameparent = $this->get_parents($obj->parent, $idchild);
|
else $sameparent = $this->get_parents($obj->parent, $idchild);
|
||||||
return $sameparent;
|
return $sameparent;
|
||||||
} // if ($resql)
|
} // if ($resql)
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user