Updating-ATCUD-codes
Unpleasant context
ATCUD codes are codes related to Portugal venues that are required in the Portouguese fiscality system to be added to certain fiscal documents. There are three ATCUD codes per venue:
- invoices
- receipts
- cancellations
Unfortunate assumptions
When ATCUD codes were implemented in TWPro, some assumptions were taken that currently don't seem to be valid anymore. Notably:
- ATCUD codes change every year. That doesn't really happen, so we still use ATCUD codes from 2023.
- There's no way that ATCUD codes can change after they have started being used. Actually, there is at least one use case in which ATCUD codes have to be updated even if they had been used, that is when a venue owner changes.
Unforeseen consequences
Consequently, there's a validation preventing ATCUD codes updates once they have been used, implying that neither the venue or AA users can update ATCUD codes once they have been used. Hence, CX department has to create a Support Request to IT department to force ATCUD code updates.
Uncool solution
So, basically, when CX opens a Support Request providing the venue ID and the
new ATCUD codes, we execute the
UpdateVenueAtcudCodes
maintentance task.