Skip to content

Commit

Permalink
Merge pull request Dolibarr#20465 from FHenry/dev_entities_project_on…
Browse files Browse the repository at this point in the history
…o_update

new: entities is now updated on project update method
  • Loading branch information
eldy authored Mar 25, 2022
2 parents 6177e91 + 6774f0e commit c83bf49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions htdocs/projet/class/project.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ public function update($user, $notrigger = 0)
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();

Expand Down Expand Up @@ -507,6 +509,7 @@ public function update($user, $notrigger = 0)
$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);
Expand Down

0 comments on commit c83bf49

Please sign in to comment.