How malak-od/automatisation_facture works
This repository turns carrier-specific monthly billing files into standardized ERP imports, reconciles calculated totals against official invoices, and produces carrier-specific Excel workbooks. The web server is the runtime entry point: it accepts uploads, selects an adapter, and coordinates output generation. The README documents broad carrier coverage and Python/Excel finalization; sampled adapters confirm varied input handling and PDF reconciliation. Some carrier implementations and server wiring were not sampled, so uncertain internal calls are omitted.
Main entry points: server.js Web server · carriers Carrier adapters · upsApi.js UPS API helper · automatisation Excel finalizers
Components 20
Web intake
- Web server
facturation-app/server.js - Carrier registry
facturation-app/src/registry.js - Run history
facturation-app/server.js
Carrier processing
- Carrier adapters
facturation-app/src/carriers - UPS adapter
facturation-app/src/carriers/ups/index.js - FedEx adapter
facturation-app/src/carriers/fedex/index.js - Chronopost adapter
facturation-app/src/carriers/chronopost/index.js - BLS adapter
facturation-app/src/carriers/bls/index.js - Charge reclassification
facturation-app/src/core/reclass.js - Import validation
facturation-app/src/core/validate.js - PDF reconciliation
facturation-app/src/carriers - UPS API helper
facturation-app/src/core/upsApi.js
ERP outputs
- ERP import CSV
facturation-app/src/core/csv.js - ERP import XLSX
facturation-app/src/core/excelOut.js - Raw export
facturation-app/src/core/exportBrut.js
Workbook finalization
- Excel finalizers
automatisation - Carrier workbook
automatisation
Other components
- Operations user
- Monthly source files
- UPS service
Connections 18
- Operations user → Web server: uploads files
- Monthly source files → Web server: supplies inputs
- Web server → Carrier registry: lists or selects
- Web server → Carrier adapters: dispatches carrier
- Web server → Run history: reads and writes
- Carrier adapters → Charge reclassification: reclassifies charges
- Carrier adapters → Import validation: validates import
- Carrier adapters → PDF reconciliation: compares invoice totals
- UPS adapter → UPS API helper: requests shipment data
- UPS API helper → UPS service: queries
- FedEx adapter → PDF reconciliation: extracts PDF supplements
- Chronopost adapter → PDF reconciliation: reconciles invoice totals
- BLS adapter → PDF reconciliation: reconciles invoice totals
- Web server → ERP import CSV: writes import
- Web server → ERP import XLSX: writes import
- Web server → Raw export: exports source data
- Web server → Excel finalizers: runs finalizer
- Excel finalizers → Carrier workbook: produces workbook