diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 5e22e9db444..d6628bdc5be 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -127,7 +127,7 @@ if ($_POST["action"] == 'add') } /* - * Genere un bon de livraison + * Build a receiving receipt */ if ($_GET["action"] == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer) { diff --git a/htdocs/langs/fr_FR/deliveries.lang b/htdocs/langs/fr_FR/deliveries.lang index 4af4cae4d94..fd9afea7ddc 100644 --- a/htdocs/langs/fr_FR/deliveries.lang +++ b/htdocs/langs/fr_FR/deliveries.lang @@ -2,12 +2,12 @@ CHARSET=UTF-8 Delivery=Livraison Deliveries=Livraisons -DeliveryCard=Fiche livraison -DeliveryOrder=Bon de livraison -DeliveryOrders=Bons de livraison -DeliveryDate=Date de livraison -DeliveryDateShort=Date livr. -CreateDeliveryOrder=Générer bon de livraison +DeliveryCard=Fiche réception +DeliveryOrder=Bon de réception +DeliveryOrders=Bons de réception +DeliveryDate=Date de réception +DeliveryDateShort=Date réc. +CreateDeliveryOrder=Générer bon de réception QtyDelivered=Qté livrée SetDeliveryDate=Définir la date de livraison ValidateDeliveryReceipt=Valider le bon de livraison diff --git a/htdocs/lib/sendings.lib.php b/htdocs/lib/sendings.lib.php index 5b820456173..7bfbe722307 100644 --- a/htdocs/lib/sendings.lib.php +++ b/htdocs/lib/sendings.lib.php @@ -268,7 +268,7 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='') } else { - print ' '; + //print ' '; print ' '; print ' '; } diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index d79908eea1f..e9bce6bc060 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -54,7 +54,7 @@ class Livraison extends CommonObject var $expedition_id; - var $date_delivery; + var $date_delivery; // Date really received var $date_creation; var $date_valid; @@ -87,6 +87,8 @@ class Livraison extends CommonObject $error = 0; + $now=dol_now(); + /* On positionne en mode brouillon le bon de livraison */ $this->brouillon = 1; @@ -108,9 +110,9 @@ class Livraison extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".$this->socid; $sql.= ", '".$this->ref_customer."'"; - $sql.= ", ".$this->db->idate(mktime()); + $sql.= ", ".$this->db->idate($now); $sql.= ", ".$user->id; - $sql.= ", ".$this->db->idate($this->date_delivery); + $sql.= ", ".($this->date_delivery?"'".$this->db->idate($this->date_delivery)."'":"null"); $sql.= ", ".($this->fk_delivery_address > 0 ? $this->fk_delivery_address : "null"); $sql.= ")"; diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index 4fafe727a01..6c24e93c520 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -139,12 +139,13 @@ if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && if ($conf->expedition_bon->enabled) { Header("Location: ".DOL_URL_ROOT.'/expedition/fiche.php?id='.$delivery->origin_id); + exit; } else { - Header("Location: liste.php"); + Header("Location: ".DOL_URL_ROOT."/livraison/liste.php"); + exit; } - exit; } else { @@ -477,6 +478,7 @@ else print ''; // Date delivery real / Received + // TODO Can edit this date, even if validated. print ''.$langs->trans("DateReceived").''; print ''.dol_print_date($delivery->date_delivery,'daytext')."\n"; print '';