struct Zugpferd::TradeSettlement

Overview

Payment details and all monetary totals for the invoice (BG-17 payment means, BG-22 document totals). Holds currency, VAT breakdown, optional payment means, and the full summation block.

Defined in:

zugpferd/trade_settlement.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(currency_code : String, taxes : Array(ApplicableTradeTax), line_total_amount : MonetaryAmount, tax_basis_total_amount : MonetaryAmount, tax_total_amount : MonetaryAmount, grand_total_amount : MonetaryAmount, due_payable_amount : MonetaryAmount, *, payment_reference : String | Nil = nil, payment_means_code : String | Nil = nil, payee_iban : String | Nil = nil, payee_bic : String | Nil = nil, payee_name : String | Nil = nil, due_date : Time | Nil = nil, payment_terms_note : String | Nil = nil, allowance_charges : Array(SpecifiedTradeAllowanceCharge) = [] of SpecifiedTradeAllowanceCharge, allowance_total_amount : MonetaryAmount = BigDecimal.new(0), charge_total_amount : MonetaryAmount = BigDecimal.new(0), prepaid_amount : MonetaryAmount = BigDecimal.new(0)) #

[View source]

Instance Method Detail

def allowance_charges : Array(SpecifiedTradeAllowanceCharge) #

Document-level allowances and charges (BG-20 charges / BG-21 allowances). Distinct from line-level #allowance_charges on SupplyChainTradeLineItem. Emitted only for BASIC_WL and above.


[View source]
def allowance_charges=(allowance_charges : Array(SpecifiedTradeAllowanceCharge)) #

Document-level allowances and charges (BG-20 charges / BG-21 allowances). Distinct from line-level #allowance_charges on SupplyChainTradeLineItem. Emitted only for BASIC_WL and above.


[View source]
def allowance_total_amount : MonetaryAmount #

Sum of all document-level allowance amounts (BT-107). Zero if none.


[View source]
def allowance_total_amount=(allowance_total_amount : MonetaryAmount) #

Sum of all document-level allowance amounts (BT-107). Zero if none.


[View source]
def charge_total_amount : MonetaryAmount #

Sum of all document-level charge amounts (BT-108). Zero if none.


[View source]
def charge_total_amount=(charge_total_amount : MonetaryAmount) #

Sum of all document-level charge amounts (BT-108). Zero if none.


[View source]
def currency_code : String #

Invoice currency (BT-5). ISO 4217 alpha-3 code, e.g. "EUR", "USD", "GBP".


[View source]
def currency_code=(currency_code : String) #

Invoice currency (BT-5). ISO 4217 alpha-3 code, e.g. "EUR", "USD", "GBP".


[View source]
def due_date : Time | Nil #

Payment due date (BT-9). Required when #payment_terms_note is absent (BR-CO-25). Emitted only for BASIC_WL and above.


[View source]
def due_date=(due_date : Time | Nil) #

Payment due date (BT-9). Required when #payment_terms_note is absent (BR-CO-25). Emitted only for BASIC_WL and above.


[View source]
def due_payable_amount : MonetaryAmount #

Amount the buyer still owes: grand_total − prepaid (BT-115).


[View source]
def due_payable_amount=(due_payable_amount : MonetaryAmount) #

Amount the buyer still owes: grand_total − prepaid (BT-115).


[View source]
def grand_total_amount : MonetaryAmount #

Invoice total inclusive of VAT (BT-112).


[View source]
def grand_total_amount=(grand_total_amount : MonetaryAmount) #

Invoice total inclusive of VAT (BT-112).


[View source]
def line_total_amount : MonetaryAmount #

Sum of all line net amounts (BT-106). Required for BASIC_WL and above.


[View source]
def line_total_amount=(line_total_amount : MonetaryAmount) #

Sum of all line net amounts (BT-106). Required for BASIC_WL and above.


[View source]
def payee_bic : String | Nil #

BIC/SWIFT code of the payee's bank (BT-85). Emitted only for BASIC_WL and above.


[View source]
def payee_bic=(payee_bic : String | Nil) #

BIC/SWIFT code of the payee's bank (BT-85). Emitted only for BASIC_WL and above.


[View source]
def payee_iban : String | Nil #

IBAN of the payee's bank account (BT-84). Emitted only for BASIC_WL and above.


[View source]
def payee_iban=(payee_iban : String | Nil) #

IBAN of the payee's bank account (BT-84). Emitted only for BASIC_WL and above.


[View source]
def payee_name : String | Nil #

Name on the payee's bank account (BT-86), if different from the seller name. Emitted only for BASIC_WL and above.


[View source]
def payee_name=(payee_name : String | Nil) #

Name on the payee's bank account (BT-86), if different from the seller name. Emitted only for BASIC_WL and above.


[View source]
def payment_means_code : String | Nil #

Payment means code (BT-81). UNTDID 4461 code list. Common values: "58" = SEPA credit transfer, "30" = credit transfer, "48" = bank card. Emitted only for BASIC_WL and above.


[View source]
def payment_means_code=(payment_means_code : String | Nil) #

Payment means code (BT-81). UNTDID 4461 code list. Common values: "58" = SEPA credit transfer, "30" = credit transfer, "48" = bank card. Emitted only for BASIC_WL and above.


[View source]
def payment_reference : String | Nil #

Remittance information / payment reference the buyer should quote (BT-83). Emitted only for BASIC_WL and above.


[View source]
def payment_reference=(payment_reference : String | Nil) #

Remittance information / payment reference the buyer should quote (BT-83). Emitted only for BASIC_WL and above.


[View source]
def payment_terms_note : String | Nil #

Free-text payment terms description (BT-20). Use when structured due date is insufficient. Emitted only for BASIC_WL and above.


[View source]
def payment_terms_note=(payment_terms_note : String | Nil) #

Free-text payment terms description (BT-20). Use when structured due date is insufficient. Emitted only for BASIC_WL and above.


[View source]
def prepaid_amount : MonetaryAmount #

Amount already paid before this invoice (BT-113). Zero if nothing is prepaid.


[View source]
def prepaid_amount=(prepaid_amount : MonetaryAmount) #

Amount already paid before this invoice (BT-113). Zero if nothing is prepaid.


[View source]
def tax_basis_total_amount : MonetaryAmount #

Tax-exclusive invoice total: line_total − allowances + charges (BT-109).


[View source]
def tax_basis_total_amount=(tax_basis_total_amount : MonetaryAmount) #

Tax-exclusive invoice total: line_total − allowances + charges (BT-109).


[View source]
def tax_total_amount : MonetaryAmount #

Total VAT amount for the invoice (BT-110).


[View source]
def tax_total_amount=(tax_total_amount : MonetaryAmount) #

Total VAT amount for the invoice (BT-110).


[View source]
def taxes : Array(ApplicableTradeTax) #

VAT breakdown entries (BG-23). At least one entry is required for BASIC and above. Emitted only for BASIC_WL and above.


[View source]
def taxes=(taxes : Array(ApplicableTradeTax)) #

VAT breakdown entries (BG-23). At least one entry is required for BASIC and above. Emitted only for BASIC_WL and above.


[View source]