This is an old revision of the document!


Billig Shipping Script

The Billig shipping script, named 'Export_Billig' in the Airtox File, is for sending shipping orders to Billig (BA) for processing. It runs as a MW script and uses CURL to send shipping orders over tcp/http. It is triggered by selecting Sales Invoices and pressing the “Export Billig” button.

Technical documentation

Key features:

  • MW Sales Invoice Sending: Sends selected sales invoices to the Billig API.
  • Checks Sales Invoices not already processed: Uses Transaction field user_4. Puts a timestamp if already sent. err:err text if error.
  • Validates Delivery Addresses: Checks the delivery address meets criteria. More info below
  • Validates Country 2 Char representation: Billig API uses 2 Char country digits for addresses
  • TODO: Add more feature text

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