This is an old revision of the document!


Billig Shipping Script

The Billig shipping script, named 'billig_shipping' in the Airtox File, is for sending shipping order to Billig (BA) for processing.

Technical documentation

Key features:

  • MW Transaction Export: Extracts transactions from Moneyworks, builds UBL XML documents using JSON templates, and exports them to Edimondo.
  • MW Transaction Reprocessing: Supports reprocessing of transactions based on status and colour flags.
  • Edimondo Status Checking: Checks the delivery status of sent documents and updates MW/DB accordingly.
  • Order Import: Retrieves orders from Edimondo, parses UBL XML, and imports them into MW.
  • Configurable: Uses TOML configuration files for server, business, and email settings.
  • Logging: Logs operations and errors to rotating log files.
  • Utilities: Provides date/time formatting, file writing, and folder setup functions.

Main modules:

  • mw_to_ubl.rs: MW → UBL/Edimondo export logic.
  • ubl_to_mw.rs: Edimondo → MW import logic.
  • mw.rs: MW API communication.
  • edimondo.rs: Edimondo API communication.
  • invoice.rs, order.rs: UBL document construction and parsing.
  • export.rs, operations.rs: MW transaction and detail handling.
  • db.rs: Database operations for exports/imports.
  • config.rs: Configuration management.
  • utilities.rs: Utility functions.

Entry point:

main.rs calls `start_server` which runs the main service loop.

Edit this page