2
0
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:
Regis Houssin
2006-09-04 12:51:11 +00:00
parent 7d60a68b10
commit c295321fac
2 changed files with 9 additions and 7 deletions

View File

@@ -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);
}
}