svn commit: r731851 [5/22] - in /ofbiz/trunk: applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/accounting/script/org/ofbiz/accounting/fixedasset/ applications/accounting/script/org/ofbiz/ac...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r731851 [5/22] - in /ofbiz/trunk: applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/accounting/script/org/ofbiz/accounting/fixedasset/ applications/accounting/script/org/ofbiz/ac...

jonesde
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java Mon Jan  5 23:13:36 2009
@@ -19,6 +19,7 @@
 package org.ofbiz.accounting.thirdparty.verisign;
 
 import java.util.*;
+import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.io.UnsupportedEncodingException;
 
@@ -52,7 +53,7 @@
         GenericValue authTrans = (GenericValue) context.get("authTrans");
         String orderId = (String) context.get("orderId");
         String cvv2 = (String) context.get("cardSecurityCode");
-        Double processAmount = (Double) context.get("processAmount");
+        BigDecimal processAmount = (BigDecimal) context.get("processAmount");
         GenericValue party = (GenericValue) context.get("billToParty");
         GenericValue cc = (GenericValue) context.get("creditCard");
         GenericValue ps = (GenericValue) context.get("billingAddress");
@@ -153,7 +154,7 @@
     public static Map ccCapture(DispatchContext dctx, Map context) {
         GenericValue paymentPref = (GenericValue) context.get("orderPaymentPreference");
         GenericValue authTrans = (GenericValue) context.get("authTrans");
-        Double amount = (Double) context.get("captureAmount");
+        BigDecimal amount = (BigDecimal) context.get("captureAmount");
         String configString = (String) context.get("paymentConfig");
         if (configString == null) {
             configString = "payment.properties";
@@ -216,7 +217,7 @@
     public static Map ccVoid(DispatchContext dctx, Map context) {
         GenericValue paymentPref = (GenericValue) context.get("orderPaymentPreference");
         GenericValue authTrans = (GenericValue) context.get("authTrans");
-        Double amount = (Double) context.get("releaseAmount");
+        BigDecimal amount = (BigDecimal) context.get("releaseAmount");
         String configString = (String) context.get("paymentConfig");
         if (configString == null) {
             configString = "payment.properties";
@@ -278,7 +279,7 @@
 
     public static Map ccRefund(DispatchContext dctx, Map context) {
         GenericValue paymentPref = (GenericValue) context.get("orderPaymentPreference");
-        Double amount = (Double) context.get("refundAmount");
+        BigDecimal amount = (BigDecimal) context.get("refundAmount");
         String configString = (String) context.get("paymentConfig");
         if (configString == null) {
             configString = "payment.properties";

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java Mon Jan  5 23:13:36 2009
@@ -19,6 +19,7 @@
 package org.ofbiz.accounting.thirdparty.worldpay;
 
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
@@ -35,6 +36,7 @@
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.webapp.view.JPublishWrapper;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
@@ -128,10 +130,10 @@
         }
         
         // the order total MUST match the auth amount or we do not process
-        Double wpTotal = new Double(authAmount);
-        Double orderTotal = orderHeader != null ? orderHeader.getDouble("grandTotal") : null;
+        BigDecimal wpTotal = new BigDecimal(authAmount);
+        BigDecimal orderTotal = orderHeader.getBigDecimal("grandTotal");
         if (orderTotal != null && wpTotal != null) {
-            if (orderTotal.doubleValue() != wpTotal.doubleValue()) {
+            if (orderTotal.compareTo(wpTotal) != 0) {
                 Debug.logError("AuthAmount (" + wpTotal + ") does not match OrderTotal (" + orderTotal + ")", module);
                 callError(request);
             }                
@@ -258,7 +260,7 @@
         paymentPreference.set("authDate", authDate);
         paymentPreference.set("authFlag", transStatus);
         paymentPreference.set("authMessage", rawAuthMessage);
-        paymentPreference.set("maxAmount", new Double(authAmount));
+        paymentPreference.set("maxAmount", new BigDecimal(authAmount));
         
         // create a payment record too -- this method does not store the object so we must here
         Map results = null;

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java Mon Jan  5 23:13:36 2009
@@ -19,6 +19,7 @@
 
 package org.ofbiz.accounting.util;
 
+import java.math.BigDecimal;
 import java.util.Iterator;
 import java.util.List;
 
@@ -95,9 +96,9 @@
      * Little method to figure out the net or ending balance of a GlAccountHistory or GlAccountAndHistory value, based on what kind
      * of account (DEBIT or CREDIT) it is
      * @param account - GlAccountHistory or GlAccountAndHistory value
-     * @return balance - a Double
+     * @return balance - a BigDecimal
      */
-    public static Double getNetBalance(GenericValue account, String debugModule) {
+    public static BigDecimal getNetBalance(GenericValue account, String debugModule) {
         try {
             return getNetBalance(account);
         } catch (GenericEntityException ex) {
@@ -105,15 +106,15 @@
             return null;
         }
     }
-    public static Double getNetBalance(GenericValue account) throws GenericEntityException {
+    public static BigDecimal getNetBalance(GenericValue account) throws GenericEntityException {
         GenericValue glAccount = account.getRelatedOne("GlAccount");
-        double balance = 0.0;
+        BigDecimal balance = BigDecimal.ZERO;
         if (isDebitAccount(glAccount)) {
-            balance = account.getDouble("postedDebits").doubleValue() - account.getDouble("postedCredits").doubleValue();
+            balance = account.getBigDecimal("postedDebits").subtract(account.getBigDecimal("postedCredits"));
         } else if (isCreditAccount(glAccount)) {
-            balance = account.getDouble("postedCredits").doubleValue() - account.getDouble("postedDebits").doubleValue();
+            balance = account.getBigDecimal("postedCredits").subtract(account.getBigDecimal("postedDebits"));
         }
-        return new Double(balance);    
+        return balance;    
     }
 
     public static List getDescendantGlAccountClassIds(GenericValue glAccountClass) throws GenericEntityException {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy Mon Jan  5 23:13:36 2009
@@ -38,7 +38,7 @@
     itemmap = [:];
     itemmap.invoiceId = invoiceAppl.invoiceId;
     itemmap.invoiceItemSeqId = invoiceAppl.invoiceItemSeqId;
-    itemmap.total = InvoiceWorker.getInvoiceTotalBd(invoice).doubleValue();
+    itemmap.total = InvoiceWorker.getInvoiceTotal(invoice);
     itemmap.paymentApplicationId = invoiceAppl.paymentApplicationId;
     itemmap.paymentId = invoiceAppl.paymentId;
     itemmap.billingAccountId = invoiceAppl.billingAccountId;

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy Mon Jan  5 23:13:36 2009
@@ -51,17 +51,17 @@
  invoiceItems = invoice.getRelatedOrderBy("InvoiceItem", ["invoiceItemSeqId"]);
     invoiceItemsConv = FastList.newInstance();
     invoiceItems.each { invoiceItem ->
-      invoiceItem.amount = new Double((invoiceItem.getBigDecimal("amount").multiply(conversionRate).setScale(decimals, rounding)).doubleValue());
+      invoiceItem.amount = invoiceItem.getBigDecimal("amount").multiply(conversionRate).setScale(decimals, rounding);
       invoiceItemsConv.add(invoiceItem);
     }
     
 
     context.invoiceItems = invoiceItemsConv;
     
-    invoiceTotal = InvoiceWorker.getInvoiceTotalBd(invoice).multiply(conversionRate).setScale(decimals, rounding).doubleValue();
-    invoiceNoTaxTotal = InvoiceWorker.getInvoiceNoTaxTotalBd(invoice).multiply(conversionRate).setScale(decimals, rounding).doubleValue();
-    context.invoiceTotal = new Double(invoiceTotal);    
-    context.invoiceNoTaxTotal = new Double(invoiceNoTaxTotal);
+    invoiceTotal = InvoiceWorker.getInvoiceTotal(invoice).multiply(conversionRate).setScale(decimals, rounding);
+    invoiceNoTaxTotal = InvoiceWorker.getInvoiceNoTaxTotal(invoice).multiply(conversionRate).setScale(decimals, rounding);
+    context.invoiceTotal = invoiceTotal;    
+    context.invoiceNoTaxTotal = invoiceNoTaxTotal;
     
     // each invoice of course has two billing addresses, but the one that is relevant for purchase invoices is the PAYMENT_LOCATION of the invoice
     // (ie Accounts Payable address for the supplier), while the right one for sales invoices is the BILLING_LOCATION (ie Accounts Receivable or

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy Mon Jan  5 23:13:36 2009
@@ -59,12 +59,12 @@
 List getPayments(List payments, boolean actual) {
  if (payments)    {
  paymentList = [];  // to pass back to the screeen list of unapplied payments
- invoiceApplied = InvoiceWorker.getInvoiceAppliedBd(invoice);
- invoiceAmount = InvoiceWorker.getInvoiceTotalBd(invoice);
+ invoiceApplied = InvoiceWorker.getInvoiceApplied(invoice);
+ invoiceAmount = InvoiceWorker.getInvoiceTotal(invoice);
  invoiceToApply = InvoiceWorker.getInvoiceNotApplied(invoice);
  payments.each { payment ->
  paymentMap = [:];
-            paymentApplied = PaymentWorker.getPaymentAppliedBd(payment, true);
+            paymentApplied = PaymentWorker.getPaymentApplied(payment, true);
  if (actual) {
  paymentMap.amount = payment.actualCurrencyAmount;
  paymentMap.currencyUomId = payment.actualCurrencyUomId;

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy Mon Jan  5 23:13:36 2009
@@ -63,14 +63,14 @@
 List getInvoices(List invoices, boolean actual) {
  if (invoices) {
  invoicesList = [];  // to pass back to the screeen list of unapplied invoices
- paymentApplied = PaymentWorker.getPaymentAppliedBd(payment);
+ paymentApplied = PaymentWorker.getPaymentApplied(payment);
  paymentToApply = payment.getBigDecimal("amount").setScale(decimals,rounding).subtract(paymentApplied);
  if (actual) {
  paymentToApply = payment.getBigDecimal("actualCurrencyAmount").setScale(decimals,rounding).subtract(paymentApplied);
  }
  invoices.each { invoice ->
- invoiceAmount = InvoiceWorker.getInvoiceTotalBd(invoice).setScale(decimals,rounding);
- invoiceApplied = InvoiceWorker.getInvoiceAppliedBd(invoice).setScale(decimals,rounding);
+ invoiceAmount = InvoiceWorker.getInvoiceTotal(invoice).setScale(decimals,rounding);
+ invoiceApplied = InvoiceWorker.getInvoiceApplied(invoice).setScale(decimals,rounding);
  invoiceToApply = invoiceAmount.subtract(invoiceApplied);
          if (invoiceToApply.signum() == 1) {
          invoiceMap = [:];

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy Mon Jan  5 23:13:36 2009
@@ -65,11 +65,11 @@
 payments = delegator.findList("Payment", topCond, null, ["effectiveDate"], null, false);
 
 if (payments)    {
-    basePaymentApplied = PaymentWorker.getPaymentAppliedBd(basePayment);
+    basePaymentApplied = PaymentWorker.getPaymentApplied(basePayment);
     basePaymentAmount = basePayment.getBigDecimal("amount");
     basePaymentToApply = basePaymentAmount.subtract(basePaymentApplied);
     payments.each { payment ->
-        if (PaymentWorker.getPaymentNotAppliedBd(payment).signum() == 1) {  // positiv not applied amount?
+        if (PaymentWorker.getPaymentNotApplied(payment).signum() == 1) {  // positiv not applied amount?
            // yes, put in the map
            paymentMap = [:];
            paymentMap.paymentId = basePaymentId;
@@ -77,8 +77,8 @@
            paymentMap.currencyUomId = payment.currencyUomId;
            paymentMap.effectiveDate = payment.effectiveDate.toString().substring(0,10); // list as YYYY-MM-DD
            paymentMap.amount = payment.getBigDecimal("amount");
-           paymentMap.amountApplied = PaymentWorker.getPaymentAppliedBd(payment);
-           paymentToApply = PaymentWorker.getPaymentNotAppliedBd(payment);
+           paymentMap.amountApplied = PaymentWorker.getPaymentApplied(payment);
+           paymentToApply = PaymentWorker.getPaymentNotApplied(payment);
            if (paymentToApply.compareTo(basePaymentToApply) < 0 ) {
                 paymentMap.amountToApply = paymentToApply;
            } else {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy Mon Jan  5 23:13:36 2009
@@ -49,11 +49,11 @@
         postedMap = FastMap.newInstance();
         postedMap.glAccountId = value.glAccountId;
         if ("C".equals(value.debitCreditFlag)) {
-            postedMap.credit = value.getDouble("totalAmount");
-            postedMap.debit = new Double(0.0);
+            postedMap.credit = value.getBigDecimal("totalAmount");
+            postedMap.debit = BigDecimal.ZERO;
         } else {
-            postedMap.credit = new Double(0.0);
-            postedMap.debit = value.getDouble("totalAmount");
+            postedMap.credit = BigDecimal.ZERO;
+            postedMap.debit = value.getBigDecimal("totalAmount");
         }
         postedTransTotalList.add(postedMap);
     }
@@ -71,11 +71,11 @@
         Map unpostedMap = FastMap.newInstance();
         unpostedMap.glAccountId = value.glAccountId;
         if ("C".equals(value.debitCreditFlag)) {
-            unpostedMap.credit = value.getDouble("totalAmount");
-            unpostedMap.debit = new Double(0.0);
+            unpostedMap.credit = value.getBigDecimal("totalAmount");
+            unpostedMap.debit = BigDecimal.ZERO;
         } else {
-            unpostedMap.credit = new Double(0.0);
-            unpostedMap.debit = value.getDouble("totalAmount");
+            unpostedMap.credit = BigDecimal.ZERO;
+            unpostedMap.debit = value.getBigDecimal("totalAmount");
         }
         unpostedTransTotalList.add(unpostedMap);
     }

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy Mon Jan  5 23:13:36 2009
@@ -33,7 +33,7 @@
 if(orderHeader) {
    orh = new OrderReadHelper(orderHeader);
    context.orh = orh;
-   context.overrideAmount = new Double(orh.getOrderGrandTotal().doubleValue());
+   context.overrideAmount = orh.getOrderGrandTotal();
 }
 
 if(orderPaymentPreferenceId) {
@@ -44,5 +44,5 @@
 if(orderPaymentPreference) {
    paymentMethodType = orderPaymentPreference.getRelatedOneCache("PaymentMethodType");
    context.paymentMethodType = paymentMethodType;
-   context.overrideAmount = orderPaymentPreference.getDouble("maxAmount");
+   context.overrideAmount = orderPaymentPreference.getBigDecimal("maxAmount");
 }

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy Mon Jan  5 23:13:36 2009
@@ -54,7 +54,7 @@
 
     if (gatewayResponses) {
         latestAuth = gatewayResponses[0];
-        context.captureAmount = latestAuth.getDouble("amount");
+        context.captureAmount = latestAuth.getBigDecimal("amount");
     } else {
         // todo: some kind of error telling user to re-authorize
     }

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml Mon Jan  5 23:13:36 2009
@@ -92,7 +92,7 @@
         <actions>
             <set field="total" value="${bsh:
                 import java.text.NumberFormat;
-                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(invoice)));}"/>
+                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)));}"/>
             <service service-name="getPartyNameForDate" result-map-name="partyNameResultFrom">
                 <field-map field-name="partyId" env-name="invoice.partyIdFrom"/>
                 <field-map field-name="compareDate" env-name="invoice.invoiceDate"/>
@@ -125,9 +125,10 @@
         <row-actions>
             <set field="total" value="${bsh:
                 import java.text.NumberFormat;
-                if(quantity==null) quantity = 1;
-                if(amount==null) amount = 0;
-                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(quantity*amount));}"/>
+                import java.math.BigDecimal;
+                if(quantity==null) quantity = BigDecimal.ONE;
+                if(amount==null) amount = BigDecimal.ZERO;
+                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(quantity.multiply(amount)));}"/>
         </row-actions>
         <auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/>
         <field name="invoiceId"><hidden/></field>
@@ -298,8 +299,9 @@
        <row-actions>
            <set field="total" value="${bsh:
                import java.text.NumberFormat;
-               if(quantity==null||quantity==0) quantity = 1;
-               return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(quantity*amount));}"/>
+               import java.math.BigDecimal;
+               if(quantity == null || quantity.compareTo(BigDecimal.ZERO) == 0) quantity = BigDecimal.ONE;
+               return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(quantity.multiply(amount)));}"/>
        </row-actions>
        <field name="invoiceId"><hidden/></field>
        <field name="invoiceItemSeqId" widget-style="buttontext"><hyperlink target="listInvoiceItems?invoiceId=${invoiceId}&amp;invoiceItemSeqId=${invoiceItemSeqId}" description="${invoiceItemSeqId}"/></field>

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl Mon Jan  5 23:13:36 2009
@@ -132,7 +132,7 @@
                         <fo:block> <#if invoiceItem.quantity?exists><@ofbizCurrency amount=invoiceItem.amount?if_exists isoCode=invoice.currencyUomId?if_exists/></#if> </fo:block>              
                     </fo:table-cell>
                     <fo:table-cell text-align="right">
-                        <fo:block> <#if invoiceItem.quantity?exists><@ofbizCurrency amount=(invoiceItem.quantity?double * invoiceItem.amount?double) isoCode=invoice.currencyUomId?if_exists/><#else><@ofbizCurrency amount=(invoiceItem.amount?double) isoCode=invoice.currencyUomId?if_exists/></#if> </fo:block>              
+                        <fo:block> <@ofbizCurrency amount=(Static["org.ofbiz.accounting.invoice.InvoiceWorker"].getInvoiceItemTotal(invoiceItem)) isoCode=invoice.currencyUomId?if_exists/> </fo:block>              
                     </fo:table-cell>
                 </fo:table-row>
         </#list>

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml Mon Jan  5 23:13:36 2009
@@ -57,7 +57,7 @@
             </service>
         </actions>
         <row-actions>
-            <set field="amountToApply" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(delegator,paymentId);}"/>
+            <set field="amountToApply" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(delegator,paymentId);}"/>
         </row-actions>
         <field name="paymentId" widget-style="buttontext">
             <hyperlink description="${paymentId}" target="paymentOverview?paymentId=${paymentId}"/>

Modified: ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml Mon Jan  5 23:13:36 2009
@@ -76,7 +76,7 @@
                 return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)));}"/>
             <set field="total" value="${bsh:
                 import java.text.NumberFormat;
-                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)));}"/>
+                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)));}"/>
         </row-actions>
         <field name="billingAccountId"><hidden/></field>
         <field name="invoiceId" widget-style="buttontext">

