mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix end date of survey (day must be included)
This commit is contained in:
parent
69b30ac8c4
commit
07c2feb69c
|
|
@ -321,7 +321,7 @@ if ($action == 'edit') {
|
|||
print $form->selectDate($expiredate ? $expiredate : $object->date_fin, 'expire', 0, 0, 0, '', 1, 0);
|
||||
} else {
|
||||
print dol_print_date($object->date_fin, 'day');
|
||||
if ($object->date_fin && $object->date_fin < dol_now() && $object->status == Opensurveysondage::STATUS_VALIDATED) {
|
||||
if ($object->date_fin && dol_get_last_hour($object->date_fin) < dol_now() && $object->status == Opensurveysondage::STATUS_VALIDATED) {
|
||||
print img_warning($langs->trans("Expired"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ $result = $object->fetch(0, $numsondage);
|
|||
$nblines = $object->fetch_lines();
|
||||
|
||||
//If the survey has not yet finished, then it can be modified
|
||||
$canbemodified = ((empty($object->date_fin) || $object->date_fin > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED);
|
||||
$canbemodified = ((empty($object->date_fin) || dol_get_last_hour($object->date_fin) > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED);
|
||||
|
||||
// Security check
|
||||
if (!isModEnabled('opensurvey')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user