diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index a382568a81d..de787373cdf 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -226,7 +226,7 @@ if ($_GET["id"] > 0) $h = 0; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("Order").": $commande->ref"; + $head[$h][1] = $langs->trans("OrderCard"); $a = $h; $h++; @@ -235,10 +235,11 @@ if ($_GET["id"] > 0) $h++; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/history.php?id='.$commande->id; - $head[$h][1] = $langs->trans("History"); + $head[$h][1] = $langs->trans("OrderFollow"); $h++; - dolibarr_fiche_head($head, $a, $soc->nom); + $title=$langs->trans("Order").": $commande->ref"; + dolibarr_fiche_head($head, $a, $title); /* * Confirmation de la suppression de la commande @@ -297,211 +298,187 @@ if ($_GET["id"] > 0) "Envoi de la commande","Etes-vous sűr de vouloir confirmer cette commande en date du ".strftime("%d/%m/%Y",$date_com)." ?","confirm_commande"); print '
'; } - /* - * Commande - */ - print ''; - print ""; - print ''; - - print '"; - if ($commande->methode_commande_id > 0) - { - print '"; - } - - print ''; - print '"; - - // Ligne de 3 colonnes - print ''; - print ''; - print ''; - print ''; - print ''; + /* + * Commande + */ + print '
".$langs->trans("Supplier")."'; - print ''.$soc->nom.''; - print ' '; - print $commande->statuts[$commande->statut]; - print "
'.$langs->trans("Date").''; - - if ($commande->date_commande) - { - print dolibarr_print_date($commande->date_commande,"%A %d %B %Y")."\n"; - } - - print ''; - if ($commande->methode_commande) - { - print "Méthode : " .$commande->methode_commande; - } - print "
'.$langs->trans("Author").''.$author->fullname.''; - print " 
'.$langs->trans("AmountHT").''.price($commande->total_ht).''.$langs->trans("Currency".$conf->monnaie).' 
'.$langs->trans("VAT").''.price($commande->total_tva).''.$langs->trans("Currency".$conf->monnaie).' 
'; + print '"; + print ''; + print ''; + + print ''; + print ''; + print '"; + + if ($commande->methode_commande_id > 0) + { + print '"; + } + + // Auteur + print ''; + print '"; - print ''; - print ''; + // Ligne de 3 colonnes + print ''; + print ''; + print ''; + print ''; + print ''; + + print ''; + print ''; + + if ($commande->note) + { + print '"; + } + + print "
'.$langs->trans("Supplier")."'; + print ''.$soc->nom.'
'.$langs->trans("Status").''; + print ' '; + print $commande->statuts[$commande->statut]; + print "
'.$langs->trans("Date").''; + + if ($commande->date_commande) + { + print dolibarr_print_date($commande->date_commande,"%A %d %B %Y")."\n"; + } + + print ''; + if ($commande->methode_commande) + { + print "Méthode : " .$commande->methode_commande; + } + print "
'.$langs->trans("Author").''.$author->fullname.''; + print " 
'.$langs->trans("TotalTTC").''.price($commande->total_ttc).''.$langs->trans("Currency".$conf->monnaie).' 
'.$langs->trans("AmountHT").''.price($commande->total_ht).''.$langs->trans("Currency".$conf->monnaie).' 
'.$langs->trans("AmountVAT").''.price($commande->total_tva).''.$langs->trans("Currency".$conf->monnaie).' 
'.$langs->trans("AmountTTC").''.price($commande->total_ttc).''.$langs->trans("Currency".$conf->monnaie).' 
'.$langs->trans("Note").''.nl2br($commande->note)."
"; - if ($commande->note) - { - print ''.$langs->trans("Note").''.nl2br($commande->note).""; - } - - print ""; - - /* - * Lignes de commandes - * - */ - print '
'; - - $sql = "SELECT l.ref, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice"; - $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l "; - $sql .= " WHERE l.fk_commande = $commande->id ORDER BY l.rowid"; - - $resql = $db->query($sql); - if ($resql) - { - $num_lignes = $db->num_rows($resql); - $i = 0; $total = 0; - - if ($num_lignes) - { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - } - $var=True; - while ($i < $num_lignes) - { - $objp = $db->fetch_object($resql); - print ""; - print "\n"; - if ($objp->fk_product > 0) - { - print ''; - } - else - { - print "\n"; - } - print ''; - print ''; - if ($objp->remise_percent > 0) - { - print '\n"; - } - else - { - print ''; - } - print '\n"; - if ($commande->statut == 0 && $user->rights->fournisseur->commande->creer && $_GET["action"] <> 'valid') - { - print ''; - } - else - { - print ''; - } - print ""; - - if ($_GET["action"] == 'editline' && $_GET["rowid"] == $objp->rowid) - { - print "id\" method=\"post\">"; - print ''; - print ''; - print ""; - print ''; - print ''; - print ''; - print ''; - print ''; - print '' . "\n"; - print "\n"; - } - $i++; - $var=!$var; - } - $db->free(); - } - else - { - print $db->error(); - } - - /* - * Ajouter une ligne - * - */ - if ($_GET["action"] <> 'valid' && $commande->statut == 0 && $user->rights->fournisseur->commande->creer) - { - $sql = "SELECT p.rowid,p.label,p.ref "; - $sql .=" , (pf.price / pf.quantity) as priceunit"; - $sql .= " FROM ".MAIN_DB_PREFIX."product as p "; - $sql .= " , ".MAIN_DB_PREFIX."product_fournisseur_price as pf "; - $sql .= " WHERE p.rowid = pf.fk_product AND pf.fk_soc = ".$commande->fourn_id; - $sql .= " ORDER BY p.ref "; + /* + * Lignes de commandes + */ + print '
'.$langs->trans("Ref").''.$langs->trans("Description").''.$langs->trans("VAT").''.$langs->trans("Qty").''.$langs->trans("Discount").''.$langs->trans("PriceU").'  
".$objp->ref."'; - print ''.stripslashes(nl2br($objp->description)).'".stripslashes(nl2br($objp->description))."'.$objp->tva_tx.'%'.$objp->qty.''.$objp->remise_percent." % '.price($objp->subprice)." '; - print img_delete(); - print '  
 %
'; + + $sql = "SELECT l.ref, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice"; + $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l"; + $sql.= " WHERE l.fk_commande = $commande->id"; + $sql.= " ORDER BY l.rowid"; + $resql = $db->query($sql); if ($resql) { - $opt = ''; - if ($resql) + $num_lignes = $db->num_rows($resql); + $i = 0; $total = 0; + + if ($num_lignes) { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $objp = $db->fetch_object($resql); - $opt .= "\n"; - $i++; - } + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; } - $db->free($resql); + $var=false; + while ($i < $num_lignes) + { + $objp = $db->fetch_object($resql); + print ""; + print "\n"; + if ($objp->fk_product > 0) + { + print ''; + } + else + { + print "\n"; + } + print ''; + print ''; + if ($objp->remise_percent > 0) + { + print '\n"; + } + else + { + print ''; + } + print '\n"; + if ($commande->statut == 0 && $user->rights->fournisseur->commande->creer && $_GET["action"] <> 'valid') + { + print ''; + } + else + { + print ''; + } + print ""; + + if ($_GET["action"] == 'editline' && $_GET["rowid"] == $objp->rowid) + { + print "id\" method=\"post\">"; + print ''; + print ''; + print ""; + print ''; + print ''; + print ''; + print ''; + print ''; + print '' . "\n"; + print "\n"; + } + $i++; + $var=!$var; + } + $db->free(); } else { - dolibarr_print_error($db); + print $db->error(); } - - print ''; - print ''; - - print ""; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''."\n"; - - $var=!$var; - print "".''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - print ""; - } - print "
'.$langs->trans("Ref").''.$langs->trans("Description").''.$langs->trans("VAT").''.$langs->trans("Qty").''.$langs->trans("Discount").''.$langs->trans("PriceU").'  
".$objp->ref."'; + print ''.stripslashes(nl2br($objp->description)).'".stripslashes(nl2br($objp->description))."'.$objp->tva_tx.'%'.$objp->qty.''.$objp->remise_percent."% '.price($objp->subprice)." '; + print img_delete(); + print '  
 %
