Skip to content
Snippets Groups Projects
Commit cec09e0f authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

On désynchronise les statuts si un dossier existe

parent 74b2ea37
No related branches found
No related tags found
1 merge request!55Ll bug report services
...@@ -68,6 +68,7 @@ class MigrationIntervenants extends AbstractMigration ...@@ -68,6 +68,7 @@ class MigrationIntervenants extends AbstractMigration
i.tel_mobile, i.email, i.tel_mobile, i.email,
i.dep_naissance_id, i.dep_naissance_id,
i.ville_naissance_libelle, i.ville_naissance_libelle,
d.statut_id dossier_statut_id,
ai.tel_domicile, ai.tel_domicile,
ai.mention_complementaire, ai.mention_complementaire,
ai.batiment, ai.batiment,
...@@ -82,6 +83,7 @@ class MigrationIntervenants extends AbstractMigration ...@@ -82,6 +83,7 @@ class MigrationIntervenants extends AbstractMigration
intervenant_save i intervenant_save i
LEFT JOIN adresse_intervenant_save ai ON ai.intervenant_id = i.id LEFT JOIN adresse_intervenant_save ai ON ai.intervenant_id = i.id
LEFT JOIN pays p ON OSE_DIVERS.STR_REDUCE(p.libelle) = OSE_DIVERS.STR_REDUCE(ai.pays_libelle) LEFT JOIN pays p ON OSE_DIVERS.STR_REDUCE(p.libelle) = OSE_DIVERS.STR_REDUCE(ai.pays_libelle)
LEFT JOIN intervenant_dossier d ON d.histo_destruction IS NULL AND d.intervenant_id = i.id AND d.statut_id IS NOT NULL
"; ";
$bdd->trigger()->disable('F_INTERVENANT'); $bdd->trigger()->disable('F_INTERVENANT');
$bdd->trigger()->disable('F_INTERVENANT_S'); $bdd->trigger()->disable('F_INTERVENANT_S');
...@@ -112,6 +114,9 @@ class MigrationIntervenants extends AbstractMigration ...@@ -112,6 +114,9 @@ class MigrationIntervenants extends AbstractMigration
'ADRESSE_COMMUNE' => trim($i['VILLE'] . ' ' . ($i['ADRESSE_PAYS_ID'] ? null : $i['PAYS_LIBELLE'])), 'ADRESSE_COMMUNE' => trim($i['VILLE'] . ' ' . ($i['ADRESSE_PAYS_ID'] ? null : $i['PAYS_LIBELLE'])),
'ADRESSE_PAYS_ID' => $i['ADRESSE_PAYS_ID'], 'ADRESSE_PAYS_ID' => $i['ADRESSE_PAYS_ID'],
]; ];
if ($i['DOSSIER_STATUT_ID']) {
$data['SYNC_STATUT'] = false;
}
try { try {
$iTable->update($data, ['ID' => $i['ID']]); $iTable->update($data, ['ID' => $i['ID']]);
} catch (\Exception $e) { } catch (\Exception $e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment