From 651b62fe3675ff1d9efb82351e8db08c26aba14a Mon Sep 17 00:00:00 2001 From: Karl Fredrik Haugland Date: Fri, 5 Jan 2024 14:33:51 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20fix:=20Set=20supplier's?= =?UTF-8?q?=20invoice=20number=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workday has two fields for invoice number, we want to set suppliers invoice number and not the invoice number field. This allows Workday to generate the invoice number, but keep the original invoice number for bookkeeping and processing --- oda_wd_client/service/resource_management/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oda_wd_client/service/resource_management/utils.py b/oda_wd_client/service/resource_management/utils.py index d86e698..689d154 100644 --- a/oda_wd_client/service/resource_management/utils.py +++ b/oda_wd_client/service/resource_management/utils.py @@ -270,7 +270,8 @@ def pydantic_supplier_invoice_to_workday( invoice_data.Submit = invoice.submit invoice_data.Locked_in_Workday = invoice.locked_in_workday - invoice_data.Invoice_Number = invoice.invoice_number + # We want to let workday set the invoice number, but keep the invoice's number for supplier's invoice number + invoice_data.Invoice_Number = None invoice_data.Suppliers_Invoice_Number = invoice.invoice_number invoice_data.Company_Reference = invoice.company.wd_object(client) invoice_data.Currency_Reference = invoice.currency.wd_object(client)