diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index df59576c88b..3bc807476e8 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -129,7 +129,8 @@ if ($viewstatut <> '')
{
if ($viewstatut < 4 && $viewstatut > -3)
{
- $sql.= ' AND c.fk_statut ='.$viewstatut; // brouillon, validee, en cours, annulee
+ if ($viewstatut == 1 && empty($conf->expedition->enabled)) $sql.= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
+ else $sql.= ' AND c.fk_statut = '.$viewstatut; // brouillon, validee, en cours, annulee
if ($viewstatut == 3)
{
$sql.= ' AND c.facture = 0'; // need to create invoice
@@ -222,7 +223,7 @@ if ($resql)
if ($viewstatut == -2)
$title.=' - '.$langs->trans('StatusOrderToProcessShort');
if ($viewstatut == -3)
- $title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill');
+ $title.=' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled)?'':$langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index e33c307d367..3b16988abe5 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -857,7 +857,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire);
if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire);
if ($leftmenu=="orders" && ! empty($conf->expedition->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=2", $langs->trans("StatusOrderOnProcessShort"), 2, $user->rights->commande->lire);
- if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=".($conf->expedition->enabled?"3":"-3"), $langs->trans("StatusOrderToBill"), 2, $user->rights->commande->lire);
+ if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=3", $langs->trans("StatusOrderToBill"), 2, $user->rights->commande->lire); // The translation key is StatusOrderToBill but it means StatusDelivered. TODO We should renamed this later
if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=4", $langs->trans("StatusOrderProcessed"), 2, $user->rights->commande->lire);
if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire);
$newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->rights->commande->lire);
diff --git a/htdocs/langs/ca_ES/orders.lang b/htdocs/langs/ca_ES/orders.lang
index c63981ccf2e..39ee41a4ca9 100644
--- a/htdocs/langs/ca_ES/orders.lang
+++ b/htdocs/langs/ca_ES/orders.lang
@@ -32,7 +32,8 @@ StatusOrderOnProcessShort=En procés
StatusOrderSentShort=Expedició en curs
StatusOrderSent=Enviament en curs
StatusOrderProcessedShort=Processada
-StatusOrderToBillShort=A facturar
+StatusOrderToBillShort=Emès
+StatusOrderToBillShort2=A facturar
StatusOrderApprovedShort=Aprovada
StatusOrderRefusedShort=Rebutjada
StatusOrderToProcessShort=A processar
@@ -43,7 +44,8 @@ StatusOrderDraft=Esborrany (a validar)
StatusOrderValidated=Validada
StatusOrderOnProcess=Pendent de rebre
StatusOrderProcessed=Processada
-StatusOrderToBill=A facturar
+StatusOrderToBill=Emès
+StatusOrderToBill2=A facturar
StatusOrderApproved=Aprovada
StatusOrderRefused=Rebutjada
StatusOrderReceivedPartially=Rebuda parcialment
diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang
index 2796759a8f0..172f6fb13c6 100644
--- a/htdocs/langs/en_US/orders.lang
+++ b/htdocs/langs/en_US/orders.lang
@@ -85,7 +85,7 @@ NumberOfOrdersByMonth=Number of orders by month
AmountOfOrdersByMonthHT=amount of orders by month (net of tax)
ListOfOrders=List of orders
CloseOrder=Close order
-ConfirmCloseOrder=Are you sure you want to close this order ? Once an order is closed, it can only be billed.
+ConfirmCloseOrder=Are you sure you want to set this order to deliverd ? Once an order is delivered, it can be set to billed.
ConfirmCloseOrderIfSending=Are you sure you want to close this order ? You must close an order only when all shipping are done.
ConfirmDeleteOrder=Are you sure you want to delete this order ?
ConfirmValidateOrder=Are you sure you want to validate this order under name %s ?
diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang
index 51bfbd082a2..65044ab09a7 100644
--- a/htdocs/langs/es_ES/orders.lang
+++ b/htdocs/langs/es_ES/orders.lang
@@ -32,7 +32,8 @@ StatusOrderOnProcessShort=En proceso
StatusOrderSentShort=Expedición en curso
StatusOrderSent=Envío en curso
StatusOrderProcessedShort=Procesado
-StatusOrderToBillShort=A facturar
+StatusOrderToBillShort=Emitido
+StatusOrderToBillShort2=A facturar
StatusOrderApprovedShort=Aprobado
StatusOrderRefusedShort=Rechazado
StatusOrderToProcessShort=A procesar
@@ -43,7 +44,8 @@ StatusOrderDraft=Borrador (a validar)
StatusOrderValidated=Validado
StatusOrderOnProcess=Pendiente de recibir
StatusOrderProcessed=Procesado
-StatusOrderToBill=A facturar
+StatusOrderToBill=Emitido
+StatusOrderToBill2=A facturar
StatusOrderApproved=Aprobado
StatusOrderRefused=Rechazado
StatusOrderReceivedPartially=Recibido parcialmente
diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang
index 1866ecbdcfb..045b6223038 100644
--- a/htdocs/langs/fr_FR/orders.lang
+++ b/htdocs/langs/fr_FR/orders.lang
@@ -85,7 +85,7 @@ NumberOfOrdersByMonth=Nombre de commandes par mois
AmountOfOrdersByMonthHT=Montant total de commandes par mois (HT)
ListOfOrders=Liste des commandes
CloseOrder=Clôturer commande
-ConfirmCloseOrder=Êtes-vous sûr de vouloir clôturer cette commande ? Une fois une commande clôturée, elle peut être facturée.
+ConfirmCloseOrder=Êtes-vous sûr de vouloir classer cette commande à Délivrée ? Une fois une commande délivrée, elle peut aussi être passée à facturée.
ConfirmCloseOrderIfSending=Êtes-vous sûr de vouloir clôturer cette commande ? Vous ne devez clôturer une commande qu'une fois les produits expédiés.
ConfirmDeleteOrder=Êtes-vous sûr de vouloir effacer cette commande ?
ConfirmValidateOrder=Êtes-vous sûr de vouloir valider cette commande sous la référence %s ?