Update subscription.php

This commit is contained in:
daraelmin 2021-11-03 22:31:45 +01:00 committed by GitHub
parent 0e91b32e99
commit f9db196512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -943,7 +943,7 @@ if ($rowid > 0) {
} }
if (!$datefrom) { if (!$datefrom) {
$datefrom = $object->datevalid; $datefrom = $object->datevalid;
if ($object->datefin > 0 && dol_now() > dol_time_plus_duree(dol_time_plus_duree($object->datefin, 2 * $defaultdelay, $defaultdelayunit), -1, 'd')) { if ($object->datefin > 0 && dol_now() < dol_time_plus_duree(dol_time_plus_duree($object->datefin, 2 * $defaultdelay, $defaultdelayunit), -1, 'd')) {
$datefrom = dol_time_plus_duree($object->datefin, 1, 'd'); $datefrom = dol_time_plus_duree($object->datefin, 1, 'd');
} else { } else {
$datefrom = dol_get_first_day(dol_print_date(time(), "%Y")); $datefrom = dol_get_first_day(dol_print_date(time(), "%Y"));