...
EXIT(VATPeriod."Period No.");
END;
// Delete the following line.
PROCEDURE RunCheckNorwegianVAT@1080009(GenJnlLine@1080000 : Record 81);
VAR
SettledVATPeriod@1080003 : Record 10601;
VATProdPostGrp@1080002 : Record 324;
...
EXIT(VATPeriod."Period No.");
END;
// Add the following line.
PROCEDURE RunCheckNorwegianVAT@1080009(GenJnlLine@1080000 : Record 81;VAR AllowPostingInClosedVATPeriod@1080001 : Boolean);
VAR
SettledVATPeriod@1080003 : Record 10601;
VATProdPostGrp@1080002 : Record 324;
...
...
GLSetup@1080004 : Record 98;
BEGIN
WITH GenJnlLine DO BEGIN
IF "VAT Base Amount Type" <> "VAT Base Amount Type"::Automatic THEN BEGIN
IF ("Gen. Posting Type" = "Gen. Posting Type"::Purchase) OR
("Bal. Gen. Posting Type" = "Bal. Gen. Posting Type"::Purchase)
...
...
GLSetup@1080004 : Record 98;
BEGIN
WITH GenJnlLine DO BEGIN
// Add the following lines.
IF AllowPostingInClosedVATPeriod THEN
AllowPostingInClosedVATPeriod := FALSE
ELSE
IF SettledVATPeriod.GET(DATE2DMY("Posting Date",3),VATPeriodNo("Posting Date")) THEN
IF SettledVATPeriod.Closed THEN
FIELDERROR("Posting Date",STRSUBSTNO(Text005,SettledVATPeriod.Year,SettledVATPeriod."Period No."));
// End of the lines.
IF "VAT Base Amount Type" <> "VAT Base Amount Type"::Automatic THEN BEGIN
IF ("Gen. Posting Type" = "Gen. Posting Type"::Purchase) OR
("Bal. Gen. Posting Type" = "Bal. Gen. Posting Type"::Purchase)
...