How Booking Tax and Discount Calculations Work
Source: event.rb
- Event totals are fully recalculated from line items on every save — there is no cached total that persists between edits
- Tax settings (rates, tax-free status, rounding) are snapshotted from the company record only while the event is in OPEN status; once closed or converted, tax settings are frozen
- Four distinct GST calculation paths exist: multi-tax, single tax without Xero, single tax with Xero, and price-includes-tax — the path chosen depends on company configuration and Xero integration status
- When discount_includes_tax is enabled, the discount amount is split proportionally between the subtotal and tax portions rather than applied to one or the other
- Swedish rounding rounds the final total to the nearest 5 cents when company.round_total is enabled (e.g., $14.52 becomes $14.50, $14.53 becomes $14.55)
- BOM parent items, regular product items, and labor items with hours each use different cost calculation formulas
- Freight tax is only applied when both company.tax_freight is true AND the customer is not flagged as tax-free
- Multi-tax line items are deleted and fully recreated after every event save to ensure tax group allocations stay correct
Support scenarios
- "My booking total is rounding strangely to the nearest 5 cents" → The company has Swedish rounding (round_total) enabled. This rounds the final total to the nearest 5 cents. If unwanted, disable round_total in company settings.
- "The tax changed on my booking after I edited it" → Tax settings are re-snapshotted from the company on every save while the event is OPEN. If the company's tax rate was changed between saves, the booking will pick up the new rate.
- "Freight isn't being taxed on this booking" → Freight tax requires both company.tax_freight to be enabled AND the customer to not be tax-free. Check both settings.