1.1 KiB
1.1 KiB
ClientFlow v4926.7 — fiscal identity guardrails + duplicate NIF handling
Fixes
- Rejects invalid company mentions extracted from email identity, including bare TLD/domain fragments such as
pt,com,www, and full domains likesementenergias.pt. - Prevents short fragments such as
ptfrom matching inside company names likePLANETOPTION, LDA. - Reduces false fiscal conflicts caused by invalid email identity mentions.
- Adds friendly duplicate-NIF handling when editing customers. Editing a customer with a NIF that already belongs to another customer now returns a business conflict instead of a raw PostgreSQL unique violation.
Scripts
scripts/cleanup_invalid_email_identity_suggestions.pyrejects pending/accepted email-identity suggestions created from invalid lookup values such aspt.scripts/inspect_customer_tax_id_conflict.pylists customers and linked counts for a duplicate NIF conflict.
Operator notes
For the SEMENTENERGIAS case, refresh email identity extraction after installing and reject old invalid suggestions created from pt.