Round the content of a field
There are various possibilities to round an amount. The amount can be some data stored in a field available when the function is run.
Examples
*/ Rounds an amount to 0.05 cts. If a field is used, it must be available.
ard_05(12.5842) = 12.60
ard_05(do_montant)
*/ Rounds an amount to the preceding 0.05 cts. If a field is used, it must be available.
ard_05_floor(12.5842) = 12.55
ard_05_floor(do_montant)
*/ Rounds an amount to 0.01 ct.
ard(12.5842, 2) = 12.58
ard(do_montant, 2)
*/ Rounds an amount to 0.10 cts.
ard(12.5842, 4) = 12.6
ard(do_montant, 4)
*/ Rounds an amount to 0.50 cts before the next integer.
ard(12.5842, 5) = 12.5
ard(do_montant, 5)
*/ Rounds an amount to 0.05 cts before the next integer.
ard(12.5842, 6) = 12.95
ard(do_montant, 6)
*/ Rounds an amount to 1.
ard(12.5842, 7) = 13
ard(do_montant, 7)
*/ Rounds an amount to 1 before the next tenth.
ard(12.5842, 8) = 19
ard(do_montant, 8)
*/ Rounds an amount to 0.50 cts before the next tenth.
ard(12.5842, 9) = 19.5
ard(do_montant, 9)
*/ Rounds an amount to 0.05 cts before the next tenth.
ard(12.5842, 10) = 19.95
ard(do_montant, 10)