";
+ $filedetail = $conf->facture->dir_output . "/" . $facref . "/" . $facref . "-detail.pdf";
+ $relativepath = "${facref}/${facref}.pdf";
+ $relativepathdetail = "${facref}/${facref}-detail.pdf";
+
+ $var=true;
+
+ print "";
if (file_exists($file))
{
- $encfile = urlencode($file);
print_titre("Documents");
print '';
- print "| Facture PDF | ";
-
- print ''.$fac->ref.'.pdf | ';
+ print " | ".$langs->trans("Bill")." PDF | ";
+ print ''.$fac->ref.'.pdf | ';
print ''.filesize($file). ' bytes | ';
print ''.strftime("%d %b %Y %H:%M:%S",filemtime($file)).' | ';
print ' ';
@@ -1230,12 +1233,11 @@ else
{
if (is_readable($dir.$file) && substr($file, -10) == 'detail.pdf')
{
- $encfile = urlencode($dir.$file);
- print "| Facture détaillée | ";
+ print " | Facture détaillée | ";
- print ''.$fac->ref.'-detail.pdf | ';
- print ''.filesize($dir.$file). ' bytes | ';
- print ''.strftime("%d %b %Y %H:%M:%S",filemtime($dir.$file)).' | ';
+ print ''.$fac->ref.'-detail.pdf | ';
+ print ''.filesize($filedetail). ' bytes | ';
+ print ''.strftime("%d %b %Y %H:%M:%S",filemtime($filedetail)).' | ';
print ' ';
}
}
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index 62e00b5927a..67f8532e115 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -129,23 +129,27 @@ if ($_GET["facid"] > 0)
* Documents
*
*/
- $forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
- $facref = str_replace($forbidden_chars,"_",$fac->ref);
- $file = FAC_OUTPUTDIR . "/" . $facref . "/" . $facref . ".pdf";
- $filedetail = FAC_OUTPUTDIR . "/" . $facref . "/" . $facref . "-detail.pdf";
- $fileimage = $file.".png";
+ $forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
+ $facref = str_replace($forbidden_chars,"_",$fac->ref);
+ $file = $conf->facture->dir_output . "/" . $facref . "/" . $facref . ".pdf";
+ $filedetail = $conf->facture->dir_output . "/" . $facref . "/" . $facref . "-detail.pdf";
+ $relativepath = "${facref}/${facref}.pdf";
+ $relativepathdetail = "${facref}/${facref}-detail.pdf";
+
+ $fileimage = $file.".png";
- // Si fichier PDF existe
+ $var=true;
+
+ // Si fichier PDF existe
if (file_exists($file))
{
$encfile = urlencode($file);
print_titre("Documents");
print '';
- print "| ".$langs->trans("Bill")." PDF | ";
-
- print ''.$fac->ref.'.pdf | ';
+ print " | ".$langs->trans("Bill")." PDF | ";
+ print ''.$fac->ref.'.pdf | ';
print ''.filesize($file). ' bytes | ';
print ''.strftime("%d %b %Y %H:%M:%S",filemtime($file)).' | ';
print ' ';
@@ -153,10 +157,9 @@ if ($_GET["facid"] > 0)
// Si fichier detail PDF existe
if (file_exists($filedetail)) // facture détaillée supplémentaire
{
- $encfile = urlencode($filedetail);
- print "| Facture détaillée | ";
+ print " | Facture détaillée | ";
- print ''.$fac->ref.'-detail.pdf | ';
+ print ''.$fac->ref.'-detail.pdf | ';
print ''.filesize($filedetail). ' bytes | ';
print ''.strftime("%d %b %Y %H:%M:%S",filemtime($filedetail)).' | ';
print ' ';
diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php
index e6de71740ae..0ddc47b3a54 100644
--- a/htdocs/compta/paiement/rapport.php
+++ b/htdocs/compta/paiement/rapport.php
@@ -146,7 +146,7 @@ if ($year)
$var=!$var;
$tfile = $dir . '/'.$year.'/'.$file;
$relativepath = $year.'/'.$file;
- print "".'| '.img_pdf().' '.$file.' | ';
+ print " ".'| '.img_pdf().' '.$file.' | ';
print ''.filesize($tfile). ' bytes | ';
print ''.strftime("%d %b %Y %H:%M:%S",filemtime($tfile)).' | ';
}
diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php
index 54f80080360..6e21ee19d41 100644
--- a/htdocs/compta/prelevement/index.php
+++ b/htdocs/compta/prelevement/index.php
@@ -32,9 +32,6 @@ require_once DOL_DOCUMENT_ROOT."/includes/modules/modPrelevement.class.php";
$user->getrights('banque');
-$mod = new modPrelevement($db);
-$dir = $mod->data_directory;
-
llxHeader();
print_titre($langs->trans("Bons de prélèvements"));
@@ -47,17 +44,16 @@ print ''.$langs->trans("Date").' | ';
print ' | ';
print "\n";
-$handle=opendir($dir);
+
+$dir = $conf->prelevement->dir_output;
+$handle=opendir($dir."/bon");
while (($file = readdir($handle))!==false)
{
- if (is_readable($dir.$file) && is_file($dir.$file))
+ $relativepath="/bon/".$file;
+ if (is_readable($dir."/".$relativepath) && is_file($dir."/".$relativepath))
{
- print '| '.$file.' | ';
-
-
-
-
+ print ' | | '.$file.' | ';
print ' | ';
}
}
|
|