Line
Discount rate. The discounts of a line are applied one after another, so the line’sDiscountRate is the combined rate:
DiscountRate = 100 × (1 − (1 − rate₁/100) × (1 − rate₂/100) × …)
10, 10 and 10 give 27.1. If the user entered a discount amount instead of rates, the rate is derived from it: DiscountAmount / (Quantity × UnitPrice) × 100.
Discount amount. DiscountAmount = Quantity × UnitPrice × DiscountRate / 100, calculated on the price as entered (the gross price when VatIncluded is true).
Amount excluding tax (AmountExcludingTax):
VatIncluded = false:Quantity × UnitPrice − DiscountAmount.VatIncluded = true: the price contains VAT (and additional taxes added on top of the price), so(Quantity × UnitPrice − DiscountAmount)is divided by(1 + additional tax rate/100) × (1 + VatRate/100). For withholding-type additional taxes (such as income tax or corporate tax withholding) the divisor is1 + additional tax rate/100 + VatRate/100.
AdditionalTaxAmountN = AmountExcludingTax × AdditionalTaxRateN / 100. AdditionalTaxBaseN is the amount the tax was calculated on.
VAT base (VatBase): AmountExcludingTax plus the additional tax amounts that are taxed with VAT, such as special consumption tax. Withholding-type additional taxes are not part of the VAT base.
VAT amount: VatAmount = VatBase × VatRate / 100.
Withholding (tevkifat): WithheldVatAmount = VatAmount × WithholdingNumerator / WithholdingDenominator. Withholding does not reduce the line amount including tax.
Amount including tax (AmountIncludingTax): VatBase + VatAmount; when withholding-type additional taxes are not part of the VAT base, their amounts are added as well.
Quote totals
Totals are the sums of the line values:SubTotal= sum of the lines’AmountExcludingTax.DiscountTotal= sum of the line discounts on a tax-excluded basis (forVatIncludedlines the line discount is divided by the same divisor as above).VatTotal= sum of (VatAmount−WithheldVatAmount). It is net of withholding.AdditionalTaxTotal= sum of the additional tax amounts of all lines.WithholdingTotal= sum of the lines’WithheldVatAmount.GrandTotal=SubTotal+VatTotal+AdditionalTaxTotal. Withholding is not subtracted again, becauseVatTotalis already net.
Currencies
Line amounts are in the line’s own currency.- Quote in the company’s default currency, lines in another currency: each line amount is multiplied by the line’s
ExchangeRatebefore it is added to the totals. - Quote in a foreign currency and lines in the same currency: the totals are the plain sums of the lines (no multiplication), and each line’s
ExchangeRateis the rate against the default currency.
AverageExchangeRate is the amount-weighted average of the line exchange rates: the sum of AmountExcludingTax × ExchangeRate divided by the sum of AmountExcludingTax, where an exchange rate of 0 counts as 1. It is 1 when everything is in the default currency.