Skip to content

Commit

Permalink
[PreventionPlanDoc] fix: add ref on digiriskElement
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Sep 10, 2021
1 parent bde0c19 commit 83cb95d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
$tmparray['photoDefault'] = $image['fullname'];
}

$digiriskelement = new DigiriskElement($this->db);
$resources = new DigiriskResources($this->db);
$signatory = new PreventionPlanSignature($this->db);
$societe = new Societe($this->db);
Expand Down Expand Up @@ -421,8 +422,10 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails

foreach ($preventionplanlines as $line) {

$digiriskelement->fetch($line->fk_element);

$tmparray['key_unique'] = $line->ref;
$tmparray['unite_travail'] = $line->fk_element;
$tmparray['unite_travail'] = $digiriskelement->ref . " - " . $digiriskelement->label;
$tmparray['action'] = $line->description;
$tmparray['risk'] = DOL_DOCUMENT_ROOT . '/custom/digiriskdolibarr/img/categorieDangers/' . $risk->get_danger_category($line) . '.png';
$tmparray['prevention'] = $line->prevention_method;
Expand Down

0 comments on commit 83cb95d

Please sign in to comment.