struct Zugpferd::ExchangedDocument

Overview

Invoice header metadata: number, date, document type, notes, and buyer reference. Corresponds to the ExchangedDocument section of the CII XML.

Defined in:

zugpferd/exchanged_document.cr

Constant Summary

CORRECTION_TYPE_CODE = "384"
CREDIT_NOTE_TYPE_CODE = "381"
INVOICE_TYPE_CODE = "380"

UNTDID 1001 document type codes. Use as type_code: in the constructor.

Constructors

Instance Method Summary

Constructor Detail

def self.new(id : String, issue_date : Time, *, type_code : String = INVOICE_TYPE_CODE, notes : Array(String) = [] of String, buyer_reference : String | Nil = nil) #

[View source]

Instance Method Detail

def buyer_reference : String | Nil #

Buyer's routing reference (BT-10). Required for XRECHNUNG (Leitweg-ID); also used as remittance advice reference in some buyer systems.


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

Buyer's routing reference (BT-10). Required for XRECHNUNG (Leitweg-ID); also used as remittance advice reference in some buyer systems.


[View source]
def id : String #

Invoice number assigned by the seller (BT-1). Must be unique within the seller's system.


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

Invoice number assigned by the seller (BT-1). Must be unique within the seller's system.


[View source]
def issue_date : Time #

Invoice issue date (BT-2). Formatted as YYYYMMDD with format code 102 in the XML.


[View source]
def issue_date=(issue_date : Time) #

Invoice issue date (BT-2). Formatted as YYYYMMDD with format code 102 in the XML.


[View source]
def notes : Array(String) #

Free-text notes attached to the invoice (BT-22). Multiple notes are supported.


[View source]
def notes=(notes : Array(String)) #

Free-text notes attached to the invoice (BT-22). Multiple notes are supported.


[View source]
def type_code : String #

Document type code (BT-3). UNTDID 1001 value; use the constants above or a raw string.


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

Document type code (BT-3). UNTDID 1001 value; use the constants above or a raw string.


[View source]