forked from Wavyzz/dolibarr
Modif: le modle de numrotation orion se base sur la date de cration de la facture pour incrmenter l'anne fiscale
This commit is contained in:
@@ -75,14 +75,16 @@ 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)
|
||||
$create_month = strftime("%m",$date_creation);
|
||||
|
||||
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));
|
||||
}
|
||||
@@ -131,9 +133,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