2004-10-20 00:24:10 +02:00
< ? php
2005-01-02 16:46:39 +01:00
/* Copyright ( C ) 2003 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
2008-03-18 20:10:46 +01:00
* Copyright ( C ) 2004 - 2008 Laurent Destailleur < eldy @ users . sourceforge . net >
2007-11-01 21:39:36 +01:00
* Copyright ( C ) 2005 - 2006 Regis Houssin < regis @ dolibarr . fr >
2003-09-14 12:34:31 +02:00
*
* 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 .
*/
2005-01-02 16:46:39 +01:00
/** \defgroup fournisseur Module fournisseur
2008-10-01 21:10:17 +02:00
\brief Module pour gerer des societes et contacts de type fournisseurs
\version $Id $
*/
2004-08-14 14:21:24 +02:00
2005-01-02 16:46:39 +01:00
/**
2008-10-01 21:10:17 +02:00
\file htdocs / includes / modules / modFournisseur . class . php
\ingroup fournisseur
\brief Fichier de description et activation du module Fournisseur
*/
2004-08-14 14:21:24 +02:00
2007-10-10 01:15:25 +02:00
include_once ( DOL_DOCUMENT_ROOT . " /includes/modules/DolibarrModules.class.php " );
2004-08-14 14:21:24 +02:00
2003-09-14 12:34:31 +02:00
2005-01-02 16:46:39 +01:00
/** \class modFournisseur
2008-10-01 21:10:17 +02:00
\brief Classe de description et activation du module Fournisseur
*/
2004-08-15 14:40:18 +02:00
2003-11-13 16:09:12 +01:00
class modFournisseur extends DolibarrModules
2003-09-14 12:34:31 +02:00
{
2008-10-01 21:10:17 +02:00
/**
* \brief Constructeur . Definit les noms , constantes et boites
* \param DB handler d ' acces base
*/
function modFournisseur ( $DB )
{
2006-02-09 22:44:25 +01:00
$this -> db = $DB ;
$this -> numero = 40 ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$this -> family = " products " ;
2008-10-01 21:10:17 +02:00
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this -> name = eregi_replace ( '^mod' , '' , get_class ( $this ));
2006-02-09 22:44:25 +01:00
$this -> description = " Gestion des fournisseurs " ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$this -> revision = explode ( ' ' , '$Revision$' );
$this -> version = $this -> revision [ 1 ];
2008-10-01 21:10:17 +02:00
2008-10-06 09:39:52 +02:00
$this -> const_name = 'MAIN_MODULE_' . strtoupper ( $this -> name );
2006-02-09 22:44:25 +01:00
$this -> special = 0 ;
$this -> picto = 'company' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
// Dir
$this -> dirs = array ();
2006-02-25 15:47:47 +01:00
2008-01-13 23:47:50 +01:00
// D<> pendances
2006-02-09 22:44:25 +01:00
$this -> depends = array ( " modSociete " );
$this -> requiredby = array ();
2006-02-25 15:47:47 +01:00
$this -> langfiles = array ( " bills " , " companies " , " suppliers " );
2008-10-01 21:10:17 +02:00
2006-02-25 15:47:47 +01:00
// Config pages
2006-12-06 00:20:18 +01:00
$this -> config_page_url = array ( " fournisseur.php " );
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
// Constantes
$this -> const = array ();
2008-10-01 21:10:17 +02:00
2006-02-25 15:47:47 +01:00
$this -> const [ 0 ][ 0 ] = " COMMANDE_SUPPLIER_ADDON_PDF " ;
$this -> const [ 0 ][ 1 ] = " chaine " ;
$this -> const [ 0 ][ 2 ] = " muscadet " ;
2008-10-01 21:10:17 +02:00
2006-02-25 15:47:47 +01:00
$this -> const [ 1 ][ 0 ] = " COMMANDE_SUPPLIER_ADDON " ;
$this -> const [ 1 ][ 1 ] = " chaine " ;
$this -> const [ 1 ][ 2 ] = " emeraude " ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
// Boxes
$this -> boxes = array ();
2006-05-20 14:16:18 +02:00
$r = 0 ;
2008-10-01 21:10:17 +02:00
2006-05-20 14:16:18 +02:00
$this -> boxes [ $r ][ 1 ] = " box_fournisseurs.php " ;
$r ++ ;
2008-10-01 21:10:17 +02:00
$this -> boxes [ $r ][ 1 ] = " box_factures_fourn_imp.php " ;
2006-05-20 14:16:18 +02:00
$r ++ ;
2008-10-01 21:10:17 +02:00
$this -> boxes [ $r ][ 1 ] = " box_factures_fourn.php " ;
2006-05-20 14:16:18 +02:00
$r ++ ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
// Permissions
$this -> rights = array ();
$this -> rights_class = 'fournisseur' ;
$r = 0 ;
2008-10-01 21:10:17 +02:00
2006-05-26 15:31:46 +02:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1181 ;
2006-05-26 15:31:46 +02:00
$this -> rights [ $r ][ 1 ] = 'Consulter les fournisseurs' ;
$this -> rights [ $r ][ 2 ] = 'r' ;
$this -> rights [ $r ][ 3 ] = 1 ;
$this -> rights [ $r ][ 4 ] = 'lire' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1182 ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 1 ] = 'Lire les commandes fournisseur' ;
$this -> rights [ $r ][ 2 ] = 'r' ;
$this -> rights [ $r ][ 3 ] = 1 ;
$this -> rights [ $r ][ 4 ] = 'commande' ;
$this -> rights [ $r ][ 5 ] = 'lire' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1183 ;
2008-01-22 21:23:51 +01:00
$this -> rights [ $r ][ 1 ] = 'Creer une commande fournisseur' ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 2 ] = 'w' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'commande' ;
$this -> rights [ $r ][ 5 ] = 'creer' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1184 ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 1 ] = 'Valider une commande fournisseur' ;
$this -> rights [ $r ][ 2 ] = 'w' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'commande' ;
$this -> rights [ $r ][ 5 ] = 'valider' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1185 ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 1 ] = 'Approuver les commandes fournisseur' ;
$this -> rights [ $r ][ 2 ] = 'w' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'commande' ;
$this -> rights [ $r ][ 5 ] = 'approuver' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1186 ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 1 ] = 'Commander une commande fournisseur' ;
$this -> rights [ $r ][ 2 ] = 'w' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'commande' ;
$this -> rights [ $r ][ 5 ] = 'commander' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1187 ;
2008-01-22 21:23:51 +01:00
$this -> rights [ $r ][ 1 ] = 'Receptionner les commandes fournisseur' ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 2 ] = 'd' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'commande' ;
$this -> rights [ $r ][ 5 ] = 'receptionner' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1188 ;
2008-01-22 21:23:51 +01:00
$this -> rights [ $r ][ 1 ] = 'Cloturer les commandes fournisseur' ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 2 ] = 'd' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'commande' ;
$this -> rights [ $r ][ 5 ] = 'cloturer' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1189 ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 1 ] = 'Annuler les commandes fournisseur' ;
$this -> rights [ $r ][ 2 ] = 'd' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'commande' ;
$this -> rights [ $r ][ 5 ] = 'annuler' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1231 ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 1 ] = 'Lire les factures fournisseur' ;
$this -> rights [ $r ][ 2 ] = 'r' ;
$this -> rights [ $r ][ 3 ] = 1 ;
$this -> rights [ $r ][ 4 ] = 'facture' ;
$this -> rights [ $r ][ 5 ] = 'lire' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1232 ;
2008-01-22 21:23:51 +01:00
$this -> rights [ $r ][ 1 ] = 'Creer une facture fournisseur' ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 2 ] = 'w' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'facture' ;
$this -> rights [ $r ][ 5 ] = 'creer' ;
2008-10-01 21:10:17 +02:00
2006-02-09 22:44:25 +01:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1233 ;
2006-02-09 22:44:25 +01:00
$this -> rights [ $r ][ 1 ] = 'Valider une facture fournisseur' ;
$this -> rights [ $r ][ 2 ] = 'w' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'facture' ;
$this -> rights [ $r ][ 5 ] = 'valider' ;
2008-10-01 21:10:17 +02:00
2006-05-30 11:15:22 +02:00
$r ++ ;
2007-04-20 00:21:32 +02:00
$this -> rights [ $r ][ 0 ] = 1234 ;
2006-05-30 11:15:22 +02:00
$this -> rights [ $r ][ 1 ] = 'Supprimer une facture fournisseur' ;
2006-08-26 02:59:45 +02:00
$this -> rights [ $r ][ 2 ] = 'd' ;
2006-05-30 11:15:22 +02:00
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'facture' ;
$this -> rights [ $r ][ 5 ] = 'supprimer' ;
2006-02-09 22:44:25 +01:00
2008-10-01 21:10:17 +02:00
$r ++ ;
$this -> rights [ $r ][ 0 ] = 1236 ;
$this -> rights [ $r ][ 1 ] = 'Exporter les factures fournisseurs, attributs et reglements' ;
$this -> rights [ $r ][ 2 ] = 'r' ;
$this -> rights [ $r ][ 3 ] = 0 ;
$this -> rights [ $r ][ 4 ] = 'facture' ;
$this -> rights [ $r ][ 5 ] = 'export' ;
// Exports
//--------
$r = 0 ;
$r ++ ;
$this -> export_code [ $r ] = $this -> rights_class . '_' . $r ;
$this -> export_label [ $r ] = 'Factures fournisseurs et lignes de facture' ;
$this -> export_permission [ $r ] = array ( array ( " fournisseur " , " facture " , " export " ));
$this -> export_fields_array [ $r ] = array ( 's.rowid' => " IdCompany " , 's.nom' => 'CompanyName' , 's.address' => 'Address' , 's.cp' => 'Zip' , 's.ville' => 'Town' , 's.fk_pays' => 'Country' , 's.tel' => 'Phone' , 's.siren' => 'ProfId1' , 's.siret' => 'ProfId2' , 's.ape' => 'ProfId3' , 's.idprof4' => 'ProfId4' , 'f.rowid' => " InvoiceId " , 'f.facnumber' => " InvoiceRef " , 'f.datec' => " InvoiceDateCreation " , 'f.datef' => " DateInvoice " , 'f.total_ht' => " TotalHT " , 'f.total_ttc' => " TotalTTC " , 'f.total_tva' => " TotalVAT " , 'f.paye' => " InvoicePayed " , 'f.fk_statut' => 'InvoiceStatus' , 'f.note' => " InvoiceNote " , 'fd.rowid' => 'LineId' , 'fd.description' => " LineDescription " , 'fd.tva_taux' => " LineVATRate " , 'fd.qty' => " LineQty " , 'fd.total_ht' => " LineHT " , 'fd.total_ttc' => " LineTTC " , 'fd.tva' => " LineVAT " );
$this -> export_entities_array [ $r ] = array ( 's.rowid' => " company " , 's.nom' => 'company' , 's.address' => 'company' , 's.cp' => 'company' , 's.ville' => 'company' , 's.fk_pays' => 'company' , 's.tel' => 'company' , 's.siren' => 'company' , 's.siret' => 'company' , 's.ape' => 'company' , 's.idprof4' => 'company' , 'f.rowid' => " invoice " , 'f.facnumber' => " invoice " , 'f.datec' => " invoice " , 'f.datef' => " invoice " , 'f.total_ht' => " invoice " , 'f.total_ttc' => " invoice " , 'f.total_tva' => " invoice " , 'f.paye' => " invoice " , 'f.fk_statut' => 'invoice' , 'f.note' => " invoice " , 'fd.rowid' => 'invoice_line' , 'fd.description' => " invoice_line " , 'fd.tva_taux' => " invoice_line " , 'fd.qty' => " invoice_line " , 'fd.total_ht' => " invoice_line " , 'fd.total_ttc' => " invoice_line " , 'fd.tva' => " invoice_line " );
$this -> export_alias_array [ $r ] = array ( 's.rowid' => " socid " , 's.nom' => 'soc_name' , 's.address' => 'soc_adres' , 's.cp' => 'soc_zip' , 's.ville' => 'soc_ville' , 's.fk_pays' => 'soc_pays' , 's.tel' => 'soc_tel' , 's.siren' => 'soc_siren' , 's.siret' => 'soc_siret' , 's.ape' => 'soc_ape' , 's.idprof4' => 'soc_idprof4' , 'f.rowid' => " invoiceid " , 'f.facnumber' => " ref " , 'f.datec' => " datecreation " , 'f.datef' => " dateinvoice " , 'f.total_ht' => " totalht " , 'f.total_ttc' => " totalttc " , 'f.total_tva' => " totalvat " , 'f.paye' => " paid " , 'f.fk_statut' => 'status' , 'f.note' => " note " , 'fd.rowid' => 'lineid' , 'fd.description' => " linedescription " , 'fd.tva_taux' => " linevatrate " , 'fd.qty' => " lineqty " , 'fd.total_ht' => " total_ht " , 'fd.total_ttc' => " total_ttc " , 'fd.tva' => " tva " );
$this -> export_sql_start [ $r ] = 'SELECT DISTINCT ' ;
$this -> export_sql_end [ $r ] = ' FROM ' . MAIN_DB_PREFIX . 'facture_fourn as f, ' . MAIN_DB_PREFIX . 'facture_fourn_det as fd, ' . MAIN_DB_PREFIX . 'societe as s' ;
2008-03-18 20:10:46 +01:00
$this -> export_sql_end [ $r ] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn' ;
2007-05-21 22:28:24 +02:00
2008-10-01 21:10:17 +02:00
$r ++ ;
$this -> export_code [ $r ] = $this -> rights_class . '_' . $r ;
$this -> export_label [ $r ] = 'Factures fournisseurs et reglements' ;
$this -> export_permission [ $r ] = array ( array ( " fournisseur " , " facture " , " export " ));
$this -> export_fields_array [ $r ] = array ( 's.rowid' => " IdCompany " , 's.nom' => 'CompanyName' , 's.address' => 'Address' , 's.cp' => 'Zip' , 's.ville' => 'Town' , 's.fk_pays' => 'Country' , 's.tel' => 'Phone' , 's.siren' => 'ProfId1' , 's.siret' => 'ProfId2' , 's.ape' => 'ProfId3' , 's.idprof4' => 'ProfId4' , 'f.rowid' => " InvoiceId " , 'f.facnumber' => " InvoiceRef " , 'f.datec' => " InvoiceDateCreation " , 'f.datef' => " DateInvoice " , 'f.total_ht' => " TotalHT " , 'f.total_ttc' => " TotalTTC " , 'f.total_tva' => " TotalVAT " , 'f.paye' => " InvoicePayed " , 'f.fk_statut' => 'InvoiceStatus' , 'f.note' => " InvoiceNote " , 'pf.amount' => 'AmountPayment' , 'p.datep' => 'DatePayment' , 'p.num_paiement' => 'PaymentNumber' );
$this -> export_entities_array [ $r ] = array ( 's.rowid' => " company " , 's.nom' => 'company' , 's.address' => 'company' , 's.cp' => 'company' , 's.ville' => 'company' , 's.fk_pays' => 'company' , 's.tel' => 'company' , 's.siren' => 'company' , 's.siret' => 'company' , 's.ape' => 'company' , 's.idprof4' => 'company' , 'f.rowid' => " invoice " , 'f.facnumber' => " invoice " , 'f.datec' => " invoice " , 'f.datef' => " invoice " , 'f.total_ht' => " invoice " , 'f.total_ttc' => " invoice " , 'f.total_tva' => " invoice " , 'f.paye' => " invoice " , 'f.fk_statut' => 'invoice' , 'f.note' => " invoice " , 'pf.amount' => 'payment' , 'p.datep' => 'payment' , 'p.num_paiement' => 'payment' );
$this -> export_alias_array [ $r ] = array ( 's.rowid' => " socid " , 's.nom' => 'soc_name' , 's.address' => 'soc_adres' , 's.cp' => 'soc_zip' , 's.ville' => 'soc_ville' , 's.fk_pays' => 'soc_pays' , 's.tel' => 'soc_tel' , 's.siren' => 'soc_siren' , 's.siret' => 'soc_siret' , 's.ape' => 'soc_ape' , 's.idprof4' => 'soc_idprof4' , 'f.rowid' => " invoiceid " , 'f.facnumber' => " ref " , 'f.datec' => " datecreation " , 'f.datef' => " dateinvoice " , 'f.total_ht' => " totalht " , 'f.total_ttc' => " totalttc " , 'f.total_tva' => " totalvat " , 'f.paye' => " paid " , 'f.fk_statut' => 'status' , 'f.note' => " note " , 'pf.amount' => 'amount_payment' , 'p.datep' => 'date_payment' , 'p.num_paiement' => 'num_payment' );
$this -> export_sql_start [ $r ] = 'SELECT DISTINCT ' ;
$this -> export_sql_end [ $r ] = ' FROM (' . MAIN_DB_PREFIX . 'facture_fourn as f, ' . MAIN_DB_PREFIX . 'societe as s) LEFT JOIN ' . MAIN_DB_PREFIX . 'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid LEFT JOIN ' . MAIN_DB_PREFIX . 'paiementfourn as p ON pf.fk_paiementfourn = p.rowid' ;
2008-03-18 20:10:46 +01:00
$this -> export_sql_end [ $r ] .= ' WHERE f.fk_soc = s.rowid' ;
2008-10-01 21:10:17 +02:00
}
/**
* \brief Fonction appelee lors de l ' activation du module . Insere en base les constantes , boites , permissions du module .
* Definit egalement les repertoires de donnees a creer pour ce module .
*/
function init ()
{
$this -> remove ();
// Dir
$this -> dirs [ 0 ] = $conf -> fournisseur -> dir_output ;
//$this->dirs[1] = $conf->fournisseur->commande->dir_output;
//$this->dirs[2] = $conf->fournisseur->facture->dir_output;
$sql = array ();
$this -> load_datas ();
return $this -> _init ( $sql );
}
/**
* \brief Fonction appelee lors de la desactivation d ' un module .
* Supprime de la base les constantes , boites et permissions du module .
*/
function remove ()
{
$sql = array ();
return $this -> _remove ( $sql );
}
/**
* \brief Fonction appel<EFBFBD> par l 'init (donc lors de l' activation d ' un module )
*
*/
function load_datas ()
{
$sql = " SELECT count(rowid) FROM " . MAIN_DB_PREFIX . " c_methode_commande_fournisseur " ;
if ( $this -> db -> query ( $sql ))
{
$row = $this -> db -> fetch_row ();
if ( $row [ 0 ] == 0 )
2004-11-30 16:58:38 +01:00
{
2008-10-01 21:10:17 +02:00
$this -> db -> free ();
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$sql = " INSERT INTO " . MAIN_DB_PREFIX . " c_methode_commande_fournisseur " ;
$sql .= " (code,libelle) VALUES ('OrderByMail','Courrier') " ;
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$this -> db -> query ( $sql );
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$sql = " INSERT INTO " . MAIN_DB_PREFIX . " c_methode_commande_fournisseur " ;
$sql .= " (code,libelle) VALUES ('OrderByFax','Fax') " ;
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$this -> db -> query ( $sql );
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$sql = " INSERT INTO " . MAIN_DB_PREFIX . " c_methode_commande_fournisseur " ;
$sql .= " (code,libelle) VALUES ('OrderByEMail','EMail') " ;
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$this -> db -> query ( $sql );
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$sql = " INSERT INTO " . MAIN_DB_PREFIX . " c_methode_commande_fournisseur " ;
$sql .= " (code,libelle) VALUES ('OrderByPhone','Telephone') " ;
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$this -> db -> query ( $sql );
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$sql = " INSERT INTO " . MAIN_DB_PREFIX . " c_methode_commande_fournisseur " ;
$sql .= " (code,libelle) VALUES ('OrderByWWW','En ligne') " ;
2004-11-30 16:58:38 +01:00
2008-10-01 21:10:17 +02:00
$this -> db -> query ( $sql );
2004-11-30 16:58:38 +01:00
}
2008-10-01 21:10:17 +02:00
}
}
2003-09-14 12:34:31 +02:00
}
?>