VatAmount Calculation

hawkeyehawkeye 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

Comments

  • jannestigjannestig Member Posts: 1,000
    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 ledger
  • hawkeyehawkeye Member Posts: 51
    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".
  • jannestigjannestig Member Posts: 1,000
    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 import
  • jannestigjannestig Member Posts: 1,000
    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
  • hawkeyehawkeye Member Posts: 51
    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)
  • jannestigjannestig Member Posts: 1,000
    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.
Sign In or Register to comment.