Fix trad/compatibility

This commit is contained in:
Laurent Destailleur 2018-03-19 15:00:50 +01:00
parent ac9ab7b228
commit eb03fb7540
2 changed files with 16 additions and 14 deletions

View File

@ -814,21 +814,23 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" onsubmit="return valider()" name="demandeCP">'."\n";
print '<input type="hidden" name="action" value="create" />'."\n";
dol_fiche_head('', '', '', -1);
if (empty($conf->global->HOLIDAY_HIDE_BALANCE))
{
dol_fiche_head('', '', '', -1);
$out='';
$typeleaves=$object->getTypes(1,1);
foreach($typeleaves as $key => $val)
{
$nb_type = $object->getCPforUser($user->id, $val['rowid']);
$nb_holiday += $nb_type;
$out .= ' - '.$val['label'].': <strong>'.($nb_type?price2num($nb_type):0).'</strong><br>';
}
print $langs->trans('SoldeCPUser', round($nb_holiday,5)).'<br>';
print $out;
dol_fiche_end();
$out='';
$typeleaves=$object->getTypes(1,1);
foreach($typeleaves as $key => $val)
{
$nb_type = $object->getCPforUser($user->id, $val['rowid']);
$nb_holiday += $nb_type;
$out .= ' - '.$val['label'].': <strong>'.($nb_type?price2num($nb_type):0).'</strong><br>';
}
print $langs->trans('SoldeCPUser', round($nb_holiday,5)).'<br>';
print $out;
dol_fiche_end();
}
dol_fiche_head();

View File

@ -81,7 +81,7 @@ EmployeeFirstname=Employee first name
TypeWasDisabledOrRemoved=Leave type (id %s) was disabled or removed
LastHolidays=Latest %s leave requests
AllHolidays=All leave requests
LEAVE_PAID=Paid vacationxx
LEAVE_PAID=Paid vacation
LEAVE_SICK=Sick leave
LEAVE_OTHER=Other leave
LEAVE_PAID_FR=Paid vacation