...
ERROR(Text011,
VATEntry.FIELDCAPTION("Posting Date"),VATEntry."Posting Date",
VATEntry.FIELDCAPTION("Entry No."),VATEntry."Entry No.");
// Delete the following lines.
EntryNo := VATEntry.GetCVLedgEntryNo(TempJnlLineDim);
IF EntryNo <> 0 THEN BEGIN
GenJnlLine."Document Type" := VATEntry."Document Type";
GenJnlLine."Document No." := VATEntry."Document No.";
GenJnlLine."Postponed VAT" := TRUE;
GenJnlLine."VAT Date" := VATDate;
GenJnlLine."Posting Date" := VATDate;
IF VATEntry."Postponed VAT" THEN
GenJnlLine.Description := Text008
ELSE
GenJnlLine.Description := Text009;
GenJnlLine.Description :=
COPYSTR(
STRSUBSTNO(GenJnlLine.Description,VATEntry."Document Type",VATEntry."Document No."),
1,MAXSTRLEN(GenJnlLine.Description));
GenJnlLine."System-Created Entry" := TRUE;
CASE VATEntry.Type OF
VATEntry.Type::Sale:
GenJnlLine."Account Type" := GenJnlLine."Account Type"::Customer;
VATEntry.Type::Purchase:
GenJnlLine."Account Type" := GenJnlLine."Account Type"::Vendor;
END;
IF Type = Type::Realize THEN
PostGenJnlLine.RealizePostponedVAT(GenJnlLine,VATEntry."Transaction No.",VATEntry."Entry No.",TempJnlLineDim)
ELSE // Reverse
PostGenJnlLine.ReversePostponedVAT(GenJnlLine,VATEntry."Transaction No.",VATEntry."Entry No.",TempJnlLineDim);
END;
// End of the lines.
...
...
ERROR(Text011,
VATEntry.FIELDCAPTION("Posting Date"),VATEntry."Posting Date",
VATEntry.FIELDCAPTION("Entry No."),VATEntry."Entry No.");
// Add the following lines.
GenJnlLine."Document Type" := VATEntry."Document Type";
GenJnlLine."Document No." := VATEntry."Document No.";
GenJnlLine."Postponed VAT" := TRUE;
GenJnlLine."VAT Date" := VATDate;
GenJnlLine."Posting Date" := VATDate;
IF VATEntry."Postponed VAT" THEN
GenJnlLine.Description := Text008
ELSE
GenJnlLine.Description := Text009;
GenJnlLine.Description :=
COPYSTR(
STRSUBSTNO(GenJnlLine.Description,VATEntry."Document Type",VATEntry."Document No."),
1,MAXSTRLEN(GenJnlLine.Description));
GenJnlLine."System-Created Entry" := TRUE;
CASE VATEntry.Type OF
VATEntry.Type::Sale:
GenJnlLine."Account Type" := GenJnlLine."Account Type"::Customer;
VATEntry.Type::Purchase:
GenJnlLine."Account Type" := GenJnlLine."Account Type"::Vendor;
END;
IF Type = Type::Realize THEN
PostGenJnlLine.RealizePostponedVAT(GenJnlLine,VATEntry)
ELSE // Reverse
PostGenJnlLine.ReversePostponedVAT(GenJnlLine,VATEntry);
//End of the lines.
...