calculate_moroccan_vat
Compute Moroccan VAT (TVA) for invoicing: convert between HT and TTC amounts using rates 0%, 7%, 10%, 14%, or 20%. Returns HT, TTC, and tax amount.
Instructions
Compute Moroccan VAT (TVA) — convert between HT and TTC. Use for invoicing in Morocco. Inputs: amount, rate (20/14/10/7), mode (ht/ttc). Returns HT, TTC, tax amount. See list_bundles for related 'finance-afrique-quebec' calculators.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount in MAD | |
| rate | No | VAT rate: 0%, 7%, 10%, 14%, or 20% (standard) | 20 |
| mode | No | Input mode: ht=hors taxe, ttc=toutes taxes comprises | ht |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Computed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools). | |
| formula | No | Human-readable formula or method used (e.g. "I=P·r·t", "Magnus formula"). | |
| source | No | Authoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21"). | |
| reference_url | No | Link to a calcul2 page documenting the calculation in detail. |