-
Notifications
You must be signed in to change notification settings - Fork 685
Open
Labels
FinanceGitHub request for Finance areaGitHub request for Finance areaevent-requestRequest for adding an eventRequest for adding an event
Description
Why do you need this change?
In 4PS Construct we need to fill a 4PS field "Interest Date" of table "Gen. Journal Line" before posting the the settlement. This must be done only in the OnPostDataItem, not every time that PostGenJnlLine is called.
Describe the request
Dear ALAppExtensions team,
On behalf of 4PS I would like to request integration event 'OnPostDataItemCloseVATEntriesOnBeforePostSettlement' to be added to trigger OnPostDataItem in report 20 "Calc. and Post VAT Settlement".
trigger OnPostDataItem()
begin
// Post to settlement account
if VATAmount <> 0 then begin
GenJnlLine.Init();
GenJnlLine."System-Created Entry" := true;
GenJnlLine."Account Type" := GenJnlLine."Account Type"::"G/L Account";
GLAccSettle.TestField("Gen. Posting Type", GenJnlLine."Gen. Posting Type"::" ");
GLAccSettle.TestField("VAT Bus. Posting Group", '');
GLAccSettle.TestField("VAT Prod. Posting Group", '');
if VATPostingSetup.Get(GLAccSettle."VAT Bus. Posting Group", GLAccSettle."VAT Prod. Posting Group") then
VATPostingSetup.TestField("VAT %", 0);
GLAccSettle.TestField("Gen. Bus. Posting Group", '');
GLAccSettle.TestField("Gen. Prod. Posting Group", '');
GenJnlLine.Validate("Account No.", GLAccSettle."No.");
GenJnlLine."Posting Date" := PostingDate;
GenJnlLine."VAT Reporting Date" := VATDate;
GenJnlLine."Document Type" := GenJnlLine."Document Type"::" ";
GenJnlLine."Document No." := DocNo;
GenJnlLine.Description := Text004;
GenJnlLine.Amount := VATAmount;
GenJnlLine."Source Currency Code" := GLSetup."Additional Reporting Currency";
GenJnlLine."Source Currency Amount" := VATAmountAddCurr;
GenJnlLine."Source Code" := SourceCodeSetup."VAT Settlement";
GenJnlLine."VAT Posting" := GenJnlLine."VAT Posting"::"Manual VAT Entry";
OnPostDataItemCloseVATEntriesOnBeforePostSettlement(GenJnlLine); //new
if PostSettlement then
PostGenJnlLine(GenJnlLine);
end;
end;
[IntegrationEvent(false, false)]
local procedure OnPostDataItemCloseVATEntriesOnBeforePostSettlement(var GenJnlLine: Record "Gen. Journal Line")
begin
//new
end;
Internal work item: AB#611652
Metadata
Metadata
Assignees
Labels
FinanceGitHub request for Finance areaGitHub request for Finance areaevent-requestRequest for adding an eventRequest for adding an event