svn commit: r708113 [1/5] - in /ofbiz/branches/typecheckcleanup200810/applications: accounting/entitydef/ accounting/script/org/ofbiz/accounting/finaccount/ accounting/script/org/ofbiz/accounting/fixedasset/ accounting/script/org/ofbiz/accounting/invoi...

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

svn commit: r708113 [1/5] - in /ofbiz/branches/typecheckcleanup200810/applications: accounting/entitydef/ accounting/script/org/ofbiz/accounting/finaccount/ accounting/script/org/ofbiz/accounting/fixedasset/ accounting/script/org/ofbiz/accounting/invoi...

lektran
Author: lektran
Date: Mon Oct 27 01:58:56 2008
New Revision: 708113

URL: http://svn.apache.org/viewvc?rev=708113&view=rev
Log:
Converted all doubles in accounting to BigDecimal

Modified:
    ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel_olap.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/SampleCommissionServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/olap/FactServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/secas_ledger.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_admin.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_billing.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_finaccount.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_fixedasset.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_invoice.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_ledger.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_payment.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_paymentmethod.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_valuelink.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/GlEvents.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/test/FinAccountTests.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
    ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/payment/PaymentForms.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/BillingAccountForms.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/InvoiceScreens.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/PaymentScreens.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryForms.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryScreens.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ap/forms/InvoiceForms.xml
    ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ar/forms/InvoiceForms.xml
    ofbiz/branches/typecheckcleanup200810/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel.xml Mon Oct 27 01:58:56 2008
@@ -248,7 +248,7 @@
       <field name="budgetId" type="id"></field>
       <field name="budgetItemSeqId" type="id"></field>
       <field name="amountChange" type="currency-amount"></field>
-      <field name="percentageChange" type="floating-point"></field>
+      <field name="percentageChange" type="fixed-point"></field>
       <prim-key field="budgetScenarioApplicId"/>
       <prim-key field="budgetScenarioId"/>
       <relation type="one" fk-name="BUDGET_SAPL_BSCN" rel-entity-name="BudgetScenario">
@@ -268,7 +268,7 @@
       <field name="budgetScenarioId" type="id-ne"></field>
       <field name="budgetItemTypeId" type="id-ne"></field>
       <field name="amountChange" type="currency-amount"></field>
-      <field name="percentageChange" type="floating-point"></field>
+      <field name="percentageChange" type="fixed-point"></field>
       <prim-key field="budgetScenarioId"/>
       <prim-key field="budgetItemTypeId"/>
       <relation type="one" fk-name="BUDGET_SRLE_BSCN" rel-entity-name="BudgetScenario">
@@ -628,7 +628,7 @@
         <field name="dateNextService" type="date-time"></field>
         <field name="expectedEndOfLife" type="date"></field>
         <field name="actualEndOfLife" type="date"></field>
-        <field name="productionCapacity" type="floating-point"></field>
+        <field name="productionCapacity" type="fixed-point"></field>
         <field name="uomId" type="id"></field>
         <field name="calendarId" type="id-ne"></field>
         <field name="serialNumber" type="long-varchar"></field>
@@ -748,7 +748,7 @@
         <field name="productMaintTypeId" type="id-ne"><description>If productMaintSeqId is known can lookup using that and the FixedAsset.productId; for un-scheduled maintenance is filled in directly</description></field>
         <field name="productMaintSeqId" type="id"><description>Optional, though should be filled in to determine upcoming maintenance for all scheduled maintenance</description></field>
         <field name="scheduleWorkEffortId" type="id"><description>Has field for estimated/actual start and finish dates, etc</description></field>
-        <field name="intervalQuantity" type="floating-point"></field>
+        <field name="intervalQuantity" type="fixed-point"></field>
         <field name="intervalUomId" type="id"><description>UOM for intervalQuantity; if used intervalMeterTypeId is generally not used (ie one or the other); if a meter reading is done as well that is not tied to the interval it should be tracked in a FixedAssetMaintMeter record</description></field>
         <field name="intervalMeterTypeId" type="id"><description>Meter Type for intervalQuantity; if used intervalUomId is generally not used (ie one or the other)</description></field>
         <field name="purchaseOrderId" type="id"></field>
@@ -783,7 +783,7 @@
         <field name="fixedAssetId" type="id-ne"></field>
         <field name="maintHistSeqId" type="id-ne"></field>
         <field name="productMeterTypeId" type="id-ne"></field>
-        <field name="meterValue" type="floating-point"></field>
+        <field name="meterValue" type="fixed-point"></field>
         <prim-key field="fixedAssetId"/>
         <prim-key field="maintHistSeqId"/>
         <prim-key field="productMeterTypeId"/>
@@ -801,7 +801,7 @@
         <field name="fixedAssetId" type="id-ne"></field>
         <field name="productMeterTypeId" type="id-ne"></field>
         <field name="readingDate" type="date-time"></field>
-        <field name="meterValue" type="floating-point"></field>
+        <field name="meterValue" type="fixed-point"></field>
         <field name="readingReasonEnumId" type="id"></field>
         <field name="maintHistSeqId" type="id"></field>
         <field name="workEffortId" type="id"></field>
@@ -826,7 +826,7 @@
       <field name="thruDate" type="date-time"></field>
       <field name="comments" type="comment"></field>
       <field name="sequenceNum" type="numeric"></field>
-      <field name="quantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
       <field name="quantityUomId" type="id"></field>
       <prim-key field="fixedAssetId"/>
       <prim-key field="productId"/>
@@ -1310,7 +1310,7 @@
       <field name="partyId" type="id-ne"></field>
       <field name="roleTypeId" type="id-ne"></field>
       <field name="datetimePerformed" type="date-time"></field>
-      <field name="percentage" type="floating-point"></field>
+      <field name="percentage" type="fixed-point"></field>
       <prim-key field="invoiceId"/>
       <prim-key field="partyId"/>
       <prim-key field="roleTypeId"/>
@@ -1963,7 +1963,7 @@
       <field name="budgetItemTypeId" type="id-ne"></field>
       <field name="fromDate" type="date-time"></field>
       <field name="thruDate" type="date-time"></field>
-      <field name="allocationPercentage" type="floating-point"></field>
+      <field name="allocationPercentage" type="fixed-point"></field>
       <prim-key field="glAccountId"/>
       <prim-key field="budgetItemTypeId"/>
       <prim-key field="fromDate"/>
@@ -2113,7 +2113,7 @@
        <description>Running tally of a product's average cost in a particular company</description>
        <field name="organizationPartyId" type="id-ne"/>
        <field name="productId" type="id-ne"/>
-       <field name="averageCost" type="floating-point"/>
+       <field name="averageCost" type="fixed-point"/>
        <field name="fromDate" type="date-time"/>
        <field name="thruDate" type="date-time"/>
        <prim-key field="organizationPartyId"/>
@@ -3081,7 +3081,7 @@
         <field name="minItemPrice" type="currency-amount"></field>
         <field name="minPurchase" type="currency-amount"></field>
         <field name="taxShipping" type="indicator"></field>
-        <field name="taxPercentage" type="floating-point"></field>
+        <field name="taxPercentage" type="fixed-point"></field>
         <field name="taxPromotions" type="indicator"></field>
         <field name="fromDate" type="date-time"></field>
         <field name="thruDate" type="date-time"></field>
@@ -3133,18 +3133,18 @@
         <field name="generalDefault" type="indicator"></field>
         <field name="insideCity" type="indicator"></field>
         <field name="geoCode" type="short-varchar"></field>
