ExCius.Enums.InvoiceTypeCode (ExCius v0.3.2)
View SourceInvoice type codes for Croatian e-Invoice (Fiskalizacija 2.0).
These codes are based on the UNTDID 1001 subset used in the Croatian specification. They identify the type of document being issued.
Reference: UN/EDIFACT Data Element 1001 - Document name code Croatian CIUS-2025 Specification
Summary
Functions
Checks if the given invoice type code represents a credit-type document.
Returns the default invoice type code (:commercial_invoice).
Returns the description for a given invoice type code.
Converts a code string to its atom representation.
Checks if the given invoice type code requires a billing reference.
Checks if the given value is a valid invoice type code.
Returns all valid invoice type code atom keys.
Functions
Checks if the given invoice type code represents a credit-type document.
Credit-type documents include credit notes and corrected invoices.
Examples
iex> ExCius.Enums.InvoiceTypeCode.credit_type?(:credit_note)
true
iex> ExCius.Enums.InvoiceTypeCode.credit_type?(:corrected_invoice)
true
iex> ExCius.Enums.InvoiceTypeCode.credit_type?(:commercial_invoice)
false
Returns the default invoice type code (:commercial_invoice).
Returns the description for a given invoice type code.
Examples
iex> ExCius.Enums.InvoiceTypeCode.description(:commercial_invoice)
"Commercial Invoice (Standard)"
iex> ExCius.Enums.InvoiceTypeCode.description(:credit_note)
"Credit Note (Odobrenje)"
Converts a code string to its atom representation.
Examples
iex> ExCius.Enums.InvoiceTypeCode.from_code("380")
:commercial_invoice
iex> ExCius.Enums.InvoiceTypeCode.from_code("381")
:credit_note
iex> ExCius.Enums.InvoiceTypeCode.from_code("384")
:corrected_invoice
iex> ExCius.Enums.InvoiceTypeCode.from_code("INVALID")
nil
Checks if the given invoice type code requires a billing reference.
Credit notes (381), corrected invoices (384), and debit notes (383) typically require a reference to the original invoice being credited/corrected.
Examples
iex> ExCius.Enums.InvoiceTypeCode.requires_billing_reference?(:credit_note)
true
iex> ExCius.Enums.InvoiceTypeCode.requires_billing_reference?(:commercial_invoice)
false
Checks if the given value is a valid invoice type code.
Examples
iex> ExCius.Enums.InvoiceTypeCode.valid?(:commercial_invoice)
true
iex> ExCius.Enums.InvoiceTypeCode.valid?("380")
true
iex> ExCius.Enums.InvoiceTypeCode.valid?(:credit_note)
true
iex> ExCius.Enums.InvoiceTypeCode.valid?(:invalid)
false
Returns all valid invoice type code atom keys.