diff --git a/htdocs/compta/commande.php b/htdocs/compta/commande.php
index cdac55641a0..147adcf31db 100644
--- a/htdocs/compta/commande.php
+++ b/htdocs/compta/commande.php
@@ -203,7 +203,7 @@ if ($_GET["id"] > 0)
}
else
{
- print $db->error();
+ dolibarr_print_error($db);
}
print '';
@@ -211,16 +211,19 @@ if ($_GET["id"] > 0)
* Documents générés
*
*/
- $file = FAC_OUTPUTDIR . "/" . $commande->ref . "/" . $commande->ref . ".pdf";
-
+ $file = $conf->facture->dir_output . "/" . $commande->ref . "/" . $commande->ref . ".pdf";
+ $relativepath = $commande->ref."/".$commande->ref.".pdf";
+
+ $var=true;
+
if (file_exists($file))
{
print "
";
print_titre("Documents");
- print '';
+ print '';
- print "| Commande PDF | ";
- print 'ref."/".$commande->ref.'.pdf">'.$commande->ref.'.pdf | ';
+ print " | ".$langs->trans("Order")." PDF | ";
+ print ''.$commande->ref.'.pdf | ';
print ''.filesize($file). ' bytes | ';
print ''.strftime("%d %b %Y %H:%M:%S",filemtime($file)).' | ';
print ' ';
@@ -255,7 +258,7 @@ if ($_GET["id"] > 0)
{
print_titre("Facture associée");
}
- print '';
+ print '';
print '| '.$langs->trans("Ref").' | '.$langs->trans("Date").' | '.$langs->trans("Author").' | ';
print ''.$langs->trans("Price").' | ';
print " \n";
@@ -265,14 +268,14 @@ if ($_GET["id"] > 0)
{
$objp = $db->fetch_object();
$var=!$var;
- print "";
- print "| facid\">$objp->facnumber";
+ print " | ";
+ print "| facid\">$objp->facnumber";
if ($objp->paye)
{
print " (payée)";
}
- print " | \n";
- print "".strftime("%d %B %Y",$objp->df)." | \n";
+ print "\n";
+ print "".strftime("%d %B %Y",$objp->df)." | \n";
if ($objp->fk_user_author <> $user->id)
{
$fuser = new User($db, $objp->fk_user_author);
|