...
DateOfToday := FORMAT(TODAY,6,Text000);
Today4 := FORMAT(TODAY,8,Text001);
TimeOfNow := FORMAT(TIME,4,Text002);
// UID Check
CompanyInfo."VAT Registration No." := RemoveSpecChar(CompanyInfo."VAT Registration No.");
...
...
DateOfToday := FORMAT(TODAY,6,Text000);
Today4 := FORMAT(TODAY,8,Text001);
TimeOfNow := FORMAT(TIME,4,Text002);
// Add the following line.
IntrastatJnlLineBuf.DELETEALL;
// UID Check
CompanyInfo."VAT Registration No." := RemoveSpecChar(CompanyInfo."VAT Registration No.");
...
...
THEN
CurrReport.SKIP;
// Check Period
LinePeriod := FORMAT(Date,4,Text005);
IF LinePeriod <> Period THEN
...
...
THEN
CurrReport.SKIP;
// Add the following line.
IntrastatJnlLineBuf := "Intrastat Jnl. Line";
// Check Period
LinePeriod := FORMAT(Date,4,Text005);
IF LinePeriod <> Period THEN
...
...
Date,"Line No.",Period);
// Check Tariff
// Delete the following lines.
"Tariff No." := DELCHR("Tariff No.");
TESTFIELD("Tariff No.");
IF STRLEN("Tariff No.") <> 8 THEN
ERROR(Text008,"Intrastat Jnl. Line"."Line No.");
// End of the deleted lines.
TESTFIELD("Country/Region Code");
TESTFIELD("Transaction Type");
...
...
Date,"Line No.",Period);
// Check Tariff
// Add the following lines.
IntrastatJnlLineBuf."Tariff No." := DELCHR("Tariff No.");
IntrastatJnlLineBuf.TESTFIELD("Tariff No.");
IF STRLEN(IntrastatJnlLineBuf."Tariff No.") <> 8 THEN
ERROR(Text008,IntrastatJnlLineBuf."Line No.");
// End of the added lines.
TESTFIELD("Country/Region Code");
TESTFIELD("Transaction Type");
...
...
ERROR(Text011,FIELDCAPTION("Transaction Specification"),"Transaction Specification");
IF (Type = Type::Receipt) AND ("Country/Region of Origin Code" = '') THEN
// Delete the following line.
"Country/Region of Origin Code" := "Country/Region Code";
IF "Supplementary Units" THEN
TESTFIELD(Quantity);
...
...
ERROR(Text011,FIELDCAPTION("Transaction Specification"),"Transaction Specification");
IF (Type = Type::Receipt) AND ("Country/Region of Origin Code" = '') THEN
// Add the following line.
IntrastatJnlLineBuf."Country/Region of Origin Code" := "Country/Region Code";
IF "Supplementary Units" THEN
TESTFIELD(Quantity);
...
...
IntraRefNo := INCSTR(IntraRefNo);
END;
// Delete the following lines.
"Internal Ref. No." := IntraRefNo;
MODIFY;
END;
// End of the deleted lines.
DataItemLink=Journal Template Name=FIELD(Journal Template Name),
Journal Batch Name=FIELD(Name);
...
...
IntraRefNo := INCSTR(IntraRefNo);
END;
// Add the following lines.
IntrastatJnlLineBuf."Internal Ref. No." := IntraRefNo;
IntrastatJnlLineBuf.INSERT;
END;
OnPostDataItem=BEGIN
IF IntrastatJnlLineBuf.FINDSET THEN BEGIN
IntraJnlLineTest.RESET;
REPEAT
IntraJnlLineTest.GET(
IntrastatJnlLineBuf."Journal Template Name",
IntrastatJnlLineBuf."Journal Batch Name",
IntrastatJnlLineBuf."Line No.");
IntraJnlLineTest."Tariff No." := IntrastatJnlLineBuf."Tariff No.";
IntraJnlLineTest."Country/Region of Origin Code" := IntrastatJnlLineBuf."Country/Region of Origin Code";
IntraJnlLineTest."Internal Ref. No." := IntrastatJnlLineBuf."Internal Ref. No.";
IntraJnlLineTest.MODIFY;
UNTIL IntrastatJnlLineBuf.NEXT = 0;
END;
END;
// End of the added lines.
DataItemLink=Journal Template Name=FIELD(Journal Template Name),
Journal Batch Name=FIELD(Name);
...