Describe the issue
XMLport 37200 "Sales Cr.Memo - PEPPOL30" does not create BillingReference XML node (ubl:CreditNote/cac:BillingReference) in the XML file, even if the source record contains corresponding data ("Applies-to No." field is filled).
There is the code for BillingReference TextElement:
trigger OnBeforePassVariable()
var
PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider";
begin
PEPPOLDocumentInfoProvider := GetFormat();
PEPPOLDocumentInfoProvider.GetCrMemoBillingReferenceInfo(
SalesCrMemoHeader,
InvoiceDocRefID,
InvoiceDocRefIssueDate);
if InvoiceDocRefID = '' then
currXMLport.Skip();
end;
For PEPPOLDocumentInfoProvider.GetCrMemoBillingReferenceInfo() calling, SalesCrMemoHeader variable is used, but this variable is always empty (never assigned or filled) and the standard interface implementation returns an empty InvoiceDocRefID variable and therefore currXMLport.Skip() is raised.
Expected behavior
SalesCrMemoHeader should be initialized. It is enough to fill just those 2 field needed in GetCrMemoBillingReferenceInfo before calling this method.
Steps to reproduce
Create e-document of credit meme type with Applies-to fields entered and export it.
Additional context
But - there is also an indirect issue with the current state:
Interface "PEPPOL Document Info Provider" contains GetCrMemoBillingReferenceInfo() method definition. This definition is inconsistent because it uses SalesCrMemoHeader parameter of Record "Sales Cr.Memo Header” type. All other methods in all Peppol interfaces use Record "Sales Header” types.
I think it should be reviewed and normalized by the Product team.
The solution would be:
- add a new method definition
GetBillingReferenceInfo() to interface "PEPPOL Document Info Provider"
- prepare implementation in
codeunit 37200 "PEPPOL30"
- replace call of GetCrMemoBillingReferenceInfo in
XMLport 37200 "Sales Cr.Memo - PEPPOL30"
There shouldn't be any breaking change, because codeunit "PEPPOL30" is default implementation for the interface in enum 37200 "PEPPOL 3.0 Format".
I will provide a fix for a bug
Describe the issue
XMLport 37200 "Sales Cr.Memo - PEPPOL30"does not createBillingReferenceXML node (ubl:CreditNote/cac:BillingReference) in the XML file, even if the source record contains corresponding data ("Applies-to No."field is filled).There is the code for
BillingReferenceTextElement:For
PEPPOLDocumentInfoProvider.GetCrMemoBillingReferenceInfo()calling,SalesCrMemoHeadervariable is used, but this variable is always empty (never assigned or filled) and the standard interface implementation returns an emptyInvoiceDocRefIDvariable and thereforecurrXMLport.Skip()is raised.Expected behavior
SalesCrMemoHeadershould be initialized. It is enough to fill just those 2 field needed inGetCrMemoBillingReferenceInfobefore calling this method.Steps to reproduce
Create e-document of credit meme type with Applies-to fields entered and export it.
Additional context
But - there is also an indirect issue with the current state:
Interface "PEPPOL Document Info Provider"containsGetCrMemoBillingReferenceInfo()method definition. This definition is inconsistent because it usesSalesCrMemoHeaderparameter ofRecord "Sales Cr.Memo Header”type. All other methods in all Peppol interfaces useRecord "Sales Header”types.I think it should be reviewed and normalized by the Product team.
The solution would be:
GetBillingReferenceInfo()tointerface "PEPPOL Document Info Provider"codeunit 37200 "PEPPOL30"XMLport 37200 "Sales Cr.Memo - PEPPOL30"There shouldn't be any breaking change, because
codeunit "PEPPOL30"is default implementation for the interface inenum 37200 "PEPPOL 3.0 Format".I will provide a fix for a bug