From 7e173bfe544d2c918857650c8f8268ea35e30ab4 Mon Sep 17 00:00:00 2001 From: Enrique Barcelli Date: Sun, 25 Jun 2023 12:00:58 +0800 Subject: [PATCH] Add 5 new fields available for the API integration: po_number buyer_reference customer_reference supplier_reference contract_number --- README.md | 2 +- extract_invoice.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9af479a..ae6b475 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ **Objective** -This project attempt to extract data from Openbravo to generate a JSON to submit +This project attempts to extract data from Openbravo to generate a JSON to submit to the Banqup API of Unifiedpost. **Requirements** diff --git a/extract_invoice.py b/extract_invoice.py index 67c7be5..bb9de73 100644 --- a/extract_invoice.py +++ b/extract_invoice.py @@ -77,7 +77,12 @@ def extract_invoice(document): "currency_code": invoice['response']['data'][0]['currency$_identifier'], "client_id": banqup_client_id, "delivery_channel": preferred_channel, - "invoice_lines": json.loads(lines_output) + "invoice_lines": json.loads(lines_output), + "po_number": "NA", + "buyer_reference": "NA", + "customer_reference": "NA", + "supplier_reference": "NA", + "contract_number": "NA" }) #print(payload)