";
+ print '';
- /*
- * Documents générés
- *
- */
- $file = $conf->facture->dir_output . "/" . $commande->ref . "/" . $commande->ref . ".pdf";
- $relativepath = $commande->ref."/".$commande->ref.".pdf";
+ /*
+ * Documents générés
+ *
+ */
+ $comref = sanitize_string($commande->ref);
+ $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf';
+ $relativepath = $comref.'/'.$comref.'.pdf';
+ $filedir = $conf->commande->dir_output . '/' . $comref;
+ $urlsource=$_SERVER["PHP_SELF"]."?id=".$commande->id;
+ $genallowed=$user->rights->commande->creer;
+ $delallowed=$user->rights->commande->supprimer;
- $var=true;
-
- if (file_exists($file))
- {
- print_titre($langs->trans("Documents"));
- print '';
-
- print "| ".$langs->trans("Order")." PDF | ";
- print ''.$commande->ref.'.pdf | ';
- print ''.filesize($file). ' bytes | ';
- print ''.strftime("%d %b %Y %H:%M:%S",filemtime($file)).' | ';
- print ' ';
-
- print " \n";
-
- }
+ $html->show_documents('commande',$comref,$filedir,$urlsource,$genallowed,$delallowed,$commande->modelpdf);
/*
* Liste des factures
|
|