web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Suggest Lines action on VAT Return page on BC SaaS version 27

(2) ShareShare
ReportReport
Posted on by
When I attempt to click the Suggest Lines action on the VAT Return page in BC version 27 I get the error: VAT statement template VATNWT name VATNWN has a wrong setup. There must be nine rows, each with a value between 1 and 9 for the Box No. field.
Our standard VAT Statement that has worked for previous BC releases contains 28 lines and has lots of Row Totalling, so to simplify matters, I created a fresh basic one that contains just 9 rows, one for each box. See values below, but I still get the error above.
Name Row No. Description Box No. Type Account Totalling Gen. Posting Type VAT Bus. Posting Group VAT Prod. Posting Group Amount Type Row Totalling Calculate with Print Print with New Page
VATNWN 1 Total VAT on Sales 1 Account Totalling 5610 Sale DOMESTIC STANDARD Amount   Sign TRUE Opposite Sign FALSE
VATNWN 2 VAT on purchases from EU 2 Account Totalling 5620 Purchase EU STANDARD Amount   Sign TRUE Sign FALSE
VATNWN 3 Total VAT 1 + 2 3 Account Totalling 2003 Sale DOMESTIC REDUCED Amount   Sign TRUE Opposite Sign FALSE
VATNWN 4 VAT Reclaimed 4 Account Totalling 5630 Purchase DOMESTIC REDUCED Amount   Sign TRUE Sign FALSE
VATNWN 5 VAT Due 5 Account Totalling 5410 Purchase DOMESTIC OUTSIDE Amount   Sign TRUE Sign FALSE
VATNWN 6 Total Sales ex VAT 6 Account Totalling 6110..6190 Sale   STANDARD Amount   Sign TRUE Opposite Sign FALSE
VATNWN 7 Total Purchases 7 Account Totalling 8210..8270 Purchase   REDUCED     Sign TRUE Sign FALSE
VATNWN 8 Value of supplies to EU 8 Account Totalling 2330 Sale   OUTSIDE     Sign TRUE Opposite Sign FALSE
VATNWN 9 Value of Purchases from EU 9 Account Totalling 5430 Purchase   ZERO     Sign TRUE Sign FALSE


The error appears to happen in the event below in the "GovTalk Subscribers" codeunit:

    [Obsolete('Event will be removed in a future release', '27.0')]
    [EventSubscriber(ObjectType::Report, Report::"VAT Report Request Page", 'OnBeforeVATStatementLineFindSet2', '', false, false)]
    local procedure OnBeforeVATStatementLineFindSet2(VATStatementLine: Record "VAT Statement Line"; VATReportHeader: Record "VAT Report Header"; var IsHandled: Boolean)
    var
        GovTalk: Codeunit GovTalk;
    begin
        if GovTalk.IsEnabled() then
            exit;
        IsHandled := true;
        if VATStatementLine.Count() <> 9 then
            Error(WrongVATSatementSetupErr, VATReportHeader."Statement Template Name", VATReportHeader."Statement Name");
    end;

I see no reason why VATStatementLine.Count would not be 9 but it clearly isn't? Any help would be greatly appreciated?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans