Functional Weave
Code in TypeScript

finance.tax.vat-rate@1.1.0

README.md

914 bytes · view raw

# finance.tax.vat-rate

The rate is not a constant in the code. It is a dated row in
data/vat-rules.json, and the lookup takes the date of supply.

That is the difference between a system that can still reprint a 2009 invoice
correctly and one that silently reprints it at today's rate. UK VAT was 15% in
2009, 17.5% in 2010 and 20% since 2011; UK hospitality was 5% for part of the
pandemic; and the Irish tourism rate has moved between 9% and 13.5% four times
since 2011.

When a rate changes, publish a new version of this capability's data.
Application code does not change at all - that is what 1.1.0 is: 1.0.0 plus the
Irish hospitality history, no implementation change.

This version also declares its effective-date columns, so a project can install
`history=current` and ship only the rules still in force. A build that does will
refuse a date before its horizon rather than answer it with today's rate.