-        <field name="stateSalesTax" type="floating-point"></field>
-        <field name="citySalesTax" type="floating-point"></field>
-        <field name="cityLocalSalesTax" type="floating-point"></field>
-        <field name="countySalesTax" type="floating-point"></field>
-        <field name="countyLocalSalesTax" type="floating-point"></field>
-        <field name="comboSalesTax" type="floating-point"></field>
-        <field name="stateUseTax" type="floating-point"></field>
-        <field name="cityUseTax" type="floating-point"></field>
-        <field name="cityLocalUseTax" type="floating-point"></field>
-        <field name="countyUseTax" type="floating-point"></field>
-        <field name="countyLocalUseTax" type="floating-point"></field>
-        <field name="comboUseTax" type="floating-point"></field>
+        <field name="stateSalesTax" type="fixed-point"></field>
+        <field name="citySalesTax" type="fixed-point"></field>
+        <field name="cityLocalSalesTax" type="fixed-point"></field>
+        <field name="countySalesTax" type="fixed-point"></field>
+        <field name="countyLocalSalesTax" type="fixed-point"></field>
+        <field name="comboSalesTax" type="fixed-point"></field>
+        <field name="stateUseTax" type="fixed-point"></field>
+        <field name="cityUseTax" type="fixed-point"></field>
+        <field name="cityLocalUseTax" type="fixed-point"></field>
+        <field name="countyUseTax" type="fixed-point"></field>
+        <field name="countyLocalUseTax" type="fixed-point"></field>
+        <field name="comboUseTax" type="fixed-point"></field>
         <prim-key field="zipCode"/>
         <prim-key field="stateCode"/>
         <prim-key field="city"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel_olap.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel_olap.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel_olap.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/entitydef/entitymodel_olap.xml Mon Oct 27 01:58:56 2008
@@ -40,7 +40,7 @@
         <field name="billToCustomerDimId" type="id-ne"></field> <!-- TODO: implement the dimension -->
         <field name="origCurrencyDimId" type="id-ne"></field>
 
-        <field name="quantity" type="floating-point">
+        <field name="quantity" type="fixed-point">
             <description>Quantity invoiced. From InvoiceItem.quantity</description>
         </field>
 

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Mon Oct 27 01:58:56 2008
@@ -73,7 +73,7 @@
         </if-empty>
         
         <!-- make sure the replenishLevel is a sane number -->
-        <calculate field-name="newEntity.replenishLevel" decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}">
+        <calculate field-name="newEntity.replenishLevel" decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}" type="BigDecimal">
             <calcop operator="get" field-name="newEntity.replenishLevel"/>
         </calculate>
 
@@ -123,7 +123,7 @@
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
 
         <!-- make sure the replenishLevel is a sane number -->
-        <calculate field-name="lookedUpValue.replenishLevel" decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}">
+        <calculate field-name="lookedUpValue.replenishLevel" decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}" type="BigDecimal">
             <calcop operator="get" field-name="lookedUpValue.replenishLevel"/>
         </calculate>
         <store-value value-name="lookedUpValue"/>
@@ -297,7 +297,7 @@
                     <then><set field="amountForCalc" from-field="finAccountTrans.amount"/></then>
                 </else-if>
             </if>
-            <calculate field-name="actualBalanceSum" type="BigDecimal" decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}">
+            <calculate field-name="actualBalanceSum" decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}">
                 <calcop operator="add" field-name="actualBalanceSum">
                     <calcop operator="get" field-name="amountForCalc"/>
                 </calcop>
@@ -320,8 +320,8 @@
         <!-- Okay, now just store the results -->
         <entity-one entity-name="FinAccount" value-name="finAccount"/>
         <log level="info" message="In updateFinAccountBalancesFromTrans/Auth updating FinAccount with ID [${finAccountId}] with actualBalance: ${finAccount.actualBalance} -> ${actualBalanceSum}, and availableBalance: ${finAccount.availableBalance} -> ${availableBalanceSum}"/>
-        <set field="finAccount.actualBalance" from-field="actualBalanceSum" type="Double"/>
-        <set field="finAccount.availableBalance" from-field="availableBalanceSum" type="Double"/>
+        <set field="finAccount.actualBalance" from-field="actualBalanceSum"/>
+        <set field="finAccount.availableBalance" from-field="availableBalanceSum"/>
         <store-value value-name="finAccount"/>
     </simple-method>
     

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml Mon Oct 27 01:58:56 2008
@@ -351,14 +351,14 @@
             <if-not-empty field="maintList">
                 <set field="listSize" value="${bsh:maintList.size();}" type="Long"/>
             </if-not-empty>
-            <set field="maxIntervalQty" value="0" type="Double"/>
+            <set field="maxIntervalQty" value="0" type="BigDecimal"/>
             <iterate list-name="maintList" entry-name="maintValue">
-                <if-compare-field field="maintValue.intervalQuantity" operator="greater" to-field="maxIntervalQty" type="Double">
-                    <set field="maxIntervalQty" from-field="maintValue.intervalQuantity" type="Double"/>
+                <if-compare-field field="maintValue.intervalQuantity" operator="greater" to-field="maxIntervalQty" type="BigDecimal">
+                    <set field="maxIntervalQty" from-field="maintValue.intervalQuantity" type="BigDecimal"/>
                 </if-compare-field>
             </iterate>
-            <set field="nextIntervalQty" value="${bsh:maxIntervalQty + productMaintValue.getDouble(&quot;intervalQuantity&quot;);}" type="Double"/>
-            <if-compare-field field="nextIntervalQty" operator="less-equals" to-field="meterValue.meterValue" type="Double">
+            <set field="nextIntervalQty" value="${bsh:maxIntervalQty.add(productMaintValue.getBigDecimal(&quot;intervalQuantity&quot;));}" type="BigDecimal"/>
+            <if-compare-field field="nextIntervalQty" operator="less-equals" to-field="meterValue.meterValue" type="BigDecimal">
                 <set field="maintDue" value="false"/>
                 <if-compare field="repeatCount" operator="greater" value="0" type="Long">
                     <if-compare-field field="listSize" operator="less" to-field="repeatCount" type="Long">
@@ -568,13 +568,13 @@
     <simple-method method-name="straightLineDepreciation" short-description="Calculate straight line depreciation to Fixed Asset[ (PC-SV)/expLife ]">
         <set field="expEndOfLifeYear" from-field="parameters.expEndOfLifeYear" type="Integer"/>
         <set field="assetAcquiredYear" from-field="parameters.assetAcquiredYear" type="Integer"/>
-        <set field="purchaseCost" from-field="parameters.purchaseCost" type="Double"/>
-        <set field="salvageValue" from-field="parameters.salvageValue" type="Double"/>
+        <set field="purchaseCost" from-field="parameters.purchaseCost"/>
+        <set field="salvageValue" from-field="parameters.salvageValue"/>
         <call-object-method obj-field-name="parameters.usageYears" method-name="intValue" ret-field-name="intUsageYears"/>
         <if-not-empty field="parameters.fixedAssetId">
-            <set field="depreciation" value="0.0" type="Double"/>
+            <set field="depreciation" value="0.0" type="BigDecimal"/>
             <!--FORMULA :  depreciation = (purchaseCost - salvageValue) / (expectedEndOfLife - dateAcquired) -->
-            <calculate field-name="depreciation" decimal-scale="2" type="Double">
+            <calculate field-name="depreciation" decimal-scale="2">
                 <calcop operator="divide">
                     <calcop operator="subtract">
                         <calcop operator="get" field-name="purchaseCost"/>
@@ -587,7 +587,7 @@
                 </calcop>
             </calculate>
             <loop count="${intUsageYears}">
-                <calculate field-name="purchaseCost" type="Double">
+                <calculate field-name="purchaseCost">
                     <calcop operator="subtract">
                         <calcop operator="get" field-name="purchaseCost"/>
                         <calcop operator="get" field-name="depreciation"/>
@@ -605,14 +605,14 @@
     <simple-method method-name="doubleDecliningBalanceDepreciation" short-description="Calculate double declining balance depreciation to Fixed Asset">
         <set field="expEndOfLifeYear" from-field="parameters.expEndOfLifeYear" type="Integer"/>
         <set field="assetAcquiredYear" from-field="parameters.assetAcquiredYear" type="Integer"/>
