33 global $db, $langs, $conf;
35 $langs->load(
"blockedlog");
41 $head[$h][0] = DOL_URL_ROOT.
"/blockedlog/admin/blockedlog.php?withtab=".$withtabsetup;
42 $head[$h][1] = $langs->trans(
"Setup");
43 $head[$h][2] =
'blockedlog';
47 $head[$h][0] = DOL_URL_ROOT.
"/blockedlog/admin/blockedlog_list.php?withtab=".$withtabsetup;
48 $head[$h][1] = $langs->trans(
"BrowseBlockedLog");
50 require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
52 if ($b->alreadyUsed()) {
53 $head[$h][1] .= (!
getDolGlobalString(
'MAIN_OPTIMIZEFORTEXTBROWSER') ?
'<span class="badge marginleftonlyshort">...</span>' :
'');
55 $head[$h][2] =
'fingerprints';
59 $head[$h][0] = DOL_URL_ROOT.
"/blockedlog/admin/blockedlog_archives.php?withtab=".$withtabsetup;
60 $head[$h][1] = $langs->trans(
"Archives");
62 $head[$h][2] =
'archives';
95 if (empty($companyname) || empty($companycountrycode) || empty($companyidprof1) || empty($companyemail)) {
101 if (empty($providerset)) {
118 return dol_hash(
'dolibarr'.$conf->file->instance_unique_id,
'sha256', 1);
138 if (defined(
'CERTIF_LNE') && (
int) constant(
'CERTIF_LNE') === 2) {
142 if (!$ignoredev && preg_match(
'/\-/', DOL_VERSION)) {
145 if (
$mysoc->country_code !=
'FR') {
148 if (!defined(
'CERTIF_LNE') || (
int) constant(
'CERTIF_LNE') === 0) {
172 if (defined(
'CERTIF_LNE') && (
int) constant(
'CERTIF_LNE') === 2
176 if (defined(
'CERTIF_LNE') && (
int) constant(
'CERTIF_LNE') === 1
199 if (array_key_exists(
'isblockedlogused', $conf->cache)) {
200 return $conf->cache[
'isblockedlogused'.$ignoresystem];
203 $sql =
"SELECT rowid FROM ".MAIN_DB_PREFIX.
"blockedlog";
204 $sql .=
" WHERE entity = ".((int) $conf->entity);
206 $sql .=
" AND action NOT IN ('MODULE_SET', 'MODULE_RESET')";
208 $sql .= $db->plimit(1);
210 $resql = $db->query($sql);
211 if ($resql !==
false) {
212 $obj = $db->fetch_object($resql);
220 $conf->cache[
'isblockedlogused'.$ignoresystem] = $result;
223 dol_syslog(
"isBlockedLogUsed: ignoresystem=".$ignoresystem.
" returns ".(
string) $result);
245 $outputlangs->load(
"blockedlog");
246 $blockedlog_mention = $outputlangs->transnoentitiesnoconv(
"InvoiceGeneratedWithLNECertifiedPOSSystem");
247 if ($blockedlog_mention) {
248 $pdf->SetFont(
'',
'', $default_font_size - 2);
249 $pdf->SetXY($pdftemplate->marge_gauche, $posy);
250 $pdf->MultiCell(100, 3, $blockedlog_mention, 0,
'L',
false);
251 $posy = $pdf->GetY();
275 if (!isset($totalamount[$block->action][$block->module_source])) {
276 $totalhtamount[$block->action][$block->module_source] = 0;
277 $totalvatamount[$block->action][$block->module_source] = 0;
278 $totalamount[$block->action][$block->module_source] = 0;
281 if ($block->action ==
'BILL_VALIDATE') {
282 $total_ht = $block->object_data->total_ht;
283 $total_vat = $block->object_data->total_tva;
284 $total_ttc = $block->object_data->total_ttc;
288 if (empty($refinvoicefound[$block->ref_object])) {
289 $totalhtamount[$block->action][$block->module_source] += $total_ht;
290 $totalvatamount[$block->action][$block->module_source] += $total_vat;
291 $totalamount[$block->action][$block->module_source] += $total_ttc;
293 $refinvoicefound[$block->ref_object] = 1;
294 } elseif ($block->action ==
'PAYMENT_CUSTOMER_CREATE') {
295 $total_ht = $block->object_data->amount;
297 $total_ttc = $block->object_data->amount;
299 $totalhtamount[$block->action][$block->module_source] += $total_ht;
300 $totalvatamount[$block->action][$block->module_source] += $total_vat;
301 $totalamount[$block->action][$block->module_source] += $total_ttc;
303 $total_ttc = $block->amounts;
if(! $sortfield) if(! $sortorder) $object
sumAmountsForUnalterableEvent($block, &$refinvoicefound, &$totalhtamount, &$totalvatamount, &$totalamount, &$total_ht, &$total_vat, &$total_ttc)
sumAmountsForUnalterableEvent
isALNEQualifiedVersion($ignoredev=0, $ignoremodule=0)
Return if the version is a candidate version to get the LNE certification and if the prerequisites ar...
isRegistrationDataSaved()
Return if the KYC mandatory parameters are set.
getHashUniqueIdOfRegistration()
Return a hash unique identifier of the registration.
pdfCertifMentionblockedLog(&$pdf, $outputlangs, $seller, $default_font_size, &$posy, $pdftemplate)
Add legal mention.
isBlockedLogUsed($ignoresystem=0)
Return if the blocked log was already used to block some events.
blockedlogadmin_prepare_head($withtabsetup)
Define head array for tabs of blockedlog tools setup pages.
isALNERunningVersion($blockedlogtestalreadydone=0)
Return if the application is executed with the LNE requirements on.
Class to manage Blocked Log.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_hash($chain, $type='0', $nosalt=0, $mode=0)
Returns a hash (non reversible encryption) of a string.