ExCius.Enums.InvoiceTypeCode (ExCius v0.3.2)

View Source

Invoice 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

code(arg1)

commercial_invoice()

corrected_invoice()

credit_note()

credit_type?(arg1)

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

debit_note()

default()

Returns the default invoice type code (:commercial_invoice).

description(key)

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)"

from_code(arg1)

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

invoice_information()

prepayment_invoice()

requires_billing_reference?(arg1)

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

self_billed_invoice()

valid?(value)

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

values()

Returns all valid invoice type code atom keys.