-        <set field="purchaseCost" from-field="parameters.purchaseCost" type="Double"/>
-        <set field="salvageValue" from-field="parameters.salvageValue" type="Double"/>
+        <set field="purchaseCost" from-field="parameters.purchaseCost"/>
+        <set field="salvageValue" from-field="parameters.salvageValue"/>
         <call-object-method obj-field-name="parameters.usageYears" method-name="intValue" ret-field-name="intUsageYears"/>
         <if-not-empty field="parameters.fixedAssetId">
             <loop count="${intUsageYears}">
-                <set field="depreciation" value="0.0" type="Double"/>
+                <set field="depreciation" value="0.0" type="BigDecimal"/>
                 <!--FORMULA : depreciation = (NBV - salvageValue) * 2 / (expectedEndOfLife - dateAcquired) -->
-                <calculate field-name="depreciation" decimal-scale="2" type="Double">
+                <calculate field-name="depreciation" decimal-scale="2">
                     <calcop operator="multiply">
                         <calcop operator="divide">
                            <calcop operator="subtract">
@@ -687,7 +687,7 @@
 
         <!-- if any asset's salvage value is empty then set it by 0 -->
         <if-empty field="fixedAsset.salvageValue">
-            <set field="salvageValue" value="0.0" type="Double"/>
+            <set field="salvageValue" value="0.0" type="BigDecimal"/>
         <else>
             <set field="salvageValue" from-field="fixedAsset.salvageValue"/>
         </else>
@@ -720,8 +720,8 @@
             <set field="serviceInMap.fixedAssetId" from-field="parameters.fixedAssetId"/>
             <set field="serviceInMap.expEndOfLifeYear" from-field="expEndOfLifeYear" type="Integer"/>
             <set field="serviceInMap.assetAcquiredYear" from-field="assetAcquiredYear" type="Integer"/>
-            <set field="serviceInMap.purchaseCost" from-field="fixedAsset.purchaseCost" type="Double"/>
-            <set field="serviceInMap.salvageValue" from-field="salvageValue" type="Double"/>
+            <set field="serviceInMap.purchaseCost" from-field="fixedAsset.purchaseCost"/>
+            <set field="serviceInMap.salvageValue" from-field="salvageValue"/>
             <set field="serviceInMap.usageYears" from-field="usageYears" type="Integer"/>
             <call-service service-name="${customMethod.customMethodName}" in-map-name="serviceInMap">
                 <result-to-field result-name="assetDepreciationTillDate"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Mon Oct 27 01:58:56 2008
@@ -274,7 +274,7 @@
         </if-empty>
         <if-not-empty field="parameters.productId">
             <if-empty field="parameters.quantity">
-                <set field="newEntity.quantity" value="1.0" type="Double"/>
+                <set field="newEntity.quantity" value="1.0" type="BigDecimal"/>
              </if-empty>
         </if-not-empty>
         <if-empty field="newEntity.amount">
@@ -453,8 +453,8 @@
             <else>
                 <!-- if new status is paid check if the complete invoice is applied. -->
                 <if-compare field="parameters.statusId" operator="equals" value="INVOICE_PAID">
-                    <set field="notApplied" type="Double" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}"/>
-                    <if-compare field="notApplied" operator="not-equals" value="0.00" type="Double">
+                    <set field="notApplied" type="BigDecimal" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}"/>
+                    <if-compare field="notApplied" operator="not-equals" value="0.00" type="BigDecimal">
                         <add-error><fail-message message="Cannot change status to 'paid', invoice ${invoice.invoiceId} has an unapplied balance of [${notApplied}]"/></add-error>
                         <check-errors/>
                     </if-compare>

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/SampleCommissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/SampleCommissionServices.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/SampleCommissionServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/invoice/SampleCommissionServices.xml Mon Oct 27 01:58:56 2008
@@ -37,7 +37,7 @@
                 <condition><if-compare field="affiliatePartyRelationship.roleTypeIdTo" operator="equals" value="AFFILIATE"/></condition>
                 <then>
                     <!-- calculate a simple commission with a base amount + a percentage of the payment -->
-                    <calculate field-name="commissionAmount" type="Double">
+                    <calculate field-name="commissionAmount" type="BigDecimal">
                         <calcop operator="add">
                             <number value="10.0"/><!-- base amount -->
                             <calcop operator="multiply">
@@ -74,7 +74,7 @@
         <set field="createInvoiceItemMap.invoiceId" from-field="createdInvoiceId"/>
         <set field="createInvoiceItemMap.invoiceItemTypeId" value="COMM_INV_ITEM"/>
         <set field="createInvoiceItemMap.amount" from-field="commissionAmount"/>
-        <set field="createInvoiceItemMap.quantity" value="1" type="Double"/>
+        <set field="createInvoiceItemMap.quantity" value="1" type="BigDecimal"/>
         <set field="createInvoiceItemMap.description" value="Commission for Received Customer Payment [${payment.paymentId}]"/>
         <call-service service-name="createInvoiceItem" in-map-name="createInvoiceItemMap"/>
     </simple-method>

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml Mon Oct 27 01:58:56 2008
@@ -93,7 +93,7 @@
                 </if-empty>
                 <if-compare-field field="newEntity.origCurrencyUomId" to-field="newEntity.currencyUomId" operator="not-equals">
                     <clear-field field-name="convertUomInMap"/>
-                    <set field="convertUomInMap.originalValue" from-field="newEntity.origAmount" type="Double"/>
+                    <set field="convertUomInMap.originalValue" from-field="newEntity.origAmount" type="BigDecimal"/>
                     <set field="convertUomInMap.uomId" from-field="newEntity.origCurrencyUomId"/>
                     <set field="convertUomInMap.uomIdTo" from-field="newEntity.currencyUomId"/>
                     <!-- TODO: set the optional asOfDate input parameter -->
@@ -211,10 +211,10 @@
         <call-service service-name="calculateAcctgTransTrialBalance" in-map-name="trialBalanceCallMap">
             <results-to-map map-name="trialBalanceResultMap"/>
         </call-service>
-        <if-compare field="trialBalanceResultMap.debitCreditDifference" operator="greater-equals" value="0.01" type="Double">
+        <if-compare field="trialBalanceResultMap.debitCreditDifference" operator="greater-equals" value="0.01" type="BigDecimal">
             <add-error><fail-message message="Not posting GL Accounting Transaction with ID [${parameters.acctgTransId}] because the trial balance failed: Debit Total=${trialBalanceResultMap.debitTotal} Credit Total=${trialBalanceResultMap.creditTotal} Debit/Credit Difference=${trialBalanceResultMap.debitCreditDifference}"/></add-error>
         </if-compare>
-        <if-compare field="trialBalanceResultMap.debitCreditDifference" operator="less-equals" value="-0.01" type="Double">
+        <if-compare field="trialBalanceResultMap.debitCreditDifference" operator="less-equals" value="-0.01" type="BigDecimal">
             <add-error><fail-message message="Not posting GL Accounting Transaction with ID [${parameters.acctgTransId}] because the trial balance failed: Debit Total=${trialBalanceResultMap.debitTotal} Credit Total=${trialBalanceResultMap.creditTotal} Debit/Credit Difference=${trialBalanceResultMap.debitCreditDifference}"/></add-error>
         </if-compare>
             
@@ -377,7 +377,7 @@
 
                 <!-- update the gl account's posted balance for this organization -->
                 <set from-field="glAccount.glAccountId" field="updateGlAccountParams.glAccountId"/>
-                <set from-field="postedBalance" field="updateGlAccountParams.postedBalance" type="Double"/>
+                <set from-field="postedBalance" field="updateGlAccountParams.postedBalance" type="BigDecimal"/>
                 <set from-field="acctgTransEntry.organizationPartyId" field="updateGlAccountParams.organizationPartyId"/>
                 <call-service service-name="updateGlAccountOrganization" in-map-name="updateGlAccountParams"/>
 
@@ -395,8 +395,8 @@
                         <set from-field="acctgTransEntry.glAccountId" field="glAccountHistory.glAccountId"/>
                         <set from-field="acctgTransEntry.organizationPartyId" field="glAccountHistory.organizationPartyId"/>
                         <set from-field="customTimePeriod.customTimePeriodId" field="glAccountHistory.customTimePeriodId"/>
