diff --git a/htdocs/fourn/commande/modules/mod_commande_fournisseur_diamant.php b/htdocs/fourn/commande/modules/mod_commande_fournisseur_diamant.php
index 57e2a57a163..823d568f45e 100644
--- a/htdocs/fourn/commande/modules/mod_commande_fournisseur_diamant.php
+++ b/htdocs/fourn/commande/modules/mod_commande_fournisseur_diamant.php
@@ -53,7 +53,7 @@ class mod_commande_fournisseur_diamant extends ModeleNumRefCommandesSuppliers
*/
function info()
{
- $texte = "Renvoie le numéro sous la forme numérique CYYNNNN, où YY représente l'année et NNNN Le numéro d'incrément. Ce dernier n'est PAS remis à zéro en début d'année.
\n";
+ $texte = "Renvoie le numéro sous la forme numérique CFYYNNNN, où YY représente l'année et NNNN Le numéro d'incrément. Ce dernier n'est PAS remis à zéro en début d'année.
\n";
$texte.= "Si la constante COMMANDE_FOURNISSEUR_DIAMANT_DELTA est définie, un offset est appliqué sur le compteur";
if (defined("COMMANDE_FOURNISSEUR_DIAMANT_DELTA"))
@@ -78,11 +78,11 @@ class mod_commande_fournisseur_diamant extends ModeleNumRefCommandesSuppliers
if (defined("COMMANDE_FOURNISSEUR_DIAMANT_DELTA"))
{
$num = sprintf("%02d",COMMANDE_FOURNISSEUR_DIAMANT_DELTA);
- return "C".$y.substr("000".$num, strlen("000".$num)-4,4);
+ return "CF".$y.substr("000".$num, strlen("000".$num)-4,4);
}
else
{
- return "C".$y."0001";
+ return "CF".$y."0001";
}
}
@@ -115,7 +115,7 @@ class mod_commande_fournisseur_diamant extends ModeleNumRefCommandesSuppliers
$y = strftime("%y",time());
- return 'C'.$y.substr("000".$num, strlen("000".$num)-4,4);
+ return 'CF'.$y.substr("000".$num, strlen("000".$num)-4,4);
}
}
?>
diff --git a/htdocs/fourn/commande/modules/mod_commande_fournisseur_emeraude.php b/htdocs/fourn/commande/modules/mod_commande_fournisseur_emeraude.php
new file mode 100644
index 00000000000..9b0f6aadaea
--- /dev/null
+++ b/htdocs/fourn/commande/modules/mod_commande_fournisseur_emeraude.php
@@ -0,0 +1,91 @@
+
+ * Copyright (C) 2005-2006 Regis Houssin
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * or see http://www.gnu.org/
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+
+/**
+ \file htdocs/fourn/commande/modules/pdf/mod_commande_fournisseur_emeraude.php
+ \ingroup fournisseur
+ \brief Fichier contenant la classe du modèle de numérotation de référence de commande fournisseur Emeraude
+ \version $Revision$
+*/
+
+include_once("modules_commandefournisseur.php");
+
+
+/**
+ \class mod_commande_fournisseur_emeraude
+ \brief Classe du modèle de numérotation de référence de commande fournisseur Emeraude
+*/
+
+class mod_commande_fournisseur_emeraude extends ModeleNumRefCommandesSuppliers
+{
+
+ /** \brief Constructeur
+ */
+ function mod_commande_fournisseur_emeraude()
+ {
+ $this->nom = "Emeraude";
+ }
+
+
+ /** \brief Renvoi la description du modele de numérotation
+ * \return string Texte descripif
+ */
+ function info()
+ {
+ $texte = "Renvoie le numéro sous la forme numérique CFNNNNNN, où NNNNNN représente numéro d'incrément. Ce dernier n'est PAS remis à zéro en début d'année.";
+ return $texte;
+ }
+
+
+ /** \brief Renvoi un exemple de numérotation
+ * \return string Example
+ */
+ function getExample()
+ {
+ return "CF000001";
+ }
+
+
+ /** \brief Renvoie le prochaine numéro de référence de commande non utilisé
+ \param obj_soc objet société
+ \return string numéro de référence de commande non utilisé
+ */
+ function commande_get_num($obj_soc=0)
+ {
+ global $db;
+
+ $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."commande_fournisseur WHERE fk_statut <> 0";
+
+ $resql = $db->query($sql);
+
+ if ( $resql )
+ {
+ $row = $db->fetch_row($resql);
+
+ $num = $row[0];
+ }
+
+ return 'CF'.substr("000000".$num,strlen("000000".$num)-6,6);
+}
+?>