From 5db1b613d70f9bdb5d5b8143ecb7aebdaa6b38d7 Mon Sep 17 00:00:00 2001 From: Enrique Barcelli Date: Sat, 29 Jul 2023 02:37:39 +0800 Subject: [PATCH] Fix Issue #3 - Invoice lines are created in Banqup in reverse or random order than in Openbravo --- extract_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extract_invoice.py b/extract_invoice.py index 1a42fe0..7473829 100644 --- a/extract_invoice.py +++ b/extract_invoice.py @@ -46,7 +46,7 @@ def extract_invoice(document): debtor_id = debtor_list[2]['results'][0]['id'] preferred_channel = debtor_list[2]['results'][0]['preferred_channel'] - url = ob_api_url+"InvoiceLine?_where=invoice='"+invoice['response']['data'][0]['id']+"'&_noActiveFilter=false" + url = ob_api_url+"InvoiceLine?_where=invoice='"+invoice['response']['data'][0]['id']+"'&_noActiveFilter=false&_sortBy=lineNo" response = requests.request("GET", url, headers=headers, data=payload) #extracts invoice lines #print(response.text)