diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index f95689b6d51..0251d4c6eeb 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -100,18 +100,27 @@ if ($_GET["id"] > 0) * Commande */ print ''; + print "'; + print ''; + print ""; print ''; - print '"; - - print ''; - print "\n"; - - print '"; - print ''; + print ''; + print "\n"; - print '"; + print ''; + // Ligne de 3 colonnes - print ''; + print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; print ''; - print ''; - - print "
".$langs->trans("Order")."".$commande->ref.''.$commande->statuts[$commande->statut].''; + + if ($conf->projet->enabled) + { + $langs->load("projects"); + if ($commande->projet_id > 0) + { + print $langs->trans("Project").' : '; + $projet = New Project($db); + $projet->fetch($commande->projet_id); + print ''.$projet->title.''; + } + } + print ' 
".$langs->trans("Customer")."'; print ''.$soc->nom.''; - print $commande->statuts[$commande->statut]; - print "
'.$langs->trans("Date").'".strftime("%A %d %B %Y",$commande->date)."'.$langs->trans("Source").' : ' . $commande->sources[$commande->source] ; + print ''.$langs->trans("Source").' : ' . $commande->sources[$commande->source] ; if ($commande->source == 0) { /* Propale */ @@ -121,29 +130,18 @@ if ($_GET["id"] > 0) } print "
'.$langs->trans("Author").''.$author->fullname.'
'.$langs->trans("Date").'".strftime("%A %d %B %Y",$commande->date)."'; - if ($conf->projet->enabled) { - print $langs->trans("Project").' : '; - if ($commande->projet_id > 0) - { - $projet = New Project($db); - $projet->fetch($commande->projet_id); - print ''.$projet->title.''; - } - else - { - print 'Classer la commande'; - } - } - print " 
'; + print $langs->trans("Author").' : '.$author->fullname.'
'.$langs->trans("AmountHT").'
'.$langs->trans("AmountHT").''.price($commande->total_ht).''.$conf->monnaie.''.$langs->trans("Note").' :
'.nl2br($commande->note).'
'.$conf->monnaie.''.$langs->trans("Note").' :
'.nl2br($commande->note).'
'.$langs->trans("GlobalDiscount").''; print $commande->remise_percent.' % '; @@ -152,9 +150,8 @@ if ($_GET["id"] > 0) print '
'.$langs->trans("VAT").''.price($commande->total_tva).''.$conf->monnaie.'
'.$langs->trans("TotalTTC").''.price($commande->total_ttc).''.$conf->monnaie.'
"; + print ''.$conf->monnaie.''; + print "\n"; /* * Lignes de commandes @@ -190,7 +187,7 @@ if ($_GET["id"] > 0) if ($objp->fk_product > 0) { print ''; - print ''.img_object($langs->trans("ShowProduct"),"product").' '.stripslashes(nl2br($objp->description)).''; + print ''.img_object($langs->trans("ShowProduct"),"product").' '.stripslashes(nl2br($objp->description)).''; } else { @@ -206,12 +203,9 @@ if ($_GET["id"] > 0) { print ' '; } - print ''.price($objp->subprice)."\n"; - + print ''.price($objp->subprice)."\n"; print '  '; - - print ""; - + print ""; $i++; $var=!$var; @@ -228,7 +222,7 @@ if ($_GET["id"] > 0) * Documents générés * */ - $file = $conf->facture->dir_output . "/" . $commande->ref . "/" . $commande->ref . ".pdf"; + $file = $conf->facture->dir_output . "/" . $commande->ref . "/" . $commande->ref . ".pdf"; $relativepath = $commande->ref."/".$commande->ref.".pdf"; $var=true; @@ -287,7 +281,7 @@ if ($_GET["id"] > 0) $objp = $db->fetch_object(); $var=!$var; print ""; - print "facid\">$objp->facnumber"; + print ''.$objp->facnumber.''; if ($objp->paye) { print " (payée)"; @@ -332,7 +326,7 @@ if ($_GET["id"] > 0) { print "
\n"; - if ($commande->statut <> 0 && $user->rights->facture->creer) + if ($commande->statut > 0 && $user->rights->facture->creer) { print ''.$langs->trans("GenerateBill").''; }