Skip to content
Snippets Groups Projects
Commit 013b7eca authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: A better fix for status/list of orders.

There was a confusion because of bad translation key StatusOrderToBill
that in fact mean "StatusOrderDelivered".
More explanation:
http://wiki.dolibarr.org/index.php/Module_Customers_Orders#Life_cycle_.2F_Business_rules
parent d590aa56
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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);
......
......@@ -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
......
......@@ -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 <b>%s</b> ?
......
......@@ -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
......
......@@ -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 <b>%s</b> ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment