Line Items: allow hooks to disable the core method for calculating taxes
The LineItem BAO create function recalculates taxes after the pre
hook has been called. This makes sense, since the hook might have changed something, and taxes must be recalculated.
However, the taxcalculator extension wants to handle tax calculations. In most places in core, it can manage to recalculate them after core has done its own recalculations, but not here:
https://github.com/civicrm/civicrm-core/blob/master/CRM/Price/BAO/LineItem.php#L34
I was wondering if it would be possible to have a magic parameter that would disable the call to getTaxAmountForLineItem
?
Example: hook_civicrm_pre
would allow extensions to add a param such as skipTaxCalculations=TRUE
. Kind of like skipLineItem
..
@eileen I expect you won't like this :-)
For context: I don't like how CiviCRM forces us to have a Financial Type + Financial Accounts + separate Line Items in Price Sets (or different Contribution Pages) for each tax jurisdiction. In Canada, this often means having ~ 5 different combos to cover most tax rates. The taxcalculator extension recalculate taxes based on the location of the contact.