ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] table 290 "VAT Amount Line" - OnAfterCheckVATDifference

Open iltererdogan opened this issue 5 years ago • 1 comments

Hi,

Is it possible to add OnAfterCheckVATDifference publisher to VAT Amount Line table?

    procedure CheckVATDifference(NewCurrencyCode: Code[10]; NewAllowVATDifference: Boolean)
    var
        GLSetup: Record "General Ledger Setup";
    begin
        InitGlobals(NewCurrencyCode, NewAllowVATDifference);
        if not AllowVATDifference then
            TestField("VAT Difference", 0);
        if Abs("VAT Difference") > Currency."Max. VAT Difference Allowed" then
            if NewCurrencyCode <> '' then
                Error(
                  Text004, FieldCaption("VAT Difference"), Currency.Code,
                  Currency.FieldCaption("Max. VAT Difference Allowed"), Currency."Max. VAT Difference Allowed")
            else begin
                if GLSetup.Get then;
                if Abs("VAT Difference") > GLSetup."Max. VAT Difference Allowed" then
                    Error(
                      Text005, FieldCaption("VAT Difference"),
                      GLSetup.FieldCaption("Max. VAT Difference Allowed"), GLSetup."Max. VAT Difference Allowed");
            end;

      // <<new
      OnAfterCheckVATDifference(Rec, NewCurrencyCode, NewAllowVATDifference);
      // >>new
    end;

    // <<new
    [IntegrationEvent(false, false)]
    local procedure OnAfterCheckVATDifference(VATAmountLine: Record "VAT Amount Line"; NewCurrencyCode: Code[10]; NewAllowVATDifference: Boolean)
    begin
    end;
    // >>new

iltererdogan avatar Nov 22 '21 15:11 iltererdogan

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 Nov 29 '21 06:11 JesperSchulz