microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
768 stars 610 forks source link

[Event request] codeunit 12184 Fattura Doc Helper: BuildSelfBillingDocPageSource procedure #26939

Open 19sam88 opened 1 month ago

19sam88 commented 1 month ago

Describe the request

Hello, we would like to make a request for an event in codeunit 12184 for the function BuildSelfBillingDocPageSource.

procedure BuildSelfBillingDocPageSource(var TempVATEntry: Record "VAT Entry" temporary; DateFilter: Text[30])
var
    FatturaSetup: Record "Fattura Setup";
    VATEntry: Record "VAT Entry";
begin
    FatturaSetup.VerifyAndSetData();
    TempVATEntry.Reset();
    TempVATEntry.DeleteAll();

    VATEntry.SetCurrentKey("Document No.", "Posting Date", "Unrealized VAT Entry No.");
    VATEntry.SetRange("VAT Bus. Posting Group", FatturaSetup."Self-Billing VAT Bus. Group");
    VATEntry.SetRange(Type, VATEntry.Type::Sale);
    VATEntry.SetRange("VAT Calculation Type", VATEntry."VAT Calculation Type"::"Reverse Charge VAT");
    VATEntry.SetFilter("Document Type", '%1|%2', VATEntry."Document Type"::Invoice, VATEntry."Document Type"::"Credit Memo");
    VATEntry.SetFilter("Posting Date", DateFilter);

add an event here to set or change other filters onBeforeBuildVATEntryBufferWithLinks(TempVATEntry, VATEntry)

    BuildVATEntryBufferWithLinks(TempVATEntry, VATEntry);
end;

Additional context

The scope is to let filter once all reverse charge VAT Business Groups. Now the user must set in Fattura Setup every single posting group Internal work item: AB#543322

azure-boards[bot] commented 1 month ago

✅ Successfully linked to Azure Boards work item(s):