Include ref into label of log history

This commit is contained in:
Laurent Destailleur 2021-09-09 19:46:40 +02:00
parent b8b5b97d78
commit 6465e8aa36

View File

@ -550,9 +550,10 @@ if (empty($reshook)) {
$nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday);
$soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type);
$newSolde = ($soldeActuel - $nbopenedday);
$label = $langs->transnoentitiesnoconv("Holidays").' - '.$object->ref;
// The modification is added to the LOG
$result = $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $object->fk_type);
$result = $object->addLogCP($user->id, $object->fk_user, $label, $newSolde, $object->fk_type);
if ($result < 0) {
$error++;
setEventMessages(null, $object->errors, 'errors');