Skip to content
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

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

evarisk-micka
Copy link
Collaborator

No description provided.

@evarisk-micka evarisk-micka added Enhancement New feature or request 3 labels Feb 29, 2024
@evarisk-micka evarisk-micka self-assigned this Feb 29, 2024
@evarisk-micka evarisk-micka linked an issue Feb 29, 2024 that may be closed by this pull request
$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);
Copy link
Contributor

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>' : '';
Copy link
Contributor

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 {
Copy link
Contributor

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 ?

@theodaviddd theodaviddd merged commit 00b3a92 into Evarisk:develop Aug 27, 2024
@evarisk-micka evarisk-micka deleted the add_infos_on_list branch August 28, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 Enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Ajout de la date de validation dans le listing des dates
2 participants