From 0d6546e18ea54a55ef99d519705ce3e28d9de020 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 25 Feb 2016 18:18:33 +0100 Subject: [PATCH] NEW Add an explanation message on shipment page to explain you can't make shipment if order is not validated --- htdocs/expedition/shipment.php | 8 +++++++- htdocs/langs/en_US/sendings.lang | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 9af5bd25811..c7de7ee207a 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -701,7 +701,13 @@ if ($id > 0 || ! empty($ref)) // Bouton expedier avec gestion des stocks - if (! empty($conf->stock->enabled) && ($commande->statut > Commande::STATUS_DRAFT && $commande->statut < Commande::STATUS_CLOSED)) + + if (! empty($conf->stock->enabled) && $commande->statut == Commande::STATUS_DRAFT) + { + print $langs->trans("ValidateOrderFirstBeforeShipment"); + } + + if (! empty($conf->stock->enabled) && ($commande->statut > Commande::STATUS_DRAFT && $commande->statut < Commande::STATUS_CLOSED)) { if ($user->rights->expedition->creer) { diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index cd4b812ad54..a118a4d8373 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -71,6 +71,7 @@ ProductQtyInShipmentAlreadySent=Product quantity from opened customer order alre ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from opened supplier order already received NoProductToShipFoundIntoStock=No product to ship found into warehouse <b>%s</b>. Correct stock or go back to choose another warehouse. WeightVolShort=Weight/Vol. +ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments. # Sending methods SendingMethodCATCH=Catch by customer -- GitLab