e-računi issues invoices in e-računi, the Croatian invoicing and fiscalisation service, through its JSON API.

Each sale gets a document record next to it. The invoice is issued from a queue rather than during checkout, and failures are retried. Each issued invoice's PDF is kept so the buyer can download it, and the module raises an alarm when an invoice is late.

Features

  • Commerce integration: the included eracuni_commerce submodule invoices Commerce orders when they're placed or paid, chosen per payment gateway. Sites that sell without Commerce can plug in their own source.
  • Invoice type follows the buyer: consumers get a Retail invoice, which e-računi fiscalises for card payments. Businesses get a B2B invoice with net prices and their tax ID.
  • VAT treatment from the buyer's country and tax ID: domestic, EU reverse charge, and outside the EU, each mapped to an e-računi VAT transaction type.
  • KPD classification codes: per product, or a site default.
  • Totals that match the charge: lines are checked against the order total before sending. Rounding differences on business invoices are absorbed so the invoice matches the charged amount to the cent.
  • Safe retries: every request carries a stable transaction ID, so a timeout never creates a second invoice. Existing invoices are found by order reference before a new one is made.
  • Late-invoice alarm: an invoice still not issued after a set time is logged as an error and fires an event, so the site can alert someone.
  • Drush commands: eracuni:status, eracuni:issue, eracuni:retry, eracuni:lookup, and eracuni:commerce:backfill.
  • Extension points: events let a site change the invoice payload, decline orders it doesn't want invoiced, and react to issued or overdue invoices.
  • Debug logging: optional logging of API requests and responses, without credentials.

Need help using or extending this module?

    Vallic
  • Hire the project maintainers: Vallic offers Drupal Commerce support and development, and runs Vallic Cloud, Drupal hosting.
  • Community support: Use the issue queue.

Requirements

  • Drupal 11, and Drupal Commerce for the submodule.
  • An e-računi account with API access. Credentials go in settings.php, never in configuration.
Supporting organizations: 
Development

Project information

Releases