mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 11:15:21 +01:00
utilisation des globals
This commit is contained in:
@@ -89,9 +89,9 @@ class mod_commande_diamant extends ModeleNumRefCommandes
|
||||
/** \brief Renvoi prochaine valeur attribu<62>e
|
||||
* \return string Valeur
|
||||
*/
|
||||
function getNextValue()
|
||||
function getNextValue($objsoc=0)
|
||||
{
|
||||
global $db;
|
||||
global $db, $conf;
|
||||
|
||||
// D'abord on r<>cup<75>re la valeur max (r<>ponse imm<6D>diate car champ ind<6E>x<EFBFBD>)
|
||||
$cyy='';
|
||||
@@ -121,24 +121,10 @@ class mod_commande_diamant extends ModeleNumRefCommandes
|
||||
}
|
||||
else
|
||||
{
|
||||
$max=0;
|
||||
}
|
||||
|
||||
if (!defined("COMMANDE_DIAMANT_DELTA"))
|
||||
{
|
||||
define("COMMANDE_DIAMANT_DELTA", 0);
|
||||
}
|
||||
|
||||
if ($max == 0)
|
||||
{
|
||||
$delta = COMMANDE_DIAMANT_DELTA;
|
||||
$num = sprintf("%05s",$delta);
|
||||
}
|
||||
else
|
||||
{
|
||||
$num = sprintf("%05s",$max+1);
|
||||
$max=$conf->global->COMMANDE_DIAMANT_DELTA?$conf->global->COMMANDE_DIAMANT_DELTA:0;
|
||||
}
|
||||
|
||||
$num = sprintf("%05s",$max+1);
|
||||
$yy = strftime("%y",time());
|
||||
|
||||
return "C$yy$num";
|
||||
|
||||
Reference in New Issue
Block a user