Modified: ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml Mon Jan  5 23:13:36 2009
@@ -212,9 +212,9 @@
                 </entity-and>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy"/>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy"/>
-                <set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(invoice)}" type="BigDecimal"/>
+                <set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
                 <set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
-                <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceAppliedBd(invoice)}" type="BigDecimal"/>
+                <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
@@ -336,9 +336,9 @@
                 <entity-one entity-name="Invoice" value-name="invoice"/>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy"/>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy"/>
-                <set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(invoice)}" type="BigDecimal"/>
+                <set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
                 <set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
-                <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceAppliedBd(invoice)}" type="BigDecimal"/>
+                <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">

Modified: ofbiz/trunk/applications/accounting/widget/PaymentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/PaymentScreens.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/PaymentScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/PaymentScreens.xml Mon Jan  5 23:13:36 2009
@@ -138,11 +138,11 @@
                 <entity-one entity-name="Payment" value-name="payment"/>
                 <set field="appliedAmount" type="String" value="${bsh:
                     import java.text.NumberFormat;
-                    return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.payment.PaymentWorker.getPaymentAppliedBd(payment)));}"/>
-                <set field="notAppliedAmount" type="BigDecimal" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(payment)}"/>
+                    return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.payment.PaymentWorker.getPaymentApplied(payment)));}"/>
+                <set field="notAppliedAmount" type="BigDecimal" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(payment)}"/>
                 <set field="notAppliedAmountStr" type="String" value="${bsh:
                     import java.text.NumberFormat;
