forked from Wavyzz/dolibarr
Fix CI
This commit is contained in:
@@ -1154,7 +1154,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
|||||||
|
|
||||||
// Define $yearcomp and $monthcomp (that will be use in the select where to search max number)
|
// Define $yearcomp and $monthcomp (that will be use in the select where to search max number)
|
||||||
$monthcomp = $maskraz;
|
$monthcomp = $maskraz;
|
||||||
$yearcomp = 0;
|
$yearcomp = '';
|
||||||
|
|
||||||
if (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && $yearoffsettype != '=') { // $yearoffsettype is - or +
|
if (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && $yearoffsettype != '=') { // $yearoffsettype is - or +
|
||||||
$currentyear = (int) date("Y", $date);
|
$currentyear = (int) date("Y", $date);
|
||||||
@@ -1183,7 +1183,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
|||||||
} elseif ($yearlen == 2) {
|
} elseif ($yearlen == 2) {
|
||||||
$yearcomp = sprintf("%02d", idate("y", $date) + $yearoffset);
|
$yearcomp = sprintf("%02d", idate("y", $date) + $yearoffset);
|
||||||
} elseif ($yearlen == 1) {
|
} elseif ($yearlen == 1) {
|
||||||
$yearcomp = (int) substr(date('y', $date), 1, 1) + $yearoffset;
|
$yearcomp = (string) ((int) substr(date('y', $date), 1, 1) + $yearoffset);
|
||||||
}
|
}
|
||||||
if ($monthcomp > 1 && empty($resetEveryMonth)) { // Test with month is useless if monthcomp = 1 (0 is same as 1)
|
if ($monthcomp > 1 && empty($resetEveryMonth)) { // Test with month is useless if monthcomp = 1 (0 is same as 1)
|
||||||
if ($yearlen == 4) {
|
if ($yearlen == 4) {
|
||||||
|
|||||||
Reference in New Issue
Block a user