diff --git a/client/src/pages/InvoicesBAP.tsx b/client/src/pages/InvoicesBAP.tsx index 221b90b..d15b1c6 100644 --- a/client/src/pages/InvoicesBAP.tsx +++ b/client/src/pages/InvoicesBAP.tsx @@ -349,6 +349,7 @@ export default function InvoicesBAP() { if (statusFilter === "export_error" && inv.exportStatus !== "export_error") return false; if (statusFilter === "bap_validated" && inv.bapValidated !== 1) return false; if (statusFilter === "bap_pending" && inv.bapValidated === 1) return false; + if (statusFilter === "to_complete" && isEligibleForBAPValidation(inv)) return false; } return true; @@ -361,6 +362,7 @@ export default function InvoicesBAP() { export_error: invoices?.filter(inv => inv.exportStatus === "export_error").length || 0, bap_validated: invoices?.filter(inv => inv.bapValidated === 1).length || 0, bap_pending: invoices?.filter(inv => inv.bapValidated !== 1).length || 0, + to_complete: invoices?.filter(inv => !isEligibleForBAPValidation(inv)).length || 0, }; // Old filter logic (to be removed) @@ -665,6 +667,14 @@ export default function InvoicesBAP() { > ⏳ En attente BAP ({statusCounts.bap_pending}) + {/* Table */}