Description
Include deposit in taxBase only when depositTaxable, calculate tax, and add purchase, deposit, and tax.
Hospitality charges depend on the unit of service, inclusion rules, deposits, commissions, and tax bases. Operation order can change an amount, while arithmetic alone does not establish contract terms or liability.
Include deposit in taxBase only when depositTaxable, calculate tax, and add purchase, deposit, and tax.
When to use this tool
Use Minibar Deposit Vatbase Flag when you need one supplied billing or cost component.
How to use the tool and how it works
- Enter purchase, deposit, taxRate, depositTaxable. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read taxBase, tax, total. Use the output convention below.
Require nonnegative purchase, deposit, and taxRate. Include deposit in taxBase only when depositTaxable, calculate tax, and add purchase, deposit, and tax.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| purchase | Purchase | Required. Finite number; minimum 0. |
| deposit | Deposit | Required. Finite number; minimum 0. |
| taxRate | Tax Rate | Required. Finite number; minimum 0. |
| depositTaxable | Deposit Taxable | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| taxBase | Tax Base | Required. Finite number. |
| tax | Tax | Required. Finite number. |
| total | Total | Required. Finite number. |
{
"input": {
"purchase": 20,
"deposit": 5,
"taxRate": 0.2,
"depositTaxable": false
},
"output": {
"taxBase": 20,
"tax": 4,
"total": 29
}
} Limitations and assumptions
- TaxRate is a fraction; the supplied flag does not determine a deposit's legal VAT status, refund treatment, or invoice rounding.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Reconcile the result with booking terms, actual invoice rules, taxes, and monetary rounding.
References
Similar or alternative tools
- Room Upgrade Supplement Tax Order
Apply taxRate to base plus supplement only when supplementTaxable, then add the full supplement and tax to base.
- Hospitality Resort Fee Night Basis
Multiply nonnegative nights, rooms, and feePerRoomNight for fee.