-                        <set field="glAccountHistory.postedDebits" value="0.0" type="Double"/>
-                        <set field="glAccountHistory.postedCredits" value="0.0" type="Double"/>
+                        <set field="glAccountHistory.postedDebits" value="0.0" type="BigDecimal"/>
+                        <set field="glAccountHistory.postedCredits" value="0.0" type="BigDecimal"/>
                         <create-value value-name="glAccountHistory"/>
                     </if-empty>
 

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Mon Oct 27 01:58:56 2008
@@ -143,15 +143,15 @@
             <call-service service-name="calculateAcctgTransTrialBalance" in-map-name="callServiceMap">
                 <results-to-map map-name="serviceResults"/>
             </call-service>
-            <calculate field-name="debitTotal" type="Double">
+            <calculate field-name="debitTotal">
                 <calcop operator="get" field-name="debitTotal"/>
                 <calcop operator="get" field-name="serviceResults.debitTotal"/>
             </calculate>
-            <calculate field-name="creditTotal" type="Double">
+            <calculate field-name="creditTotal">
                 <calcop operator="get" field-name="creditTotal"/>
                 <calcop operator="get" field-name="serviceResults.creditTotal"/>
             </calculate>
-            <calculate field-name="debitCreditDifference" type="Double">
+            <calculate field-name="debitCreditDifference">
                 <calcop operator="get" field-name="debitCreditDifference"/>
                 <calcop operator="get" field-name="serviceResults.debitCreditDifference"/>
             </calculate>
@@ -171,7 +171,7 @@
             <results-to-map map-name="trialBalanceResultMap"/>
         </call-service>
         
-        <if-compare field="trialBalanceResultMap.debitCreditDifference" operator="not-equals" value="0" type="Double">
+        <if-compare field="trialBalanceResultMap.debitCreditDifference" operator="not-equals" value="0" type="BigDecimal">
             <add-error><fail-message message="Not posting GL Journal with ID [${parameters.glJournalId}] because the trial balance failed: Debit Total=${trialBalanceResultMap.debitTotal} Credit Total=${trialBalanceResultMap.creditTotal} Debit/Credit Difference=${trialBalanceResultMap.debitCreditDifference}"/></add-error>
             <check-errors/>
         </if-compare>
@@ -333,7 +333,7 @@
                             <set field="acctgTransEntry.currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
                             <if-compare-field field="acctgTransEntry.origCurrencyUomId" to-field="acctgTransEntry.currencyUomId" operator="not-equals">
                                 <clear-field field-name="convertUomInMap"/>
-                                <set field="convertUomInMap.originalValue" from-field="acctgTransEntry.origAmount" type="Double"/>
+                                <set field="convertUomInMap.originalValue" from-field="acctgTransEntry.origAmount"/>
                                 <set field="convertUomInMap.uomId" from-field="acctgTransEntry.origCurrencyUomId"/>
                                 <set field="convertUomInMap.uomIdTo" from-field="acctgTransEntry.currencyUomId"/>
                                 <!-- TODO: set the optional asOfDate input parameter -->
@@ -655,7 +655,7 @@
             <order-by field-name="acctgTransId"/>
             <order-by field-name="acctgTransEntrySeqId"/>
         </entity-condition>
-        <set field="totalAmount" value="0.0" type="Double"/>
+        <set field="totalAmount" value="0.0" type="BigDecimal"/>
         <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
             <get-related-one value-name="acctgTransAndEntry" relation-name="GlAccount" to-value-name="glAccount"/>
             <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field-name="isCreditAccount">
@@ -667,7 +667,7 @@
             <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field-name="isExpenseAccount">
                 <field field-name="glAccount" type="GenericValue"/>
             </call-class-method>
-            <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+            <set field="amount" from-field="acctgTransAndEntry.amount"/>
             <if>
                 <condition>
                     <or>
@@ -692,7 +692,7 @@
                     <calcop field-name="amount" operator="negative"/>
                 </calculate>
             </if-compare>
-            <calculate field-name="totalAmount" type="Double">
+            <calculate field-name="totalAmount">
                 <calcop field-name="totalAmount" operator="add"><calcop field-name="amount" operator="get"/></calcop>
             </calculate>
         </iterate>
@@ -715,7 +715,7 @@
             <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getNetBalance" ret-field-name="postedBalance">
                 <field field-name="profitLossAccountHistory" type="GenericValue"/>
             </call-class-method>
-            <if-compare-field field="postedBalance" to-field="totalAmount" operator="not-equals" type="Double">
+            <if-compare-field field="postedBalance" to-field="totalAmount" operator="not-equals" type="BigDecimal">
                 <add-error><fail-message message="There is already a posted balance [${postedBalance}] that doesn't match with the current one [${totalAmount}]."/></add-error>
             </if-compare-field>
             <check-errors/>
@@ -753,7 +753,7 @@
             <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getNetBalance" ret-field-name="endingBalance">
                 <field field-name="glAccountHistory" type="GenericValue"/>
             </call-class-method>
-            <set field="glAccountHistory.endingBalance" from-field="endingBalance" type="Double"/>
+            <set field="glAccountHistory.endingBalance" from-field="endingBalance"/>
             <store-value value-name="glAccountHistory"/>
         </iterate>
         <if-not-empty field="lastClosedTimePeriod">
@@ -781,12 +781,12 @@
                     <set field="thisPeriodGlAccountHistory.customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/>
                     <set field="thisPeriodGlAccountHistory.organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
                     <set field="thisPeriodGlAccountHistory.glAccountId" from-field="lastPeriodGlAccountHistory.glAccountId"/>
-                    <set field="thisPeriodGlAccountHistory.postedDebits" value="0.0" type="Double"/>
-                    <set field="thisPeriodGlAccountHistory.postedCredits" value="0.0" type="Double"/>
-                    <set field="thisPeriodGlAccountHistory.endingBalance" from-field="lastPeriodGlAccountHistory.endingBalance" type="Double"/>
+                    <set field="thisPeriodGlAccountHistory.postedDebits" value="0.0" type="BigDecimal"/>
+                    <set field="thisPeriodGlAccountHistory.postedCredits" value="0.0" type="BigDecimal"/>
+                    <set field="thisPeriodGlAccountHistory.endingBalance" from-field="lastPeriodGlAccountHistory.endingBalance"/>
                     <create-value value-name="thisPeriodGlAccountHistory"/>
                 <else>
-                    <calculate field-name="thisPeriodGlAccountHistory.endingBalance" type="Double">
+                    <calculate field-name="thisPeriodGlAccountHistory.endingBalance">
                         <calcop field-name="thisPeriodGlAccountHistory.endingBalance" operator="add"><calcop field-name="lastPeriodGlAccountHistory.endingBalance" operator="get"/></calcop>
                     </calculate>
                     <store-value value-name="thisPeriodGlAccountHistory"/>
@@ -823,7 +823,7 @@
                 <order-by field-name="acctgTransEntrySeqId"/>
             </entity-condition>
 
-            <set field="newPostedBalance" value="0.0" type="Double"/>
+            <set field="newPostedBalance" value="0.0" type="BigDecimal"/>
             <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
                 <get-related-one value-name="acctgTransAndEntry" relation-name="GlAccount" to-value-name="glAccount"/>
                 <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field-name="isCreditAccount">
@@ -835,7 +835,7 @@
                 <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field-name="isExpenseAccount">
                     <field field-name="glAccount" type="GenericValue"/>
                 </call-class-method>
-                <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+                <set field="amount" from-field="acctgTransAndEntry.amount"/>
                 <if>
                     <condition>
                         <or>
@@ -860,14 +860,14 @@
                         <calcop field-name="amount" operator="negative"/>
                     </calculate>
                 </if-compare>
-                <calculate field-name="newPostedBalance" type="Double">
+                <calculate field-name="newPostedBalance">
                     <calcop field-name="newPostedBalance" operator="add"><calcop field-name="amount" operator="get"/></calcop>
                 </calculate>
             </iterate>
 
             <set field="updateGlAccountOrganizationInMap.organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
             <set field="updateGlAccountOrganizationInMap.glAccountId" from-field="glAccountOrganizationAndClass.glAccountId"/>
