From 5e31d0bd8d2f3e85e51039329991525e674e4686 Mon Sep 17 00:00:00 2001 From: Enrique Barcelli Date: Tue, 27 Jun 2023 19:29:41 +0800 Subject: [PATCH] Add gst_rate to config --- config-sample.py | 1 + extract_invoice.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config-sample.py b/config-sample.py index 4f4d8b4..d421eae 100644 --- a/config-sample.py +++ b/config-sample.py @@ -9,6 +9,7 @@ userpass_b64 = "cm9ib3RhcGk6S2kxMzAxa28j" # Banqup API parameters banqup_client_id = "73223" banqup_platform_id = 15 +gst_rate = "8" bq_client_id = "your-client-id-here" bq_client_secret = "your-secret-here" bq_base_url = "https://v4-api.platform.eu.banqup.com/v4" diff --git a/extract_invoice.py b/extract_invoice.py index bb9de73..bcebdcb 100644 --- a/extract_invoice.py +++ b/extract_invoice.py @@ -64,7 +64,7 @@ def extract_invoice(document): if not first_line: lines_output = lines_output+',' first_line = False - lines_output = lines_output + '{"service_name": "","service_description": "'+linetemp['product$_identifier']+'","service_quantity": '+str(linetemp['invoicedQuantity'])+',"service_price": '+str(linetemp['unitPrice'])+',"service_vat": '+'8'+'}' + lines_output = lines_output + '{"service_name": "","service_description": "'+linetemp['product$_identifier']+'","service_quantity": '+str(linetemp['invoicedQuantity'])+',"service_price": '+str(linetemp['unitPrice'])+',"service_vat": '+gst_rate+'}' lines_output = lines_output+']' #print(lines_output)