ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Events for localization

Open ernestasju opened this issue 7 years ago • 0 comments

Hello,

We are developing localization extension and need these events for extending VAT functionality.

Codeunit 12 Gen. Jnl.-Post Line

In OnAfterInitVAT event subscriber we need to use CalcLCYToAddCurr function to recalculate VAT amounts on G/L Entry. Include sender in the event and expose function CalcLCYToAddCurr (currency local).

In OnAfterInsertVAT event subscriber we need to use CreateGLEntry function to create additional G/L entries. Include sender in the event and expose function CreateGLEntry (currently local).

with GenJournalLine do
  if (GLEntryVATAmount <> 0) or ((SrcCurrGLEntryVATAmt <> 0) and (SrcCurrCode = AddCurrencyCode)) then
    if "Gen. Posting Type" = "Gen. Posting Type"::Sale then
      if (UnrealizedVAT and (VATPostingSetup."LBC Reverse Chrg. VAT Unreal.Acc.2" <> '')) or
        (not UnrealizedVAT and (VATPostingSetup."LBC Reverse Chrg. VAT Acc. 2" <> ''))
      then begin
        Sender.CreateGLEntry(GenJournalLine, VATPostingSetup.GetSalesAccount(UnrealizedVAT), GLEntryVATAmount, SrcCurrGLEntryVATAmt, true);
        Sender.CreateGLEntry(GenJournalLine, VATPostingSetup.GetRevChargeAccount2(UnrealizedVAT), -GLEntryVATAmount, -SrcCurrGLEntryVATAmt, true);
      end;

Codeunit 90 Purch.-Post

Add event publisher for changing factor calculation in PostItemJnlLine function. image image

Table 290 VAT Amount Line

Add event publisher for summing up additional VAT Amount Line fields. image image

Table 325 VAT Posting Setup

Expose functions TestNotSalesTax and CheckGLAcc.

Report 85 Copy - VAT Posting Setup

Add event publisher for copying additional VAT Amount Line fields. image image

Thank you in advance!

ernestasju avatar Jan 15 '19 10:01 ernestasju