diff --git a/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php b/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php new file mode 100644 index 00000000000..acebea53430 --- /dev/null +++ b/htdocs/core/modules/expedition/methode_expedition_chrono.modules.php @@ -0,0 +1,55 @@ +. + */ + +/** + * \file htdocs/core/modules/expedition/methode_expedition_chrono.modules.php + * \ingroup expedition + */ + +include_once "methode_expedition.modules.php"; + +/** + * Class to manage shipment Chronopost + */ +class methode_expedition_chrono extends ModeleShippingMethod +{ + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db=0) + { + $this->db = $db; + $this->id = 8; // Do not change this value + $this->code = "COLCHRONO"; // Do not change this value + $this->name = "Chronopost"; + $this->description = "Chronopost"; + } + + /** + * Return URL of provider + * + * @param string $tracking_number Tracking number + * @return string URL for tracking + */ + function provider_url_status($tracking_number) + { + return sprintf("http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros=%s",$tracking_number); + } +} + +?> diff --git a/htdocs/core/modules/expedition/methode_expedition_gls.modules.php b/htdocs/core/modules/expedition/methode_expedition_gls.modules.php new file mode 100644 index 00000000000..2f63ff927af --- /dev/null +++ b/htdocs/core/modules/expedition/methode_expedition_gls.modules.php @@ -0,0 +1,55 @@ +. + */ + +/* + * \file htdocs/core/modules/expedition/methode_expedition_gls.modules.php + * \ingroup expedition + */ + +include_once "methode_expedition.modules.php"; + +/** + * Class to manage shipment GLS + */ +class methode_expedition_gls extends ModeleShippingMethod +{ + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db=0) + { + $this->db = $db; + $this->id = 7; // Do not change this value + $this->code = "COLGLS"; // Do not change this value + $this->name = "GLS"; + $this->description = "General Logistics Systems"; + } + + /** + * Return URL of provider + * + * @param string $tracking_number Tracking number + * @return string URL for tracking + */ + function provider_url_status($tracking_number) + { + return sprintf("http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/FR01/FR/5004.htm?txtAction=71000&txtRefNo=%s",$tracking_number); + } +} + +?> diff --git a/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php b/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php new file mode 100644 index 00000000000..fa8072ecda3 --- /dev/null +++ b/htdocs/core/modules/expedition/methode_expedition_kiala.modules.php @@ -0,0 +1,55 @@ +. + * or see http://www.gnu.org/ + */ + +/* + * \file htdocs/core/modules/expedition/methode_expedition_kiala.modules.php + * \ingroup expedition + */ + +include_once "methode_expedition.modules.php"; + + +Class methode_expedition_kiala extends ModeleShippingMethod + +{ + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function methode_expedition_kiala($db=0) + { + $this->db = $db; + $this->id = 6; // Do not change this value + $this->code = "COLKIALA"; // Do not change this value + $this->name = "KIALA"; + $this->description = "KIALA"; + } + + /** + * Return URL of provider + * + * @param string $tracking_number Tracking number + * @return string URL for tracking + */ + function provider_url_status($tracking_number) + { + return sprintf("http://www.kiala.fr/tnt/delivery/%s",$tracking_number); + } +} + +?> diff --git a/htdocs/core/modules/expedition/methode_expedition_ups.modules.php b/htdocs/core/modules/expedition/methode_expedition_ups.modules.php new file mode 100644 index 00000000000..582f23c9e0a --- /dev/null +++ b/htdocs/core/modules/expedition/methode_expedition_ups.modules.php @@ -0,0 +1,54 @@ +. + * or see http://www.gnu.org/ + */ + +/* + * \file htdocs/core/modules/expedition/methode_expedition_ups.modules.php + * \ingroup expedition + */ + +include_once "methode_expedition.modules.php"; + + +class methode_expedition_ups extends ModeleShippingMethod +{ + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function methode_expedition_ups($db=0) + { + $this->db = $db; + $this->id = 5; // Do not change this value + $this->code = "COLUPS"; // Do not change this value + $this->name = "UPS"; + $this->description = "United Parcel Service"; + } + + /** + * Return URL of provider + * + * @param string $tracking_number Tracking number + * @return string URL for tracking + */ + function provider_url_status($tracking_number) + { + return sprintf("http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1=%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 e78f25a0ac2..ba625191e3d 100644 --- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql @@ -33,3 +33,7 @@ INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES ( 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); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'COLKIALA','KIALA','Relais Kiala',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'COLGLS','GLS','General Logistics Systems',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'COLCHRONO','Chronopost','Chronopost',0); diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index cad2ac40bb4..00d50ad51d7 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -45,3 +45,8 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; + +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'COLKIALA','KIALA','Relais Kiala',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'COLGLS','GLS','General Logistics Systems',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'COLCHRONO','Chronopost','Chronopost',0);