'.$langs->trans("Description").''.$langs->trans("VAT").''.$langs->trans("Qty").''.$langs->trans("Discount").''.$langs->trans("PriceU").'  
% 

"; - /* - * Fin Ajout ligne - * - */ - - print ''; + /* + * Ajouter une ligne + */ + if ($_GET["action"] <> 'valid' && $commande->statut == 0 && $user->rights->fournisseur->commande->creer) + { + print '
'; + print ''; + + print ''; + print ''.$langs->trans("Description").''; + print ''.$langs->trans("VAT").''; + print ''.$langs->trans("Qty").''; + print ''.$langs->trans("Discount").''; + print ''.$langs->trans("PriceU").''; + print '  '."\n"; + + $var=false; + print "".''; + $html->select_produits_fournisseurs($commande->fourn_id,'','p_idprod',$filtre); + print ''; + print ''; + print ' %'; + print ' '; + print ''; + print "\n"; + + print "
"; + } + + print ""; + print ''; + /* + * Boutons actions + */ if ($user->societe_id == 0 && $commande->statut < 3 && $_GET["action"] <> 'valid') { print '
'; @@ -525,7 +502,7 @@ if ($_GET["id"] > 0) { print ''.$langs->trans("ApproveOrder").''; - print ''.$langs->trans("RefuseOrder").''; + print ''.$langs->trans("RefuseOrder").''; } } @@ -533,7 +510,7 @@ if ($_GET["id"] > 0) { if ($user->rights->fournisseur->commande->approuver) { - print ''.$langs->trans("RefuseOrder").''; + print ''.$langs->trans("RefuseOrder").''; } } diff --git a/htdocs/fourn/commande/history.php b/htdocs/fourn/commande/history.php index 2cdc2d38f19..a39711b69d9 100644 --- a/htdocs/fourn/commande/history.php +++ b/htdocs/fourn/commande/history.php @@ -64,7 +64,7 @@ if ($_GET["id"] > 0) $h = 0; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("Order").": $commande->ref"; + $head[$h][1] = $langs->trans("OrderCard"); $h++; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$commande->id; @@ -72,12 +72,13 @@ if ($_GET["id"] > 0) $h++; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/history.php?id='.$commande->id; - $head[$h][1] = $langs->trans("History"); + $head[$h][1] = $langs->trans("OrderFollow"); $a = $h; $h++; - dolibarr_fiche_head($head, $a, $soc->nom); + $title=$langs->trans("Order").": $commande->ref"; + dolibarr_fiche_head($head, $a, $title); /* @@ -85,11 +86,12 @@ if ($_GET["id"] > 0) */ print ''; - print ""; - print '"; + print ''; + print ''; - print '"; @@ -102,9 +104,9 @@ if ($_GET["id"] > 0) print ""; } + // Auteur print ''; - - print ''; + print ''; print "
".$langs->trans("Supplier")."'; + print '
'.$langs->trans("Supplier")."'; print ''.$soc->nom.'
'; + print '
'.$langs->trans("Status").''; print ' '; print $commande->statuts[$commande->statut]; print "
'.$langs->trans("Author").''.$author->fullname.' 
 
