Change the code in the Data Item Number 5 Sections in the Make 349 Declaration report (88)) as follows:
Existing code 1...
SectionType=GroupFooter;
SectionWidth=15600;
SectionHeight=423;
// Delete the following line.
OnPostSection=BEGIN
CustVendCountry.GET("Country/Region Code");
CustVendVatRegNo := COPYSTR("VAT Registration No.",1,CustVendCountry."VAT Registration No. digits");
OpTriang := ' ';
...
Replacement code 1...
SectionType=GroupFooter;
SectionWidth=15600;
SectionHeight=423;
// Add the following lines.
OnPostSection=VAR
SalesInvLine@1100300 : Record 113;
SalesInvHeader@1100301 : Record 112;
BEGIN
// End of the lines.
CustVendCountry.GET("Country/Region Code");
CustVendVatRegNo := COPYSTR("VAT Registration No.",1,CustVendCountry."VAT Registration No. digits");
OpTriang := ' ';
...
Existing code 2...
AccumOrigDeclAmountEUService := 0;
AccumPrevDeclAmountTri := 0;
AccumOrigDeclAmountTri := 0;
Customer2.RESET;
Customer2.SETRANGE(Customer2."VAT Registration No.","VAT Registration No.");
...
Replacement code 2...
AccumOrigDeclAmountEUService := 0;
AccumPrevDeclAmountTri := 0;
AccumOrigDeclAmountTri := 0;
Customer2.RESET;
Customer2.SETRANGE(Customer2."VAT Registration No.","VAT Registration No.");
...
Existing code 3...
AccumOrigDeclAmountEUService := 0;
AccumPrevDeclAmountTri := 0;
AccumOrigDeclAmountTri := 0;
Customer2.RESET;
Customer2.SETRANGE(Customer2."VAT Registration No.","VAT Registration No.");
...
Replacement code 3...
AccumOrigDeclAmountEUService := 0;
AccumPrevDeclAmountTri := 0;
AccumOrigDeclAmountTri := 0;
// Add the following lines.
NoTaxableNormalAmount := 0;
NoTaxableAmountOpTri := 0;
NoTaxableAmountEUService := 0;
// End of the lines.
Customer2.RESET;
Customer2.SETRANGE(Customer2."VAT Registration No.","VAT Registration No.");
...
Existing code 4...
RectPeriod := '0';
UNTIL CustVendWarning349.NEXT = 0;
//END;
UNTIL Customer2.NEXT = 0;
IF "VAT Registration No." <> '' THEN BEGIN
...
Replacement code 4...
RectPeriod := '0';
UNTIL CustVendWarning349.NEXT = 0;
//END;
// Add the following lines.
SalesInvLine.RESET;
SalesInvLine.SETRANGE("Bill-to Customer No.",Customer2."No.");
SalesInvLine.SETRANGE("Posting Date",FromDate,ToDate);
SalesInvLine.SETRANGE("VAT Calculation Type",SalesInvLine."VAT Calculation Type"::"No Taxable VAT");
SalesInvLine.SETFILTER("Gen. Prod. Posting Group", FilterString);
IF SalesInvLine.FINDSET THEN
REPEAT
IF VATPostingSetup.GET(SalesInvLine."VAT Bus. Posting Group",SalesInvLine."VAT Prod. Posting Group") THEN
IF VATPostingSetup."EU Service" THEN
NoTaxableAmountEUService := NoTaxableAmountEUService + SalesInvLine."Line Amount"
ELSE
IF SalesInvHeader.GET(SalesInvLine."Document No.") THEN
IF SalesInvHeader."EU 3-Party Trade" THEN
NoTaxableAmountOpTri := NoTaxableAmountOpTri + SalesInvLine."Line Amount"
ELSE
NoTaxableNormalAmount := NoTaxableNormalAmount + SalesInvLine."Line Amount"
UNTIL SalesInvLine.NEXT = 0;
// End of the lines.
UNTIL Customer2.NEXT = 0;
IF "VAT Registration No." <> '' THEN BEGIN
...
Existing code 5...
IF "VAT Registration No." <> '' THEN BEGIN
IF NormalAmount < 0 THEN
NormalAmount := -NormalAmount;
IF CorrIncludedForNormalAmount OR (NormalAmount <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(NormalAmount),3,13);
Txt :=
...
Replacement code 5...
IF "VAT Registration No." <> '' THEN BEGIN
IF NormalAmount < 0 THEN
NormalAmount := -NormalAmount;
// Add the following line.
NormalAmount := NormalAmount + NoTaxableNormalAmount;
IF CorrIncludedForNormalAmount OR (NormalAmount <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(NormalAmount),3,13);
Txt :=
...
Existing code 6...
END;
IF AmountOpTri < 0 THEN
AmountOpTri := -AmountOpTri;
IF CorrIncludedForOpTriAmount OR (AmountOpTri <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(AmountOpTri),3,13);
Txt :=
...
Replacement code 6...
END;
IF AmountOpTri < 0 THEN
AmountOpTri := -AmountOpTri;
// Add the following line.
AmountOpTri := AmountOpTri + NoTaxableAmountOpTri;
IF CorrIncludedForOpTriAmount OR (AmountOpTri <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(AmountOpTri),3,13);
Txt :=
...
Existing code 7...
END;
IF AmountEUService < 0 THEN
AmountEUService := -AmountEUService;
IF CorrIncludedForEUServiceAmount OR (AmountEUService <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(AmountEUService),3,13);
CustVendCountry.GET(Customer2."Country/Region Code");
...
Replacement code 7...
END;
IF AmountEUService < 0 THEN
AmountEUService := -AmountEUService;
// Add the following line.
AmountEUService := AmountEUService + NoTaxableAmountEUService;
IF CorrIncludedForEUServiceAmount OR (AmountEUService <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(AmountEUService),3,13);
CustVendCountry.GET(Customer2."Country/Region Code");
...
Change the code in the Data Item Number 6 Sections in the Make 349 Declaration report (88) as follows:
Existing code 1...
SectionType=GroupFooter;
SectionWidth=15600;
SectionHeight=423;
// Delete the following line.
OnPostSection=BEGIN
CustVendCountry.GET("Country/Region Code");
CustVendVatRegNo := COPYSTR("VAT Registration No.",1,CustVendCountry."VAT Registration No. digits");
OpTriang := ' ';
...
Replacement code 1...
SectionType=GroupFooter;
SectionWidth=15600;
SectionHeight=423;
// Add the following lines.
OnPostSection=VAR
PurchInvLine@1100302 : Record 123;
BEGIN
// End of the lines.
CustVendCountry.GET("Country/Region Code");
CustVendVatRegNo := COPYSTR("VAT Registration No.",1,CustVendCountry."VAT Registration No. digits");
OpTriang := ' ';
...
Existing code 2...
AccumOrigDeclAmountEUService := 0;
AccumPrevDeclAmountTri := 0;
AccumOrigDeclAmountTri := 0;
Vendor2.RESET;
Vendor2.SETRANGE(Vendor2."VAT Registration No.","VAT Registration No.");
...
Replacement code 2...
AccumOrigDeclAmountEUService := 0;
AccumPrevDeclAmountTri := 0;
AccumOrigDeclAmountTri := 0;
// Add the following lines.
NoTaxableNormalAmount := 0;
NoTaxableAmountEUService := 0;
// End of the lines.
Vendor2.RESET;
Vendor2.SETRANGE(Vendor2."VAT Registration No.","VAT Registration No.");
...
Existing code 3...
RectPeriod := '0';
UNTIL CustVendWarning349.NEXT = 0;
END;
UNTIL Vendor2.NEXT = 0;
IF "VAT Registration No." <> '' THEN BEGIN
...
Replacement code 3...
RectPeriod := '0';
UNTIL CustVendWarning349.NEXT = 0;
END;
// Add the following lines.
PurchInvLine.RESET;
PurchInvLine.SETRANGE("Pay-to Vendor No.",Vendor2."No.");
PurchInvLine.SETRANGE("Posting Date",FromDate,ToDate);
PurchInvLine.SETRANGE("VAT Calculation Type",PurchInvLine."VAT Calculation Type"::"No Taxable VAT");
PurchInvLine.SETFILTER("Gen. Prod. Posting Group", FilterString);
IF PurchInvLine.FINDSET THEN
REPEAT
IF VATPostingSetup.GET(PurchInvLine."VAT Bus. Posting Group",PurchInvLine."VAT Prod. Posting Group") THEN
IF VATPostingSetup."EU Service" THEN
NoTaxableAmountEUService := NoTaxableAmountEUService + PurchInvLine."Line Amount"
ELSE
NoTaxableNormalAmount := NoTaxableNormalAmount + PurchInvLine."Line Amount"
UNTIL PurchInvLine.NEXT = 0;
// End of the lines.
UNTIL Vendor2.NEXT = 0;
IF "VAT Registration No." <> '' THEN BEGIN
...
Existing code 4...
IF "VAT Registration No." <> '' THEN BEGIN
IF NormalAmount < 0 THEN
NormalAmount := -NormalAmount;
IF CorrIncludedForNormalAmount OR (NormalAmount <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(NormalAmount),3,13);
Txt :=
...
Replacement code 4...
IF "VAT Registration No." <> '' THEN BEGIN
IF NormalAmount < 0 THEN
NormalAmount := -NormalAmount;
// Add the following line.
NormalAmount := NormalAmount + NoTaxableNormalAmount;
IF CorrIncludedForNormalAmount OR (NormalAmount <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(NormalAmount),3,13);
Txt :=
...
Existing code 5...
END;
IF AmountEUService < 0 THEN
AmountEUService := -AmountEUService;
IF CorrIncludedForEUServiceAmount OR (AmountEUService <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(AmountEUService),3,13);
CustVendCountry.GET(Customer2."Country/Region Code");
...
Replacement code 5...
END;
IF AmountEUService < 0 THEN
AmountEUService := -AmountEUService;
// Add the following line.
AmountEUService := AmountEUService + NoTaxableAmountEUService;
IF CorrIncludedForEUServiceAmount OR (AmountEUService <> 0) THEN BEGIN
TextAmount := COPYSTR(FormatTextAmt(AmountEUService),3,13);
CustVendCountry.GET(Customer2."Country/Region Code");
...