I have an application that, depending on the format of the portion that the user selects, the system will return the amount of that parcel. For example: Assuming a request for $ 50,000 twice, the system will store two records containing $ 25,000.00 in the bank.
The problem is when it comes to calculating a "broken" value. For example: The user generates a request for $ 100,000 and installs it three times, the system will save three results of $ 33,333.33 .
The problem is the time to get the resulting value, because if I know that the value of the parcel was 3 and multiplied the amount R $ 33.333,33 I get R $ 99.999.99 , that is , this 1 centavo
ends up lacking what in the front generates a discrepant value when it comes to obtaining certain reports.
I noticed that invoice systems do this perfectly ...
How can I generate (mostly broken) parcels, containing a penny more when needed?