Work on blockedlog
This commit is contained in:
parent
33032a5474
commit
dc692f333d
23
htdocs/blockedlog/README-fr.md
Normal file
23
htdocs/blockedlog/README-fr.md
Normal file
@ -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.
|
||||||
|
|
||||||
22
htdocs/blockedlog/README.md
Normal file
22
htdocs/blockedlog/README.md
Normal file
@ -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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -128,20 +128,20 @@ print ' | <a href="?action=downloadcsv">'.$langs->trans('DownloadLogCSV').'</a>'
|
|||||||
print ' </div>';
|
print ' </div>';
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
print getTitleFieldOfList($langs->trans('#'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'minwidth50 ')."\n";
|
||||||
print '<td class="minwidth50">'.$langs->trans('#').'</td>';
|
print getTitleFieldOfList($langs->trans('Date'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td class="center">'.$langs->trans('Date').'</td>';
|
print getTitleFieldOfList($langs->trans('Author'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td>'.$langs->trans('Author').'</td>';
|
print getTitleFieldOfList($langs->trans('Action'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td>'.$langs->trans('Action').'</td>';
|
print getTitleFieldOfList($langs->trans('Ref'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td>'.$langs->trans('Ref').'</td>';
|
print getTitleFieldOfList($langs->trans('Element'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td>'.$langs->trans('Element').'</td>';
|
print getTitleFieldOfList($langs->trans('Amount'), 0, $_SERVER["PHP_SELF"],'','','','align="right"',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td>'.$langs->trans('Amount').'</td>';
|
print getTitleFieldOfList($langs->trans('DataOfArchivedEvent'), 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td class="center">'.$langs->trans('DataOfArchivedEvent').'</td>';
|
print getTitleFieldOfList($langs->trans('Fingerprint'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td>'.$langs->trans('Fingerprint').'</td>';
|
print getTitleFieldOfList('<span id="blockchainstatus"></span>', 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
||||||
print '<td><span id="blockchainstatus"></span></td>';
|
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
foreach($blocks as &$block) {
|
foreach($blocks as &$block) {
|
||||||
@ -159,7 +159,7 @@ foreach($blocks as &$block) {
|
|||||||
print '<td>'.$block->ref_object.'</td>';
|
print '<td>'.$block->ref_object.'</td>';
|
||||||
print '<td>'.$object_link.'</td>';
|
print '<td>'.$object_link.'</td>';
|
||||||
print '<td align="right">'.price($block->amounts).'</td>';
|
print '<td align="right">'.price($block->amounts).'</td>';
|
||||||
print '<td align="center"><a href="#" blockid="'.$block->id.'" rel="show-info">'.img_info($langs->trans('ShowDetails')).'</a></td>';
|
print '<td align="center"><a href="#" data-blockid="'.$block->id.'" rel="show-info">'.img_info($langs->trans('ShowDetails')).'</a></td>';
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->textwithpicto(dol_trunc($block->signature, '12'), $block->signature);
|
print $form->textwithpicto(dol_trunc($block->signature, '12'), $block->signature);
|
||||||
@ -179,53 +179,49 @@ foreach($blocks as &$block) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<script type="text/javascript">
|
||||||
|
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
jQuery("#dialogforpopup").dialog(
|
||||||
|
{ closeOnEscape: true, classes: { "ui-dialog": "highlight" },
|
||||||
|
maxHeight: window.innerHeight-60, height: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? 400 : 700).',
|
||||||
|
modal: true,
|
||||||
|
autoOpen: false }).css("z-index: 5000");
|
||||||
|
|
||||||
?>
|
$("a[rel=show-info]").click(function() {
|
||||||
<script type="text/javascript">
|
|
||||||
$('a[rel=show-info]').click(function() {
|
|
||||||
|
|
||||||
$pop = $('<div id="pop-info"><table width="100%" class="border"><thead><th width="25%"><?php echo $langs->trans('Field') ?></th><th><?php echo $langs->trans('Value') ?></th></thead><tbody></tbody></table></div>');
|
console.log("We click on tooltip");
|
||||||
|
|
||||||
$pop.dialog({
|
jQuery("#dialogforpopup").html(\'<div id="pop-info"><table width="100%" height="80%" class="border"><thead><th width="50%">'.$langs->trans('Field').'</th><th>'.$langs->trans('Value').'</th></thead><tbody></tbody></table></div>\');
|
||||||
title:"<?php echo $langs->transnoentities('BlockedlogInfoDialog'); ?>"
|
|
||||||
,modal:true
|
var fk_block = $(this).attr("data-blockid");
|
||||||
,width:'80%'
|
|
||||||
|
$.ajax({
|
||||||
|
url:"../ajax/block-info.php?id="+fk_block
|
||||||
|
,dataType:"json"
|
||||||
|
}).done(function(data) {
|
||||||
|
drawData(data,"");
|
||||||
|
});
|
||||||
|
|
||||||
|
jQuery("#dialogforpopup").dialog("open");
|
||||||
});
|
});
|
||||||
|
|
||||||
var fk_block = $(this).attr("blockid");
|
|
||||||
|
|
||||||
$.ajax({
|
function drawData(data, prefix) {
|
||||||
url:"../ajax/block-info.php?id="+fk_block
|
for(x in data) {
|
||||||
,dataType:'json'
|
value = data[x];
|
||||||
}).done(function(data) {
|
|
||||||
|
|
||||||
drawData(data,'');
|
$("#pop-info table tbody").append("<tr><td>"+prefix+x+"</td><td class=\"wordwrap\">"+value+"</td></tr>");
|
||||||
|
if( (typeof value === "object") && (value !== null) ) {
|
||||||
});
|
drawData(value, prefix+x+" >> ");
|
||||||
|
}
|
||||||
});
|
|
||||||
|
|
||||||
function drawData(data, prefix) {
|
|
||||||
|
|
||||||
for(x in data) {
|
|
||||||
|
|
||||||
value = data[x];
|
|
||||||
|
|
||||||
$('#pop-info table tbody').append('<tr><td>'+prefix+x+'</td><td>'+value+'</td></tr>');
|
|
||||||
|
|
||||||
if( (typeof value === "object") && (value !== null) ) {
|
|
||||||
drawData(value, prefix+x+' >> ');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
})
|
||||||
|
</script>'."\n";
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) {
|
if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
BlockedLog=Non Reversible Logs
|
BlockedLog=Non Reversible Logs
|
||||||
Field=Field
|
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
|
Fingerprints=Archived events and fingerprints
|
||||||
FingerprintsDesc=Archived business events and fingerprints
|
FingerprintsDesc=Archived business events and fingerprints
|
||||||
CompanyInitialKey=Company initial key
|
CompanyInitialKey=Company initial key
|
||||||
|
|||||||
@ -408,7 +408,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
|||||||
$parameters=array('arrayfields'=>$arrayfields);
|
$parameters=array('arrayfields'=>$arrayfields);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
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 '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user