BexioApiClient.Purchase.Bill (bexio_api_client v2.0.0)

Copy Markdown

Bill in purchase

Summary

Types

t()

Bill in purchase.

Types

t()

@type t() :: %BexioApiClient.Purchase.Bill{
  address: BexioApiClient.Purchase.Address.t() | nil,
  amount_calc: float() | nil,
  amount_man: float() | nil,
  attachment_ids: [String.t()],
  base_currency_amount: float() | nil,
  base_currency_code: String.t() | nil,
  bill_date: Date.t(),
  booking_account_ids: [integer()] | nil,
  contact_partner_id: integer() | nil,
  created_at: DateTime.t() | NaiveDateTime.t(),
  currency_code: String.t(),
  discounts: [BexioApiClient.Purchase.BillDiscount.t()],
  document_no: String.t(),
  due_date: Date.t(),
  exchange_rate: float() | nil,
  firstname_suffix: String.t() | nil,
  gross: float() | nil,
  id: String.t(),
  item_net?: boolean() | nil,
  lastname_company: String.t(),
  line_items: [BexioApiClient.Purchase.BillLineItem.t()],
  manual_amount?: boolean() | nil,
  net: float() | nil,
  overdue?: boolean(),
  payment: BexioApiClient.Purchase.BillPayment.t() | nil,
  pending_amount: float() | nil,
  purchase_order_id: integer() | nil,
  qr_bill_information: String.t() | nil,
  split_into_line_items?: boolean() | nil,
  status:
    :draft
    | :booked
    | :partially_created
    | :created
    | :partially_sent
    | :sent
    | :partially_downloaded
    | :downloaded
    | :partially_paid
    | :paid
    | :partially_failed
    | :failed,
  supplier_id: integer() | nil,
  title: String.t() | nil,
  vendor: String.t() | nil,
  vendor_ref: String.t() | nil
}

Bill in purchase.

The list endpoint only returns the fields of the list response; the fields only present in the single-bill response (like :supplier_id, :line_items, :payment) are nil/[] there.

Fields:

  • :vendor - Joined firstname_suffix and lastname_company based on supplier (contact) type (COMPANY or PRIVATE)
  • :net - Net value of the bill. calculated based on line_items and discounts.
  • :gross - Gross value of the bill. calculated based on line_items and discounts.
  • :overdue - Indicates whether bill due_date has passed. for bill in status :draft or :paid is always false
  • :manual_amount? - indicates whether :amount_man or :amount_calc is required and considered as bill amount
  • :item_net? - indicates whether :amount in :line_items is net or gross
  • :split_into_line_items? - indicates whether the bill has multiple items (line items and discounts) or a single item
  • :qr_bill_information - QR bill information string

Functions

new(attrs \\ %{})

@spec new(map()) :: t()