Unanswered: how to solve difference 1 cent problem
now our company system have face some problem that is diference 1 cent problem for the total inerest amount before the payment and after the payment.
This is because the total interest amount is the sum value for 2 type of interest that are fixed interest and ongoing interest.
This two type of interest also calulate by difference formula, this two type of value also use difference programs to calculate, but the variable use to store this 2 value is DECIMAL(13,2).
The fixed interest is calculate by the program afer customer make the payment and the value will store into database, and than the ongoing interest is just calculate by the programs which need to use this amount, but it does not store into database.
Because this 2 value also store in DECIMAL(13,2) variable,So when this two value sum up together it also may not get the correct value.
the fixed interest can be 12.345678, but just the 12.35 value will store into database. The ongoing interest can be 33.5636891, after store into DECIMAL(13,2) variable it will become 33.56, and the total was 45.91.
the fixed interes wil increase to 24.5647861, so 24.56 will store into database. The ongoing interest has become 21.3443892, so it will become 21.34. The total was 45.90.
fix int : 12.345678 12.35
ong int: 33.5646891 33.56
total int: 45.91
fix int : 24.5647861 24.56
ong int: 21.3443892 21.34
total int: 45.90
the fix interest is store into database so i cannot change that field variable to DECIMAL(21,10), because it will make other value wrong also.
i m still a training student, i wish have some one can elp me solve this problem.
if i store the additional decimal into database field it will change the whole structure for the database.
This is because that field just using some condition to differentiate the value. That is the amount
field. It have many type of amount, for example invoice amount, fix interest amount, discount amount,.........
if want to get the invoice amount
WHERE rt_class_cde = "S"
if want to get the fix interest amount
WHERE rt_class_cde = "A"
if want to get the discount amount
WHERE rt_class_cde = "D"
The ra_amt from artran table also have related to many field in other table, if i just increase the decimal places it will need to change other interelated table also. Actually that field can say is one of the most important field in the table. Many programs in our server also directly get this amt to perform some calculation or directly gt that value to print out the receipt or invoice for customer, so if i just increase the decimal place, the value will print out 12.234252 dollar on the invoice or receipt, but not 12.23 dollar.
In our server got >400 programs have using this amt field. if like that i also need to change >400 programs. Change is easy, but testing is very waste time. My supervisor already ban this suggestion propose by me, he say it is unrealistic.
but u all have more easy way to solve it or not?
(Sorry for my Eng) I ask a beau to see if it's veritable he said it is, uninterrupted a collage professor i met said so. It's in virtue carve, even-handed the top formerly larboard scrap is kinda scratched.
How much do you about it's worth? picture of coin is here: http://coindad.com/coin/Cent_1803_F.jpg"