"Amount before tax" is wrong on online contribution receipt
It's because totalTaxAmount seems to have gone missing, so the amount before tax ends up the same as after tax. The total is correct though.
To reproduce:
- Turn on and set up taxes: https://docs.civicrm.org/user/en/latest/contributions/sales-tax-and-vat/
- Create a price set using that financial type.
- Create an online donation for it where it's set up to send a receipt. It also happens if you use the send receipt action later from find contributions, since this also uses the online template (as opposed to editing the contribution and checking the box to send receipt, which uses the offline template).
I don't know exactly when it started. It's not working in 5.52 or master.