Quittio next API

BuildsAllowancesAndCharges

Document level allowances and charges (BG-20, BG-21) and discounts split over the VAT rates.

Part of InvoiceBuilder, which holds the state; use the builder, not the trait.

Table of Contents

Methods

allowance()  : static
Document level allowance (BG-20) for one VAT category and rate.
charge()  : static
Document level charge (BG-21) for one VAT category and rate. See allowance() for the exemption reason.
discountAmount()  : static
Absolute discount distributed over all VAT groups in proportion to their line totals.
discountPercent()  : static
Percentage discount on all lines. Split into one allowance per VAT group.

Methods

allowance()

Document level allowance (BG-20) for one VAT category and rate.

public allowance(VatCategory $category, BigDecimal|int|float|string|null $rate[, string|null $amount = null ][, string|null $percent = null ][, string|null $reason = null ][, AllowanceReasonCode|RawCode|string|null $reasonCode = null ][, string|null $baseAmount = null ][, string|null $exemptionReason = null ][, VatExemptionReasonCode|RawCode|string|null $exemptionReasonCode = null ]) : static

The exemption reason (BT-120/BT-121) is used for the VAT breakdown when no invoice line of the same VAT group provides one, e.g. an exempt charge on a standard rated invoice.

Parameters
$category : VatCategory
$rate : BigDecimal|int|float|string|null
$amount : string|null = null
$percent : string|null = null
$reason : string|null = null
$reasonCode : AllowanceReasonCode|RawCode|string|null = null
$baseAmount : string|null = null
$exemptionReason : string|null = null
$exemptionReasonCode : VatExemptionReasonCode|RawCode|string|null = null
Return values
static

charge()

Document level charge (BG-21) for one VAT category and rate. See allowance() for the exemption reason.

public charge(VatCategory $category, BigDecimal|int|float|string|null $rate[, string|null $amount = null ][, string|null $percent = null ][, string|null $reason = null ][, ChargeReasonCode|RawCode|string|null $reasonCode = null ][, string|null $baseAmount = null ][, string|null $exemptionReason = null ][, VatExemptionReasonCode|RawCode|string|null $exemptionReasonCode = null ]) : static
Parameters
$category : VatCategory
$rate : BigDecimal|int|float|string|null
$amount : string|null = null
$percent : string|null = null
$reason : string|null = null
$reasonCode : ChargeReasonCode|RawCode|string|null = null
$baseAmount : string|null = null
$exemptionReason : string|null = null
$exemptionReasonCode : VatExemptionReasonCode|RawCode|string|null = null
Return values
static

discountAmount()

Absolute discount distributed over all VAT groups in proportion to their line totals.

public discountAmount(BigDecimal|int|float|string $amount[, string|null $reason = null ][, AllowanceReasonCode|RawCode|string|null $reasonCode = AllowanceReasonCode::Discount ]) : static
Parameters
$amount : BigDecimal|int|float|string
$reason : string|null = null
$reasonCode : AllowanceReasonCode|RawCode|string|null = AllowanceReasonCode::Discount
Return values
static

discountPercent()

Percentage discount on all lines. Split into one allowance per VAT group.

public discountPercent(BigDecimal|int|float|string $percent[, string|null $reason = null ][, AllowanceReasonCode|RawCode|string|null $reasonCode = AllowanceReasonCode::Discount ]) : static
Parameters
$percent : BigDecimal|int|float|string
$reason : string|null = null
$reasonCode : AllowanceReasonCode|RawCode|string|null = AllowanceReasonCode::Discount
Return values
static
On this page

Search results