prepare new rule

This commit is contained in:
Frédéric FRANCE
2020-05-23 21:07:47 +02:00
parent 6522bb70fd
commit 174ddc5fd4
26 changed files with 223 additions and 512 deletions

View File

@@ -904,11 +904,9 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
{
// If before of next new year date
if ($date < $nextnewyeardate && $yearoffsettype == '+') $yearoffset = 1;
}
// If after or equal of current new year date
} // If after or equal of current new year date
elseif ($date >= $newyeardate && $yearoffsettype == '-') $yearoffset = -1;
}
// For backward compatibility
} // For backward compatibility
elseif (date("m", $date) < $maskraz && empty($resetEveryMonth)) { $yearoffset = -1; } // If current month lower that month of return to zero, year is previous year
if ($yearlen == 4) $yearcomp = sprintf("%04d", date("Y", $date) + $yearoffset);