-                    return(NumberFormat.getCurrencyInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(payment)));}"/>
+                    return(NumberFormat.getCurrencyInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(payment)));}"/>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy"/>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy"/>
                 <entity-one entity-name="PartyNameView" value-name="partyNameViewTo">
@@ -316,8 +316,8 @@
                 <set field="labelTitleProperty" value="PageTitlePaymentOverview"/>
                 <set field="paymentId" from-field="parameters.paymentId"/>
                 <entity-one entity-name="Payment" value-name="payment"/>
-                <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentAppliedBd(payment).toString()}"/>
-                <set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(payment).toString()}"/>
+                <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentApplied(payment).toString()}"/>
+                <set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(payment).toString()}"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonPaymentDecorator" location="${parameters.mainDecoratorLocation}">

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Mon Jan  5 23:13:36 2009
@@ -81,12 +81,12 @@
             </entity-one>
             <set field="showDebit" value="${bsh:(postedBalance &gt;= 0 &amp;&amp; org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount)) || (postedBalance &lt; 0 &amp;&amp; org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount))}" type="Boolean"/>
             <set field="showCredit" value="${bsh:(postedBalance &gt;= 0 &amp;&amp; org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount)) || (postedBalance &lt; 0 &amp;&amp; org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount))}" type="Boolean"/>
-            <set field="absolutePostedBalance" value="${bsh:(postedBalance &gt;= 0? postedBalance: (-1)*postedBalance)}" type="BigDecimal"/>
+            <set field="absolutePostedBalance" value="${bsh:(postedBalance.abs())}" type="BigDecimal"/>
             <set field="showTotals" value="${bsh:(isLastRow != null &amp;&amp; isLastRow==true)}" type="Boolean"/>
-            <set field="debitTotal" from-field="parameters.debitTotal" type="Double"/>
-            <set field="creditTotal" from-field="parameters.creditTotal" type="Double"/>
-            <set field="parameters.debitTotal" value="${bsh:(showDebit? (debitTotal + absolutePostedBalance): (debitTotal))}" type="BigDecimal"/>
-            <set field="parameters.creditTotal" value="${bsh:(showCredit? (creditTotal + absolutePostedBalance): (creditTotal))}" type="BigDecimal"/>
+            <set field="debitTotal" from-field="parameters.debitTotal" type="BigDecimal"/>
+            <set field="creditTotal" from-field="parameters.creditTotal" type="BigDecimal"/>
+            <set field="parameters.debitTotal" value="${bsh:(showDebit ? (debitTotal.add(absolutePostedBalance)) : (debitTotal))}" type="BigDecimal"/>
+            <set field="parameters.creditTotal" value="${bsh:(showCredit ? (creditTotal.add(absolutePostedBalance)) : (creditTotal))}" type="BigDecimal"/>
         </row-actions>
         <field name="glAccountId" use-when="!showTotals">
             <hyperlink target="FindAcctgTransEntries?glAccountId=${glAccountId}&amp;organizationPartyId=${organizationPartyId}" description="[${glAccountId}] [${glAccount.accountCode}] ${glAccount.accountName}"/>

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Mon Jan  5 23:13:36 2009
@@ -293,10 +293,10 @@
                     <order-by field-name="glAccountId"/>
                 </entity-condition>
                 <set field="totalsRow.isLastRow" value="true" type="Boolean"/>