-            <set field="updateGlAccountOrganizationInMap.postedBalance" from-field="newPostedBalance" type="Double"/>
+            <set field="updateGlAccountOrganizationInMap.postedBalance" from-field="newPostedBalance"/>
             <call-service service-name="updateGlAccountOrganization" in-map-name="updateGlAccountOrganizationInMap"/>
         </iterate>
 
@@ -913,7 +913,7 @@
             <order-by field-name="acctgTransId"/>
             <order-by field-name="acctgTransEntrySeqId"/>
         </entity-condition>
-        <set field="totalNetIncome" value="0.0" type="Double"/>
+        <set field="totalNetIncome" value="0.0" type="BigDecimal"/>
         <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
             <get-related-one value-name="acctgTransAndEntry" relation-name="GlAccount" to-value-name="glAccount"/>
             <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field-name="isCreditAccount">
@@ -925,7 +925,7 @@
             <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field-name="isExpenseAccount">
                 <field field-name="glAccount" type="GenericValue"/>
             </call-class-method>
-            <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+            <set field="amount" from-field="acctgTransAndEntry.amount"/>
             <if>
                 <condition>
                     <or>
@@ -950,21 +950,21 @@
                     <calcop field-name="amount" operator="negative"/>
                 </calculate>
             </if-compare>
-            <calculate field-name="totalNetIncome" type="Double">
+            <calculate field-name="totalNetIncome">
                 <calcop field-name="totalNetIncome" operator="add"><calcop field-name="amount" operator="get"/></calcop>
             </calculate>
             <if-compare field="isExpenseAccount" operator="equals" value="true" type="Boolean">
                 <if-empty field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
-                    <set field="glAccountTotalsExpenseMap.${glAccount.glAccountId}" value="0.0" type="Double"/>
+                    <set field="glAccountTotalsExpenseMap.${glAccount.glAccountId}" value="0.0" type="BigDecimal"/>
                 </if-empty>
-                <calculate field-name="glAccountTotalsExpenseMap.${glAccount.glAccountId}" type="Double">
+                <calculate field-name="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
                     <calcop field-name="glAccountTotalsExpenseMap.${glAccount.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
                 </calculate>
             <else>
                 <if-empty field="glAccountTotalsProfitMap.${glAccount.glAccountId}">
-                    <set field="glAccountTotalsProfitMap.${glAccount.glAccountId}" value="0.0" type="Double"/>
+                    <set field="glAccountTotalsProfitMap.${glAccount.glAccountId}" value="0.0" type="BigDecimal"/>
                 </if-empty>
-                <calculate field-name="glAccountTotalsProfitMap.${glAccount.glAccountId}" type="Double">
+                <calculate field-name="glAccountTotalsProfitMap.${glAccount.glAccountId}">
                     <calcop field-name="glAccountTotalsProfitMap.${glAccount.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
                 </calculate>
             </else>
@@ -1030,7 +1030,7 @@
                 <order-by field-name="glAccountId"/>
             </entity-condition>
             <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
-                <set field="glAccountTotalsAssetMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance" type="Double"/>
+                <set field="glAccountTotalsAssetMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance"/>
             </iterate>
             <entity-condition entity-name="GlAccountAndHistory" list-name="glAccountAndHistories">
                 <condition-list combine="and">
@@ -1041,7 +1041,7 @@
                 <order-by field-name="glAccountId"/>
             </entity-condition>
             <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
-                <set field="glAccountTotalsLiabilityMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance" type="Double"/>
+                <set field="glAccountTotalsLiabilityMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance"/>
             </iterate>
             <entity-condition entity-name="GlAccountAndHistory" list-name="glAccountAndHistories">
                 <condition-list combine="and">
@@ -1052,7 +1052,7 @@
                 <order-by field-name="glAccountId"/>
             </entity-condition>
             <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
-                <set field="glAccountTotalsEquityMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance" type="Double"/>
+                <set field="glAccountTotalsEquityMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance"/>
             </iterate>
         </if-not-empty>
 
@@ -1070,16 +1070,16 @@
             <order-by field-name="acctgTransEntrySeqId"/>
         </entity-condition>
         <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
-            <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+            <set field="amount" from-field="acctgTransAndEntry.amount"/>
             <if-compare field="acctgTransAndEntry.debitCreditFlag" operator="equals" value="C">
                 <calculate field-name="amount">
                     <calcop field-name="amount" operator="negative"/>
                 </calculate>
             </if-compare>
             <if-empty field="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}">
-                <set field="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="Double"/>
+                <set field="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="BigDecimal"/>
             </if-empty>
-            <calculate field-name="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}" type="Double">
+            <calculate field-name="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}">
                 <calcop field-name="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
             </calculate>
         </iterate>
@@ -1097,16 +1097,16 @@
             <order-by field-name="acctgTransEntrySeqId"/>
         </entity-condition>
         <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
-            <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+            <set field="amount" from-field="acctgTransAndEntry.amount"/>
             <if-compare field="acctgTransAndEntry.debitCreditFlag" operator="equals" value="D">
                 <calculate field-name="amount">
                     <calcop field-name="amount" operator="negative"/>
                 </calculate>
             </if-compare>
             <if-empty field="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}">
-                <set field="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="Double"/>
+                <set field="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="BigDecimal"/>
             </if-empty>
-            <calculate field-name="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}" type="Double">
+            <calculate field-name="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}">
                 <calcop field-name="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
             </calculate>
         </iterate>
@@ -1124,16 +1124,16 @@
             <order-by field-name="acctgTransEntrySeqId"/>
         </entity-condition>
         <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
-            <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+            <set field="amount" from-field="acctgTransAndEntry.amount"/>
             <if-compare field="acctgTransAndEntry.debitCreditFlag" operator="equals" value="D">
                 <calculate field-name="amount">
                     <calcop field-name="amount" operator="negative"/>
                 </calculate>
             </if-compare>
             <if-empty field="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}">
-                <set field="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="Double"/>
+                <set field="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="BigDecimal"/>
             </if-empty>
-            <calculate field-name="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}" type="Double">
+            <calculate field-name="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}">
                 <calcop field-name="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
             </calculate>
         </iterate>
@@ -1153,9 +1153,9 @@
         </entity-one>
         <if-not-empty field="retainedEarningsAccount">
             <if-empty field="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}">
-                <set field="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}" value="0.0" type="Double"/>
+                <set field="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}" value="0.0" type="BigDecimal"/>
             </if-empty>
-            <calculate field-name="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}" type="Double">
+            <calculate field-name="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}">
                 <calcop field-name="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}" operator="add"><calcop field-name="totalNetIncome" operator="get"/></calcop>
             </calculate>
         </if-not-empty>
@@ -1202,49 +1202,49 @@
         </call-service>
 
         <iterate list-name="period2AssetBalancesList" entry-name="period2AssetBalance">
-            <set field="assetBalancesMap.${period2AssetBalance.glAccountId}" from-field="period2AssetBalance.totalAmount" type="Double"/>
+            <set field="assetBalancesMap.${period2AssetBalance.glAccountId}" from-field="period2AssetBalance.totalAmount"/>
         </iterate>
         <iterate list-name="period1AssetBalancesList" entry-name="period1AssetBalance">
-            <set field="amount" from-field="period1AssetBalance.totalAmount" type="Double"/>
+            <set field="amount" from-field="period1AssetBalance.totalAmount"/>
             <calculate field-name="amount">
                 <calcop field-name="amount" operator="negative"/>
             </calculate>
             <if-empty field="assetBalancesMap.${period1AssetBalance.glAccountId}">
-                <set field="assetBalancesMap.${period1AssetBalance.glAccountId}" value="0.0" type="Double"/>
+                <set field="assetBalancesMap.${period1AssetBalance.glAccountId}" value="0.0" type="BigDecimal"/>
             </if-empty>
