struct Zugpferd::SupplyChainTradeLineItem

Overview

One invoice line (BG-25). Each line describes a distinct product or service with its quantity, unit price, VAT category, and the resulting line total.

Defined in:

zugpferd/trade_line_item.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(position : Int32, name : String, billed_quantity : MonetaryAmount, unit_code : String, net_price : MonetaryAmount, tax_category_code : ApplicableTradeTax::CategoryCode, *, description : String | Nil = nil, seller_assigned_id : String | Nil = nil, buyer_assigned_id : String | Nil = nil, gross_price : MonetaryAmount | Nil = nil, tax_rate_percent : MonetaryAmount | Nil = nil, allowance_charges : Array(SpecifiedTradeAllowanceCharge) = [] of SpecifiedTradeAllowanceCharge, note : String | Nil = nil) #

[View source]

Instance Method Detail

def allowance_charges : Array(SpecifiedTradeAllowanceCharge) #

Line-level allowances or charges (BG-27 allowances / BG-28 charges). Emitted inside GrossPriceProductTradePrice as AppliedTradeAllowanceCharge elements. Only meaningful when #gross_price is set or these entries are non-empty.


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

Line-level allowances or charges (BG-27 allowances / BG-28 charges). Emitted inside GrossPriceProductTradePrice as AppliedTradeAllowanceCharge elements. Only meaningful when #gross_price is set or these entries are non-empty.


[View source]
def billed_quantity : MonetaryAmount #

Number of units delivered or consumed (BT-129).


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

Number of units delivered or consumed (BT-129).


[View source]
def buyer_assigned_id : String | Nil #

Buyer's article or item identifier (BT-156).


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

Buyer's article or item identifier (BT-156).


[View source]
def description : String | Nil #

Optional free-text description of the item (BT-154).


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

Optional free-text description of the item (BT-154).


[View source]
def gross_price : MonetaryAmount | Nil #

Gross (list) price per unit before any line-level discounts (BT-148). Emit only when it differs from #net_price; triggers a GrossPriceProductTradePrice block.


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

Gross (list) price per unit before any line-level discounts (BT-148). Emit only when it differs from #net_price; triggers a GrossPriceProductTradePrice block.


[View source]
def line_total : MonetaryAmount #

Calculated line total: billed_quantity × net_price (BT-131 × BT-129). Set automatically in the constructor; update manually if you override #net_price after construction.


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

Calculated line total: billed_quantity × net_price (BT-131 × BT-129). Set automatically in the constructor; update manually if you override #net_price after construction.


[View source]
def name : String #

Name of the product or service (BT-153).


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

Name of the product or service (BT-153).


[View source]
def net_price : MonetaryAmount #

Net price per unit, exclusive of VAT (BT-131). #line_total is computed as billed_quantity × net_price.


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

Net price per unit, exclusive of VAT (BT-131). #line_total is computed as billed_quantity × net_price.


[View source]
def note : String | Nil #

Optional free-text note for this line (BT-127).


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

Optional free-text note for this line (BT-127).


[View source]
def position : Int32 #

Sequential line number within the invoice (BT-126). Must be unique and positive.


[View source]
def position=(position : Int32) #

Sequential line number within the invoice (BT-126). Must be unique and positive.


[View source]
def seller_assigned_id : String | Nil #

Seller's own article or item identifier (BT-155).


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

Seller's own article or item identifier (BT-155).


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

VAT category code applicable to this line (BT-151). Common values: S = standard rate, Z = zero rate, E = exempt, AE = reverse charge.


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

VAT category code applicable to this line (BT-151). Common values: S = standard rate, Z = zero rate, E = exempt, AE = reverse charge.


[View source]
def tax_rate_percent : MonetaryAmount | Nil #

VAT rate percentage for this line (BT-152). Nil for exempt/reverse-charge categories.


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

VAT rate percentage for this line (BT-152). Nil for exempt/reverse-charge categories.


[View source]
def unit_code : String #

Unit of measure for #billed_quantity (BT-130). UN/ECE Rec 20 code, e.g. "C62" = piece, "HUR" = hour, "KGM" = kilogram, "DAY" = day.


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

Unit of measure for #billed_quantity (BT-130). UN/ECE Rec 20 code, e.g. "C62" = piece, "HUR" = hour, "KGM" = kilogram, "DAY" = day.


[View source]