Round flowfield (Amount Incl. VAT)

ReedbergReedberg Member Posts: 68
Hello all,
"Purch. Invoice Header" table contains field "Amount Incl. VAT". It has a flowfield type and shows the sum of "Amount Incl. VAT" in lines. At the present moment I have a Purchase Invoice with "Amount Incl. VAT" equal to 99.99. My client wants it to be rounded to 100.

Field "Amount Incl. VAT" has AutoFormatType property set to 1. As help says when system calculates this field it cals AutoFormatTranslate function in 1 cdu.
This function returns format property in the following manner:
<Precision,%1><Standard format,0>
Precision is taken either from Currency table or GLSetup table, field "Amount Decimal Places".
One way to make "Amount Incl. VAT" field equal to 100 is to change "Amount Decimal Places" for a given currency to 0:0. It works. But it affects the whole system and it works not precisely as I want. I want system to ROUND value, not just use less decimals.

I understand that I can erase AutoFormatType property and use "DecimalPlaces" value (0:0) for this field, but this way again system won't ROUND decimal + this new setting will apply all currencies, not the one I use. Also I doubt if it is okay to change this property, won't I face some problems in future?

Is there any clear way to ROUND flowfield value?
Thanks!

Answers

  • Rishi1109Rishi1109 Member Posts: 43
    Dear Reedberg, I dont think system will allow you to do any manipulation with the flowfield value but why your customer wants it.If he want it for reports and all then it can be handled but not directly on table or else you round the values in Invoice Line itself
    Thanks and Regards
    Rishi
  • ReedbergReedberg Member Posts: 68
    Dear Rishi1109, thanks for you answer!
    My customer needs it because he imports payments for invoices from external system and this payment contains rounded number. User posts the payment (for example 100) and when he applies payment with invoice (99.99), 0.01 cent remains unaplied. This is not so critical, but still the client does not want such small differencies to occur.
  • Rishi1109Rishi1109 Member Posts: 43
    Can you not use "Inv. Rounding Precision (LCY)" as 1.00 on General Ledger Setup ??
    Thanks and Regards
    Rishi
  • ReedbergReedberg Member Posts: 68
    I just tried it, nothing changed. When system calculates format property for this calcfield it does not use "Inv. Rounding Precision (LCY)" field in General Ledger Setup.
  • Rishi1109Rishi1109 Member Posts: 43
    Even I also tried and it is working fine for me
    Have you checked whether "Invoice Rounding" is checked or not in "Purchases & Payables Setup" ??
    Thanks and Regards
    Rishi
  • ReedbergReedberg Member Posts: 68
    Rishi1109, I checked "Invoice Rounding" in "Purchases & Payables Setup"table, it was not installed. I installed it, changed "Inv. Rounding Precision (LCY)" to 1.00 on General Ledger Setup but unfortunately nothing changed.
    I thought may be this is so because I use an old version of Navision, so I checked it in NAV5, Cronus database. The same thing appear - "Inv. Rounding Precision (LCY)" in General Ledger Setup does not affect "Amount Incl. VAT" flowfield in Purchase Invoice Header.
    In fact I don't really unrderstand how this setup should affect decimals of this flowfield, help says very promptly that AutoFormatTranslate function is being called and this function does not look at "Inv. Rounding Precision (LCY)" field. Rishi1109, may be some additional code is written in your verision of Navision? Could you please check this in Cronus, when you have time? It would be really appreciated!

    In any case, thank you for your help, I didn't know about such setup as "Invoice Rounding", will be usable in future, thanks!
  • Rishi1109Rishi1109 Member Posts: 43
    Dear ReedBerg

    Can you please check the InvoiceRounding function in codeunit 90 (viz. Purch.-Post) and compare it with some newer version ???
    Thanks and Regards
    Rishi
  • vaprogvaprog Member Posts: 1,141
    Are you sure changing the appearance is enough for you? Don't you rather have to change the lines of your document so it sums up to what you need? i.e.to import all relevant fields directly and adjust the other fields such that NAV is happy. You cannot change the properties of a mathematical sum by rounding the result. The introduced error will cause you trouble later on.

    Have a look at the "VAT Difference" field and maybe also at the "VAT Calculation Type" field on sales and purchase lines.
  • ReedbergReedberg Member Posts: 68
    Dear Rishi1109, vaprog
    I am sorry the my late reply, but laster is better than never! :)

    Thank you very much for your answers, I learnt some new stuff from your replies!
Sign In or Register to comment.