This commit is contained in:
Regis Houssin 2006-05-03 11:47:26 +00:00
parent c218df86ed
commit 1710b3ecf0
2 changed files with 23 additions and 10 deletions

View File

@ -88,11 +88,17 @@ function info()
} }
$num = $num + 1; $num = $num + 1;
$current_month = date("n"); $current_month = date("n");
if($current_month >= $conf->global->FISCAL_MONTH_START)
$y = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)); if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->FISCAL_MONTH_START)
else {
$y = strftime("%y",time()); $y = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
}
else
{
$y = strftime("%y",time());
}
return "FA" . "$y" . substr("0000".$num, strlen("0000".$num)-5,5); return "FA" . "$y" . substr("0000".$num, strlen("0000".$num)-5,5);
} }

View File

@ -88,12 +88,19 @@ class mod_propale_emeraude extends ModeleNumRefPropales
$num = $row[0]; $num = $row[0];
} }
$current_month = date("n");
if($current_month >= $conf->global->FISCAL_MONTH_START) $current_month = date("n");
if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->FISCAL_MONTH_START)
{
$y = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)); $y = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
else }
$y = strftime("%y",time()); else
$num = $num + 1; {
$y = strftime("%y",time());
}
$num = $num + 1;
return "PR" . "$y" . substr("0000".$num, strlen("0000".$num)-5,5); return "PR" . "$y" . substr("0000".$num, strlen("0000".$num)-5,5);
} }