2
For example:
venda de R$ 200,00 em 3x:
parc 1: 66,67
parc 2: 66,67
parc 3: 66,67
Besides not making it easy, you’d be charging the customer an extra penny.
I would need a solution such as:
parc 1: 68,00
parc 2: 66,00
parcl 3: 66,00
To facilitate the change of sales by crediario, how to arrendondar the value of the decimals for first installment , using Javascript?
Just divide 200 by 3 that gives 66.67, remove the decimal part, is then 66. And then add to one of the parcels the rest of the division 200 by 3.
– Jorge B.
For this I use a logic similar to @Jorgeb. using the method allocate library bigmoney.js
– Renato Gama
understood the logic @Jorgeb have to post some example?
– Rafael Assmann
Look at my answer.
– Jorge B.
great @Jorgeb. I managed to apply perfectly in my code, thank you!
– Rafael Assmann