-                <set field="totalsRow.postedBalance" value="0" type="Double"/>
+                <set field="totalsRow.postedBalance" value="0" type="BigDecimal"/>
                 <set field="trialBalances[]" from-field="totalsRow" type="Object"/>
-                <set field="parameters.debitTotal" value="0" type="Double"/>
-                <set field="parameters.creditTotal" value="0" type="Double"/>
+                <set field="parameters.debitTotal" value="0" type="BigDecimal"/>
+                <set field="parameters.creditTotal" value="0" type="BigDecimal"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}">

Modified: ofbiz/trunk/applications/accounting/widget/ap/forms/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ap/forms/InvoiceForms.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ap/forms/InvoiceForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ap/forms/InvoiceForms.xml Mon Jan  5 23:13:36 2009
@@ -48,7 +48,7 @@
                 return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)));}"/>
             <set field="total" value="${bsh:
                 import java.text.NumberFormat;
-                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)));}"/>
+                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)));}"/>
         </row-actions>
         <field name="invoiceId" widget-style="buttontext">
             <hyperlink description="${invoiceId}" target="invoiceOverview?invoiceId=${invoiceId}"/>

Modified: ofbiz/trunk/applications/accounting/widget/ar/forms/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/forms/InvoiceForms.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ar/forms/InvoiceForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ar/forms/InvoiceForms.xml Mon Jan  5 23:13:36 2009
@@ -49,7 +49,7 @@
                 return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)));}"/>
             <set field="total" value="${bsh:
                 import java.text.NumberFormat;
-                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)));}"/>
+                return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)));}"/>
         </row-actions>
         <field name="invoiceId" widget-style="buttontext">
             <hyperlink description="${invoiceId}" target="invoiceOverview?invoiceId=${invoiceId}"/>

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Mon Jan  5 23:13:36 2009
@@ -980,18 +980,15 @@
         <log level="info" message="textDataLen:${textDataLen}"/>
         <property-to-field resource="forum" property="descriptLen" field="descriptLen" />
         <log level="info" message="descriptLen:${descriptLen}"/>
-        <set field="dblTextDataLen" from-field="textDataLen" type="Double"/>
-        <set field="dblDescriptLen" from-field="descriptLen" type="Double"/>
         <call-class-method method-name="min" class-name="java.lang.Math" ret-field="subStringLen">
-            <field field="dblTextDataLen" type="double"/>
-            <field field="dblDescriptLen" type="double"/>
+            <field field="textDataLen" type="int"/>
+            <field field="descriptLen" type="int"/>
         </call-class-method>
-        <set field="intSubStringLen" from-field="subStringLen" type="Integer"/>
         <log level="info" message="subStringLen:${subStringLen}"/>
         <set field="zeroValue" value="0" type="Integer"/>
         <call-object-method method-name="substring" obj-field="parameters.textData" ret-field="subDescript">
             <field field="zeroValue" type="int"/>
-            <field field="intSubStringLen" type="int"/>
+            <field field="subStringLen" type="int"/>
         </call-object-method>
         <log level="info" message="subDescript:${subDescript}"/>
         <if-compare operator="equals" field="contentAssocTypeId" value="PUBLISH_LINK">

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml Mon Jan  5 23:13:36 2009
@@ -703,7 +703,7 @@
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
             <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_CURRENCY">
-                <set field="responseAnswer.currencyResponse" from-field="answers.${currentFieldName}" type="Double"/>
+                <set field="responseAnswer.currencyResponse" from-field="answers.${currentFieldName}" type="BigDecimal"/>
             </if-compare>
             <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_FLOAT">
                 <set field="responseAnswer.floatResponse" from-field="answers.${currentFieldName}" type="Double"/>

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Mon Jan  5 23:13:36 2009
@@ -18,6 +18,7 @@
  *******************************************************************************/
 package org.ofbiz.content;
 
+import java.math.BigDecimal;
 import java.nio.ByteBuffer;
 import java.sql.Timestamp;
 import java.util.Calendar;
