ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Report 20 "Calc. and Post VAT Settlement" - OnClosingGLAndVATEntryOnAfterSetVATEntryFilters

Open Mike-1984 opened this issue 5 years ago • 1 comments

Hello colleagues,

We would like to request an event in Report 20 "Calc. and Post VAT Settlement". Our customers want to have more control over which VAT Entries will be processed/closed after the report execution. Currently the only available filters are VAT Bus. Posting Group,VAT Prod. Posting Group and Posting Date.

For example, they want to process only "Sale" VAT Entries.

We believe this requirement can be achieved by implementing the following event:

Event signature:

[IntegrationEvent(false, false)]
local procedure OnClosingGLAndVATEntryOnAfterSetVATEntryFilters(VATPostingSetup: Record "VAT Posting Setup"; var VATEntry: Record "VAT Entry");

Code:

dataitem("Closing G/L and VAT Entry"; "Integer")
{
...
      trigger OnAfterGetRecord()
      begin
          VATEntry.Reset();
          VATEntry.SetRange(Type, VATType);
          VATEntry.SetRange(Closed, false);
          VATEntry.SetFilter("Posting Date", VATDateFilter);
          VATEntry.SetRange("VAT Bus. Posting Group", "VAT Posting Setup"."VAT Bus. Posting Group");
          VATEntry.SetRange("VAT Prod. Posting Group", "VAT Posting Setup"."VAT Prod. Posting Group");
          // ++++++++
          OnClosingGLAndVATEntryOnAfterSetVATEntryFilters("VAT Posting Setup", VATEntry);
          // -------------
          case "VAT Posting Setup"."VAT Calculation Type" of

Mike-1984 avatar Sep 06 '21 11:09 Mike-1984

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.

JesperSchulz avatar Sep 07 '21 15:09 JesperSchulz