Add sumbission of invoice to Banqup via API

This commit is contained in:
Enrique Barcelli 2023-06-24 22:15:11 +08:00
parent 26cdb8d55e
commit 9aa316f0a9
Signed by: kikobar
GPG key ID: 006C13A68E25D3B7

View file

@ -74,10 +74,14 @@ def extract_invoice(document):
"debtor_id": debtor_id,
"currency_code": invoice['response']['data'][0]['currency$_identifier'],
"client_id": banqup_client_id,
"delivery_channel": "openpeppol",
"delivery_channel": preferred_channel,
"invoice_lines": json.loads(lines_output)
})
print(payload)
new_invoice = api.post('sales-invoices',json.loads(payload),None,None)
print(new_invoice)
if __name__ == '__main__':
extract_invoice(str(sys.argv[1]))