From dc692f333d63cbde6cb27b3c85b5a603b3127eaa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Nov 2017 10:45:55 +0100 Subject: [PATCH] Work on blockedlog --- htdocs/blockedlog/README-fr.md | 23 +++++ htdocs/blockedlog/README.md | 22 +++++ htdocs/blockedlog/admin/fingerprints.php | 92 +++++++++---------- htdocs/langs/en_US/blockedlog.lang | 2 +- .../modulebuilder/template/myobject_list.php | 2 +- 5 files changed, 91 insertions(+), 50 deletions(-) create mode 100644 htdocs/blockedlog/README-fr.md create mode 100644 htdocs/blockedlog/README.md diff --git a/htdocs/blockedlog/README-fr.md b/htdocs/blockedlog/README-fr.md new file mode 100644 index 00000000000..14fe8e104c3 --- /dev/null +++ b/htdocs/blockedlog/README-fr.md @@ -0,0 +1,23 @@ +LOG INALTERABLE +=============== + +## Fonctionnalité + +Ce module tace, en temps réel, certains évènements métiers dans une log non reversible (que vous ne pouvez pas modifier une fois enregistré) de type blockchain. +Ce module est requis pour la compatibilité avec les exigences légales de certains pays (comme la France avec la loi Fincance 2016 - Norme NF535). + + +**Les évènements tracés de manière inaltérables sont:** + +- Création de facture +- Enregistrement des paiements +- Impression et téléchargement de facture faites via le logiciel + +Remarque: Le type des événements tracés est probablement plus large que la plupart des exigences légales mais permet d'être prêt pour d'éventuel élargissement +de ces exigences. +Vous pouvez aussi lire et recherche au sein de la log dédiée. + +Tous les enregistrements de la logs inaltérable sont liés avec le précédent dnas une Blockchain, et leur contenu fait parti de la signature inclue dans le lien, +aussi, une fois le module activé et le premier enregistrement réalisé, il ne sera plus possible d'effacer ni modifié un enregistrement dans la log +inaltérable sans corrompre la chaine. Dès lors qu'un enregistrement est invalide, tous les suivants seront également considérés invalides. + diff --git a/htdocs/blockedlog/README.md b/htdocs/blockedlog/README.md new file mode 100644 index 00000000000..ec3174fb847 --- /dev/null +++ b/htdocs/blockedlog/README.md @@ -0,0 +1,22 @@ +BLOCKED LOG +=========== + +## Feature + +This module tracks, in real time, some events into a non reversible log (that you can't modify once recorded) into a block chain. +This module provides compatibility with requirements of laws of some countries (like France with the law Fincance 2016 - Norme NF535). + + +**The tracked events are:** + +- Invoices creation +- Payments record +- Invoice printing + +You can also read and search into this dedicated log. + +All record in the log are linked with the previous one in a blockchain, and content of the record is part of the +signature included into the link, so, once the module is activated, it is no more possible to erase or modify a record without corrupting all the chain. + + + diff --git a/htdocs/blockedlog/admin/fingerprints.php b/htdocs/blockedlog/admin/fingerprints.php index da149d4340d..b7f00765316 100644 --- a/htdocs/blockedlog/admin/fingerprints.php +++ b/htdocs/blockedlog/admin/fingerprints.php @@ -128,20 +128,20 @@ print ' | '.$langs->trans('DownloadLogCSV').'' print ' '; +print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; + print ''; - -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; - +print getTitleFieldOfList($langs->trans('#'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'minwidth50 ')."\n"; +print getTitleFieldOfList($langs->trans('Date'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n"; +print getTitleFieldOfList($langs->trans('Author'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n"; +print getTitleFieldOfList($langs->trans('Action'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n"; +print getTitleFieldOfList($langs->trans('Ref'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n"; +print getTitleFieldOfList($langs->trans('Element'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n"; +print getTitleFieldOfList($langs->trans('Amount'), 0, $_SERVER["PHP_SELF"],'','','','align="right"',$sortfield,$sortorder,'')."\n"; +print getTitleFieldOfList($langs->trans('DataOfArchivedEvent'), 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'')."\n"; +print getTitleFieldOfList($langs->trans('Fingerprint'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n"; +print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n"; print ''; foreach($blocks as &$block) { @@ -159,7 +159,7 @@ foreach($blocks as &$block) { print ''; print ''; print ''; - print ''; + print ''; print '
'.$langs->trans('#').''.$langs->trans('Date').''.$langs->trans('Author').''.$langs->trans('Action').''.$langs->trans('Ref').''.$langs->trans('Element').''.$langs->trans('Amount').''.$langs->trans('DataOfArchivedEvent').''.$langs->trans('Fingerprint').'
'.$block->ref_object.''.$object_link.''.price($block->amounts).''.img_info($langs->trans('ShowDetails')).''.img_info($langs->trans('ShowDetails')).''; print $form->textwithpicto(dol_trunc($block->signature, '12'), $block->signature); @@ -179,53 +179,49 @@ foreach($blocks as &$block) { } print '
'; +print '
'; +print ' - -'."\n"; if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang index 7129b65257d..67d248587c9 100644 --- a/htdocs/langs/en_US/blockedlog.lang +++ b/htdocs/langs/en_US/blockedlog.lang @@ -1,6 +1,6 @@ BlockedLog=Non Reversible Logs Field=Field -BlockedLogDesc=This module store event for invoice and payments into a block chain +BlockedLogDesc=This module tracks some events into a non reversible log (that you can't modify once recorded) into a block chain, in real time. This module provides compatibility with requirements of laws of some countries (like France with the law Fincance 2016 - Norme NF535). Fingerprints=Archived events and fingerprints FingerprintsDesc=Archived business events and fingerprints CompanyInitialKey=Company initial key diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 1dd7652f0a6..b33ab447592 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -408,7 +408,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n"; +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n"; print ''."\n";