Initial implementation of the reconciliation script

Standalone Ruby script reconciling GoCardless payments, Dolibarr
invoices (via API), and Shine bank statements. Three-pass engine:
GC↔Dolibarr matching, open invoice audit, payout↔bank verification.
Includes dry-run and --fix mode to auto-mark Dolibarr invoices as paid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Kevin Bataille
2026-02-26 00:23:07 +01:00
commit 4decb3cb3c
16 changed files with 19534 additions and 0 deletions

12
.env.example Normal file
View File

@@ -0,0 +1,12 @@
# Dolibarr API
DOLIBARR_URL=https://your-dolibarr.example.com/api/index.php
DOLIBARR_API_KEY=your_api_key
# GoCardless payment method ID for GoCardless
# Find it with: GET /setup/dictionary/payment_types
# Look for "Prélèvement GoCardless" or similar
DOLIBARR_GC_PAYMENT_ID=6
# Dolibarr bank account ID (for recording payments)
# Find it with: GET /bankaccounts
DOLIBARR_BANK_ACCOUNT_ID=1