-            <calculate field-name="assetBalancesMap.${period1AssetBalance.glAccountId}" type="Double">
+            <calculate field-name="assetBalancesMap.${period1AssetBalance.glAccountId}">
                 <calcop field-name="assetBalancesMap.${period1AssetBalance.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
             </calculate>
         </iterate>
 
         <iterate list-name="period2LiabilityBalancesList" entry-name="period2LiabilityBalance">
-            <set field="liabilityBalancesMap.${period2LiabilityBalance.glAccountId}" from-field="period2LiabilityBalance.totalAmount" type="Double"/>
+            <set field="liabilityBalancesMap.${period2LiabilityBalance.glAccountId}" from-field="period2LiabilityBalance.totalAmount"/>
         </iterate>
         <iterate list-name="period1LiabilityBalancesList" entry-name="period1LiabilityBalance">
-            <set field="amount" from-field="period1LiabilityBalance.totalAmount" type="Double"/>
+            <set field="amount" from-field="period1LiabilityBalance.totalAmount"/>
             <calculate field-name="amount">
                 <calcop field-name="amount" operator="negative"/>
             </calculate>
             <if-empty field="liabilityBalancesMap.${period1LiabilityBalance.glAccountId}">
-                <set field="liabilityBalancesMap.${period1LiabilityBalance.glAccountId}" value="0.0" type="Double"/>
+                <set field="liabilityBalancesMap.${period1LiabilityBalance.glAccountId}" value="0.0" type="BigDecimal"/>
             </if-empty>
-            <calculate field-name="liabilityBalancesMap.${period1LiabilityBalance.glAccountId}" type="Double">
+            <calculate field-name="liabilityBalancesMap.${period1LiabilityBalance.glAccountId}">
                 <calcop field-name="liabilityBalancesMap.${period1LiabilityBalance.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
             </calculate>
         </iterate>
 
         <iterate list-name="period2EquityBalancesList" entry-name="period2EquityBalance">
-            <set field="equityBalancesMap.${period2EquityBalance.glAccountId}" from-field="period2EquityBalance.totalAmount" type="Double"/>
+            <set field="equityBalancesMap.${period2EquityBalance.glAccountId}" from-field="period2EquityBalance.totalAmount"/>
         </iterate>
         <iterate list-name="period1EquityBalancesList" entry-name="period1EquityBalance">
-            <set field="amount" from-field="period1EquityBalance.totalAmount" type="Double"/>
+            <set field="amount" from-field="period1EquityBalance.totalAmount"/>
             <calculate field-name="amount">
                 <calcop field-name="amount" operator="negative"/>
             </calculate>
             <if-empty field="equityBalancesMap.${period1EquityBalance.glAccountId}">
-                <set field="equityBalancesMap.${period1EquityBalance.glAccountId}" value="0.0" type="Double"/>
+                <set field="equityBalancesMap.${period1EquityBalance.glAccountId}" value="0.0" type="BigDecimal"/>
             </if-empty>
-            <calculate field-name="equityBalancesMap.${period1EquityBalance.glAccountId}" type="Double">
+            <calculate field-name="equityBalancesMap.${period1EquityBalance.glAccountId}">
                 <calcop field-name="equityBalancesMap.${period1EquityBalance.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
             </calculate>
         </iterate>
@@ -1290,7 +1290,7 @@
         </entity-and>
         <first-from-list list-name="billToCustomers" entry-name="billToCustomer"/>
         <!-- TODO: handle serialized inventory -->
-        <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+        <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
             <calcop operator="multiply">
                 <calcop operator="get" field-name="itemIssuance.quantity"/>
                 <calcop operator="get" field-name="inventoryItem.unitCost"/>
@@ -1348,7 +1348,7 @@
         </entity-and>
         <first-from-list list-name="billToCustomers" entry-name="billToCustomer"/>
         <!-- TODO: handle serialized inventory -->
-        <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+        <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
             <calcop operator="multiply">
                 <calcop operator="get" field-name="parameters.canceledQuantity"/>
                 <calcop operator="get" field-name="inventoryItem.unitCost"/>
@@ -1408,7 +1408,7 @@
         </else>
         </if-not-empty>
         <!-- TODO: handle serialized inventory -->
-        <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+        <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
             <calcop operator="multiply">
                 <calcop operator="get" field-name="shipmentReceipt.quantityAccepted"/>
                 <calcop operator="get" field-name="inventoryItem.unitCost"/>
@@ -1464,7 +1464,7 @@
         </entity-condition>
         <first-from-list list-name="inventoryItemDetails" entry-name="oldInventoryItemDetail"/>
         <if-not-empty field="oldInventoryItemDetail">
-            <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+            <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                 <calcop operator="multiply" field-name="newinventoryItem.quantityOnHandTotal">
                     <calcop operator="subtract">
                         <calcop operator="get" field-name="oldInventoryItemDetail.unitCost"/>
@@ -1514,7 +1514,7 @@
         </entity-and>
         <iterate list-name="inventoryItemDetails" entry-name="inventoryItemDetail">
             <get-related-one value-name="inventoryItemDetail" relation-name="InventoryItem" to-value-name="inventoryItem"/>        
-            <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+            <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                 <calcop operator="multiply">
                     <calcop operator="get" field-name="inventoryItemDetail.quantityOnHandDiff"/>
                     <calcop operator="get" field-name="inventoryItem.unitCost"/>
@@ -1560,7 +1560,7 @@
         </entity-one>
         <get-related-one value-name="workEffortInventoryProduced" relation-name="InventoryItem" to-value-name="inventoryItem"/>  
         <!-- TODO: handle serialized inventory -->
-        <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+        <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
             <calcop operator="multiply">
                 <calcop operator="get" field-name="inventoryItem.quantityOnHandTotal"/>
                 <calcop operator="get" field-name="inventoryItem.unitCost"/>
@@ -1660,7 +1660,7 @@
         
         <!-- TODO: handle serialized inventory -->
         <if-not-empty field="inventoryItem.quantityOnHandTotal">
-            <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+            <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                 <calcop operator="multiply">
                     <calcop operator="get" field-name="inventoryItem.quantityOnHandTotal"/>
                     <calcop operator="get" field-name="inventoryItem.unitCost"/>
@@ -1746,7 +1746,7 @@
         </entity-one>        
         <get-related-one value-name="workEffortInventoryAssign" relation-name="InventoryItem" to-value-name="inventoryItem"/>
         <!-- TODO: handle serialized inventory -->
-        <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+        <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
             <calcop operator="multiply">
                 <calcop operator="get" field-name="workEffortInventoryAssign.quantity"/>
                 <calcop operator="get" field-name="inventoryItem.unitCost"/>
@@ -1789,7 +1789,7 @@
         <entity-one entity-name="ItemIssuance" value-name="itemIssuance"/>
         <get-related-one value-name="itemIssuance" relation-name="InventoryItem" to-value-name="inventoryItem"/>
 
-        <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+        <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
             <calcop operator="multiply">
                 <calcop operator="get" field-name="itemIssuance.quantity"/>
                 <calcop operator="get" field-name="inventoryItem.unitCost"/>
@@ -1830,8 +1830,8 @@
         <property-to-field resource="arithmetic" property="ledger.rounding" field-name="roundingMode"/>
         <log level="info" message="Using ledger decimals [${ledgerDecimals}] and rounding [${roundingMode}]"/>
           
-        <calculate field-name="amountAppliedTotal" type="BigDecimal"><number value="0"/></calculate>
-        <calculate field-name="diffAmount" type="BigDecimal"><number value="0"/></calculate>
+        <calculate field-name="amountAppliedTotal"><number value="0"/></calculate>
+        <calculate field-name="diffAmount"><number value="0"/></calculate>
         
         <entity-one entity-name="Payment" value-name="payment"/>
         <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isReceipt" ret-field-name="isReceiptValue">
@@ -1876,7 +1876,7 @@
                 </if-not-empty>
                 <set field="creditEntry.organizationPartyId" from-field="organizationPartyId"/>
                 <set field="creditEntry.glAccountTypeId" from-field="creditGlAccountTypeId"/>
