Improve reconciliation process by skipping already validated deliveries

Update client-side logic in BLReconciliation to exclude deliveries with a 'reconciled' status from automatic verification. Modify server-side InvoiceVerificationService to implement permanent caching for reconciled invoices, preventing redundant checks.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: daf3525c-b971-454a-b0c0-7a9845e786cc
Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
michaelschal committed 2025-08-31 07:56:20 +00:00
1 parent aef303b709
commit 8dec1c46ba
2 files changed
+16 -10

No files matched your search

+7 -3
View File
@@ -30,9 +30,13 @@ export class InvoiceVerificationService {
currentTime: new Date().toISOString()
});
// Cache permanent si facture validée (isReconciled = true)
if (cached && cached.isReconciled) {
console.log('✅ [CACHE] Cache PERMANENT pour facture validée:', { invoiceReference, groupId, exists: cached.exists });
// ✅ CACHE PERMANENT : Facture validée avec coche verte = JAMAIS re-vérifier
if (cached && cached.isReconciled && cached.exists) {
console.log('🛡️ [CACHE] PERMANENT - Facture validée avec coche verte, AUCUNE vérification:', {
invoiceReference,
groupId,
exists: cached.exists
});
return {
exists: cached.exists,
matchType: cached.matchType,