Skip to content

Commit

Permalink
Evarisk#2599 [Mod] fix: backward wu become ut
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Jan 3, 2024
1 parent 22daf2e commit a693912
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class mod_workunitdocument_standard extends ModeleNumRefSaturne
/**
* @var string Numbering module ref prefix.
*/
public string $prefix = 'WUD';
public string $prefix = 'UTD';

/**
* @var string Name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class mod_workunit_standard extends ModeleNumRefSaturne
/**
* @var string Numbering module ref prefix.
*/
public string $prefix = 'WU';
public string $prefix = 'UT';

/**
* @var string Name.
Expand Down
12 changes: 6 additions & 6 deletions core/modules/modDigiriskDolibarr.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2103,9 +2103,6 @@ public function init($options = '')
dolibarr_set_const($this->db, 'MAIN_EXTRAFIELDS_USE_SELECT2', 1, 'integer', 0, '', $conf->entity);
}

dolibarr_set_const($this->db, 'DIGIRISKDOLIBARR_VERSION', $this->version, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($this->db, 'DIGIRISKDOLIBARR_DB_VERSION', $this->version, 'chaine', 0, '', $conf->entity);

if ($conf->global->CATEGORIE_RECURSIV_ADD == 0) {
dolibarr_set_const($this->db, 'CATEGORIE_RECURSIV_ADD', 1, 'integer', 0, '', $conf->entity);
}
Expand Down Expand Up @@ -2327,7 +2324,7 @@ public function init($options = '')
'RiskSign' => ['greip', 'RS{0}'],
'Evaluator' => ['bebhionn', 'EV{0}'],
'Groupment' => ['sirius', 'GP{0}'],
'WorkUnit' => ['canopus', 'WU{0}'],
'WorkUnit' => ['canopus', (empty($conf->global->DIGIRISKDOLIBARR_VERSION) || version_compare($conf->global->DIGIRISKDOLIBARR_VERSION, '9.14.1') >= 0 ? 'UT{0}' : 'WU{0}')],
'Accident' => ['curtiss', 'ACC{0}'],
'AccidentLesion' => ['wright', 'ACCL{0}'],
'AccidentWorkStop' => ['richthofen', 'ACCW{0}'],
Expand All @@ -2342,7 +2339,7 @@ public function init($options = '')
'ListingRisksAction' => ['gunnlod', 'RLA{0}'],
'ListingRisksPhoto' => ['fornjot', 'RLP{0}'],
'GroupmentDocument' => ['mundilfari', 'GPD{0}'],
'WorkUnitDocument' => ['hati', 'WUD{0}'],
'WorkUnitDocument' => ['hati', (empty($conf->global->DIGIRISKDOLIBARR_VERSION) || version_compare($conf->global->DIGIRISKDOLIBARR_VERSION, '9.14.1') >= 0 ? 'UTD{0}' : 'WUD{0}')],
'RiskAssessmentDocument' => ['eggther', 'DU{0}'],
'PreventionPlanDocument' => ['bestla', 'PPD{0}'],
'FirePermitDocument' => ['greip', 'FPD{0}'],
Expand Down Expand Up @@ -2375,7 +2372,10 @@ public function init($options = '')
rename($mediaPath . '/accident_investigationdocument', $mediaPath . '/accidentinvestigationdocument');
}

return $this->_init($sql, $options);
dolibarr_set_const($this->db, 'DIGIRISKDOLIBARR_VERSION', $this->version, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($this->db, 'DIGIRISKDOLIBARR_DB_VERSION', $this->version, 'chaine', 0, '', $conf->entity);

return $this->_init($sql, $options);
}

/**
Expand Down

0 comments on commit a693912

Please sign in to comment.