-                <calculate field-name="amountAppliedTotal" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+                <calculate field-name="amountAppliedTotal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                     <calcop operator="add">
                         <calcop operator="get" field-name="amountAppliedTotal"/>
                         <calcop operator="get" field-name="paymentApplication.amountApplied"/>
@@ -1885,7 +1885,7 @@
                 <set field="acctgTransEntries[]" from-field="creditEntry" type="Object"/>
             </iterate>
         
-            <calculate field-name="diffAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+            <calculate field-name="diffAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                 <calcop operator="subtract">
                     <calcop operator="get" field-name="payment.amount"/>
                     <calcop operator="get" field-name="amountAppliedTotal"/>
@@ -1934,13 +1934,13 @@
                 <if-empty field="invoiceItem.quantity">
                     <set field="invoiceItem.quantity" value="1"/>
                 </if-empty>
-                <calculate field-name="amountFromInvoice"  type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+                <calculate field-name="amountFromInvoice" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                     <calcop operator="multiply">
                         <calcop operator="get" field-name="invoiceItem.quantity"/>
                         <calcop operator="get" field-name="invoiceItem.amount"/>
                     </calcop>
                 </calculate>
-                <calculate field-name="totalAmountFromInvoice" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+                <calculate field-name="totalAmountFromInvoice" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                     <calcop operator="add">
                         <calcop operator="get" field-name="totalAmountFromInvoice"/>
                         <calcop operator="get" field-name="amountFromInvoice"/>
@@ -1949,7 +1949,7 @@
                 <get-related value-name="invoiceItem" relation-name="OrderItemBilling" list-name="orderItemBillings"/>
                 <iterate list-name="orderItemBillings" entry-name="orderItemBilling">
                     <get-related-one value-name="orderItemBilling" relation-name="OrderItem" to-value-name="orderItem"/>
-                    <calculate field-name="amountFromOrder" type="BigDecimal"  decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+                    <calculate field-name="amountFromOrder" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                         <calcop field-name="amountFromOrder" operator="add">
                             <calcop operator="multiply">
                                 <calcop operator="get" field-name="orderItemBilling.quantity"/>
@@ -1974,7 +1974,7 @@
                         <set field="debitEntry.roleTypeId" value="BILL_FROM_VENDOR"/>
                         <set field="debitEntry.productId" from-field="invoiceItem.productId"/>
                         <set field="debitEntry.glAccountTypeId" value="PURCHASE_PRICE_VAR"/>
-                        <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+                        <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                             <calcop operator="subtract">
                                 <calcop operator="get" field-name="amountFromInvoice"/>
                                 <calcop operator="get" field-name="amountFromOrder"/>
@@ -2045,13 +2045,13 @@
                 <if-empty field="invoiceItem.quantity">
                     <set field="invoiceItem.quantity" value="1"/>
                 </if-empty>
-                <calculate field-name="origAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+                <calculate field-name="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                     <calcop operator="multiply">
                         <calcop operator="get" field-name="invoiceItem.quantity"/>
                         <calcop operator="get" field-name="invoiceItem.amount"/>
                     </calcop>
                 </calculate>
-                <calculate field-name="totalOrigAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+                <calculate field-name="totalOrigAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                     <calcop operator="add">
                         <calcop operator="get" field-name="totalOrigAmount"/>
                         <calcop operator="get" field-name="origAmount"/>
@@ -2153,7 +2153,7 @@
                     </if-not-empty>
                 </else>
                 </if-not-empty>
-                <calculate field-name="amountAppliedTotal" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+                <calculate field-name="amountAppliedTotal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                     <calcop operator="add">
                         <calcop operator="get" field-name="amountAppliedTotal"/>
                         <calcop operator="get" field-name="paymentApplication.amountApplied"/>
@@ -2161,7 +2161,7 @@
                 </calculate>
                 <set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/>
             </iterate>
-            <calculate field-name="amount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
+            <calculate field-name="amount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
                 <calcop operator="subtract">
                     <calcop operator="get" field-name="payment.amount"/>
                     <calcop operator="get" field-name="amountAppliedTotal"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/olap/FactServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/olap/FactServices.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/olap/FactServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/olap/FactServices.xml Mon Oct 27 01:58:56 2008
@@ -123,7 +123,7 @@
             <set field="fact.extDiscountAmount" value="0.0" type="BigDecimal"/>
             <set field="fact.extTaxAmount" value="0.0" type="BigDecimal"/>
             <set field="fact.extNetAmount" value="0.0" type="BigDecimal"/>
-            <calculate field-name="fact.extGrossAmount" type="BigDecimal">
+            <calculate field-name="fact.extGrossAmount">
                 <calcop field-name="invoiceItem.quantity" operator="multiply">
                     <calcop field-name="invoiceItem.amount" operator="get"/>
                 </calcop>
@@ -133,7 +133,7 @@
             <set field="andConditions.invoiceItemTypeId" value="ITM_SALES_TAX"/>
             <get-related relation-name="ChildrenInvoiceItem" value-name="invoiceItem" list-name="taxes" map-name="andConditions"/>
             <iterate list-name="taxes" entry-name="tax">
-                <calculate field-name="fact.extTaxAmount" type="BigDecimal">
+                <calculate field-name="fact.extTaxAmount">
                     <calcop field-name="fact.extTaxAmount" operator="add">
                         <calcop field-name="tax.amount" operator="get"/>
                     </calcop>
@@ -151,7 +151,7 @@
                 </calculate>
             </iterate>
             
-            <calculate field-name="fact.extNetAmount" type="BigDecimal">
+            <calculate field-name="fact.extNetAmount">
                 <calcop field-name="fact.extGrossAmount" operator="subtract">
                     <calcop field-name="fact.extDiscountAmount" operator="get"/>
                 </calcop>
@@ -163,7 +163,7 @@
             <set field="fact.extStorageCost" value="0.0" type="BigDecimal"/>
             <set field="fact.extDistributionCost" value="0.0" type="BigDecimal"/>
 
-            <calculate field-name="fact.contributionAmount" type="BigDecimal">
+            <calculate field-name="fact.contributionAmount">
                 <calcop field-name="fact.extNetAmount" operator="subtract">
                     <calcop field-name="fact.extManFixedCost" operator="get"/>
                     <calcop field-name="fact.extManVarCost" operator="get"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml Mon Oct 27 01:58:56 2008
@@ -145,10 +145,10 @@
             <entity-one entity-name="Invoice" value-name="invoice"/>
 
             <!-- get the amount that has not been applied yet for the invoice (outstanding amount) -->
-            <set field="notApplied" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice).doubleValue()}" type="Double"/>
+            <set field="notApplied" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
 
             <!-- if the amount to apply goes over the outstanding amount, then use the notApplied amount and log a warning -->
-            <if-compare-field field="paymentAppl.amountApplied" to-field="notApplied" operator="greater" type="Double">
+            <if-compare-field field="paymentAppl.amountApplied" to-field="notApplied" operator="greater" type="BigDecimal">
                 <log level="warning" message="Create Payment Application: Amount to apply [${paymentAppl.amountApplied}] is greater than the outstanding amount [${notApplied}] of the invoice [${invoice.invoiceId}]. Creating Payment Application for outstanding amount [${notApplied}] instead."/>
                 <set field="paymentAppl.amountApplied" from-field="notApplied"/>
             </if-compare-field>
@@ -186,8 +186,8 @@
                     
                     <!-- check if the payment fully applied when set to confirmed-->
                     <if-compare field="parameters.statusId" operator="equals" value="PMNT_CONFIRMED">
-                        <set field="notYetApplied" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(payment)}"/>
-                        <if-compare field="notYetApplied" operator="greater" value="0.00">
+                        <set field="notYetApplied" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(payment)}"/>
+                        <if-compare field="notYetApplied" operator="greater" value="0.00" type="BigDecimal">
                             <add-error><fail-property resource="AccountingUiLabels" property="AccountingPSNotConfirmedNotFullyApplied"/></add-error>
                             <log level="error" message="Cannot change from ${payment.statusId} to ${parameters.statusId}, payment not fully applied: ${notYetapplied}"/>
                             <check-errors/>
