-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Enable/fix PhanPluginPrintfIncompatibleArgumentTypeWeak occurences
# Fix: Enable/fix PhanPluginPrintfIncompatibleArgumentTypeWeak occurences Fix the PhanPluginPrintfIncompatibleArgumentTypeWeak occurences and fix the rule
- Loading branch information
Showing
39 changed files
with
82 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2004-2017 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2012 Regis Houssin <[email protected]> | ||
* Copyright (C) 2013-2023 Charlene BENKE <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -205,7 +206,7 @@ | |
print "<td>".dol_print_date(dol_mktime(1, 1, 1, $mois, 1, 2000), "%B")."</td>"; | ||
|
||
for ($annee = $year_start; $annee <= $year_end; $annee++) { | ||
$case = sprintf("%04s-%02s", $annee, $mois); | ||
$case = sprintf("%04d-%02d", $annee, $mois); | ||
|
||
print '<td class="right" width="10%"> '; | ||
if (isset($decaiss[$case]) && $decaiss[$case] > 0) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2016-2022 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2018-2020 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2018 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -260,12 +261,12 @@ | |
print '<th class="liste_titre right">'.$langs->trans("SelectedPeriod").'</th>'; | ||
foreach ($months as $k => $v) { | ||
if (($k + 1) >= $date_startmonth && $k < $date_endmonth) { | ||
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k + 1))).'</th>'; | ||
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02d", ($k + 1))).'</th>'; | ||
} | ||
} | ||
foreach ($months as $k => $v) { | ||
if (($k + 1) < $date_startmonth) { | ||
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k + 1))).'</th>'; | ||
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02d", ($k + 1))).'</th>'; | ||
} | ||
} | ||
print '</tr>'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2022-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2022 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -156,7 +158,7 @@ public function getNextValue($object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_asset_standard::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -148,7 +149,7 @@ public function getNextValue($objprod, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_bom_standard::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2015 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -145,7 +146,7 @@ public function getNextValue($objsoc, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog(__METHOD__." return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -160,7 +161,7 @@ public function getNextValue($objsoc, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_commande_marbre::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2011 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -29,7 +30,6 @@ | |
*/ | ||
class mod_contract_serpis extends ModelNumRefContracts | ||
{ | ||
|
||
// variables inherited from ModelNumRefContracts class | ||
public $name = 'Serpis'; | ||
public $version = 'dolibarr'; | ||
|
@@ -145,7 +145,7 @@ public function getNextValue($objsoc, $contract) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_contract_serpis::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2004-2008 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2010 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -163,7 +164,7 @@ public function getNextValue($objsoc, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_delivery_jade::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2011 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -151,7 +152,7 @@ public function getNextValue($objsoc, $shipment) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_expedition_safor::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2017 Maxime Kohlhaas <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -208,7 +209,7 @@ public function getNextValue($object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_expensereport_jade::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2005-2018 Regis Houssin <[email protected]> | ||
* Copyright (C) 2013 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -200,7 +201,7 @@ public function getNextValue($objsoc, $invoice, $mode = 'next') | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max); | ||
$num = sprintf("%04d", $max); | ||
} | ||
|
||
$ref = ''; | ||
|
@@ -229,7 +230,7 @@ public function getNextValue($objsoc, $invoice, $mode = 'next') | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* Copyright (C) 2005-2008 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2015 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -240,7 +241,7 @@ public function getNextValue($objsoc, $invoice, $mode = 'next') | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max); | ||
$num = sprintf("%04d", $max); | ||
} | ||
|
||
$ref = ''; | ||
|
@@ -268,7 +269,7 @@ public function getNextValue($objsoc, $invoice, $mode = 'next') | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2013 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -156,7 +157,7 @@ public function getNextValue($objsoc = '', $object = '') | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
return $this->prefix.$yymm."-".$num; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* Copyright (C) 2011 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2018-2023 Charlene Benke <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -30,7 +31,6 @@ | |
*/ | ||
class mod_holiday_madonna extends ModelNumRefHolidays | ||
{ | ||
|
||
// variables inherited from ModelNumRefHolidays class | ||
public $name = 'Madonna'; | ||
public $version = 'dolibarr'; | ||
|
@@ -146,7 +146,7 @@ public function getNextValue($objsoc, $holiday) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_holiday_madonna::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -156,7 +157,7 @@ public function getNextValue($object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_evaluation_standard::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2021 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2022-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -31,7 +32,6 @@ | |
*/ | ||
class mod_member_advanced extends ModeleNumRefMembers | ||
{ | ||
|
||
// variables inherited from ModeleNumRefMembers class | ||
public $name = 'Advanced'; | ||
public $version = 'dolibarr'; | ||
|
@@ -150,7 +150,7 @@ public function getNextValue($objsoc, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_member_advanced::getNextValue return ".$this->prefix.$yymm."-".$num, LOG_INFO); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -148,7 +149,7 @@ public function getNextValue($objprod, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_mo_standard::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?php | ||
/* Copyright (C) 2015 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -154,7 +155,7 @@ public function getNextValue($objsoc, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
} else { | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog(__METHOD__." return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2021 Christophe Battarel <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -150,7 +151,7 @@ public function getNextValue($objsoc, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; | ||
} else { // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_lot_standard::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2021 Christophe Battarel <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -150,7 +151,7 @@ public function getNextValue($objsoc, $object) | |
if ($max >= (pow(10, 4) - 1)) { | ||
$num = $max + 1; | ||
} else { // If counter > 9999, we do not format on 4 chars, we take number as it is | ||
$num = sprintf("%04s", $max + 1); | ||
$num = sprintf("%04d", $max + 1); | ||
} | ||
|
||
dol_syslog("mod_sn_standard::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
|
Oops, something went wrong.