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 ""; - print ''; + print ""; + print ''; print ''; print ''; print ''; @@ -255,7 +258,7 @@ if ($_GET["id"] > 0) { print_titre("Facture associée"); } - print '
Commande PDFref."/".$commande->ref.'.pdf">'.$commande->ref.'.pdf
".$langs->trans("Order")." PDF'.$commande->ref.'.pdf'.filesize($file). ' bytes'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'
'; + print '
'; print ''; print ''; print "\n"; @@ -265,14 +268,14 @@ if ($_GET["id"] > 0) { $objp = $db->fetch_object(); $var=!$var; - print ""; - print ""; + print "\n"; - print "\n"; + print "\n"; + print "\n"; if ($objp->fk_user_author <> $user->id) { $fuser = new User($db, $objp->fk_user_author);
'.$langs->trans("Ref").''.$langs->trans("Date").''.$langs->trans("Author").''.$langs->trans("Price").'
facid\">$objp->facnumber"; + print "
facid\">$objp->facnumber"; if ($objp->paye) { print " (payée)"; } - print "".strftime("%d %B %Y",$objp->df)."".strftime("%d %B %Y",$objp->df)."