From 9f603ae9d227c99d954bc015fff9322f1b582763 Mon Sep 17 00:00:00 2001 From: Enrique Barcelli Date: Wed, 21 Jun 2023 23:43:43 +0800 Subject: [PATCH] Move Banqup platform_id and client_id to config.py --- config-sample.py | 5 +++++ extract-invoice.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config-sample.py b/config-sample.py index f14a8e2..8662aa7 100644 --- a/config-sample.py +++ b/config-sample.py @@ -4,3 +4,8 @@ ob_api_url = "http://[your-openbravo-domain]/openbravo/org.openbravo.service.jso #client_id = "7B75C13C21B945AB9DA2B32DD993FE70" #client_identifier = "Grupo Acme Companies" userpass_b64 = "cm9ib3RhcGk6S2kxMzAxa28j" + + +# Banqup API parameters +banqup_client_id = 73223 +banqup_platform_id = 15 diff --git a/extract-invoice.py b/extract-invoice.py index 02d4219..47f5ede 100644 --- a/extract-invoice.py +++ b/extract-invoice.py @@ -29,10 +29,10 @@ payload = json.dumps({ "sales_invoice_number": invoice['response']['data'][0]['documentNo'], "sales_invoice_date": invoice['response']['data'][0]['invoiceDate']+"T00:00:00Z", "sales_invoice_due_date": "2023-06-17T00:00:00Z", #needs to be replaced by invoiceDate+"daysTillDue" - "platform_id": 15, + "platform_id": banqup_platform_id, "debtor_id": 136328, #needs to be fetch from database using the "client_debtor_number" "currency_code": invoice['response']['data'][0]['currency$_identifier'], - "client_id": 73223, + "client_id": banqup_client_id, "delivery_channel": "openpeppol", "invoice_lines": [ {