Hi,
I have a problem in Java...Problem was...
We have created one website called "STATS" in that website the user need to enter the Qty,Price,Date to confirm their Purchase Orders.After confirming their orders the price gets round up automatically.. .
For Ex :Price: 4.10 for 1 Item Qty : 40
3.06 for 2nd item Qty : 30
14.82 for 3rd Item Qty : 20
2.67 for 4th Item Qty : 20
383.44 for 5th Item Qty : 1
When the user enters the above information and select "Confirm" button ,,,then Subtotal, GST, TotalAmount will be calculated automatically.
All the details will store in 2 SQL Tables...,,,All the price information will store in Details table..
But now the prob was: if i give the above price and qty Subtotal will be 988.89,,GST will be 49.44,,Total Price will be 1038.33..
But when i calculate with calculator the exact price must be as : Sub total : 989.04,,GST : 49.45,,,TotalPr ice : 1038.49...
Why the Java compiler is rounding the value..can we solve this problem.???
We are using Java Platform/2003 Os/JDK 1.3 version and the Database SQL 2000 Developer Edition,,and also JRUN 3.0..
please help on this>..
Kalyani
I have a problem in Java...Problem was...
We have created one website called "STATS" in that website the user need to enter the Qty,Price,Date to confirm their Purchase Orders.After confirming their orders the price gets round up automatically.. .
For Ex :Price: 4.10 for 1 Item Qty : 40
3.06 for 2nd item Qty : 30
14.82 for 3rd Item Qty : 20
2.67 for 4th Item Qty : 20
383.44 for 5th Item Qty : 1
When the user enters the above information and select "Confirm" button ,,,then Subtotal, GST, TotalAmount will be calculated automatically.
All the details will store in 2 SQL Tables...,,,All the price information will store in Details table..
But now the prob was: if i give the above price and qty Subtotal will be 988.89,,GST will be 49.44,,Total Price will be 1038.33..
But when i calculate with calculator the exact price must be as : Sub total : 989.04,,GST : 49.45,,,TotalPr ice : 1038.49...
Why the Java compiler is rounding the value..can we solve this problem.???
We are using Java Platform/2003 Os/JDK 1.3 version and the Database SQL 2000 Developer Edition,,and also JRUN 3.0..
please help on this>..
Kalyani
Comment