Hi Pierre & Stéphane,
The simple tax plugin was too simple :-)
I could not send to production this “single tax rate” that would apply to every taxable items.
So, inspired by the concept of "tax code" I saw in the avatax plugin, I rewrote the simple tax plugin to implement tax codes.
I
documented the result and just finished covering it with tests (≈95.3%).
Regulation-specific rules can be adapted with custom implementations of the
TaxResolver interface.
The idempotent nature of the plugin is now driven by the tax codes set on invoice items custom fields.
Upcoming
in my TODOs, I'll allow tax codes to apply to specific countries only.
With this in mind, I wonder how countries are stored in Kill Bill accounts, and how they are validated and used.
Do you have any thought about how I could enforce mandatory and consistent data in there,
so that the simple tax plugin can always know the applicable country for an account?
Do you recommend using a custom field instead for storing the tax-related country information?
Next, I'll also need to store the
VATINs for accounts.
Indeed, my foreign customers won't get taxed with the French system, but I need their VAT number appear on their invoices.
Do you think custom fields are the right approach to store those VAT numbers?
Cheers