Merge pull request #20465 from FHenry/dev_entities_project_ono_update

new: entities is now updated on project update method
This commit is contained in:
Laurent Destailleur 2022-03-25 13:54:42 +01:00 committed by GitHub
commit c83bf49b6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -479,6 +479,8 @@ class Project extends CommonObject
return -3;
}
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
if (dol_strlen(trim($this->ref)) > 0) {
$this->db->begin();
@ -507,6 +509,7 @@ class Project extends CommonObject
$sql .= ", accept_booth_suggestions = ".($this->accept_booth_suggestions ? 1 : 0);
$sql .= ", price_registration = ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : "null");
$sql .= ", price_booth = ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : "null");
$sql .= ", entity = ".((int) $this->entity);
$sql .= " WHERE rowid = ".((int) $this->id);
dol_syslog(get_class($this)."::update", LOG_DEBUG);