diff --git a/htdocs/blockedlog/ajax/block-add.php b/htdocs/blockedlog/ajax/block-add.php
new file mode 100644
index 00000000000..247b01186fe
--- /dev/null
+++ b/htdocs/blockedlog/ajax/block-add.php
@@ -0,0 +1,19 @@
+fetch($id)>0) {
+ $facture->call_trigger($action, $user);
+ }
+
+ }
+
\ No newline at end of file
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index c4bf83293de..ffab33275a7 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -4248,6 +4248,37 @@ else if ($id > 0 || ! empty($ref))
$delallowed = $user->rights->facture->supprimer;
print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
+
+ if(!empty($conf->blockedlog->enabled) && $object->statut>0) {
+ ?>
+
+ numoffiles;
// Show links to link elements
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 89cf70951ad..44a90794790 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -712,7 +712,7 @@ class FormFile
$out.= '
';
$tmp = $this->showPreview($file,$modulepart,$relativepath,0,$param);
$out.= ($tmp?$tmp.' ':'');
- $out.= '';
diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
index 461a277dfd4..004c4eecd78 100644
--- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
+++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
@@ -51,7 +51,8 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
return 0;
}
- if($action==='BILL_VALIDATE' || $action === 'BILL_PAYED' || $action==='BILL_UNPAYED' || $action === 'BILL_SENTBYMAIL') {
+ if($action==='BILL_VALIDATE' || $action === 'BILL_PAYED' || $action==='BILL_UNPAYED'
+ || $action === 'BILL_SENTBYMAIL' || $action === 'DOWNLOAD_BILL' || $action === 'PREVIEW_BILL') {
$amounts= (double) $object->total_ttc;
}
else if($action === 'PAYMENT_CUSTOMER_CREATE' || $action === 'PAYMENT_ADD_TO_BANK') {
diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang
index 7e64bfad17f..fcad52508bd 100644
--- a/htdocs/langs/en_US/blockedlog.lang
+++ b/htdocs/langs/en_US/blockedlog.lang
@@ -18,4 +18,6 @@ logBILL_VALIDATE=Customer bill set valid from draft
logBILL_SENTBYMAIL=Customer bill send by mail
BlockedlogInfoDialog=Log Details
Fingerprint=Fingerprint
-DownloadLogCSV=Download fingerprints CSV
\ No newline at end of file
+DownloadLogCSV=Download fingerprints CSV
+logPREVIEW_BILL=Preview of a validated customer bill in order to print or download
+logDOWNLOAD_BILL=Download of a validated customer bill in order to print or send
\ No newline at end of file
|