...
TotalPayments := TotalPayments - (VATEntry2."Remaining Unrealized Amount" + VATEntry2."Remaining Unrealized Base");
// IT0028.end
IF VATAmount <> 0 THEN BEGIN // IT0028
// Delete the following lines.
InitGLEntry(SalesVATUnrealAccount,-VATAmount,0,FALSE,TRUE);
GLEntry."Additional-Currency Amount" := -VATAmountAddCurr;
GLEntry."Bal. Account No." := SalesVATAccount;
SummarizeVAT(
GLSetup."Summarize G/L Entries",GLEntry,TempGLEntryVAT,InsertedTempGLEntryVAT);
// End of the lines.
InitGLEntry(SalesVATAccount,VATAmount,0,FALSE,TRUE);
GLEntry."Additional-Currency Amount" := VATAmountAddCurr;
GLEntry."Bal. Account No." := SalesVATUnrealAccount;
GLEntry."Gen. Posting Type" := VATEntry2.Type;
...
...
TotalPayments := TotalPayments - (VATEntry2."Remaining Unrealized Amount" + VATEntry2."Remaining Unrealized Base");
// IT0028.end
IF VATAmount <> 0 THEN BEGIN // IT0028
// Add the following lines.
IF NOT UnrealizedVATPosted THEN BEGIN
InitGLEntry(SalesVATUnrealAccount,-VATAmount,0,FALSE,TRUE);
GLEntry."Additional-Currency Amount" := -VATAmountAddCurr;
GLEntry."Bal. Account No." := SalesVATAccount;
SummarizeVAT(
GLSetup."Summarize G/L Entries",GLEntry,TempGLEntryVAT,InsertedTempGLEntryVAT);
END;
// End of the lines.
InitGLEntry(SalesVATAccount,VATAmount,0,FALSE,TRUE);
GLEntry."Additional-Currency Amount" := VATAmountAddCurr;
GLEntry."Bal. Account No." := SalesVATUnrealAccount;
GLEntry."Gen. Posting Type" := VATEntry2.Type;
...