@@ -1610,7 +1611,7 @@
                 ModelService subscriptionModel = dispatcher.getDispatchContext().getModelService("updateContentSubscriptionByProduct");
             while (orderItemIter.hasNext()) {
                 GenericValue orderItem = (GenericValue)orderItemIter.next();  
-                Double qty = (Double) orderItem.get("quantity");
+                BigDecimal qty = orderItem.getBigDecimal("quantity");
                 String productId = (String) orderItem.get("productId");
                 List productContentList = delegator.findByAnd("ProductContent", UtilMisc.toMap("productId", productId, "productContentTypeId", "ONLINE_ACCESS"));
                 List productContentListFiltered = EntityUtil.filterByDate(productContentList);

Modified: ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Mon Jan  5 23:13:36 2009
@@ -1130,18 +1130,18 @@
 
         <call-bsh><![CDATA[
             Map shipCost = org.ofbiz.order.shoppingcart.shipping.ShippingEvents.getShipGroupEstimate(dispatcher, delegator, shoppingCart, 0);
-            Double shippingTotal = (Double) shipCost.get("shippingTotal");
+            shippingTotal = shipCost.get("shippingTotal");
             if (shippingTotal == null) {
-                shippingTotal = new Double(0.00);
+                shippingTotal = 0.00;
             }
-            shoppingCart.setItemShipGroupEstimate(shippingTotal.doubleValue(), 0);
-            parameters.put("shippingTotal", org.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal.doubleValue(), isoCode, locale));
+            shoppingCart.setItemShipGroupEstimate(shippingTotal, 0);
+            parameters.put("shippingTotal", org.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal, isoCode, locale));
 
             checkOutHelper = new org.ofbiz.order.shoppingcart.CheckOutHelper(dispatcher, delegator, shoppingCart);
             // Calculate and add the tax adjustments
             checkOutHelper.calcAndAddTax();
 
-            double salesTax = shoppingCart.getTotalSalesTax();
+            salesTax = shoppingCart.getTotalSalesTax();
             totalSalesTax = org.ofbiz.base.util.UtilFormatOut.formatCurrency(salesTax, isoCode, locale);
             parameters.put("totalSalesTax", totalSalesTax);
 

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy Mon Jan  5 23:13:36 2009
@@ -103,7 +103,7 @@
 context.localOrderReadHelper = orh;
 context.orderShippingTotal = cart.getTotalShipping();
 context.orderTaxTotal = cart.getTotalSalesTax();
-context.orderGrandTotal = new Double(cart.getGrandTotal());
+context.orderGrandTotal = cart.getGrandTotal();
 
 // nuke the event messages
 request.removeAttribute("_EVENT_MESSAGE_");

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl Mon Jan  5 23:13:36 2009
@@ -233,13 +233,13 @@
       <#if totalPrice?exists>
         <div>${uiLabelMap.ProductAggregatedPrice}: <span id='totalPrice' class='basePrice'><@ofbizCurrency amount=totalPrice isoCode=totalPrice.currencyUsed/></span></div>
       <#else>
-      <#if price.competitivePrice?exists && price.price?exists && price.price?double < price.competitivePrice?double>
+      <#if price.competitivePrice?exists && price.price?exists && price.price < price.competitivePrice>
         <div>${uiLabelMap.ProductCompareAtPrice}: <span class='basePrice'><@ofbizCurrency amount=price.competitivePrice isoCode=price.currencyUsed/></span></div>
       </#if>
-      <#if price.listPrice?exists && price.price?exists && price.price?double < price.listPrice?double>
+      <#if price.listPrice?exists && price.price?exists && price.price < price.listPrice>
         <div>${uiLabelMap.ProductListPrice}: <span class='basePrice'><@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed/></span></div>
       </#if>
-      <#if price.listPrice?exists && price.defaultPrice?exists && price.price?exists && price.price?double < price.defaultPrice?double && price.defaultPrice?double < price.listPrice?double>
+      <#if price.listPrice?exists && price.defaultPrice?exists && price.price?exists && price.price < price.defaultPrice && price.defaultPrice < price.listPrice>
         <div>${uiLabelMap.ProductRegularPrice}: <span class='basePrice'><@ofbizCurrency amount=price.defaultPrice isoCode=price.currencyUsed/></span></div>
       </#if>
       <div>
@@ -253,15 +253,15 @@
             ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual?if_exists> from </#if><span class='${priceStyle}'><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span>
         </b>
       </div>
-      <#if price.listPrice?exists && price.price?exists && price.price?double < price.listPrice?double>
-        <#assign priceSaved = price.listPrice?double - price.price?double>
-        <#assign percentSaved = (priceSaved?double / price.listPrice?double) * 100>
+      <#if price.listPrice?exists && price.price?exists && price.price < price.listPrice>
+        <#assign priceSaved = price.listPrice - price.price>
+        <#assign percentSaved = (priceSaved / price.listPrice) * 100>
         <div>${uiLabelMap.OrderSave}: <span class="basePrice"><@ofbizCurrency amount=priceSaved isoCode=price.currencyUsed/> (${percentSaved?int}%)</span></div>
       </#if>
       </#if>
 
       <#-- Included quantities/pieces -->
-      <#if product.quantityIncluded?exists && product.quantityIncluded?double != 0>
+      <#if product.quantityIncluded?exists && product.quantityIncluded != 0>
         <div>${uiLabelMap.OrderIncludes}:
           ${product.quantityIncluded?if_exists}
           ${product.quantityUomId?if_exists}
@@ -610,7 +610,7 @@
   <tr>
     <td colspan="2">
       <div>${uiLabelMap.OrderCustomerReviews}:</div>
-      <#if averageRating?exists && (averageRating?double > 0) && numRatings?exists && (numRatings?double > 1)>
+      <#if averageRating?exists && (averageRating > 0) && numRatings?exists && (numRatings > 1)>
           <div>${uiLabelMap.OrderAverageRating}: ${averageRating} <#if numRatings?exists>(${uiLabelMap.CommonFrom} ${numRatings} ${uiLabelMap.OrderRatings})</#if></div>
       </#if>
     </td>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/productdetail.ftl?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/productdetail.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/productdetail.ftl Mon Jan  5 23:13:36 2009
@@ -315,13 +315,13 @@
               - if price < defaultPrice and defaultPrice < listPrice, show default
               - if isSale show price with salePrice style and print "On Sale!"
       -->
-      <#if price.competitivePrice?exists && price.price?exists && price.price?double < price.competitivePrice?double>
+      <#if price.competitivePrice?exists && price.price?exists && price.price < price.competitivePrice>
         <div>${uiLabelMap.ProductCompareAtPrice}: <span class="basePrice"><@ofbizCurrency amount=price.competitivePrice isoCode=price.currencyUsed/></span></div>
       </#if>
-      <#if price.listPrice?exists && price.price?exists && price.price?double < price.listPrice?double>
+      <#if price.listPrice?exists && price.price?exists && price.price < price.listPrice>
         <div>${uiLabelMap.ProductListPrice}: <span class="basePrice"><@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed/></span></div>
       </#if>
-      <#if price.listPrice?exists && price.defaultPrice?exists && price.price?exists && price.price?double < price.defaultPrice?double && price.defaultPrice?double < price.listPrice?double>
+      <#if price.listPrice?exists && price.defaultPrice?exists && price.price?exists && price.price < price.defaultPrice && price.defaultPrice < price.listPrice>
         <div>${uiLabelMap.ProductRegularPrice}: <span class="basePrice"><@ofbizCurrency amount=price.defaultPrice isoCode=price.currencyUsed/></span></div>
       </#if>
       <#if price.specialPromoPrice?exists>
@@ -343,9 +343,9 @@
              </#if>
          </b>
       </div>
-      <#if price.listPrice?exists && price.price?exists && price.price?double < price.listPrice?double>
-        <#assign priceSaved = price.listPrice?double - price.price?double>
-        <#assign percentSaved = (priceSaved?double / price.listPrice?double) * 100>
+      <#if price.listPrice?exists && price.price?exists && price.price < price.listPrice>
+        <#assign priceSaved = price.listPrice - price.price>
+        <#assign percentSaved = (priceSaved / price.listPrice) * 100>
         <div>${uiLabelMap.OrderSave}: <span class="basePrice"><@ofbizCurrency amount=priceSaved isoCode=price.currencyUsed/> (${percentSaved?int}%)</span></div>
       </#if>
       <#-- show price details ("showPriceDetails" field can be set in the screen definition) -->
@@ -363,32 +363,32 @@
           ${uiLabelMap.OrderPieces}: ${product.piecesIncluded}
         </div>
       </#if>
-      <#if (product.quantityIncluded?exists && product.quantityIncluded?double != 0) || product.quantityUomId?has_content>
+      <#if (product.quantityIncluded?exists && product.quantityIncluded != 0) || product.quantityUomId?has_content>
         <#assign quantityUom = product.getRelatedOneCache("QuantityUom")?if_exists/>
         <div>
           ${uiLabelMap.CommonQuantity}: ${product.quantityIncluded?if_exists} ${((quantityUom.abbreviation)?default(product.quantityUomId))?if_exists}
         </div>
       </#if>
 
-      <#if (product.weight?exists && product.weight?double != 0) || product.weightUomId?has_content>
+      <#if (product.weight?exists && product.weight != 0) || product.weightUomId?has_content>
         <#assign weightUom = product.getRelatedOneCache("WeightUom")?if_exists/>
         <div>
           ${uiLabelMap.CommonWeight}: ${product.weight?if_exists} ${((weightUom.abbreviation)?default(product.weightUomId))?if_exists}
         </div>
       </#if>
-      <#if (product.productHeight?exists && product.productHeight?double != 0) || product.heightUomId?has_content>
+      <#if (product.productHeight?exists && product.productHeight != 0) || product.heightUomId?has_content>
         <#assign heightUom = product.getRelatedOneCache("HeightUom")?if_exists/>
         <div>
           ${uiLabelMap.CommonHeight}: ${product.productHeight?if_exists} ${((heightUom.abbreviation)?default(product.heightUomId))?if_exists}
         </div>
       </#if>
-      <#if (product.productWidth?exists && product.productWidth?double != 0) || product.widthUomId?has_content>
+      <#if (product.productWidth?exists && product.productWidth != 0) || product.widthUomId?has_content>
         <#assign widthUom = product.getRelatedOneCache("WidthUom")?if_exists/>
         <div>
           ${uiLabelMap.CommonWidth}: ${product.productWidth?if_exists} ${((widthUom.abbreviation)?default(product.widthUomId))?if_exists}
         </div>
       </#if>
-      <#if (product.productDepth?exists && product.productDepth?double != 0) || product.depthUomId?has_content>
+      <#if (product.productDepth?exists && product.productDepth != 0) || product.depthUomId?has_content>
         <#assign depthUom = product.getRelatedOneCache("DepthUom")?if_exists/>
         <div>
           ${uiLabelMap.CommonDepth}: ${product.productDepth?if_exists} ${((depthUom.abbreviation)?default(product.depthUomId))?if_exists}
@@ -474,7 +474,7 @@
         <#else>
           <input type="hidden" name="product_id" value="${product.productId}"/>
           <input type="hidden" name="add_product_id" value="${product.productId}"/>
-          <#assign isStoreInventoryNotAvailable = !(Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryAvailable(request, product, 1.0?double))>
+          <#assign isStoreInventoryNotAvailable = !(Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryAvailable(request, product, 1.0))>
           <#assign isStoreInventoryRequired = Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryRequired(request, product)>
           <#if isStoreInventoryNotAvailable>
             <#if isStoreInventoryRequired>
@@ -618,7 +618,7 @@
   <#-- Product Reviews -->
     <div id="reviews">
       <div>${uiLabelMap.OrderCustomerReviews}:</div>
-      <#if averageRating?exists && (averageRating?double > 0) && numRatings?exists && (numRatings?double > 1)>
+      <#if averageRating?exists && (averageRating > 0) && numRatings?exists && (numRatings > 1)>
           <div>${uiLabelMap.OrderAverageRating}: ${averageRating} <#if numRatings?exists>(${uiLabelMap.CommonFrom} ${numRatings} ${uiLabelMap.OrderRatings})</#if></div>
       </#if>
       <tr><td colspan="2"><hr/></td></tr>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/forumPaging.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/forumPaging.ftl?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/forumPaging.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/forumPaging.ftl Mon Jan  5 23:13:36 2009
@@ -25,8 +25,8 @@
     <#assign listSize = forumMessages?size/>
     <#if highIndex gt listSize><#assign highIndex = listSize></#if>
     <div class="product-prevnext">
-      <#assign r = listSize?double / viewSize?double />
-      <#assign viewIndexMax = Static["java.lang.Math"].ceil(r?double)>
+      <#assign r = listSize / viewSize />
+      <#assign viewIndexMax = Static["java.lang.Math"].ceil(r)>
       <select name="pageSelect" class="selectBox" onchange="window.location=this[this.selectedIndex].value;">
         <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int+1} ${uiLabelMap.CommonOf} ${viewIndexMax}</option>
         <#list 1..viewIndexMax as curViewNum>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/makebogodata.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/makebogodata.jsp?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/makebogodata.jsp (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/makebogodata.jsp Mon Jan  5 23:13:36 2009
