.. _invoice-reader: Reader ====== .. warning:: This module is deprecated and will be removed in the future. Please use :ref:`action-invoice` instead. .. note:: It's required to install ``reader``, ``pdf`` and ``codes`` from :ref:`Optional dependencies` section. Aiviro Reader allows you to process PDF files and extract crucial information. Whether it's vendor IDs, customer IDs, total amounts, or more, it simplifies data extraction from invoices. Invoice Processing ------------------ .. list-table:: Supported field extraction :widths: 25 15 60 :header-rows: 1 :class: tight-table * - Name - Type - Description * - language - :class:`~.Language` - Language of the invoice * - customer - :class:`~.InvoiceCustomer` - Customer details * - vendor - :class:`~.InvoiceVendor` - Vendor details * - invoice_id - :class:`str` - Invoice number * - invoice_date - :class:`datetime.date` - Date the invoice was issued * - due_date - :class:`datetime.date` - Date payment for this invoice is due * - tax_date - :class:`datetime.date` - Date the tax was applied to the invoice * - order_number - :class:`list`, :class:`str` - Order reference number * - primary_total - :class:`list`, :class:`str` - Details about primary amounts (total_amount, total_amount_without_tax, total_tax, amount_due) and currency * - secondary_total - :class:`~.InvoiceTotals` - Details about secondary amounts (total_amount, total_amount_without_tax, total_tax, amount_due) and currency * - exchange_rate - :class:`decimal.Decimal` - Exchange rate between primary and secondary currency * - variable_symbol - :class:`str` - Variable symbol of the invoice * - payment_term - :class:`str` - The terms of payment for the invoice * - bank_accounts - :class:`list`, :class:`~.InvoiceBankAccount` - List of bank accounts * - items - :class:`list`, :class:`~.InvoiceItem` - List of invoice items, filtered by `total_amount` and `total_amount_without_tax` * - raw_items - :class:`list`, :class:`~.InvoiceItem` - List of unfiltered invoice items .. list-table:: Invoice Address * - Name - Type - Description * - house_number - :class:`str` - House number of the address * - road - :class:`str` - Road of the address * - city - :class:`str` - Name of the city * - postal_code - :class:`str` - Postal code of the city * - street_address - :class:`str` - Full street address (combined as road and house_number) * - country_code_A3 - :class:`str` - Country code as alpha-3 (3 letters), e.g., CZE, DEU, AUT, SVK, etc. .. list-table:: Invoice totals * - Name - Type - Description * - total_amount - :class:`decimal.Decimal` - Total amount of the invoice * - total_amount_without_tax - :class:`decimal.Decimal` - Total amount of the invoice without tax * - total_tax - :class:`decimal.Decimal` - Total tax amount of the invoice * - amount_due - :class:`decimal.Decimal` - Amount due for the invoice * - currency - :class:`str` - Currency of the invoice .. list-table:: Customer * - id - :class:`str` - Customer reference ID * - ico - :class:`str` - The Czech company ID number of the customer * - tax_id - :class:`str` - The taxpayer number associated with the customer * - address - :class:`~.InvoiceAddress` - Mailing address for the customer * - address_recipient - :class:`str` - Name associated with the customer address * - name - :class:`str` - Name of the customer .. list-table:: Vendor * - id - :class:`str` - Vendor reference ID * - ico - :class:`str` - The Czech company ID number of the vendor * - tax_id - :class:`str` - The taxpayer number associated with the vendor * - address - :class:`~.InvoiceAddress` - Vendor mailing address * - address_recipient - :class:`str` - Name associated with the vendor address * - name - :class:`str` - Name of the vendor * - is_not_tax_payer - :class:`bool` - Check for vendor tax payer status .. list-table:: Invoice Bank Account :widths: 25 15 60 :header-rows: 1 :class: tight-table * - Name - Type - Description * - iban - :class:`str` - IBAN of the bank account * - swift - :class:`str` - SWIFT (BIC) code of the bank account * - bank_name - :class:`str` - Name of the bank * - country_code - :class:`str` - Country code of the bank account, e.g., CZ, DE, etc. * - local_account - :class:`~.LocalBankAccount` - Contains bank code, account number and account prefix .. list-table:: Invoice items :widths: 25 15 60 :header-rows: 1 :class: tight-table * - Name - Type - Description * - index - :class:`int` - Line item index, starting from 0 * - item - :class:`str` - Full string text line of the line item * - description - :class:`str` - The text description for the invoice line item * - quantity - :class:`decimal.Decimal` - The quantity of the item * - unit_price - :class:`decimal.Decimal` - The net or gross price of one unit of this item, primarily net * - unit - :class:`str` - The unit of the line item, e.g, kg, lb etc. * - product_code - :class:`str` - Product code, product number, SKU, etc. * - tax - :class:`decimal.Decimal` - Tax associated with the line item * - tax_rate - :class:`decimal.Decimal` - Tax rate associated with the line item * - amount - :class:`decimal.Decimal` - Total gross amount of the line item * - amount_without_tax - :class:`decimal.Decimal` - Total net amount of the line item * - identifier - :class:`str` - Identifier of the item, found in product code, description or item's content * - tag - :class:`str` - Tag of the item associated based on the identifier .. automodule:: aiviro.modules.reader :members: