mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix: bug sur le module de numrotation orion.
Modif: gestion de la date de cration sur le module de numrotation titan, ce dernier gre correctement la date de cration car il se remet zro en dbut d'anne fiscale.
This commit is contained in:
@@ -75,14 +75,22 @@ function info()
|
||||
/** \brief Renvoi prochaine valeur attribu<62>e
|
||||
* \return string Valeur
|
||||
*/
|
||||
function getNextValue($date_creation)
|
||||
function getNextValue($date_creation = '')
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
// On d<>fini l'ann<6E>e fiscale
|
||||
$prefix='FA';
|
||||
$current_month = date("n");
|
||||
$create_month = strftime("%m",$date_creation);
|
||||
|
||||
if ($date_creation != '')
|
||||
{
|
||||
$create_month = strftime("%m",$date_creation);
|
||||
}
|
||||
else
|
||||
{
|
||||
$create_month = $current_month;
|
||||
}
|
||||
|
||||
if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
|
||||
{
|
||||
@@ -133,7 +141,7 @@ function info()
|
||||
* \param objsoc Objet soci<63>t<EFBFBD>
|
||||
* \return string Texte descripif
|
||||
*/
|
||||
function getNumRef($objsoc=0,$date_creation)
|
||||
function getNumRef($objsoc=0,$date_creation = '')
|
||||
{
|
||||
return $this->getNextValue($date_creation);
|
||||
}
|
||||
|
||||
@@ -75,14 +75,24 @@ function info()
|
||||
/** \brief Renvoi prochaine valeur attribu<62>e
|
||||
* \return string Valeur
|
||||
*/
|
||||
function getNextValue()
|
||||
function getNextValue($date_creation = '')
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
// D'abord on d<>fini l'ann<6E>e fiscale
|
||||
// On d<>fini l'ann<6E>e fiscale
|
||||
$prefix='FA';
|
||||
$current_month = date("n");
|
||||
if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
|
||||
|
||||
if ($date_creation != '')
|
||||
{
|
||||
$create_month = strftime("%m",$date_creation);
|
||||
}
|
||||
else
|
||||
{
|
||||
$create_month = $current_month;
|
||||
}
|
||||
|
||||
if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
|
||||
{
|
||||
$yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
|
||||
}
|
||||
@@ -135,9 +145,9 @@ function info()
|
||||
* \param objsoc Objet soci<63>t<EFBFBD>
|
||||
* \return string Texte descripif
|
||||
*/
|
||||
function getNumRef($objsoc=0)
|
||||
function getNumRef($objsoc=0,$date_creation = '')
|
||||
{
|
||||
return $this->getNextValue();
|
||||
return $this->getNextValue($date_creation);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user