You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local procedure "Code"(var GenJnlLine: Record "Gen. Journal Line"; CheckLine: Boolean)
var
Balancing: Boolean;
IsTransactionConsistent: Boolean;
IsPosted: Boolean;
begin
IsPosted := false;
OnBeforeCode(GenJnlLine, CheckLine, IsPosted, GLReg, GLEntryNo);
if IsPosted then
exit;
GetJournalsSourceCode();
if GenJnlLine.EmptyLine() then begin
InitLastDocDate(GenJnlLine);
exit;
end;
if GenJnlLine."VAT Reporting Date" = 0D then begin
GLSetup.Get();
if (GenJnlLine."Document Date" = 0D) and (GLSetup."VAT Reporting Date" = GLSetup."VAT Reporting Date"::"Document Date") then
GenJnlLine."VAT Reporting Date" := GenJnlLine."Posting Date"
else
GenJnlLine."VAT Reporting Date" := GLSetup.GetVATDate(GenJnlLine."Posting Date", GenJnlLine."Document Date");
end;
CheckGenJnlLine(GenJnlLine, CheckLine);
//---------------------------------------------------------------OnCodeOnAfterCheckGenJnlLine:BEGIN
OnCodeOnAfterCheckGenJnlLine(GenJnlLine, CheckLine);
//---------------------------------------------------------------OnCodeOnAfterCheckGenJnlLine:END
AmountRoundingPrecision := InitAmounts(GenJnlLine);
if GenJnlLine."Bill-to/Pay-to No." = '' then
case true of
GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]:
GenJnlLine."Bill-to/Pay-to No." := GenJnlLine."Account No.";
GenJnlLine."Bal. Account Type" in [GenJnlLine."Bal. Account Type"::Customer, GenJnlLine."Bal. Account Type"::Vendor]:
GenJnlLine."Bill-to/Pay-to No." := GenJnlLine."Bal. Account No.";
end;
if GenJnlLine."Document Date" = 0D then
GenJnlLine."Document Date" := GenJnlLine."Posting Date";
if GenJnlLine."Due Date" = 0D then
GenJnlLine."Due Date" := GenJnlLine."Posting Date";
FindJobLineSign(GenJnlLine);
OnBeforeStartOrContinuePosting(GenJnlLine, LastDocType.AsInteger(), LastDocNo, LastDate, NextEntryNo);
if NextEntryNo = 0 then
StartPosting(GenJnlLine)
else
ContinuePosting(GenJnlLine);
OnCodeOnAfterStartOrContinuePosting(GenJnlLine, LastDocType, LastDocNo, LastDate, NextEntryNo);
if GenJnlLine."Account No." <> '' then begin
if (GenJnlLine."Bal. Account No." <> '') and
(not GenJnlLine."System-Created Entry") and
(GenJnlLine."Account Type" in
[GenJnlLine."Account Type"::Customer,
GenJnlLine."Account Type"::Vendor,
GenJnlLine."Account Type"::"Fixed Asset"])
then begin
CODEUNIT.Run(CODEUNIT::"Exchange Acc. G/L Journal Line", GenJnlLine);
//----------------------------------------------------OnCodeOnAfterRunExhangeAccGLJournalLine:BEGIN
//OnCodeOnAfterRunExhangeAccGLJournalLine(GenJnlLine, Balancing, NextEntryNo);
OnCodeOnAfterRunExhangeAccGLJournalLine(GenJnlLine, Balancing, NextEntryNo, JobLine);
//----------------------------------------------------OnCodeOnAfterRunExhangeAccGLJournalLine:END
Balancing := true;
end;
PostGenJnlLine(GenJnlLine, Balancing);
end;
if GenJnlLine."Bal. Account No." <> '' then begin
CODEUNIT.Run(CODEUNIT::"Exchange Acc. G/L Journal Line", GenJnlLine);
//----------------------------------------------------OnCodeOnAfterRunExhangeAccGLJournalLine:BEGIN
//OnCodeOnAfterRunExhangeAccGLJournalLine(GenJnlLine, Balancing, NextEntryNo);
OnCodeOnAfterRunExhangeAccGLJournalLine(GenJnlLine, Balancing, NextEntryNo, JobLine);
//----------------------------------------------------OnCodeOnAfterRunExhangeAccGLJournalLine:END
PostGenJnlLine(GenJnlLine, not Balancing);
end;
CheckPostUnrealizedVAT(GenJnlLine, true);
CreateDeferralScheduleFromGL(GenJnlLine, Balancing);
OnCodeOnBeforeFinishPosting(GenJnlLine, Balancing, FirstEntryNo);
IsTransactionConsistent := FinishPosting(GenJnlLine);
OnAfterGLFinishPosting(
GlobalGLEntry, GenJnlLine, IsTransactionConsistent, FirstTransactionNo, GLReg, TempGLEntryBuf,
NextEntryNo, NextTransactionNo);
GLEntryInconsistent := not IsTransactionConsistent;
end;
//---------------------------------------------------------------OnCodeOnAfterCheckGenJnlLine:BEGIN
[IntegrationEvent(true, false)]
local procedure OnCodeOnAfterCheckGenJnlLine(var GenJnlLine: Record "Gen. Journal Line"; CheckLine: Boolean)
begin
end;
//---------------------------------------------------------------OnCodeOnAfterCheckGenJnlLine:END
//----------------------------------------------------OnCodeOnAfterRunExhangeAccGLJournalLine:BEGIN
[IntegrationEvent(true, false)]
//local procedure OnCodeOnAfterRunExhangeAccGLJournalLine(var GenJournalLine: Record "Gen. Journal Line"; Balancing: Boolean; var NextEntryNo: Integer)
local procedure OnCodeOnAfterRunExhangeAccGLJournalLine(var GenJournalLine: Record "Gen. Journal Line"; Balancing: Boolean; var NextEntryNo: Integer; var JobLine: Boolean)
begin
end;
//----------------------------------------------------OnCodeOnAfterRunExhangeAccGLJournalLine:END
Additional context
We need OnCodeOnAfterCheckGenJnlLine for check after all standard checks.
We need split OnCodeOnAfterRunExhangeAccGLJournalLine event when run for Bal. Account and when not. May be some bool paramater helps.
We need option know and change global variabl JobLine
Describe the request
Please add new event
Additional context
We need OnCodeOnAfterCheckGenJnlLine for check after all standard checks.
We need split OnCodeOnAfterRunExhangeAccGLJournalLine event when run for Bal. Account and when not. May be some bool paramater helps.
We need option know and change global variabl JobLine
Internal work item: AB#562613
The text was updated successfully, but these errors were encountered: