[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * or see http://www.gnu.org/ 19 * 20 * $Id: mod_commande_ivoire.php,v 1.9 2004/12/31 17:55:45 eldy Exp $ 21 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/commande/mod_commande_ivoire.php,v $ 22 * 23 */ 24 25 /** \file htdocs/includes/modules/commande/mod_commande_ivoire.php 26 \ingroup commande 27 \brief Fichier contenant la classe du modèle de numérotation de référence de commande Ivoire 28 \version $Revision: 1.9 $ 29 */ 30 31 include_once ("modules_commande.php"); 32 33 34 /** 35 \class mod_commande_ivoire 36 \brief Classe du modèle de numérotation de référence de commande Ivoire 37 */ 38 39 class mod_commande_ivoire extends ModeleNumRefCommandes 40 { 41 42 /** \brief Constructeur 43 */ 44 function mod_commande_ivoire() 45 { 46 $this->nom = "Ivoire"; 47 } 48 49 50 /** \brief Renvoi la description du modele de numérotation 51 * \return string Texte descripif 52 */ 53 function info() 54 { 55 return "Renvoie le numéro sous la forme numérique C0M1, COM2, COM3, ..."; 56 } 57 58 59 /** \brief Renvoie le prochaine numéro de référence de commande non utilisé 60 \param obj_soc objet société 61 \return string numéro de référence de commande non utilisé 62 */ 63 function commande_get_num($obj_soc=0) 64 { 65 global $db; 66 67 $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."commande WHERE fk_statut <> 0"; 68 69 if ( $db->query($sql) ) 70 { 71 $row = $db->fetch_row(0); 72 73 $num = $row[0]; 74 } 75 76 $y = strftime("%y",time()); 77 78 return 'COM'.($num+1); 79 } 80 } 81 82 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |