diff --git a/htdocs/compta/facture/facture-rec.class.php b/htdocs/compta/facture/facture-rec.class.php index 2541dd6c7bf..3669ac47b13 100644 --- a/htdocs/compta/facture/facture-rec.class.php +++ b/htdocs/compta/facture/facture-rec.class.php @@ -314,7 +314,7 @@ class FactureRec */ $forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","="); $facref = str_replace($forbidden_chars,"_",$this->ref); - $filepdf = FAC_OUTPUTDIR . "/" . $facref . "/" . $facref . ".pdf"; + $filepdf = $conf->facture->dir_output . "/" . $facref . "/" . $facref . ".pdf"; $mesg = "La facture ".$this->ref." a été validée.\n"; diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index f94a5981976..6ebe5bbfaac 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -21,6 +21,11 @@ * $Source$ * */ + +/** +\todo Ce fichier ne semble plus utilisé. A virer ? +*/ + require("./pre.inc.php"); $user->getrights('facture'); @@ -122,9 +127,9 @@ if ($_GET["propalid"]) $color1 = "#e0e0e0"; - print ''; + print '
'; - print ''; + print ''; print ""; // @@ -134,7 +139,7 @@ if ($_GET["propalid"]) { $projet = new Project($db); $projet->fetch($obj->fk_projet); - print ''; } @@ -143,7 +148,7 @@ if ($_GET["propalid"]) * */ - print ""; + print ""; /* * */ @@ -156,7 +161,7 @@ if ($_GET["propalid"]) $totalht = $propal->price ; - print ""; + print ""; /* * */ @@ -167,10 +172,12 @@ if ($_GET["propalid"]) /* * */ - print ""; - $file = PROPALE_OUTPUTDIR. "/$obj->ref/$obj->ref.pdf"; + print ""; + $file = $conf->propal->dir_output. "/$obj->ref/$obj->ref.pdf"; + $relativepath = "$obj->ref/$obj->ref.pdf"; + if (file_exists($file)) { - print ''; + print ''; } print ''; /* @@ -223,7 +230,7 @@ if ($_GET["propalid"]) { print_titre("Facture associée"); } - print '
Société'.$obj->nom.'
'.$langs->trans("Company").''.$obj->nom.'Note :
". nl2br($obj->note)."
Projet'; + print '
'.$langs->trans("Project").''; print ''; print $projet->title.'
Montant HT".price($obj->price + $obj->remise)." euros
".$langs->trans("AmountHT")."".price($obj->price + $obj->remise)." euros
Total HT".price($totalht)." euros
".$langs->trans("TotalHT")."".price($totalht)." euros
PDF
".$langs->trans("Propal")." PDF'.$obj->ref.'.pdf
'.$obj->ref.'.pdf
'; + print '
'; print ""; print ''; print ''; @@ -305,7 +312,7 @@ if ($_GET["propalid"]) */ if ($obj->statut <> 4 && $user->societe_id == 0) { - print '

'.$langs->trans("Ref").''.$langs->trans("Date").'
'; + print '
'; if ($obj->statut == 2 && $user->rights->facture->creer) { @@ -345,7 +352,7 @@ if ($_GET["propalid"]) */ print_titre("Produits"); - print '
'; + print '
'; print ""; print ""; print ''; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 3521e4183c0..8322e739662 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -484,16 +484,19 @@ else * Documents générés * */ - $file = FAC_OUTPUTDIR . "/" . $commande->ref . "/" . $commande->ref . ".pdf"; - + $file = $conf->commande->dir_output . "/" . $commande->ref . "/" . $commande->ref . ".pdf"; + $relativepath = $commande->ref . "/" . $commande->ref . ".pdf"; + + $var=true; + if (file_exists($file)) { print "
".$langs->trans("Ref")."Produit'.$langs->trans("Price").'RemiseQté.
"; print_titre("Documents"); - print ''; + print '
'; - print ""; - print ''; + print ""; + print ''; print ''; print ''; print ''; @@ -515,8 +518,8 @@ else if ($num) { $i = 0; $total = 0; - 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 "\n"; + print '
DateAction
'; + print "\n"; $var=True; while ($i < $num) @@ -524,8 +527,8 @@ else $objp = $db->fetch_object($result); $var=!$var; print ""; - print "\n"; - print ''; + print "\n"; + print ''; print ""; $i++; } @@ -534,7 +537,7 @@ else } else { - print $db->error(); + dolibarr_print_error($db); } /* diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 25d59efd99b..08b2f41f3ea 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -157,7 +157,7 @@ if ($_GET["action"] == 'create') $smonth = 1; $syear = date("Y", time()); - print '
".$langs->trans("Date")."".$langs->trans("Action")."
".strftime("%d %B %Y",$objp->da)."'.stripslashes($objp->note).'".strftime("%d %B %Y",$objp->da)."'.stripslashes($objp->note).'
'; + print '
'; print ''; print ""; @@ -169,7 +169,7 @@ if ($_GET["action"] == 'create') { if ($day == $cday) { - print "
Société".$objsoc->nom."
'; print_titre("Documents générés"); - print ''; + print '
'; - $file = FICHEINTER_OUTPUTDIR . "/$fichinter->ref/$fichinter->ref.pdf"; + $file = $conf->ficheinter->dir_output . "/$fichinter->ref/$fichinter->ref.pdf"; + $relativepath="$fichinter->ref/$fichinter->ref.pdf"; + + $var=true; + if (file_exists($file)) { print ""; - print ''; + print ''; print ''; print ''; } diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index ea998d49ad6..c4f5f1d4504 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -616,7 +616,7 @@ if ($id > 0) } else { - print $db->error(); + dolibarr_print_error($db); } print " 
Ficheinter PDF'.$fichinter->ref.'.pdf'.$fichinter->ref.'.pdf'.filesize($file). ' bytes'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'
"; @@ -624,15 +624,18 @@ if ($id > 0) * Documents générés * */ - $file = FAC_OUTPUTDIR . "/" . $commande->ref . "/" . $commande->ref . ".pdf"; - + $file = $conf->commande->dir_output . "/" . $commande->ref . "/" . $commande->ref . ".pdf"; + $relativepath=$commande->ref . "/" . $commande->ref . ".pdf"; + + $var=true; + if (file_exists($file)) { print_titre("Documents"); print ''; - print ""; - print ''; + print ""; + print ''; print ''; print ''; print ''; diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index 5e9d2dee98a..f68e525fed5 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -54,18 +54,14 @@ class pdf_soleil extends ModelePDFFicheinter $fich = new Fichinter($this->db,"",$id); if ($fich->fetch($id)) { - if (defined("FICHEINTER_OUTPUTDIR")) - { - - $dir = FICHEINTER_OUTPUTDIR . "/" . $fich->ref . "/" ; - $file = $dir . $fich->ref . ".pdf"; + $dir = $conf->ficheinter->dir_output . "/" . $fich->ref . "/" ; + $file = $dir . $fich->ref . ".pdf"; - if (! file_exists($dir)) + if (! file_exists($dir)) { umask(0); mkdir($dir, 0755); } - } if (file_exists($dir)) {
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)).'