struct Zugpferd::SpecifiedTradeAllowanceCharge

Overview

A document-level or line-level allowance or charge.

At document level: BG-20 (charge) or BG-21 (allowance), held in TradeSettlement#allowance_charges. At line level: BG-27 (allowance) or BG-28 (charge), held in SupplyChainTradeLineItem#allowance_charges.

Defined in:

zugpferd/allowance_charge.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(charge : Bool, actual_amount : MonetaryAmount, tax_category_code : ApplicableTradeTax::CategoryCode, *, reason : String | Nil = nil, reason_code : String | Nil = nil, tax_rate_percent : MonetaryAmount | Nil = nil) #

[View source]

Instance Method Detail

def actual_amount : MonetaryAmount #

The monetary amount of the allowance or charge (BT-92 doc-allowance / BT-99 doc-charge / BT-136 line-allowance / BT-141 line-charge).


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

The monetary amount of the allowance or charge (BT-92 doc-allowance / BT-99 doc-charge / BT-136 line-allowance / BT-141 line-charge).


[View source]
def charge=(charge : Bool) #

Whether this entry is a surcharge (true, BG-20/28) or an allowance/discount (false, BG-21/27).


[View source]
def charge? : Bool #

Whether this entry is a surcharge (true, BG-20/28) or an allowance/discount (false, BG-21/27).


[View source]
def reason : String | Nil #

Free-text reason for the allowance or charge (BT-97/104/139/144). Optional but recommended.


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

Free-text reason for the allowance or charge (BT-97/104/139/144). Optional but recommended.


[View source]
def reason_code : String | Nil #

Coded reason using UNTDID 4465 (BT-98/105/140/145). Examples: "64" = special agreement, "95" = discount, "SAA" = settlement allowance.


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

Coded reason using UNTDID 4465 (BT-98/105/140/145). Examples: "64" = special agreement, "95" = discount, "SAA" = settlement allowance.


[View source]
def tax_category_code : ApplicableTradeTax::CategoryCode #

VAT category that applies to this allowance or charge (BT-95/102/151). Required at document level; not used for line-level entries.


[View source]
def tax_category_code=(tax_category_code : ApplicableTradeTax::CategoryCode) #

VAT category that applies to this allowance or charge (BT-95/102/151). Required at document level; not used for line-level entries.


[View source]
def tax_rate_percent : MonetaryAmount | Nil #

VAT rate percentage for this allowance or charge (BT-96/103/152). Nil for exempt or zero-rate categories.


[View source]
def tax_rate_percent=(tax_rate_percent : MonetaryAmount | Nil) #

VAT rate percentage for this allowance or charge (BT-96/103/152). Nil for exempt or zero-rate categories.


[View source]