Modifie l'affichage des facture detaille
This commit is contained in:
parent
e9db2af363
commit
563b157844
@ -1176,11 +1176,11 @@ else
|
||||
* Documents générés
|
||||
*
|
||||
*/
|
||||
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||
$facref = str_replace($forbidden_chars,"_",$fac->ref);
|
||||
$file = FAC_OUTPUTDIR . "/" . $facref . "/" . $facref . ".pdf";
|
||||
$filedetail = FAC_OUTPUTDIR . "/" . $facref . "/" . $facref . "-detail.pdf";
|
||||
|
||||
|
||||
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||
$facref = str_replace($forbidden_chars,"_",$fac->ref);
|
||||
$file = FAC_OUTPUTDIR . "/" . $facref . "/" . $facref . ".pdf";
|
||||
|
||||
print "<table width=\"100%\" cellspacing=2><tr><td width=\"50%\" valign=\"top\">";
|
||||
|
||||
if (file_exists($file))
|
||||
@ -1196,18 +1196,24 @@ else
|
||||
print '<td align="right">'.filesize($file). ' bytes</td>';
|
||||
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if (file_exists($filedetail)) // facture détaillée supplémentaire
|
||||
{
|
||||
$encfile = urlencode($filedetail);
|
||||
print "<tr $bc[0]><td>Facture détaillée</td>";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT . '/document.php?file='.$encfile.'">'.$fac->ref.'-detail.pdf</a></td>';
|
||||
print '<td align="right">'.filesize($filedetail). ' bytes</td>';
|
||||
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($filedetail)).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
$dir = FAC_OUTPUTDIR . "/" . $facref . "/";
|
||||
$handle=opendir($dir);
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_readable($dir.$file) && substr($file, -10) == 'detail.pdf')
|
||||
{
|
||||
$encfile = urlencode($dir.$file);
|
||||
print "<tr $bc[0]><td>Facture détaillée</td>";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT . '/document.php?file='.$encfile.'">'.$fac->ref.'-detail.pdf</a></td>';
|
||||
print '<td align="right">'.filesize($dir.$file). ' bytes</td>';
|
||||
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($dir.$file)).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user