ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 10750 "SII XML Creator" - OnAfterFillDetalleIVANode

Open VadymPatuk opened this issue 2 years ago • 1 comments

Describe the request

Can you add new event OnAfterFillDetalleIVANode in procedure FillDetalleIVANode?

New event should receive same parameters as procedure adding:

  • var XmlNodeOut type of XmlNode
  • var IsHandled type of bool
      OnBeforeAddLineAmountElement(TempVATEntry, AmountNodeName, Amount);
        if ExportTaxInformation(TempVATEntry, RegimeCodes) then
            XMLDOMManagement.AddElementWithPrefix(XMLNode, AmountNodeName, FormatNumber(Amount), 'sii', SiiTxt, TempXmlNode);
        if (ECPercent <> 0) and FillEUServiceNodes then
            GenerateRecargoEquivalenciaNodes(XMLNode, ECPercent, ECAmount);
        XMLDOMManagement.FindNode(XMLNode, '..', XMLNode);

		// NEW EVENT ->
        OnAfterFillDetalleIVANode(TempVATEntry, XmlNodeOut, UseSign, Sign, FillEUServiceNodes, NonExemptTransactionType, RegimeCodes, AmountNodeName, isHandled);
        if IsHandled then
            ALXMLDocumentToDotNet(XMLNode, XmlNodeOut);
		// NEW EVENT <-

    end;

    local procedure FillOperationDescription(var XMLNode: DotNet XmlNode; OperationDescription: Text; PostingDate: Date; LedgerEntryDescription: Text)
    var
        SIIInitialDocUpload: Codeunit "SII Initial Doc. Upload";
        TempXMLNode: DotNet XmlNode;
    begin

Additional context

Agencia Tributaria provides field BienInversion to fill with S o N in node DetalleIVA

Our customer need to include BienInversion in XML and at this moment there no definition in Codeunit 10750 "SII XML Creator" for this field.

Using new event we can add node BienInversion to DetalleIVA using XmlNodeOut and finally transforming XmlNode DotNet by marking IsHandled = true (same as OnAfterGenerateXmlDocument in procedure GenerateXml)

https://sede.agenciatributaria.gob.es/static_files/Sede/Procedimiento_ayuda/G417/FicherosSuministros/V_1_1/SuministroInformacion.xsd

image

Internal work item: AB#527539

VadymPatuk avatar Apr 23 '24 15:04 VadymPatuk

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 20685.

JesperSchulz avatar Jun 12 '24 12:06 JesperSchulz