Fix for Bug#1664268 - Charge amount does not default

This commit is contained in:
croo 2007-02-20 14:54:58 +00:00
parent 76d6178c81
commit 1eecb3f138
1 changed files with 2 additions and 1 deletions

View File

@ -983,7 +983,8 @@ public class CalloutOrder extends CalloutEngine
// Discount entered - Calculate Actual/Entered
if (mField.getColumnName().equals("Discount"))
{
PriceActual = new BigDecimal ((100.0 - Discount.doubleValue()) / 100.0 * PriceList.doubleValue());
if ( PriceList.doubleValue() != 0 )
PriceActual = new BigDecimal ((100.0 - Discount.doubleValue()) / 100.0 * PriceList.doubleValue());
if (PriceActual.scale() > StdPrecision)
PriceActual = PriceActual.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
PriceEntered = MUOMConversion.convertProductFrom (ctx, M_Product_ID,