\n"; @@ -133,7 +135,7 @@ if ($_GET["id"] > 0) $obj = $db->fetch_object($resql); print ""; - print ''.strftime("%a %d %B %Y %H:%M:%S",$obj->dl)."\n"; + print ''.dolibarr_print_date($obj->dl,"%a %d %b %Y %H:%M:%S")."\n"; print ' '; diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index bc4c899d50e..27a5b2cff3f 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -76,7 +76,7 @@ if ($_GET["id"] > 0) $h = 0; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("Order").": $commande->ref"; + $head[$h][1] = $langs->trans("OrderCard"); $h++; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$commande->id; @@ -85,10 +85,11 @@ if ($_GET["id"] > 0) $h++; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/history.php?id='.$commande->id; - $head[$h][1] = $langs->trans("History"); + $head[$h][1] = $langs->trans("OrderFollow"); $h++; - dolibarr_fiche_head($head, $a, $soc->nom); + $title=$langs->trans("Order").": $commande->ref"; + dolibarr_fiche_head($head, $a, $title); /* @@ -98,11 +99,14 @@ if ($_GET["id"] > 0) print ''; print ''; - print ""; - print ''; + print ''; + print ''; - print ''; + print ''; + print '"; @@ -124,8 +128,10 @@ if ($_GET["id"] > 0) } print ""; } + + // Auteur print ''; - print '"; // Ligne de 3 colonnes @@ -134,15 +140,15 @@ if ($_GET["id"] > 0) print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; if ($user->rights->fournisseur->commande->creer) { - print '"; + print '"; print ''; } else diff --git a/htdocs/fourn/product/fiche.php b/htdocs/fourn/product/fiche.php index 9e194576b39..14b53e3a151 100644 --- a/htdocs/fourn/product/fiche.php +++ b/htdocs/fourn/product/fiche.php @@ -143,7 +143,6 @@ if ($_POST["action"] == 'add_fourn' && $_POST["cancel"] <> $langs->trans("Cancel if ($product->add_fournisseur($user, $_POST["id_fourn"], $_POST["ref_fourn"]) > 0) { $action = ''; - $mesg = $langs->trans("SupplierAdded"); } else { @@ -425,7 +424,6 @@ else print ''; } print "
".$langs->trans("Supplier")."'; + print '
'.$langs->trans("Supplier").''; print ''.$soc->nom.'
'; + print '
'.$langs->trans("Status").''; print ' '; print $commande->statuts[$commande->statut]; print "
'.$langs->trans("Author").''.$author->fullname.''; + print ''; print " 
'.$langs->trans("Currency".$conf->monnaie).' 
'.$langs->trans("VAT").''.price($commande->total_tva).'
'.$langs->trans("AmountVAT").''.price($commande->total_tva).''.$langs->trans("Currency".$conf->monnaie).' 
'.$langs->trans("TotalTTC").''.price($commande->total_ttc).'
'.$langs->trans("AmountTTC").''.price($commande->total_ttc).''.$langs->trans("Currency".$conf->monnaie).' 
'.$langs->trans("Note").'
'.$langs->trans("Note").'