@@ -22,6 +22,7 @@
 <%@ page import="org.ofbiz.entity.*" %>
 <%@ page import="org.ofbiz.base.util.*" %>
 <%@ page import="java.util.*" %>
+<%@ page import="java.math.BigDecimal" %>
 
 <jsp:useBean id="delegator" type="org.ofbiz.entity.GenericDelegator" scope="request" />
 
@@ -59,7 +60,7 @@
           int wordNum = (int)(Math.random()*(longWordBag.length-1));
           longDesc += (" " + longWordBag[wordNum]);
         }
-        Double price = new Double(2.99 + prod);
+        BigDecimal price = new BigDecimal("2.99").add(BigDecimal.valueOf(prod));
         GenericValue product = delegator.create("Product", UtilMisc.toMap("productId", "" + (cat*100 + prod), "primaryProductCategoryId", "" + (cat), "productName", "Product " + "" + (cat*100 + prod), "description", desc, "longDescription", longDesc, "defaultPrice", price));
         KeywordIndex.indexKeywords(product);
         delegator.create("ProductCategoryMember", UtilMisc.toMap("productId", "" + (cat*100 + prod), "productCategoryId", "" + (cat)));

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl Mon Jan  5 23:13:36 2009
@@ -168,7 +168,7 @@
                     <td>
                       &nbsp;
                       <span class="tabletext">
-                        <b>${uiLabelMap.OrderBillUpTo}:</b> <input type="text" size="5" class="inputBox" name="amount_${paymentMethod.paymentMethodId}" value="<#if (cart.getPaymentAmount(paymentMethod.paymentMethodId)?default(0) > 0)>${cart.getPaymentAmount(paymentMethod.paymentMethodId)?double?string("##0.00")}</#if>">
+                        <b>${uiLabelMap.OrderBillUpTo}:</b> <input type="text" size="5" class="inputBox" name="amount_${paymentMethod.paymentMethodId}" value="<#if (cart.getPaymentAmount(paymentMethod.paymentMethodId)?default(0) > 0)>${cart.getPaymentAmount(paymentMethod.paymentMethodId)?string("##0.00")}</#if>">
                       </span>
                     </td>
                   </tr>
@@ -191,7 +191,7 @@
                     <td>
                       &nbsp;
                       <span class="tabletext">
-                        <b>${uiLabelMap.OrderBillUpTo}:</b> <input type="text" size="5" class="inputBox" name="amount_${paymentMethod.paymentMethodId}" value="<#if (cart.getPaymentAmount(paymentMethod.paymentMethodId)?default(0) > 0)>${cart.getPaymentAmount(paymentMethod.paymentMethodId)?double?string("##0.00")}</#if>">
+                        <b>${uiLabelMap.OrderBillUpTo}:</b> <input type="text" size="5" class="inputBox" name="amount_${paymentMethod.paymentMethodId}" value="<#if (cart.getPaymentAmount(paymentMethod.paymentMethodId)?default(0) > 0)>${cart.getPaymentAmount(paymentMethod.paymentMethodId)?string("##0.00")}</#if>">
                       </span>
                     </td>
                   </tr>
@@ -226,8 +226,8 @@
                     <select name="billingAccountId">
                       <option value=""></option>
                         <#list billingAccountList as billingAccount>
-                          <#assign availableAmount = billingAccount.accountBalance?double>
-                          <#assign accountLimit = billingAccount.accountLimit?double>
+                          <#assign availableAmount = billingAccount.accountBalance>
+                          <#assign accountLimit = billingAccount.accountLimit>
                           <option value="${billingAccount.billingAccountId}" <#if billingAccount.billingAccountId == selectedBillingAccountId?default("")>selected</#if>>${billingAccount.description?default("")} [${billingAccount.billingAccountId}] Available: <@ofbizCurrency amount=availableAmount isoCode=billingAccount.accountCurrencyUomId/> Limit: <@ofbizCurrency amount=accountLimit isoCode=billingAccount.accountCurrencyUomId/></option>
                         </#list>
                     </select>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/orderitems.ftl?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/orderitems.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/orderitems.ftl Mon Jan  5 23:13:36 2009
@@ -91,23 +91,23 @@
                       <#if product.piecesIncluded?exists && product.piecesIncluded?long != 0>
                           [${uiLabelMap.OrderPieces}: ${product.piecesIncluded}]
                       </#if>
-                      <#if (product.quantityIncluded?exists && product.quantityIncluded?double != 0) || product.quantityUomId?has_content>
+                      <#if (product.quantityIncluded?exists && product.quantityIncluded != 0) || product.quantityUomId?has_content>
                         <#assign quantityUom = product.getRelatedOneCache("QuantityUom")?if_exists/>
                           [${uiLabelMap.CommonQuantity}: ${product.quantityIncluded?if_exists} ${((quantityUom.abbreviation)?default(product.quantityUomId))?if_exists}]
                       </#if>
-                      <#if (product.weight?exists && product.weight?double != 0) || product.weightUomId?has_content>
+                      <#if (product.weight?exists && product.weight != 0) || product.weightUomId?has_content>
                         <#assign weightUom = product.getRelatedOneCache("WeightUom")?if_exists/>
                           [${uiLabelMap.CommonWeight}: ${product.weight?if_exists} ${((weightUom.abbreviation)?default(product.weightUomId))?if_exists}]
                       </#if>
-                      <#if (product.productHeight?exists && product.productHeight?double != 0) || product.heightUomId?has_content>
+                      <#if (product.productHeight?exists && product.productHeight != 0) || product.heightUomId?has_content>
                         <#assign heightUom = product.getRelatedOneCache("HeightUom")?if_exists/>
                           [${uiLabelMap.CommonHeight}: ${product.productHeight?if_exists} ${((heightUom.abbreviation)?default(product.heightUomId))?if_exists}]
                       </#if>
-                      <#if (product.productWidth?exists && product.productWidth?double != 0) || product.widthUomId?has_content>
+                      <#if (product.productWidth?exists && product.productWidth != 0) || product.widthUomId?has_content>
                         <#assign widthUom = product.getRelatedOneCache("WidthUom")?if_exists/>
                           [${uiLabelMap.CommonWidth}: ${product.productWidth?if_exists} ${((widthUom.abbreviation)?default(product.widthUomId))?if_exists}]
                       </#if>
