Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

VAT Registration No. in VAT Entry

(0) ShareShare
ReportReport
Posted on by

Hi, I was checking some diffenences in codeunit 12 (Gen. Jnl.-Post Line) between NAV 2009 R2 and NAV 2013. Inside InsertVAT function previously there was VAT Registration No. evaluation:

  VATEntry."Bill-to/Pay-to No." := "Bill-to/Pay-to No.";
  IF "Bill-to/Pay-to No." <> '' THEN
    CASE VATEntry.Type OF
      VATEntry.Type::Purchase:
        BEGIN
          IF Vend."No." <> "Bill-to/Pay-to No." THEN
            Vend.GET("Bill-to/Pay-to No.");
          VATEntry."Country/Region Code" := Vend."Country/Region Code";
          VATEntry."VAT Registration No." := Vend."VAT Registration No.";
        END;
      VATEntry.Type::Sale:
        BEGIN
          IF Cust."No." <> "Bill-to/Pay-to No." THEN
            Cust.GET("Bill-to/Pay-to No.");
          VATEntry."Country/Region Code" := Cust."Country/Region Code";
          VATEntry."VAT Registration No." := Cust."VAT Registration No.";
        END;
    END;

In 2013 and 2013 R2 instead there is:

  VATEntry."Bill-to/Pay-to No." := "Bill-to/Pay-to No.";
  IF "Bill-to/Pay-to No." <> '' THEN
    CASE VATEntry.Type OF
      VATEntry.Type::Purchase:
        BEGIN
          IF Vend."No." <> "Bill-to/Pay-to No." THEN
            Vend.GET("Bill-to/Pay-to No.");
          VATEntry."Fiscal Code" := Vend."Fiscal Code";
        END;
      VATEntry.Type::Sale:
        BEGIN
          IF Cust."No." <> "Bill-to/Pay-to No." THEN
            Cust.GET("Bill-to/Pay-to No.");
          VATEntry."Fiscal Code" := Cust."Fiscal Code";
        END;
    END
  ELSE
    VATEntry."VAT Registration No." := "VAT Registration No.";

If I'm not wrong in invoices/credit memos posting this means VAT Registration No. is not filled anymore, isn't it? Any explanation regarding this business logic change? My plan should be to re-integrate the function with missing evaluation from customer/vendor.

Thanks

Daniele

*This post is locked for comments

  • geordie Profile Picture
    geordie on at
    RE: VAT Registration No. in VAT Entry

    Thanks, I guess the assignment has been lost by mistake in 2013 IT: I'll restore it.

  • Mohana Yadav Profile Picture
    Mohana Yadav 60,155 Super User 2025 Season 1 on at
    RE: VAT Registration No. in VAT Entry

    I checked in NAV2013 and NAV2013r2 also..

  • geordie Profile Picture
    geordie on at
    RE: VAT Registration No. in VAT Entry

    Thanks Mohana, the code you mentioned is from 2009 or 2013?

    I'm using a standard IT localization and I looked also at a 2009 R2 W1 and the code part is:

    VATEntry."Country/Region Code" := Cust."Country/Region Code";

    VATEntry."VAT Registration No." := Cust."VAT Registration No.";

    Unfortunately actually I don't have access to a 2013 W1 db to complete the cross-check.

  • Mohana Yadav Profile Picture
    Mohana Yadav 60,155 Super User 2025 Season 1 on at
    RE: VAT Registration No. in VAT Entry

    Hi Daniele,

    In my NL database, I simply have

     VATEntry."Bill-to/Pay-to No." := "Bill-to/Pay-to No.";

     VATEntry."Country/Region Code" := "Country/Region Code";

     VATEntry."VAT Registration No." := "VAT Registration No.";

    which localization are you using? Is it country specific or customization?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans