Round selling price

superbrugersuperbruger Member Posts: 41
edited 2004-02-26 in Navision Attain
Hi,

I have to export some unit prices, but they must be rounded to nearest 9.

Ex.
Unit Price 152,- = export: 149,-
Unit Price 156,- = export: 159,-
Unit Price 14,- = export: 9,-
Unit Price 218,- = export 219,-

You get the idea? :wink:

But how do I do that?

Comments

  • eromeineromein Member Posts: 589
    Price := round(Price,10) - 1
    

    But I haven't tested it.
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • superbrugersuperbruger Member Posts: 41
    Nice.

    Seems to work.
    And in a much shorter code than the one I made.

    Thank You.
  • Torben_R.Torben_R. Member Posts: 99
    Just one small problem.

    If the Unit price is lower than 5 .....
Sign In or Register to comment.