DataPort Sales Invoices with Fixed Vat value

ADARTIHS
Member Posts: 78
Hi Guys/Dolls merry xmas 
Version: NAV 2009 SP1
Database:SQL
I am trying to import details from a spreadsheet to import Sales invoice lines. The import creates A header and lines into the Sales Header and Lines table. The spreadsheet provided also has VAT values which I cannot import in? When I calculate with NAV there is rounding differnces.
Is there anyway I can import the VAT value and keep this fixed. Also to be a pain some invoices have settlement discount.
thanks for your help. This is a horrible one.
Thanks
ADARTIHS

Version: NAV 2009 SP1
Database:SQL
I am trying to import details from a spreadsheet to import Sales invoice lines. The import creates A header and lines into the Sales Header and Lines table. The spreadsheet provided also has VAT values which I cannot import in? When I calculate with NAV there is rounding differnces.
Is there anyway I can import the VAT value and keep this fixed. Also to be a pain some invoices have settlement discount.
thanks for your help. This is a horrible one.
Thanks
ADARTIHS
0
Comments
-
"The spreadsheet provided also has VAT values which I cannot import in?"
Why? are you getting an error or something?
Have you tried importing that value into a variable and then mapping it to it's proper field?
Validate(Taxfield,Your Variable);0 -
hi ADARTIHS, i've just faced the same problem with VAT: no matter what field you validate before, nav will screw up your calculation in some way.
For "screw up" i mean that nav has its own logic, and based on it, it calculates the vat, but when interfacing with external programs, you usually want the data to be perfectly the same in nav and external system, and this is hard to do when facing with vat differences and roundings. The only method i found (it's really odd, but it works fine) is to force all the values in: here's the code (put it in the loop for the lines). before reassigning the values, remember to run
lCUReleaseDoc.PerformManualRelease(lTBSalesHeader);//lCUReleaseDoc is Release sales document codeunit//pdecnewvat: vat amount per line in the external program //this code does not support the foreign currency, but you can adapt it lDECVATAmountFromNAV := vTBSalesLines."Amount Including VAT" - vTBSalesLines.Amount; lDECVATDifference := pDECNewVAT - lDECVATAmountFromNAV; vTBSalesLines."VAT Difference" := lDECVATDifference; vTBSalesLines.Amount := pDECNewAmount; vTBSalesLines."Amount Including VAT" := pDECNewAmount + pDECNewVAT; vTBSalesLines."Outstanding Amount" := pDECNewAmount + pDECNewVAT; vTBSalesLines."Outstanding Amount (LCY)" := pDECNewAmount + pDECNewVAT; vTBSalesLines."VAT Base Amount" := pDECNewAmount; vTBSalesLines."Line Amount" := pDECNewAmount; vTBSalesLines.MODIFY(TRUE);
I know that's not the way nav works, but we couldn't find another way...if there's one and someone knows it, please suggest it to us0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions