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

Fix: Affichage des commandes en cours dans fiche stock

parent 8d51371b
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,8 @@ require_once(DOL_DOCUMENT_ROOT."/project.class.php");
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
require_once(DOL_DOCUMENT_ROOT ."/fourn/commande/modules/modules_commandefournisseur.php");
$langs->load("orders");
$user->getrights("fournisseur");
if (!$user->rights->fournisseur->commande->lire) accessforbidden();
......@@ -371,7 +373,7 @@ if ($_GET["id"] > 0)
{
$date_com = mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]);
$html->form_confirm("fiche.php?id=".$commande->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"],
"Envoi de la commande","Etes-vous sr de vouloir confirmer cette commande en date du ".strftime("%d/%m/%Y",$date_com)." ?","confirm_commande");
$langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dolibarr_print_date($date_com,'day')),"confirm_commande");
print '<br />';
}
......
......@@ -7,10 +7,15 @@ OrderFollow=Follow up
OrderContact=Order contact
OrderDate=Date commande
NewOrder=New order
ToOrder=Make order
MakeOrder=Make order
NoStockForThisProduct=No stock for this product
SupplierOrder=Supplier order
SuppliersOrders=Suppliers' orders
SuppliersOrdersRunning=Current suppliers' orders
CustomerOrder=Customer order
CustomersOrders=Customers' orders
CustomersOrdersRunning=Current customers' orders
OrdersToValid=Orders to valid
OrdersToBill=Orders to bill
OrdersInProcess=Orders in process
......@@ -64,6 +69,7 @@ ConfirmCloseOrderIfSending=Are you sure you want to close this order ? You must
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> ?
ConfirmCancelOrder=Are you sure you want to cancel this order ?
ConfirmMakeOrder=Are you sure you want to confirm you made this order on <b>%s</b> ?
GenerateBill=Generate invoice
ClassifyBilled=Classify "Billed"
ComptaCard=Accountancy card
......
......@@ -7,10 +7,15 @@ OrderFollow=Suivi
OrderContact=Contacts commande
OrderDate=Date commande
NewOrder=Nouvelle commande
ToOrder=Passer commande
MakeOrder=Passer commande
NoStockForThisProduct=Pas de stock pour ce produit
SupplierOrder=Commande fournisseur
SuppliersOrders=Commandes fournisseurs
SuppliersOrdersRunning=Commandes fournisseurs en cours
CustomerOrder=Commande client
CustomersOrders=Commandes client
CustomersOrdersRunning=Commandes client en cours
OrdersToValid=Commandes à valider
OrdersToBill=Commandes à facturer
OrdersInProcess=Commandes en traitement
......@@ -64,6 +69,7 @@ ConfirmCloseOrderIfSending=
ConfirmDeleteOrder=Êtes-vous sur de vouloir effacer cette commande ?
ConfirmValidateOrder=Êtes-vous sur de vouloir valider cette commande sous la référence <b>%s</b> ?
ConfirmCancelOrder=Êtes-vous sur de vouloir annuler cette commande ?
ConfirmMakeOrder=Etes-vous sûr de vouloir confirmer cette commande en date du <b>%s</b> ?
GenerateBill=Facturer
ClassifyBilled=Classer "Facturée"
ComptaCard=Fiche compta
......
......@@ -147,7 +147,7 @@ if ($_GET["id"] || $_GET["ref"])
print '<tr><td>'.$langs->trans("TotalStock").'</td>';
if ($product->no_stock)
{
print "<td>Pas de dfinition de stock pour ce produit";
print "<td>".$langs->trans("NoStockForThisProduct");
}
else
{
......@@ -168,7 +168,7 @@ if ($_GET["id"] || $_GET["ref"])
{
$result=$product->load_stats_commande(0,'1');
if ($result < 0) dolibarr_print_error($db,$product->error);
print '<tr><td>'.$langs->trans("CustomersOrders").'</td>';
print '<tr><td>'.$langs->trans("CustomersOrdersRunning").'</td>';
print '<td>';
print $product->stats_commande['qty'];
$result=$product->load_stats_commande(0,'0');
......@@ -180,12 +180,12 @@ if ($_GET["id"] || $_GET["ref"])
// Nbre de commande fournisseurs en cours
if ($conf->fournisseur->enabled)
{
$result=$product->load_stats_commande_fournisseur(0,'2');
$result=$product->load_stats_commande_fournisseur(0,'3');
if ($result < 0) dolibarr_print_error($db,$product->error);
print '<tr><td>'.$langs->trans("SuppliersOrders").'</td>';
print '<tr><td>'.$langs->trans("SuppliersOrdersRunning").'</td>';
print '<td>';
print $product->stats_commande_fournisseur['qty'];
$result=$product->load_stats_commande_fournisseur(0,'0,1');
$result=$product->load_stats_commande_fournisseur(0,'0,1,2');
if ($result < 0) dolibarr_print_error($db,$product->error);
print ' ('.$langs->trans("DraftOrWaitingApproved").': '.$product->stats_commande_fournisseur['qty'].')';
print '</td></tr>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment