Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ codeunit 4850 "AA Codes Posting Helper"
GenJnlCheckLine: Codeunit "Gen. Jnl.-Check Line";
NoOfAutoAccounts: Decimal;
TotalAmount: Decimal;
TotalAltAmount: Decimal;
SourceCurrBaseAmount: Decimal;
AccLine: Integer;
begin
Expand Down Expand Up @@ -115,9 +116,11 @@ codeunit 4850 "AA Codes Posting Helper"
CopyDimensionFromAutoAccLine(GenJnlLine2, AutomaticAccountLine);
AccLine := AccLine + 1;
TotalAmount := TotalAmount + GenJnlLine2.Amount;
TotalAltAmount := TotalAltAmount + GenJnlLine2."Source Currency Amount";
if (AccLine = NoOfAutoAccounts) and (TotalAmount <> 0) then
GenJnlLine2.Validate(Amount, GenJnlLine2.Amount - TotalAmount);

if (AccLine = NoOfAutoAccounts) and (TotalAltAmount <> 0) then
GenJnlLine2.Validate("Source Currency Amount", GenJnlLine2."Source Currency Amount" - TotalAltAmount);
GenJnlCheckLine.RunCheck(GenJnlLine2);

sender.InitGLEntry(GenJnlLine2, GLEntry,
Expand Down
Loading