@@ -250,10 +250,10 @@
             <set field="invoice" from-field="parameters.invoice"/>
         </else>
         </if-empty>
-        <call-class-method class-name="org.ofbiz.accounting.invoice.InvoiceWorker" method-name="getInvoiceTotalBd" ret-field-name="invoiceTotalAmount">
+        <call-class-method class-name="org.ofbiz.accounting.invoice.InvoiceWorker" method-name="getInvoiceTotal" ret-field-name="invoiceTotalAmount">
             <field field-name="invoice" type="org.ofbiz.entity.GenericValue"/>
         </call-class-method>
-        <call-class-method class-name="org.ofbiz.accounting.invoice.InvoiceWorker" method-name="getInvoiceAppliedBd" ret-field-name="invoiceTotalAmountPaid">
+        <call-class-method class-name="org.ofbiz.accounting.invoice.InvoiceWorker" method-name="getInvoiceApplied" ret-field-name="invoiceTotalAmountPaid">
             <field field-name="invoice" type="org.ofbiz.entity.GenericValue"/>
         </call-class-method>
         <get-related relation-name="InvoiceTerm" value-name="invoice" list-name="invoiceTerms"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml Mon Oct 27 01:58:56 2008
@@ -45,8 +45,8 @@
         <set field="serviceCtx.inventoryItemTypeId" value="NON_SERIAL_INV_ITEM"/>
         <set field="serviceCtx.productId" from-field="productId"/>
         <set field="serviceCtx.facilityId" value="WebStoreWarehouse"/>
-        <set field="serviceCtx.quantityAccepted" value="10" type="Double"/>
-        <set field="serviceCtx.quantityRejected" value="0" type="Double"/>
+        <set field="serviceCtx.quantityAccepted" value="10" type="BigDecimal"/>
+        <set field="serviceCtx.quantityRejected" value="0" type="BigDecimal"/>
         <set field="serviceCtx.shipmentId" from-field="shipmentId"/>
         <set field="serviceCtx.orderId" from-field="orderId"/>
         <set field="serviceCtx.orderItemSeqId" from-field="orderItemSeqId"/>
@@ -104,8 +104,8 @@
         <first-from-list list-name="acctgTransList" entry-name="acctgTrans"/>
         <get-related value-name="acctgTrans" relation-name="AcctgTransEntry" list-name="acctgTransEntries"/>
         
-        <set field="debitTotal" type="Double" value="0.0"/>
-        <set field="creditTotal" type="Double" value="0.0"/>
+        <set field="debitTotal" type="BigDecimal" value="0.0"/>
+        <set field="creditTotal" type="BigDecimal" value="0.0"/>
         
         <assert><not><if-empty field="acctgTransEntries"/></not></assert>
         <iterate list-name="acctgTransEntries" entry-name="acctgTransEntry">
@@ -158,8 +158,8 @@
         <first-from-list list-name="acctgTransList" entry-name="acctgTrans"/>
         <get-related value-name="acctgTrans" relation-name="AcctgTransEntry" list-name="acctgTransEntries"/>
 
-        <set field="debitTotal" type="Double" value="0.0"/>
-        <set field="creditTotal" type="Double" value="0.0"/>
+        <set field="debitTotal" type="BigDecimal" value="0.0"/>
+        <set field="creditTotal" type="BigDecimal" value="0.0"/>
         
         <assert><not><if-empty field="acctgTransEntries"/></not></assert>
         <iterate list-name="acctgTransEntries" entry-name="acctgTransEntry">
@@ -206,7 +206,7 @@
         <set field="shipGroupSeqId" value="00001"/>
         <set field="orderItemSeqId" value="00001"/>
         <set field="inventoryItemId" value="9001"/>
-        <set field="quantity" value="2" type="Double"/>
+        <set field="quantity" value="2" type="BigDecimal"/>
         <set field="productId" value="GZ-2644"/>
 
         <entity-one entity-name="UserLogin" value-name="userLogin" auto-field-map="false">
@@ -326,8 +326,8 @@
         <get-related value-name="payment" relation-name="AcctgTrans" list-name="acctgTransList"/>
         <first-from-list list-name="acctgTransList" entry-name="acctgTrans"/>
         <get-related value-name="acctgTrans" relation-name="AcctgTransEntry" list-name="acctgTransEntries"/>
-        <set field="debitTotal" type="Double" value="0.0"/>
-        <set field="creditTotal" type="Double" value="0.0"/>
+        <set field="debitTotal" type="BigDecimal" value="0.0"/>
+        <set field="creditTotal" type="BigDecimal" value="0.0"/>
 
         <assert><not><if-empty field="acctgTransEntries"/></not></assert>
         <iterate entry-name="acctgTransEntry" list-name="acctgTransEntries">
@@ -389,8 +389,8 @@
         </entity-condition>
         <assert><not><if-empty field="workEffortAndInventoryAssigns"/></not></assert>
 
-        <set field="totalIssuedQty_MAT_A_COST" value="0.0" type="Double"/>
-        <set field="totalIssuedQty_MAT_B_COST" value="0.0" type="Double"/>
+        <set field="totalIssuedQty_MAT_A_COST" value="0.0" type="BigDecimal"/>
+        <set field="totalIssuedQty_MAT_B_COST" value="0.0" type="BigDecimal"/>
         <iterate list-name="workEffortAndInventoryAssigns" entry-name="workEffortAndInventoryAssign">
             <if-compare field="workEffortAndInventoryAssign.productId" operator="equals" value="MAT_A_COST">  
                 <calculate field-name="totalIssuedQty_MAT_A_COST">
@@ -412,8 +412,8 @@
             </if-compare>
         </iterate>
         <assert>
-            <if-compare field="totalIssuedQty_MAT_A_COST" operator="equals" value="4.0" type="Double"/>
-            <if-compare field="totalIssuedQty_MAT_B_COST" operator="equals" value="6.0" type="Double"/>
+            <if-compare field="totalIssuedQty_MAT_A_COST" operator="equals" value="4.0" type="BigDecimal"/>
+            <if-compare field="totalIssuedQty_MAT_B_COST" operator="equals" value="6.0" type="BigDecimal"/>
         </assert>
         <entity-and entity-name="AcctgTrans" list-name="acctgTransList">
             <field-map field-name="acctgTransTypeId" value="INVENTORY"/>
@@ -524,7 +524,7 @@
         <first-from-list list-name="acctgTransEntryList" entry-name="acctgTransEntry"/>
         <assert>
             <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C"/>
-            <if-compare field="acctgTransEntry.origAmount" operator="equals" value="328" type="Double"/>
+            <if-compare field="acctgTransEntry.origAmount" operator="equals" value="328" type="BigDecimal"/>
         </assert>
         
         <!-- For debit entry -->
@@ -537,7 +537,7 @@
         <first-from-list list-name="acctgTransEntryList" entry-name="acctgTransEntry"/>
         <assert>
             <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D"/>
-            <if-compare field="acctgTransEntry.origAmount" operator="equals" value="328" type="Double"/>
+            <if-compare field="acctgTransEntry.origAmount" operator="equals" value="328" type="BigDecimal"/>
         </assert>
         <check-errors/>
     </simple-method>

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/secas_ledger.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/secas_ledger.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/secas_ledger.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/secas_ledger.xml Mon Oct 27 01:58:56 2008
@@ -36,7 +36,7 @@
     
     <!-- create an accounting transactions every time an issuance to sales shipment is canceled -->
     <eca service="cancelOrderItemIssuanceFromSalesShipment" event="commit">
-        <condition field-name="canceledQuantity" operator="greater" value="0" type="Double"/>
+        <condition field-name="canceledQuantity" operator="greater" value="0" type="BigDecimal"/>
         <action service="createAcctgTransForCanceledSalesShipmentIssuance" mode="sync"/>
     </eca>