From c4745e1a81413a908d6d04a7b2fc4e287e216f88 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 28 May 2007 19:47:21 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20on=20ne=20prend=20pas=20en=20compte=20le?= =?UTF-8?q?=20mois=20de=20janvier=20pour=20le=20debut=20d'ann=E9e=20fiscal?= =?UTF-8?q?e=20car=20il=20est=20pris=20par=20defaut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commande/modules/mod_commande_fournisseur_orchidee.php | 2 +- htdocs/includes/modules/commande/mod_commande_emeraude.php | 2 +- htdocs/includes/modules/commande/mod_commande_rubis.php | 2 +- htdocs/includes/modules/commande/mod_commande_saphir.php | 2 +- htdocs/includes/modules/facture/orion/orion.modules.php | 2 +- htdocs/includes/modules/facture/pluton/pluton.modules.php | 2 +- htdocs/includes/modules/facture/titan/titan.modules.php | 2 +- htdocs/includes/modules/fichinter/mod_arctic.php | 2 +- htdocs/includes/modules/propale/mod_propale_emeraude.php | 2 +- htdocs/includes/modules/propale/mod_propale_rubis.php | 2 +- htdocs/includes/modules/propale/mod_propale_saphir.php | 2 +- htdocs/livraison/mods/mod_livraison_saphir.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/fourn/commande/modules/mod_commande_fournisseur_orchidee.php b/htdocs/fourn/commande/modules/mod_commande_fournisseur_orchidee.php index 2ced28e3841..fbdf39f22aa 100644 --- a/htdocs/fourn/commande/modules/mod_commande_fournisseur_orchidee.php +++ b/htdocs/fourn/commande/modules/mod_commande_fournisseur_orchidee.php @@ -352,7 +352,7 @@ function info() } // On change d'année fiscal si besoin - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear); } diff --git a/htdocs/includes/modules/commande/mod_commande_emeraude.php b/htdocs/includes/modules/commande/mod_commande_emeraude.php index b0bfd078180..27215dd34c2 100644 --- a/htdocs/includes/modules/commande/mod_commande_emeraude.php +++ b/htdocs/includes/modules/commande/mod_commande_emeraude.php @@ -90,7 +90,7 @@ class mod_commande_emeraude extends ModeleNumRefCommandes // D'abord on défini l'année fiscale $prefix='C'; $current_month = date("n"); - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)); } diff --git a/htdocs/includes/modules/commande/mod_commande_rubis.php b/htdocs/includes/modules/commande/mod_commande_rubis.php index dbdfe0c409d..a18e1c66aa6 100644 --- a/htdocs/includes/modules/commande/mod_commande_rubis.php +++ b/htdocs/includes/modules/commande/mod_commande_rubis.php @@ -90,7 +90,7 @@ class mod_commande_rubis extends ModeleNumRefCommandes // D'abord on défini l'année fiscale $prefix='C'; $current_month = date("n"); - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)); } diff --git a/htdocs/includes/modules/commande/mod_commande_saphir.php b/htdocs/includes/modules/commande/mod_commande_saphir.php index ec4e997cbb4..5422950443e 100644 --- a/htdocs/includes/modules/commande/mod_commande_saphir.php +++ b/htdocs/includes/modules/commande/mod_commande_saphir.php @@ -354,7 +354,7 @@ function info() } // On change d'année fiscal si besoin - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear); } diff --git a/htdocs/includes/modules/facture/orion/orion.modules.php b/htdocs/includes/modules/facture/orion/orion.modules.php index 52dc2857328..7c4eebb4568 100644 --- a/htdocs/includes/modules/facture/orion/orion.modules.php +++ b/htdocs/includes/modules/facture/orion/orion.modules.php @@ -93,7 +93,7 @@ function info() $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) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $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)); } diff --git a/htdocs/includes/modules/facture/pluton/pluton.modules.php b/htdocs/includes/modules/facture/pluton/pluton.modules.php index 3d6a5cbe723..38a8a906e2a 100644 --- a/htdocs/includes/modules/facture/pluton/pluton.modules.php +++ b/htdocs/includes/modules/facture/pluton/pluton.modules.php @@ -398,7 +398,7 @@ function info() } // On change d'année fiscal si besoin - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear); } diff --git a/htdocs/includes/modules/facture/titan/titan.modules.php b/htdocs/includes/modules/facture/titan/titan.modules.php index b4327a1432e..c15b421d31f 100644 --- a/htdocs/includes/modules/facture/titan/titan.modules.php +++ b/htdocs/includes/modules/facture/titan/titan.modules.php @@ -94,7 +94,7 @@ function info() $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) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $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)); } diff --git a/htdocs/includes/modules/fichinter/mod_arctic.php b/htdocs/includes/modules/fichinter/mod_arctic.php index 8372d84c936..e3152c18564 100644 --- a/htdocs/includes/modules/fichinter/mod_arctic.php +++ b/htdocs/includes/modules/fichinter/mod_arctic.php @@ -354,7 +354,7 @@ function info() } // On change d'année fiscal si besoin - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear); } diff --git a/htdocs/includes/modules/propale/mod_propale_emeraude.php b/htdocs/includes/modules/propale/mod_propale_emeraude.php index 1934f378f97..960eae658db 100644 --- a/htdocs/includes/modules/propale/mod_propale_emeraude.php +++ b/htdocs/includes/modules/propale/mod_propale_emeraude.php @@ -89,7 +89,7 @@ class mod_propale_emeraude extends ModeleNumRefPropales // D'abord on défini l'année fiscale $prefix='PR'; $current_month = date("n"); - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)); } diff --git a/htdocs/includes/modules/propale/mod_propale_rubis.php b/htdocs/includes/modules/propale/mod_propale_rubis.php index 6916b3425d1..e8f7be37f87 100644 --- a/htdocs/includes/modules/propale/mod_propale_rubis.php +++ b/htdocs/includes/modules/propale/mod_propale_rubis.php @@ -89,7 +89,7 @@ class mod_propale_rubis extends ModeleNumRefPropales // D'abord on défini l'année fiscale $prefix='PR'; $current_month = date("n"); - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)); } diff --git a/htdocs/includes/modules/propale/mod_propale_saphir.php b/htdocs/includes/modules/propale/mod_propale_saphir.php index 53a8eba4d7e..48ac5c59a67 100644 --- a/htdocs/includes/modules/propale/mod_propale_saphir.php +++ b/htdocs/includes/modules/propale/mod_propale_saphir.php @@ -343,7 +343,7 @@ function info() } // On change d'année fiscal si besoin - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear); } diff --git a/htdocs/livraison/mods/mod_livraison_saphir.php b/htdocs/livraison/mods/mod_livraison_saphir.php index 93a6cbce417..2e53de5d29d 100644 --- a/htdocs/livraison/mods/mod_livraison_saphir.php +++ b/htdocs/livraison/mods/mod_livraison_saphir.php @@ -356,7 +356,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder } // On change d'année fiscal si besoin - if($conf->global->SOCIETE_FISCAL_MONTH_START && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) + if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START) { $this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear); }