Skip to content

Commit

Permalink
[AdminConf] add: check multicompany and shared risk for active conf
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Apr 14, 2022
1 parent 3f60aa3 commit 1e5249f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions admin/config/riskassessmentdocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,20 @@
print '</td>';
print '</tr>';

print '<tr class="oddeven"><td>';
print $langs->trans('ShowSharedRisks');
print "</td><td>";
print $langs->trans('ShowSharedRisksDescription');
print '</td>';

print '<td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_SHOW_SHARED_RISKS');
print '</td>';
print '</tr>';
$result = !empty($conf->mc->entities['risk']) ? strpos($conf->mc->entities['risk'], $conf->entity) : 0;

if ($conf->multicompany->enabled && !empty($conf->mc->sharings['risk']) && $result > 0) {
print '<tr class="oddeven"><td>';
print $langs->trans('ShowSharedRisks');
print "</td><td>";
print $langs->trans('ShowSharedRisksDescription');
print '</td>';

print '<td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_SHOW_SHARED_RISKS');
print '</td>';
print '</tr>';
}

print '</table>';
print '<hr>';
Expand Down

0 comments on commit 1e5249f

Please sign in to comment.