Skip to content

Commit

Permalink
Evarisk#3434 [Accident] fix: remove ACC_USER_EMPLOYER
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Oct 17, 2023
1 parent 43e0de7 commit 52480ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion langs/fr_FR/digiriskdolibarr.lang
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ AccidentMetaDataCreateTrigger = Enregistrement des données complémentaires de
AccidentLesionCreateTrigger = Lésion %s ajoutée à l'accident
AccidentLesionModifyTrigger = Lésion %s modifiée sur l'accident
AccidentLesionDeleteTrigger = Lésion %s supprimée de l'accident
ACC_USER_EMPLOYERSigned = Signature du reponsable de l'entreprise

# Mod Numbering - Modèle de numérotation
DigiriskAccidentNumberingModule = Modèle de numérotation des accidents de Digirisk
Expand Down
14 changes: 7 additions & 7 deletions view/accident/accident_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
$fk_soc = GETPOST('fk_soc');
// Initialize technical objects
$object = new Accident($db);
$signatory = new SaturneSignature($db, $object->module, $object->element);
//$signatory = new SaturneSignature($db, $object->module, $object->element);
$objectline = new AccidentWorkStop($db);
$contact = new Contact($db);
$usertmp = new User($db);
Expand Down Expand Up @@ -213,12 +213,12 @@
if (!$error) {
$result = $object->create($user, false);
if ($result > 0) {
if (empty($object->fk_user_employer)) {
$usertmp->fetch('', $mysoc->managers, $mysoc->id, 0, $conf->entity);
} else {
$usertmp->fetch($object->fk_user_employer);
}
$signatory->setSignatory($object->id, 'accident', 'user', array($usertmp->id), 'ACC_USER_EMPLOYER');
// if (empty($object->fk_user_employer)) {
// $usertmp->fetch('', $mysoc->managers, $mysoc->id, 0, $conf->entity);
// } else {
// $usertmp->fetch($object->fk_user_employer);
// }
// $signatory->setSignatory($object->id, 'accident', 'user', array($usertmp->id), 'ACC_USER_EMPLOYER');

// Creation Accident OK
$urltogo = str_replace('__ID__', $result, $backtopage);
Expand Down

0 comments on commit 52480ff

Please sign in to comment.