-                      <#if (product.productDepth?exists && product.productDepth?double != 0) || product.depthUomId?has_content>
+                      <#if (product.productDepth?exists && product.productDepth != 0) || product.depthUomId?has_content>
                         <#assign depthUom = product.getRelatedOneCache("DepthUom")?if_exists/>
                           [${uiLabelMap.CommonDepth}: ${product.productDepth?if_exists} ${((depthUom.abbreviation)?default(product.depthUomId))?if_exists}]
                       </#if>

Modified: ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml Mon Jan  5 23:13:36 2009
@@ -351,7 +351,7 @@
             <actions>
                 <set field="titleProperty" value="PageTitleDigitalProductEdit"/>
 
-                <set field="parameters.minimumOrderQuantity" value="1" type="Double"/>
+                <set field="parameters.minimumOrderQuantity" value="1" type="BigDecimal"/>
                 <entity-one entity-name="SupplierProduct" value-name="supplierProduct" auto-field-map="false">
                     <field-map field-name="partyId" env-name="userLogin.partyId"/><!-- get from userLogin for security reasons -->
                     <field-map field-name="productId" env-name="parameters.productId"/>

Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomMapProcs.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomMapProcs.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomMapProcs.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomMapProcs.xml Mon Jan  5 23:13:36 2009
@@ -50,12 +50,12 @@
             </convert>
         </process>
         <process field="quantity">
-            <convert type="Double">
+            <convert type="BigDecimal">
                 <fail-property resource="ManufacturingUiLabels" property="ManufacturingQuantityBadFormat"/>
             </convert>
         </process>
         <process field="scrapFactor">
-            <convert type="Double">
+            <convert type="BigDecimal">
                 <fail-property resource="ManufacturingUiLabels" property="ManufacturingScrapFactorBadFormat"/>
             </convert>
         </process>

Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Mon Jan  5 23:13:36 2009
@@ -58,7 +58,7 @@
     <simple-method method-name="issueProductionRunTaskComponent" short-description="Issues the Inventory for a Production Run Task Component" login-required="false">
         <if-empty field="parameters.fromDate">
             <set from-field="parameters.productId" field="productId"/>
-            <set from-field="parameters.quantity" field="estimatedQuantity" default-value="0.0" type="Double"/>
+            <set from-field="parameters.quantity" field="estimatedQuantity" default-value="0.0" type="BigDecimal"/>
         <else>
             <entity-one entity-name="WorkEffortGoodStandard" value-field="workEffortGoodStandard" auto-field-map="false">
                 <field-map field-name="workEffortId" from-field="parameters.workEffortId"/>
@@ -70,7 +70,7 @@
             <if-empty field="parameters.quantity">
                 <set from-field="workEffortGoodStandard.estimatedQuantity" field="estimatedQuantity"/>
             <else>
-                <set from-field="parameters.quantity" field="estimatedQuantity" default-value="0.0" type="Double"/>
+                <set from-field="parameters.quantity" field="estimatedQuantity" default-value="0.0" type="BigDecimal"/>
             </else>
             </if-empty>
         </else>
@@ -132,14 +132,14 @@
                 <condition>
                     <and>
                         <if-compare field="parameters.failIfItemsAreNotAvailable" operator="not-equals" value="Y" type="String"/>
-                        <if-compare field="parameters.quantityNotIssued" operator="greater" value="0" type="Double"/>
+                        <if-compare field="parameters.quantityNotIssued" operator="greater" value="0" type="BigDecimal"/>
                     </and>
                 </condition>
                 <then>
                     <set field="parameters.useReservedItems" value="Y"/>
                     <iterate entry="inventoryItem" list="inventoryItemList">
-                        <if-compare field="parameters.quantityNotIssued" operator="greater" value="0" type="Double">
-                            <refresh-value value-name="inventoryItem"/>
+                        <if-compare field="parameters.quantityNotIssued" operator="greater" value="0" type="BigDecimal">
+                            <refresh-value value-field="inventoryItem"/>
                             <!-- this is a little trick to get the InventoryItem value object without doing a query, possible since all fields on InventoryItem are also on InventoryItemAndLocation with the same names -->
                             <call-simple-method method-name="issueProductionRunTaskComponentInline"/>
                         </if-compare>
@@ -148,7 +148,7 @@
             </if>
             
             <!-- if quantityNotIssued is not 0, then pull it from the last non-serialized inventory item found, in the quantityNotIssued field -->
-            <if-compare field="parameters.quantityNotIssued" operator="not-equals" value="0" type="Double">
+            <if-compare field="parameters.quantityNotIssued" operator="not-equals" value="0" type="BigDecimal">
                 <if>
                     <condition>
                         <or>
@@ -174,10 +174,10 @@
                     <!-- instead of updating InventoryItem, add an InventoryItemDetail -->
                     <set from-field="lastNonSerInventoryItem.inventoryItemId" field="createDetailMap.inventoryItemId"/>
                     <set from-field="parameters.workEffortId" field="createDetailMap.workEffortId"/>
-                    <calculate field="createDetailMap.availableToPromiseDiff" type="Double">
+                    <calculate field="createDetailMap.availableToPromiseDiff">
                         <calcop field="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
-                    <calculate field="createDetailMap.quantityOnHandDiff" type="Double">
+                    <calculate field="createDetailMap.quantityOnHandDiff">
                         <calcop field="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
                     <set field="createDetailMap.reasonEnumId" from-field="parameters.reasonEnumId"/>
@@ -207,10 +207,10 @@
                     <!-- also create a detail record with the quantities -->
                     <set field="createDetailMap.inventoryItemId" from-field="createInvItemOutMap.inventoryItemId"/>
                     <set field="createDetailMap.workEffortId" from-field="parameters.workEffortId"/>
-                    <calculate field="createDetailMap.availableToPromiseDiff" type="Double">
+                    <calculate field="createDetailMap.availableToPromiseDiff">
                         <calcop field="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
-                    <calculate field="createDetailMap.quantityOnHandDiff" type="Double">
+                    <calculate field="createDetailMap.quantityOnHandDiff">
                         <calcop field="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
                     <set field="createDetailMap.reasonEnumId" from-field="parameters.reasonEnumId"/>
@@ -234,7 +234,7 @@
                         </calcop>
                     </calculate>
                 </iterate>
-                <if-compare-field field="workEffortGoodStandard.estimatedQuantity" to-field="totalIssuance" operator="less-equals" type="Double">
+                <if-compare-field field="workEffortGoodStandard.estimatedQuantity" to-field="totalIssuance" operator="less-equals" type="BigDecimal">
                     <set value="WEGS_COMPLETED" field="workEffortGoodStandard.statusId"/>
                     <store-value value-field="workEffortGoodStandard"/>
                 </if-compare-field>
@@ -243,7 +243,7 @@
     </simple-method>
     <simple-method method-name="issueProductionRunTaskComponentInline" short-description="Does a issuance for one InventoryItem, meant to be called in-line">
         <!-- only do something with this inventoryItem if there is more inventory to issue -->
-        <if-compare field="parameters.quantityNotIssued" operator="greater" value="0" type="Double">
+        <if-compare field="parameters.quantityNotIssued" operator="greater" value="0" type="BigDecimal">
             <if-compare value="SERIALIZED_INV_ITEM" operator="equals" field="inventoryItem.inventoryItemTypeId">
                 <if-compare value="INV_AVAILABLE" operator="equals" field="inventoryItem.statusId">
                     <!-- change status on inventoryItem -->
@@ -282,8 +282,8 @@
                     
                     <if-not-empty field="inventoryItemQuantity">
                         <!-- reduce atp on inventoryItem if availableToPromise greater than 0, if not the code at the end of this method will handle it -->
-                        <if-compare field="inventoryItemQuantity" operator="greater" value="0" type="Double">
-                            <if-compare-field field="parameters.quantityNotIssued" to-field="inventoryItemQuantity" operator="greater" type="Double">
+                        <if-compare field="inventoryItemQuantity" operator="greater" value="0" type="BigDecimal">
+                            <if-compare-field field="parameters.quantityNotIssued" to-field="inventoryItemQuantity" operator="greater" type="BigDecimal">
                                 <set from-field="inventoryItemQuantity" field="parameters.deductAmount"/>
                             <else>
                                 <set from-field="parameters.quantityNotIssued" field="parameters.deductAmount"/>
