diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php
index 1f821bf733b..ea0bd9de49e 100644
--- a/htdocs/compta/accounting-files.php
+++ b/htdocs/compta/accounting-files.php
@@ -672,7 +672,7 @@ if (!empty($date_start) && !empty($date_stop)) {
print '
';
// Type
- print '| '.$langs->trans($data['item']).' | ';
+ print ''.$langs->trans($data['item']).' | ';
// Date
print '';
@@ -685,7 +685,7 @@ if (!empty($date_start) && !empty($date_stop)) {
print " | \n";
// Ref
- print '';
+ print ' | ';
if ($data['item'] == 'Invoice') {
$invoice->id = $data['id'];
@@ -733,23 +733,33 @@ if (!empty($date_start) && !empty($date_stop)) {
print ' | ';
// File link
- print '';
+ print ' | ';
if (!empty($data['files'])) {
foreach ($data['files'] as $id => $filecursor) {
- print ''.($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']).' '.$formfile->showPreview($filecursor, $filecursor['modulepart'], $filecursor['subdir'].'/'.$filecursor['name']).' ';
+ $tmppreview = $formfile->showPreview($filecursor, $filecursor['modulepart'], $filecursor['subdir'].'/'.$filecursor['name'], 0);
+ if ($tmppreview) {
+ print $tmppreview;
+ }
+ $filename = ($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']);
+ print '';
+ if (empty($tmppreview)) {
+ print img_picto('', 'generic', '', false, 0, 0, '', 'pictonopreview pictofixedwidth paddingright');
+ }
+ print $filename;
+ print ' ';
}
}
print " | \n";
// Paid
- print ''.$data['paid'].' | ';
+ print ''.($data['paid'] ? yn($data['paid']) : '').' | ';
// Total ET
- print ''.price(price2num($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'], 'MT'))." | \n";
+ print ''.price(price2num($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'], 'MT'))." | \n";
// Total IT
- print ''.price(price2num($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'], 'MT'))." | \n";
+ print ''.price(price2num($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'], 'MT'))." | \n";
// Total VAT
- print ''.price(price2num($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'], 'MT'))." | \n";
+ print ''.price(price2num($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'], 'MT'))." | \n";
print ''.dol_escape_htmltag($data['thirdparty_name'])." | \n";
@@ -757,6 +767,7 @@ if (!empty($date_start) && !empty($date_stop)) {
print ''.$data['country_code']." | \n";
+ // VAT number
print ''.dol_escape_htmltag($data['vatnum'])." | \n";
if ($data['sens']) {
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 6c4ff6e30f1..b955fa4a51d 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -2144,7 +2144,7 @@ class FormFile
* @param array $file Array with data of file. Example: array('name'=>...)
* @param string $modulepart propal, facture, facture_fourn, ...
* @param string $relativepath Relative path of docs
- * @param integer $ruleforpicto Rule for picto: 0=Use the generic preview picto, 1=Use the picto of mime type of file)
+ * @param integer $ruleforpicto Rule for picto: 0=Use the generic preview picto, 1=Use the picto of mime type of file). Use a negative value to show a generic picto even if preview not available.
* @param string $param More param on http links
* @return string $out Output string with HTML
*/
@@ -2160,11 +2160,15 @@ class FormFile
//$out.= '';
if (empty($ruleforpicto)) {
//$out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail');
- $out .= '';
+ $out .= '';
} else {
- $out .= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']);
+ $out .= img_mime($relativepath, $langs->trans('Preview').' '.$file['name'], 'pictofixedwidth');
}
$out .= '';
+ } else {
+ if ($ruleforpicto < 0) {
+ $out .= img_picto('', 'generic', '', false, 0, 0, '', 'paddingright pictofixedwidth');
+ }
}
}
return $out;
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index ba260737678..11dea235094 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -2280,7 +2280,7 @@ span.widthpictotitle.pictotitle {
vertical-align: middle;
margin-top: -3px
}
-.pictowarning, .pictoerror, .pictopreview, .picto.error {
+.pictowarning, .pictoerror, .pictopreview, .pictonopreview, .picto.error {
padding-: 3px;
}
.pictowarning {
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 764b21bba77..83d656196e2 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -2294,7 +2294,7 @@ td.nobordernopadding.widthpictotitle.col-picto {
vertical-align: middle;
margin-top: -3px
}
-.pictowarning, .pictoerror, .pictopreview {
+.pictowarning, .pictoerror, .pictopreview, .pictonopreview {
padding-: 3px;
}
.pictowarning {