diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index e019d28ba6b..31b4bc4bc29 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -96,10 +96,11 @@ class Form
* @param paramkey Key of parameter (unique if there is several parameter to show)
* @param perm Permission to allow button to edit parameter
* @param typeofdata Type of data ('string' by default, 'email', 'text', ...)
+ * @param editvalue Use this value instead $preselected
* @return string HTML edit field
* TODO no GET or POST in class file, use a param
*/
- function editfieldval($text,$htmlname,$preselected,$paramkey,$paramvalue,$perm,$typeofdata='string')
+ function editfieldval($text,$htmlname,$preselected,$paramkey,$paramvalue,$perm,$typeofdata='string',$editvalue='')
{
global $langs;
$ret='';
@@ -114,11 +115,11 @@ class Form
$ret.='
';
- }
-
print "\n";
/*
diff --git a/htdocs/includes/modules/expedition/methode_expedition_lettremax.modules.php b/htdocs/includes/modules/expedition/methode_expedition_lettremax.modules.php
new file mode 100644
index 00000000000..19e78218ea6
--- /dev/null
+++ b/htdocs/includes/modules/expedition/methode_expedition_lettremax.modules.php
@@ -0,0 +1,45 @@
+
+ *
+ * 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, see .
+ */
+
+/**
+ * \file htdocs/includes/modules/expedition/methode_expedition_lettremax.modules.php
+ * \ingroup expedition
+ * \version $Id$
+ */
+
+include_once "methode_expedition.modules.php";
+
+
+class methode_expedition_lettremax extends ModeleShippingMethod
+{
+
+ function methode_expedition_lettremax($db=0)
+ {
+ $this->db = $db;
+ $this->id = 4; // Do not change this value
+ $this->code = "LETTREMAX"; // Do not change this value
+ $this->name = "Lettre max";
+ $this->description = "Courrier suivi et lettre max";
+ }
+
+ function provider_url_status($tracking_number)
+ {
+ return sprintf("http://www.csuivi.courrier.laposte.fr/default.asp?EZ_ACTION=rechercheRapide&numObjet=%s",$tracking_number);
+ }
+}
+
+?>
diff --git a/htdocs/install/mysql/data/llx_c_shipment_mode.sql b/htdocs/install/mysql/data/llx_c_shipment_mode.sql
index 88e23b1d0a9..d9d8069a124 100644
--- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql
+++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql
@@ -3,7 +3,7 @@
-- Copyright (C) 2004-2009 Laurent Destailleur
-- Copyright (C) 2004 Benoit Mortier
-- Copyright (C) 2004 Guillaume Delecourt
--- Copyright (C) 2005-2009 Regis Houssin
+-- Copyright (C) 2005-2011 Regis Houssin
-- Copyright (C) 2007 Patrick Raguin
--
-- This program is free software; you can redistribute it and/or modify
@@ -34,3 +34,4 @@
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (1,'CATCH','Catch','Catch by client',1);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (2,'TRANS','Transporter','Generic transporter',1);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi',0);
+INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max',0);
diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
index d3b4fde1e03..ed97836d30f 100755
--- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
+++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
@@ -122,6 +122,8 @@ ALTER TABLE llx_expedition ADD COLUMN ref_int varchar(30) AFTER ref_ext;
ALTER TABLE llx_livraison ADD COLUMN ref_ext varchar(30) AFTER fk_soc;
ALTER TABLE llx_livraison ADD COLUMN ref_int varchar(30) AFTER ref_ext;
+INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max',0);
+
--Add Chile data (id pays=67)
-- Regions Chile
INSERT INTO llx_c_regions (rowid, code_region, fk_pays, cheflieu, tncc, nom, active) VALUES (6701, 6701, 67, NULL, NULL, 'Tarapacá', 1);