We have implemented this in a non-generalized way for a couple of clients (eg https://github.com/JMAConsulting/biz.jmaconsulting.cdntaxcalculator), and have developed a spec for the work involved in making it work easily for everyone. There are various places where this would be useful: Canadian federal and provincial taxes (sometimes harmonized into a single tax), VAT sales for certain online services across Europe, state and city taxes in US, etc.
We think the functionality can be broken into two: a general extension to support two taxes, and jurisdiction-specific extensions to provide rates for a (set of) jurisdictions.
General extension functionality to support up to two taxes:
- during configuration for each financial type
- on display per line item on contribution, membership, and event registration purchase forms, confirmation forms, thank you pages
- on display on shopping cart event registration purchases
- on invoice and credit note downloadable documents
- for pay later, pay immediate, partial payment, cancellation, pending refund, partial refund and refund transactions
- in financial batch export functionality
- on all contribution, membership and event registration system template messages
- on all relevant reports that display financial information (about 15+)
- on API calls for order, payment, contribution, etc.
- on hook calls for determining tax amounts
- automated tests to ensure compliance
- system administrator/bookkeeper documentation
A second extension would provide the data and code to calculate taxes for a specific (set of) jurisdiction(s), like Canadian provinces. The types of rules for determining which taxes are applicable vary between jurisdictions. Generally there is a set of rules to determine place of supply (ie which place the sale occurs in for sales purposes) which can vary between different kinds of sales - physical goods, online services, offline services. The type of sale and place of supply will determine how many and which taxes to apply. Different items may have different tax rates in the same jurisdiction. Updates to the billing address may result in changes to the applicable taxes.
The work can probably be done in separate phases for contributions (when used for taxable products or services), event registrations and memberships (dependent on contributions).
There is likely some opportunity to share costs between various organizations needing this functionality. However, such Make It Happen fundraising efforts usually only succeeded when there was a launch sponsor willing to fund at least half the cost. Please contact me at joe (dot) murray (at) jmaconsulting (dot) biz if you would like to continue this discussion.