You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2007/04/17 09:50:45 UTC
svn commit: r529522 - in /ofbiz/trunk/applications:
accounting/src/org/ofbiz/accounting/agreement/
accounting/src/org/ofbiz/accounting/invoice/
accounting/src/org/ofbiz/accounting/payment/
accounting/src/org/ofbiz/accounting/tax/ manufacturing/src/org/...
Author: lektran
Date: Tue Apr 17 00:50:42 2007
New Revision: 529522
URL: http://svn.apache.org/viewvc?view=rev&rev=529522
Log:
Fixed a pile of bigDecimal.setScale() calls which should be bigDecimal = bigDecimal.setScale()
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java?view=diff&rev=529522&r1=529521&r2=529522
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java Tue Apr 17 00:50:42 2007
@@ -56,7 +56,7 @@
rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
// set zero to the proper scale
- if (decimals != -1) ZERO.setScale(decimals, rounding);
+ if (decimals != -1) ZERO = ZERO.setScale(decimals, rounding);
}
public static final String resource = "AccountingUiLabels";
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?view=diff&rev=529522&r1=529521&r2=529522
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Tue Apr 17 00:50:42 2007
@@ -1961,7 +1961,7 @@
}
}
- amount.setScale(decimals, rounding);
+ amount = amount.setScale(decimals, rounding);
adjAmount = amount;
}
else if (adj.get("sourcePercentage") != null) {
@@ -2019,7 +2019,7 @@
}
}
- amount.setScale(decimals, rounding);
+ amount = amount.setScale(decimals, rounding);
adjAmount = amount;
}
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java?view=diff&rev=529522&r1=529521&r2=529522
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java Tue Apr 17 00:50:42 2007
@@ -59,7 +59,7 @@
rounding = UtilNumber.getBigDecimalRoundingMode("order.rounding");
// set zero to the proper scale
- if (decimals != -1) ZERO.setScale(decimals);
+ if (decimals != -1) ZERO = ZERO.setScale(decimals);
}
public static List makePartyBillingAccountList(GenericValue userLogin, String currencyUomId, String partyId, GenericDelegator delegator, LocalDispatcher dispatcher) throws GeneralException {
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?view=diff&rev=529522&r1=529521&r2=529522
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Tue Apr 17 00:50:42 2007
@@ -76,7 +76,7 @@
rounding = UtilNumber.getBigDecimalRoundingMode("order.rounding");
// set zero to the proper scale
- if (decimals != -1) ZERO.setScale(decimals);
+ if (decimals != -1) ZERO = ZERO.setScale(decimals);
}
/**
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?view=diff&rev=529522&r1=529521&r2=529522
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java Tue Apr 17 00:50:42 2007
@@ -122,8 +122,8 @@
}
// round to 2 decimal places for display/etc
- taxTotal.setScale(salestaxFinalDecimals, salestaxRounding);
- priceWithTax.setScale(salestaxFinalDecimals, salestaxRounding);
+ taxTotal = taxTotal.setScale(salestaxFinalDecimals, salestaxRounding);
+ priceWithTax = priceWithTax.setScale(salestaxFinalDecimals, salestaxRounding);
Map result = ServiceUtil.returnSuccess();
result.put("taxTotal", taxTotal);
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?view=diff&rev=529522&r1=529521&r2=529522
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Tue Apr 17 00:50:42 2007
@@ -69,8 +69,8 @@
decimals = UtilNumber.getBigDecimalScale("order.decimals");
rounding = UtilNumber.getBigDecimalRoundingMode("order.rounding");
// set zero to the proper scale
- ZERO.setScale(decimals);
- ONE.setScale(decimals);
+ ZERO = ZERO.setScale(decimals);
+ ONE = ONE.setScale(decimals);
}
/**
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?view=diff&rev=529522&r1=529521&r2=529522
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Tue Apr 17 00:50:42 2007
@@ -962,7 +962,7 @@
}
if (product != null) {
if (ProductWorker.shippingApplies(product)) {
- shippableQuantity =shippableQuantity.add(getOrderItemQuantityBd(item)).setScale(scale, rounding);
+ shippableQuantity = shippableQuantity.add(getOrderItemQuantityBd(item)).setScale(scale, rounding);
}
}
}
@@ -2169,7 +2169,7 @@
for (int i = 0; i < orderItems.size(); i++) {
GenericValue oi = (GenericValue) orderItems.get(i);
- totalItems =totalItems.add(oi.getBigDecimal("quantity")).setScale(scale, rounding);
+ totalItems = totalItems.add(oi.getBigDecimal("quantity")).setScale(scale, rounding);
}
return totalItems;
}
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?view=diff&rev=529522&r1=529521&r2=529522
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Tue Apr 17 00:50:42 2007
@@ -75,7 +75,7 @@
rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
// set zero to the proper scale
- if (decimals != -1) ZERO.setScale(decimals);
+ if (decimals != -1) ZERO = ZERO.setScale(decimals);
}
// locate the return item's initial inventory item cost