From c6e7b2e6a3281f14bd4b325b5cf4835e4108c487 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 13:39:02 +0200 Subject: [PATCH 01/15] Fix date shipment from order better for pickup collection with date and hour from order --- htdocs/install/mysql/migration/11.0.0-12.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 8a68e763160..95c6658c306 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -285,3 +285,5 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); UPDATE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; + +ALTER TABLE llx_commande MODIFY COLUMN date_livraison DATETIME; From 014c013f834b5a90d5b8dddfc6f0af6fed6103f9 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 13:40:31 +0200 Subject: [PATCH 02/15] Update card.php --- htdocs/commande/card.php | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4764b53a5c9..a24e62cde97 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -557,14 +557,17 @@ if (empty($reshook)) } } - elseif ($action == 'setdate_livraison' && $usercancreate) { - // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; - $datelivraison = dol_mktime(0, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); + elseif ($action == 'setdate_livraison' && $usercancreate) + { + //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; + $datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); - $result = $object->set_date_livraison($user, $datelivraison); - if ($result < 0) { - setEventMessages($object->error, $object->errors, 'errors'); - } + $object->fetch($id); + $result = $object->set_date_livraison($user, $datedelivery); + if ($result < 0) + { + setEventMessages($object->error, $object->errors, 'errors'); + } } elseif ($action == 'setmode' && $usercancreate) { @@ -1681,15 +1684,14 @@ if ($action == 'create' && $usercancreate) print $form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print ''; - // Delivery date planed - print "".$langs->trans("DateDeliveryPlanned").''; - if (empty($datedelivery)) - { - if (!empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); - else $datedelivery = empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY) ?-1 : ''; - } - print $form->selectDate($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); - print ""; + // Date delivery planned + print ''.$langs->trans("DateDeliveryPlanned").''; + print ''; + //print dol_print_date($object->date_livraison, "day"); // date_livraison come from order and will be stored into date_delivery planed. + $date_delivery = ($date_delivery ? $date_delivery : $object->date_livraison); // $date_delivery comes from GETPOST + print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); + print "\n"; + print ''; // terms of the settlement print ''.$langs->trans('PaymentConditionsShort').''; @@ -2209,11 +2211,11 @@ if ($action == 'create' && $usercancreate) print '
'; print ''; print ''; - print $form->selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); + print $form->selectDate($object->date_delivery ? $object->date_delivery : -1, 'liv_', 1, 1, '', "setdate_livraison", 1, 0); print ''; print '
'; } else { - print $object->date_livraison ? dol_print_date($object->date_livraison, 'daytext') : ' '; + print $object->date_livraison ? dol_print_date($object->date_livraison, 'dayhour') : ' '; if ($object->hasDelay() && !empty($object->date_livraison)) { print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); } From 9e49e02efb3f06e515640a84c62ec7b5f022c265 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 12 May 2020 11:42:18 +0000 Subject: [PATCH 03/15] Fixing style errors. --- htdocs/commande/card.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index a24e62cde97..f382ac85f8e 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1684,14 +1684,14 @@ if ($action == 'create' && $usercancreate) print $form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print ''; - // Date delivery planned - print ''.$langs->trans("DateDeliveryPlanned").''; - print ''; - //print dol_print_date($object->date_livraison, "day"); // date_livraison come from order and will be stored into date_delivery planed. - $date_delivery = ($date_delivery ? $date_delivery : $object->date_livraison); // $date_delivery comes from GETPOST - print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); - print "\n"; - print ''; + // Date delivery planned + print ''.$langs->trans("DateDeliveryPlanned").''; + print ''; + //print dol_print_date($object->date_livraison, "day"); // date_livraison come from order and will be stored into date_delivery planed. + $date_delivery = ($date_delivery ? $date_delivery : $object->date_livraison); // $date_delivery comes from GETPOST + print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); + print "\n"; + print ''; // terms of the settlement print ''.$langs->trans('PaymentConditionsShort').''; From e1ff1bf865ac2dc2d440569050f4acacfea1dbad Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 13:42:43 +0200 Subject: [PATCH 04/15] Update card.php --- htdocs/commande/card.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index f382ac85f8e..800193bc61e 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1684,14 +1684,14 @@ if ($action == 'create' && $usercancreate) print $form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print ''; - // Date delivery planned - print ''.$langs->trans("DateDeliveryPlanned").''; - print ''; - //print dol_print_date($object->date_livraison, "day"); // date_livraison come from order and will be stored into date_delivery planed. - $date_delivery = ($date_delivery ? $date_delivery : $object->date_livraison); // $date_delivery comes from GETPOST - print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); - print "\n"; - print ''; + // Date delivery planned + print ''.$langs->trans("DateDeliveryPlanned").''; + print ''; + //print dol_print_date($object->date_livraison, "day"); // date_livraison come from order and will be stored into date_delivery planed. + $date_delivery = ($date_delivery ? $date_delivery : $object->date_livraison); // $date_delivery comes from GETPOST + print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); + print "\n"; + print ''; // terms of the settlement print ''.$langs->trans('PaymentConditionsShort').''; @@ -2211,7 +2211,7 @@ if ($action == 'create' && $usercancreate) print '
'; print ''; print ''; - print $form->selectDate($object->date_delivery ? $object->date_delivery : -1, 'liv_', 1, 1, '', "setdate_livraison", 1, 0); + print $form->selectDate($object->date_livraison ? $object->date_livraison : -1, 'liv_', 1, 1, '', "setdate_livraison", 1, 0); print ''; print '
'; } else { From 83ec39f55a1ed189b15b12eb4032dc3d17edb9fc Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 12 May 2020 11:44:12 +0000 Subject: [PATCH 05/15] Fixing style errors. --- htdocs/commande/card.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 800193bc61e..54661297939 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1684,14 +1684,14 @@ if ($action == 'create' && $usercancreate) print $form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print ''; - // Date delivery planned - print ''.$langs->trans("DateDeliveryPlanned").''; - print ''; - //print dol_print_date($object->date_livraison, "day"); // date_livraison come from order and will be stored into date_delivery planed. - $date_delivery = ($date_delivery ? $date_delivery : $object->date_livraison); // $date_delivery comes from GETPOST - print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); - print "\n"; - print ''; + // Date delivery planned + print ''.$langs->trans("DateDeliveryPlanned").''; + print ''; + //print dol_print_date($object->date_livraison, "day"); // date_livraison come from order and will be stored into date_delivery planed. + $date_delivery = ($date_delivery ? $date_delivery : $object->date_livraison); // $date_delivery comes from GETPOST + print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); + print "\n"; + print ''; // terms of the settlement print ''.$langs->trans('PaymentConditionsShort').''; From 447c61cc15bcdc517db0554609424a2984493d12 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 13:49:55 +0200 Subject: [PATCH 06/15] Update shipment.php --- htdocs/expedition/shipment.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 75ee2ef4da3..a40d29d1d78 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -103,16 +103,17 @@ if (empty($reshook)) } if ($action == 'setdatedelivery' && $user->rights->commande->creer) - { - //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; - $datelivraison = dol_mktime(0, 0, 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); + { + //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; + $datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); - $object = new Commande($db); - $object->fetch($id); - $result = $object->set_date_livraison($user, $datelivraison); - if ($result < 0) - setEventMessages($object->error, $object->errors, 'errors'); - } + $object->fetch($id); + $result = $object->set_date_livraison($user, $datedelivery); + if ($result < 0) + { + setEventMessages($object->error, $object->errors, 'errors'); + } + } /* if ($action == 'setdeliveryaddress' && $user->rights->commande->creer) { @@ -373,13 +374,13 @@ if ($id > 0 || !empty($ref)) print '
'; print ''; print ''; - print $form->selectDate($object->date_livraison > 0 ? $object->date_livraison : -1, 'liv_', '', '', '', "setdatedelivery"); + print $form->selectDate($object->date_livraison ? $object->date_livraison : -1, 'liv_', 1, 1, '', "setdate_livraison", 1, 0); print ''; print '
'; } else { - print dol_print_date($object->date_livraison, 'daytext'); + print dol_print_date($object->date_livraison, 'dayhour'); if ($object->hasDelay() && !empty($object->date_livraison)) { print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); } From 39f228b98a92140d58d82c3be1220742728e4958 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 14:10:43 +0200 Subject: [PATCH 07/15] Update list.php --- htdocs/expedition/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 999bde3fb32..ada701750a0 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -699,7 +699,7 @@ if ($resql) if (!empty($arrayfields['e.date_delivery']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_livraison), "day"); + print dol_print_date($db->jdate($obj->date_livraison), "dayhour"); /*$now = time(); if ( ($now - $db->jdate($obj->date_expedition)) > $conf->warnings->lim && $obj->statutid == 1 ) { From ce9b841d9f1e026f0aaa0d94890bd40c5283d4b1 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 15:33:25 +0200 Subject: [PATCH 08/15] Update shipment.php --- htdocs/expedition/shipment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index a40d29d1d78..3adb1820d27 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -353,7 +353,7 @@ if ($id > 0 || !empty($ref)) // Date print ''.$langs->trans('Date').''; print ''; - print dol_print_date($object->date, 'daytext'); + print dol_print_date($object->date, 'dayhour'); if ($object->hasDelay() && empty($object->date_livraison)) { print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); } From f837bf043a4c642a8df8b894519b1e0960f94043 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 15:34:48 +0200 Subject: [PATCH 09/15] Update shipment.php --- htdocs/expedition/shipment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 3adb1820d27..99cf77ce1f3 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -353,7 +353,7 @@ if ($id > 0 || !empty($ref)) // Date print ''.$langs->trans('Date').''; print ''; - print dol_print_date($object->date, 'dayhour'); + print dol_print_date($object->date, 'day'); if ($object->hasDelay() && empty($object->date_livraison)) { print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); } From 70ea77ce8f547eb775fa63e7d68e17e2262aff39 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 15:37:37 +0200 Subject: [PATCH 10/15] Update list.php --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 3b83e04fe3c..8b7000d8f23 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1147,7 +1147,7 @@ if ($resql) if (!empty($arrayfields['c.date_delivery']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_delivery), 'day'); + print dol_print_date($db->jdate($obj->date_delivery), 'dayhour'); print ''; if (!$i) $totalarray['nbfield']++; } From 1453b8469ea6dad679dc652bc0fa4a175f081cae Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 15 May 2020 15:56:16 +0200 Subject: [PATCH 11/15] Update 11.0.0-12.0.0.sql --- htdocs/install/mysql/migration/11.0.0-12.0.0.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 95c6658c306..8a68e763160 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -285,5 +285,3 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); UPDATE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; - -ALTER TABLE llx_commande MODIFY COLUMN date_livraison DATETIME; From 703fee0635d4deccccccc7a1ac1f88ebe287f397 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 15 May 2020 15:58:01 +0200 Subject: [PATCH 12/15] Update llx_commande.sql --- htdocs/install/mysql/tables/llx_commande.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index 676e768c73b..aa237383452 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -64,8 +64,8 @@ create table llx_commande fk_currency varchar(3), -- currency code fk_cond_reglement integer, -- condition de reglement fk_mode_reglement integer, -- mode de reglement - - date_livraison date default NULL, + + date_livraison datetime default NULL, fk_shipping_method integer, -- shipping method id fk_warehouse integer default NULL, fk_availability integer NULL, From 6a0bc86ea6a77c000eb1092a8fafdd97fa6ddc50 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 15 May 2020 16:03:03 +0200 Subject: [PATCH 13/15] Create 12.0.0.-13.0.0.sql --- .../mysql/migration/12.0.0.-13.0.0.sql | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 htdocs/install/mysql/migration/12.0.0.-13.0.0.sql diff --git a/htdocs/install/mysql/migration/12.0.0.-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0.-13.0.0.sql new file mode 100644 index 00000000000..e0bf956bb43 --- /dev/null +++ b/htdocs/install/mysql/migration/12.0.0.-13.0.0.sql @@ -0,0 +1,35 @@ +-- +-- Be carefull to requests order. +-- This file must be loaded by calling /install/index.php page +-- when current version is 13.0.0 or higher. +-- +-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y +-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y +-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; +-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; +-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); +-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; +-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60); +-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name; +-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field); +-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table +-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex +-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- To make pk to be auto increment (postgres): +-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid; +-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid); +-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq'); +-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table; +-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL; +-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL; +-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL; +-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL; +-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL; +-- Note: fields with type BLOB/TEXT can't have default value. + + +-- Missing in v12 + + +-- For v13 + ALTER TABLE llx_commande MODIFY COLUMN date_livraison DATETIME; From e00152a8459f51eb9fb9619f06d6d75888f56063 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 15 May 2020 16:03:38 +0200 Subject: [PATCH 14/15] Rename 12.0.0.-13.0.0.sql to 12.0.0-13.0.0.sql --- .../mysql/migration/{12.0.0.-13.0.0.sql => 12.0.0-13.0.0.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename htdocs/install/mysql/migration/{12.0.0.-13.0.0.sql => 12.0.0-13.0.0.sql} (100%) diff --git a/htdocs/install/mysql/migration/12.0.0.-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql similarity index 100% rename from htdocs/install/mysql/migration/12.0.0.-13.0.0.sql rename to htdocs/install/mysql/migration/12.0.0-13.0.0.sql From 8d242cacae0ab85f988adc3110141c12a28cb918 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 15 May 2020 16:04:36 +0200 Subject: [PATCH 15/15] Update 12.0.0-13.0.0.sql update sql --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index e0bf956bb43..d2ee477afa3 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -32,4 +32,5 @@ -- For v13 + ALTER TABLE llx_commande MODIFY COLUMN date_livraison DATETIME;