\n"; - // Liste des fournisseurs print ''; @@ -466,10 +464,10 @@ else print ''; $i++; } - $db->free(); - } + $db->free(); + } print '
'.$objp->quantity.'
'; - print "
\n"; + print "\n"; /* @@ -515,9 +513,7 @@ else } /* - * * Fiche en mode edition - * */ if (($_GET["action"] == 'edit' || $_GET["action"] == 're-edit') && $user->rights->produit->creer) { @@ -525,7 +521,7 @@ else print_fiche_titre('Edition de la fiche '.$types[$product->type].' : '.$product->ref, ""); if ($mesg) { - print '
'.$mesg.'

'; + print '
'.$mesg.'

'; } print "
\n"; @@ -536,7 +532,7 @@ else print ''.$langs->trans("Label").''; - if ($product->type == 0 && defined("MAIN_MODULE_STOCK")) + if ($product->type == 0 && $conf->stock->enabled) { print "".'Seuil stock'; print ''; @@ -573,6 +569,8 @@ else } + + /* ************************************************************************** */ /* */ /* Barre d'action */ @@ -619,5 +617,5 @@ else $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 31490c43684..d3f6eeeb77d 100755 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -2,6 +2,7 @@ OrdersArea=Orders area Order=Order Orders=Orders +OrderFollow=Follow up OrderDate=Date commande NewOrder=New order SupplierOrder=Supplier order diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang index 52582d9c837..7110c4f753c 100755 --- a/htdocs/langs/fr_FR/orders.lang +++ b/htdocs/langs/fr_FR/orders.lang @@ -2,6 +2,7 @@ OrdersArea=Espace commandes Order=Commande Orders=Commandes +OrderFollow=Suivi OrderDate=Date commande NewOrder=Nouvelle commande SupplierOrder=Commande fournisseur