Calculate IVA (El Salvador, 13%)
calculate_ivaCalculate the 13% IVA for El Salvador. Specify whether the amount already includes IVA to get subtotal, tax, and total rounded to two decimals.
Instructions
Compute El Salvador IVA (13%). If includesIva is false (the default), amount is treated as the net subtotal and IVA is added on top. If includesIva is true, amount already includes IVA and it is broken out. Returns { subtotal, iva, total } rounded to 2 decimals.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Monetary amount. | |
| includesIva | No | Whether amount already includes the 13% IVA. Defaults to false. |