@@ -301,10 +301,10 @@
                             <set from-field="inventoryItem.inventoryItemId" field="createDetailMap.inventoryItemId"/>
                             <set from-field="parameters.workEffortId" field="createDetailMap.workEffortId"/>
                             <!-- update availableToPromiseDiff AND quantityOnHandDiff since this is an issuance -->
-                            <calculate field="createDetailMap.availableToPromiseDiff" type="Double">
+                            <calculate field="createDetailMap.availableToPromiseDiff">
                                 <calcop field="parameters.deductAmount" operator="negative"/>
                             </calculate>
-                            <calculate field="createDetailMap.quantityOnHandDiff" type="Double">
+                            <calculate field="createDetailMap.quantityOnHandDiff">
                                 <calcop field="parameters.deductAmount" operator="negative"/>
                             </calculate>
                             <set field="createDetailMap.reasonEnumId" from-field="parameters.reasonEnumId"/>
@@ -354,7 +354,7 @@
                 <and>
                     <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM"/>
                     <not><if-empty field="inventoryItem.availableToPromiseTotal"/></not>
-                    <if-compare field="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="Double"/>
+                    <if-compare field="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="BigDecimal"/>
                 </and>
             </condition>
             <then>
@@ -362,7 +362,7 @@
                     <condition>
                         <or>
                             <if-empty field="parameters.quantity"/>
-                            <if-compare-field field="parameters.quantity" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="Double"/>
+                            <if-compare-field field="parameters.quantity" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="BigDecimal"/>
                         </or>
                     </condition>
                     <then>
@@ -383,10 +383,10 @@
                 <set from-field="inventoryItem.inventoryItemId" field="createDetailMap.inventoryItemId"/>
                 <set from-field="parameters.workEffortId" field="createDetailMap.workEffortId"/>
                 <!-- update availableToPromiseDiff AND quantityOnHandDiff since this is an issuance -->
-                <calculate field="createDetailMap.availableToPromiseDiff" type="Double">
+                <calculate field="createDetailMap.availableToPromiseDiff">
                     <calcop field="deductAmount" operator="negative"/>
                 </calculate>
-                <calculate field="createDetailMap.quantityOnHandDiff" type="Double">
+                <calculate field="createDetailMap.quantityOnHandDiff">
                     <calcop field="deductAmount" operator="negative"/>
                 </calculate>
                 <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>

Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml Mon Jan  5 23:13:36 2009
@@ -47,13 +47,13 @@
                 </process>
                 <process field="estimatedSetupMillis">
                     <copy/>
-                    <convert type="Double">
+                    <convert type="BigDecimal">
                         <fail-property resource="ManufacturingUiLabels" property="ManufacturingProductionRunQuantityNotCorrect"/>
                     </convert>
                 </process>
                 <process field="estimatedMilliSeconds">
                     <copy/>
-                    <convert type="Double">
+                    <convert type="BigDecimal">
                         <fail-property resource="ManufacturingUiLabels" property="ManufacturingProductionRunQuantityNotCorrect"/>
                     </convert>
                 </process>
@@ -85,13 +85,13 @@
                 </process>
                 <process field="estimatedSetupMillis">
                     <copy/>
-                    <convert type="Double">
+                    <convert type="BigDecimal">
                         <fail-property resource="ManufacturingUiLabels" property="ManufacturingProductionRunQuantityNotCorrect"/>
                     </convert>
                 </process>
                 <process field="estimatedMilliSeconds">
                     <copy/>
-                    <convert type="Double">
+                    <convert type="BigDecimal">
                         <fail-property resource="ManufacturingUiLabels" property="ManufacturingProductionRunQuantityNotCorrect"/>
                     </convert>
                 </process>
@@ -137,13 +137,13 @@
                 </process>
                 <process field="estimatedSetupMillis">
                     <copy/>
-                    <convert type="Double">
+                    <convert type="BigDecimal">
                         <fail-property resource="ManufacturingUiLabels" property="ManufacturingProductionRunQuantityNotCorrect"/>
                     </convert>
                 </process>
                 <process field="estimatedMilliSeconds">
                     <copy/>
-                    <convert type="Double">
+                    <convert type="BigDecimal">
                         <fail-property resource="ManufacturingUiLabels" property="ManufacturingProductionRunQuantityNotCorrect"/>
                     </convert>
                 </process>

Modified: ofbiz/trunk/applications/manufacturing/servicedef/services_bom.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/servicedef/services_bom.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/servicedef/services_bom.xml (original)
+++ ofbiz/trunk/applications/manufacturing/servicedef/services_bom.xml Mon Jan  5 23:13:36 2009
@@ -110,8 +110,8 @@
         <attribute mode="IN" name="type" optional="true" type="Integer"/>
         <attribute mode="IN" name="fromDate" optional="true" type="String"/>
         <attribute mode="IN" name="bomType" optional="false" type="String"/>
-        <attribute mode="IN" name="quantity" optional="true" type="Double"/>
-        <attribute mode="IN" name="amount" optional="true" type="Double"/>
+        <attribute mode="IN" name="quantity" optional="true" type="BigDecimal"/>
+        <attribute mode="IN" name="amount" optional="true" type="BigDecimal"/>
         <attribute mode="OUT" name="tree" optional="true" type="org.ofbiz.manufacturing.bom.BOMTree"/>
     </service>
 
@@ -119,8 +119,8 @@
             location="org.ofbiz.manufacturing.bom.BOMServices" invoke="getManufacturingComponents">
         <description>Returns the product's routing id and the components of a given product (if necessary, running the configurator).</description>
         <attribute mode="IN" name="productId" optional="false" type="String"/>
-        <attribute mode="IN" name="quantity" optional="true" type="Double"/>
-        <attribute mode="IN" name="amount" optional="true" type="Double"/>
+        <attribute mode="IN" name="quantity" optional="true" type="BigDecimal"/>
+        <attribute mode="IN" name="amount" optional="true" type="BigDecimal"/>
         <attribute mode="IN" name="fromDate" optional="true" type="String"/>
         <attribute mode="IN" name="excludeWIPs" optional="true" type="Boolean"/>
         <attribute mode="OUT" name="workEffortId" optional="true" type="String"/>
@@ -132,7 +132,7 @@
             location="org.ofbiz.manufacturing.bom.BOMServices" invoke="getProductsInPackages">
         <description>Returns the components (that needs to be packaged) of a given product (if necessary, running the configurator).</description>
         <attribute mode="IN" name="productId" optional="false" type="String"/>
-        <attribute mode="IN" name="quantity" optional="true" type="Double"/>
+        <attribute mode="IN" name="quantity" optional="true" type="BigDecimal"/>
         <attribute mode="IN" name="fromDate" optional="true" type="String"/>
         <attribute mode="OUT" name="productsInPackages" optional="false" type="java.util.List"/>
     </service>
@@ -140,8 +140,8 @@
                 location="org.ofbiz.manufacturing.bom.BOMServices" invoke="getNotAssembledComponents" auth="true">
         <description>Explodes a product id and returns all the components that are not manufactured on customer order: these components will be taken from warehouse.</description>
         <attribute mode="IN" name="productId" optional="false" type="String"/>
-        <attribute mode="IN" name="quantity" optional="true" type="Double"/>
-        <attribute mode="IN" name="amount" optional="true" type="Double"/>
+        <attribute mode="IN" name="quantity" optional="true" type="BigDecimal"/>
+        <attribute mode="IN" name="amount" optional="true" type="BigDecimal"/>
         <attribute mode="IN" name="fromDate" optional="true" type="String"/>
         <attribute mode="OUT" name="notAssembledComponents" type="java.util.List"/>
     </service>