From 7328aeacf96762c4dcaaaefdea200d634f968d58 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Feb 2026 04:04:17 +0100 Subject: [PATCH] Work on LNE --- htdocs/blockedlog/admin/registration.php | 2 +- htdocs/blockedlog/lib/blockedlog.lib.php | 11 +++++++++-- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 3 ++- .../core/modules/facture/doc/pdf_octopus.modules.php | 2 +- .../core/modules/facture/doc/pdf_sponge.modules.php | 3 ++- htdocs/langs/en_US/blockedlog.lang | 2 ++ 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/htdocs/blockedlog/admin/registration.php b/htdocs/blockedlog/admin/registration.php index f58221fc68f..f82a9e46830 100644 --- a/htdocs/blockedlog/admin/registration.php +++ b/htdocs/blockedlog/admin/registration.php @@ -223,7 +223,7 @@ $morehtmlcenter = ''; $registrationnumber = getHashUniqueIdOfRegistration(); $texttop = ''.$langs->trans("RegistrationNumber").': '.dol_trunc($registrationnumber, 10).''; -if (!isRegistrationDataSavedAndPushed()) { +if ((!isRegistrationDataSavedAndPushed() || !isModEnabled('blockedlog')) && $mode != "forceregistration") { $texttop = ''; } diff --git a/htdocs/blockedlog/lib/blockedlog.lib.php b/htdocs/blockedlog/lib/blockedlog.lib.php index 0f563c0ac99..c7441a28731 100644 --- a/htdocs/blockedlog/lib/blockedlog.lib.php +++ b/htdocs/blockedlog/lib/blockedlog.lib.php @@ -265,9 +265,16 @@ function pdfCertifMentionblockedLog(&$pdf, $outputlangs, $seller, $default_font_ { $result = 0; - if (in_array($seller->country_code, array('FR')) && isALNEQualifiedVersion()) { // If necessary, we could replace with "if isALNERunningVersion()" + if (in_array($seller->country_code, array('FR'))) { $outputlangs->load("blockedlog"); - $blockedlog_mention = $outputlangs->transnoentitiesnoconv("InvoiceGeneratedWithLNECertifiedPOSSystem"); + + $isalne = isALNEQualifiedVersion(); // If necessary, we could replace with "if isALNERunningVersion()" + if ($isalne == 'CERTIF_LNE_IS_2') { + $blockedlog_mention = $outputlangs->transnoentitiesnoconv("InvoiceGeneratedWithLNECandidatePOSSystem"); + } else { + $blockedlog_mention = $outputlangs->transnoentitiesnoconv("InvoiceGeneratedWithLNECertifiedPOSSystem"); + } + if ($blockedlog_mention) { $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($pdftemplate->marge_gauche, $posy); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 1071d97f24e..7b5eecce727 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1907,7 +1907,8 @@ class pdf_crabe extends ModelePDFFactures $resteapayer = 0; } - if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) { + if ((($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) + || isALNERunningVersion()) { // Already paid + Deposits $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); diff --git a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php index a626c66240b..6f2e634b8f7 100644 --- a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php @@ -1997,7 +1997,7 @@ class pdf_octopus extends ModelePDFFactures if (! empty($object->paye)) $resteapayer=0; */ - if ($deja_regle > 0) { + if ($deja_regle > 0 || isALNERunningVersion()) { // Already paid + Deposits $index++; diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 76094f3aaf8..b36329584e9 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2264,7 +2264,8 @@ class pdf_sponge extends ModelePDFFactures $resteapayer_origin = 0; } - if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) { + if ((($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) + || isALNERunningVersion()) { // Already paid + Deposits $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang index a3d62ab9044..010574a3157 100644 --- a/htdocs/langs/en_US/blockedlog.lang +++ b/htdocs/langs/en_US/blockedlog.lang @@ -57,6 +57,7 @@ LNECertifiedVersionFR=This version is a certified version of application. More i LNECandidateVersionForCertificationFR=This version is a candidate version to become a LNE certified version. Not yet certified. NotCertifiedVersionFR=This version of application is technically compliant with the french VAT anti-fraud law (check any update of the law of your country), but you MUST get the compliant statement from an IT company to be allowed to use this software to collect payments from private individuals (ask your reseller or integrator to get this statement of compliance). InvoiceGeneratedWithLNECertifiedPOSSystem=Invoice generated with a LNE certified POS system +InvoiceGeneratedWithLNECandidatePOSSystem=Invoice generated with a candidate for the LNE certified POS system TotalTTCIfInvoiceSeeCompleteDataForDetail=Event amount. Total including tax if invoice. See the column "complete data" for details. TypeOfEvent=Type of event TotalForAction=Total for event %s @@ -124,3 +125,4 @@ DebugTools=Debug tools URLToForceRegistration=URL to force the registration URLToForcePushOfBlockedLogCounter=URL to force the push of the last unlaterable record counter UseThisFormToUpdate=Use this form to update your registration information +ControlFile=Control the file