VatAmount Calculation

hawkeye
Member Posts: 51
I have a VAT-calculation, which is given me 0,01 in difference in invoice lines.
I´m generating an invoice with several lines. One of them gives me headacke.
The following code on Sales Line are calculating the wrong VATAmount
VATAmount :=
TempVATAmountLineRemainder."VAT Amount" +
VATAmountLine."VAT Amount" * NewAmount / VATAmountLine."VAT Base";
My Values are:
TempVATAmountLineRemainder."VAT Amount" = 0,00373808
VATAmountLine."VAT Amount" = 148,66
NewAmount = 159,2
VATAmountLine."VAT Base" = 594,61
My amount incl. VAT Should be 159,2 * 1,25 = 199,00 ( Danish Vat is 25 %)
But the amount caused by the code is 0,00373808 + 148,66 X 159,2 / 594,61 = 39,80574612
39,80574612 + 159,2 = 199,0057 ~ 199,01
I think I have tried everything with the rounding precision fields on G/L-setup.
As it is a live system, I cant´t change the "Amount Rounding Precision"
Please give me a hint so I can move on - I´m stuck.
My customer is tired of having open Customer ledger entries with 0.01 as remaining amount.
BR
Hawkeye
I´m generating an invoice with several lines. One of them gives me headacke.
The following code on Sales Line are calculating the wrong VATAmount
VATAmount :=
TempVATAmountLineRemainder."VAT Amount" +
VATAmountLine."VAT Amount" * NewAmount / VATAmountLine."VAT Base";
My Values are:
TempVATAmountLineRemainder."VAT Amount" = 0,00373808
VATAmountLine."VAT Amount" = 148,66
NewAmount = 159,2
VATAmountLine."VAT Base" = 594,61
My amount incl. VAT Should be 159,2 * 1,25 = 199,00 ( Danish Vat is 25 %)
But the amount caused by the code is 0,00373808 + 148,66 X 159,2 / 594,61 = 39,80574612
39,80574612 + 159,2 = 199,0057 ~ 199,01
I think I have tried everything with the rounding precision fields on G/L-setup.
As it is a live system, I cant´t change the "Amount Rounding Precision"
Please give me a hint so I can move on - I´m stuck.
My customer is tired of having open Customer ledger entries with 0.01 as remaining amount.
BR
Hawkeye
0
Comments
-
What is your GL setup for VAT in General ledger setup fields ?
Max. VAT Difference Allowed Field
VAT Rounding Type Field
and S& R setup'
Allow VAT Difference Field
This should all ow you to round up vat amounts or adjust the VAT on the sales document
I am not sure invoice rounding percision and and rounding type affect VAT amounts as they are posted to the vAT ledger0 -
I have tried a lot of combinations in my development base.
Max. VAT Difference Allowed - I hav tried 0 - 0,1 - 0,2 - 1
I did not try the VAT Rounding Type field though. It is "Nearest"
Edit: It works with VAT Rounding Type "Low", but this is not a solution, because I also have the problem on other invoices missing 0.01, so it has to be "nearest".0 -
Try round Up or down then
What version are you you using ?
Since you database is live if its version 4.3 or higher you can make anychanges you need with the new VAT 2010 changes you will need to import0 -
So when you create your invoice or order and press F9 to see the vat calculations and fields does this differ from when you post them. It is on this f9 form you can change the Vat amount manually
Your basic issue sounds like that you have VAT fields set to more then 2 decimal places eg it should be 0,00 but you have 0.0000000 and these bottom calculations are rounding up to give you .01
Check a standard cronus to see what it has0 -
jannestig wrote:So when you create your invoice or order and press F9 to see the vat calculations and fields does this differ from when you post them. It is on this f9 form you can change the Vat amount manually
Your basic issue sounds like that you have VAT fields set to more then 2 decimal places eg it should be 0,00 but you have 0.0000000 and these bottom calculations are rounding up to give you .01
Check a standard cronus to see what it has
The F9 shows what is on the invoice and what is being posted
The customer has a report that makes the invoices. I started there. It seems like it goes wrong in the NAV-standard - T37 as described above.
I have a Line amount Excl. VAT which is 159,2 (exact), but a Amount Inclusive VAT 199,01 (should hav been 199,00, with 25 %VAT)
It only goes wrong somtimes and all of the times I have seen, there are a lot Sales Lines.
I can actual have a Invoice with multible identically lines (only differ is Amount Incl. Vat (0,01) and Line No)0 -
Sounds like you have some customisation issues on this report that creates the invoices as well ? Perhaps rounding the amounts during creation would take away the problem ?
You still haven't said what version of NAV you are using.
There is quite a few issues with VAT rounding in 4.X
The next point would be checking you setup on S&R setup is the Invoice Rounding Field checked or not ?
Then check you GL setup for invoice rounding setup
Inv. Rounding Precision (LCY) you can set to 1 so you will have no decimals
you can also then play around with the Inv. Rounding Type (LCY) settings
If you have inserted 1.00 in the Invoice Rounding Precision field, the amounts 1.25 and 1.75 will be rounded for the various options as follows:
Nearest:
1.25 will be rounded down to 1.00.
1.75 will be rounded up to 2.00.
Up:
1.25 will be rounded up to 2.00.
1.75 will be rounded up to 2.00.
Down:
1.25 will be rounded down to 1.00.
1.75 will be rounded down to 1.00.0
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