Look: Ajout picto sur statut commande client

This commit is contained in:
Laurent Destailleur 2006-04-01 16:17:36 +00:00
parent 8b12e546ba
commit 0b6aebdd05
7 changed files with 39 additions and 32 deletions

View File

@ -252,7 +252,7 @@ if ($_GET["id"] > 0) {
// Statut
print '<tr><td>'.$langs->trans("Status").'</td>';
print "<td colspan=\"2\">".$commande->statuts[$commande->statut]."</td>\n";
print "<td colspan=\"2\">".$commande->getLibStatut(4)."</td>\n";
print '</tr>';
// Date

View File

@ -1308,7 +1308,7 @@ class Commande
*/
function getLibStatut($mode)
{
return $this->LibStatut($this->statut);
return $this->LibStatut($this->statut,$mode);
}
/**

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
@ -666,8 +666,9 @@ else
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>';
print '</tr>';
// Statut
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td colspan="2">'.$commande->statuts[$commande->statut].'</td>';
print '<td colspan="2">'.$commande->getLibStatut(4).'</td>';
print '</tr>';
print '<tr><td>'.$langs->trans('Date').'</td>';
@ -1006,11 +1007,7 @@ else
{
print '<div class="tabsAction">';
if ($conf->expedition->enabled && $commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$_GET['id'].'">'.$langs->trans('Send').'</a>';
}
// Valid
if ($commande->statut == 0)
{
if ($user->rights->commande->valider)
@ -1019,6 +1016,18 @@ else
}
}
// Build PDF
if ($user->rights->commande->creer)
{
print '<a class="butAction" href="fiche.php?id='.$commande->id.'&amp;action=builddoc">'.$langs->trans("BuildPDF").'</a>';
}
// Ship
if ($conf->expedition->enabled && $commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$_GET['id'].'">'.$langs->trans('ShipProduct').'</a>';
}
if ($commande->statut == 1 || $commande->statut == 2)
{
if ($user->rights->commande->creer)
@ -1027,11 +1036,6 @@ else
}
}
if ($commande->statut == 0 && $user->rights->commande->supprimer)
{
print '<a class="butActionDelete" href="fiche.php?id='.$id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
}
if ($commande->statut == 1)
{
$nb_expedition = $commande->nb_expedition();
@ -1040,12 +1044,12 @@ else
print '<a class="butActionDelete" href="fiche.php?id='.$id.'&amp;action=annuler">'.$langs->trans('CancelOrder').'</a>';
}
}
// Build PDF
if ($user->rights->commande->creer)
{
print '<a class="butAction" href="fiche.php?id='.$commande->id.'&amp;action=builddoc">'.$langs->trans("BuildPDF").'</a>';
}
if ($commande->statut == 0 && $user->rights->commande->supprimer)
{
print '<a class="butActionDelete" href="fiche.php?id='.$id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
}
print '</div>';
}
print '<br>';

View File

@ -185,7 +185,7 @@ if ($resql)
print strftime('%B',$objp->date_commande).'</a>';
print ' <a href="liste.php?year='.$y.'">';
print strftime('%Y',$objp->date_commande).'</a></td>';
print '<td align="center">'.$generic_commande->status_label_short[$objp->fk_statut].'</td>';
print '<td align="right">'.$generic_commande->LibStatut($objp->fk_statut,5).'</td>';
print '</tr>';
$total = $total + $objp->price;
$subtotal = $subtotal + $objp->price;

View File

@ -137,7 +137,7 @@ if ($_GET["id"] > 0)
print '<table class="border" width="100%">';
// Ref
print '<tr><td width="15%">'.$langs->trans('Ref').'</td>';
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
print '<td colspan="2">'.$commande->ref.'</td>';
print '<td width="50%">'.$langs->trans('Source').' : ' . $commande->sources[$commande->source] ;
if ($commande->source == 0)
@ -149,32 +149,33 @@ if ($_GET["id"] > 0)
}
print '</td></tr>';
// Société
print '<tr><td>'.$langs->trans('Customer').'</td>';
print '<td colspan="3">';
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>';
print '</tr>';
$nbrow=3;
// Ref commande client
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
print $langs->trans('RefCdeClient').'</td><td align="left">';
print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>';
print '</tr></table>';
print '</td><td colspan="2">';
print $commande->ref_client;
print '</td>';
$nbrow=3;
print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('Note').' :<br>';
print nl2br($commande->note);
print '</td>';
print '</tr>';
// Société
print '<tr><td>'.$langs->trans('Customer').'</td>';
print '<td>';
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>';
print '</tr>';
// Statut
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td colspan="2">'.$commande->statuts[$commande->statut].'</td>';
print '<td colspan="2">'.$commande->getLibStatut(4).'</td>';
print '</tr>';
// Date
print '<tr><td>'.$langs->trans('Date').'</td>';
print '<td colspan="2">'.dolibarr_print_date($commande->date,'%A %d %B %Y').'</td>';
print '</tr>';

View File

@ -22,6 +22,7 @@ MenuOrdersToBill=Orders to bill
SearchOrder=Search order
Sending=Sending
Sendings=Sendings
ShipProduct=Ship product
VAT=VAT
Discount=Discount
CreateOrder=Create Order

View File

@ -22,6 +22,7 @@ SearchOrder=Rechercher une commande
MenuOrdersToBill=Commandes à facturer
Sending=Expédition
Sendings=Expéditions
ShipProduct=Expédier produit
VAT=TVA
Discount=Remise
CreateOrder=Créer Commande