calculate_vat_generic
Calculate VAT, GST, or sales tax for any rate and country. Given an amount and tax rate, returns amounts before tax, after tax, and the tax amount, with support for before-tax or after-tax input.
Instructions
Add or remove VAT/GST/sales tax at any custom rate, for any country. Inputs: amount, rate (tax rate in percent) and optional mode (whether amount is before-tax or after-tax — see enum). Returns amount before tax, amount after tax and the tax amount. Read-only and deterministic. Country-specific helpers (French/UK/Swiss VAT…) exist in the full catalog via get_bundle_tools('finance-universal').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ht=before tax, ttc=after tax | ht |
| rate | Yes | Tax rate in % | |
| amount | Yes | Amount |