This commit is contained in:
Laurent Destailleur 2022-09-21 23:52:17 +02:00
parent 6c17c2f044
commit 92aac0dca3

View File

@ -3363,6 +3363,8 @@ class ContratLigne extends CommonObjectLine
// If we change a planned date (start or end), sync dates for all services
if (!$error && !empty($conf->global->CONTRACT_SYNC_PLANNED_DATE_OF_SERVICES)) {
dol_syslog(get_class($this)."::update CONTRACT_SYNC_PLANNED_DATE_OF_SERVICES is on so we update date for all lines", LOG_DEBUG);
if ($this->date_ouverture_prevue != $this->oldcopy->date_ouverture_prevue) {
$sql = 'UPDATE '.MAIN_DB_PREFIX.'contratdet SET';
$sql .= " date_ouverture_prevue = ".($this->date_ouverture_prevue != '' ? "'".$this->db->idate($this->date_ouverture_prevue)."'" : "null");