-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1719 [List] add: last dates and answer/question on control and survey #1750
Conversation
0c621b3
to
fd56108
Compare
$lastValidateAction = $actioncomm->getActions(0, $object->id, 'control@digiquali', ' AND a.code = "AC_CONTROL_VALIDATE"', 'a.datep', 'DESC', 1); | ||
$lastReOpenAction = $actioncomm->getActions(0, $object->id, 'control@digiquali', ' AND a.code = "AC_CONTROL_UNVALIDATE"', 'a.datep', 'DESC', 1); | ||
|
||
$lastValidateDate = (is_array($lastValidateAction) && !empty($lastValidateAction) ? $lastValidateAction[0]->datec : 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dernière condition du ternaire met un '' plutot que 0
$lastReOpenDate = (is_array($lastValidateAction) && !empty($lastValidateAction) ? $lastReOpenAction[0]->datec : 0); | ||
|
||
print '<td class="' . $resource['css'] . '">'; | ||
print $lastValidateDate > 0 ? $langs->trans('ValidationDate') . ': <br>' . dol_print_date($lastValidateDate, 'dayhour') . '<br>' : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ici check sur dol_strlen vu que c'est une string, c'est plus clean que > 0
print '<td class="' . $resource['css'] . '">'; | ||
print $lastValidateDate > 0 ? $langs->trans('ValidationDate') . ': <br>' . dol_print_date($lastValidateDate, 'dayhour') . '<br>' : ''; | ||
print $lastReOpenDate > 0 ? $langs->trans('ReOpenDate') . ': <br>' . dol_print_date($lastReOpenDate, 'dayhour') . '<br>' : ''; | ||
print '</td>'; | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ca fait mal de voir un doublon de cette taille là y a pas moyen de merger survey_list et control_list ?
fd56108
to
6f572d3
Compare
No description provided.