Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_admin.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_admin.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_admin.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_admin.xml Mon Oct 27 01:58:56 2008 @@ -69,7 +69,7 @@ <permission-service service-name="acctgFxPermissionCheck" main-action="UPDATE"/> <attribute type="String" mode="IN" name="uomId" optional="false"/> <attribute type="String" mode="IN" name="uomIdTo" optional="false"/> - <attribute type="Double" mode="IN" name="conversionFactor" optional="false"/> + <attribute type="BigDecimal" mode="IN" name="conversionFactor" optional="false"/> <attribute type="Timestamp" mode="IN" name="asOfTimestamp" optional="true"/> </service> Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_billing.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_billing.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_billing.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_billing.xml Mon Oct 27 01:58:56 2008 @@ -29,7 +29,7 @@ location="org/ofbiz/accounting/payment/BillingServices.xml" invoke="createBillingAccount"> <description>Create a Billing Account</description> <permission-service service-name="acctgBillingAcctCheck" main-action="CREATE"/> - <attribute name="accountLimit" type="Double" mode="IN" optional="true"/> + <attribute name="accountLimit" type="BigDecimal" mode="IN" optional="true"/> <attribute name="accountCurrencyUomId" type="String" mode="IN" optional="true"/> <attribute name="description" type="String" mode="IN" optional="true"/> <attribute name="contactMechId" type="String" mode="IN" optional="true"/> @@ -44,7 +44,7 @@ <description>Update a Billing Account</description> <permission-service service-name="acctgBillingAcctCheck" main-action="UPDATE"/> <attribute name="billingAccountId" type="String" mode="IN" optional="false"/> - <attribute name="accountLimit" type="Double" mode="IN" optional="true"/> + <attribute name="accountLimit" type="BigDecimal" mode="IN" optional="true"/> <attribute name="accountCurrencyUomId" type="String" mode="IN" optional="true"/> <attribute name="description" type="String" mode="IN" optional="true"/> <attribute name="contactMechId" type="String" mode="IN" optional="true"/> @@ -107,10 +107,10 @@ location="org.ofbiz.accounting.payment.BillingAccountWorker" invoke="calcBillingAccountBalance"> <description>Calculate the balance of a Billing Account</description> <attribute name="billingAccountId" type="String" mode="IN" optional="false"/> - <attribute name="accountBalance" type="Double" mode="OUT" optional="false"/> - <attribute name="netAccountBalance" type="Double" mode="OUT" optional="false"/> - <attribute name="availableBalance" type="Double" mode="OUT" optional="false"/> - <attribute name="availableToCapture" type="Double" mode="OUT" optional="false"/> + <attribute name="accountBalance" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="netAccountBalance" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="availableBalance" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="availableToCapture" type="BigDecimal" mode="OUT" optional="false"/> <attribute name="billingAccount" type="GenericValue" mode="OUT" optional="false"/> </service> <service name="acctgBillingAcctCheck" engine="simple" Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_finaccount.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_finaccount.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_finaccount.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_finaccount.xml Mon Oct 27 01:58:56 2008 @@ -44,9 +44,9 @@ </auto-attributes> <attribute name="oldStatusId" type="String" mode="OUT" optional="true"/> <attribute name="oldReplenishPaymentId" type="String" mode="OUT" optional="true"/> - <attribute name="oldReplenishLevel" type="Double" mode="OUT" optional="true"/> + <attribute name="oldReplenishLevel" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="replenishPaymentId" type="String" mode="OUT" optional="true"/> - <attribute name="replenishLevel" type="Double" mode="OUT" optional="true"/> + <attribute name="replenishLevel" type="BigDecimal" mode="OUT" optional="true"/> </service> <service name="deleteFinAccount" engine="simple" default-entity-name="FinAccount" location="org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="deleteFinAccount"> @@ -145,9 +145,9 @@ <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="orderItemSeqId" type="String" mode="IN" optional="true"/> <attribute name="reasonEnumId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> - <attribute name="balance" type="Double" mode="OUT" optional="false"/> - <attribute name="previousBalance" type="Double" mode="OUT" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="previousBalance" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> </service> @@ -163,9 +163,9 @@ <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="orderItemSeqId" type="String" mode="IN" optional="true"/> <attribute name="reasonEnumId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> - <attribute name="balance" type="Double" mode="OUT" optional="false"/> - <attribute name="previousBalance" type="Double" mode="OUT" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="previousBalance" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> </service> @@ -184,8 +184,8 @@ location="org.ofbiz.accounting.finaccount.FinAccountServices" invoke="checkFinAccountBalance" auth="true"> <description>Checks the balance of the financial account</description> <attribute name="finAccountId" type="String" mode="IN" optional="false"/> - <attribute name="availableBalance" type="Double" mode="OUT" optional="false"/> - <attribute name="balance" type="Double" mode="OUT" optional="false"/> + <attribute name="availableBalance" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="false"/> <attribute name="statusId" type="String" mode="OUT" optional="false"/> </service> <service name="checkFinAccountStatus" engine="java" @@ -203,7 +203,7 @@ <attribute name="reasonEnumId" type="String" mode="IN" optional="true"/> <attribute name="comments" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="false"/> - <attribute name="amount" type="Double" mode="IN" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="currencyUomId" type="String" mode="IN" optional="true"/> <attribute name="productStoreId" type="String" mode="IN" optional="true"/> <attribute name="finAccountTypeId" type="String" mode="IN" default-value="SVCCRED_ACCOUNT"/> @@ -217,9 +217,9 @@ <attribute name="reasonEnumId" type="String" mode="IN" optional="true"/> <attribute name="comments" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="false"/> - <attribute name="amount" type="Double" mode="IN" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="replenishPaymentId" type="String" mode="IN" optional="true"/> - <attribute name="replenishLevel" type="Double" mode="IN" optional="true"/> + <attribute name="replenishLevel" type="BigDecimal" mode="IN" optional="true"/> <attribute name="currencyUomId" type="String" mode="IN" optional="true"/> <attribute name="productStoreId" type="String" mode="IN" optional="true"/> <attribute name="finAccountTypeId" type="String" mode="IN" optional="false"/> @@ -263,7 +263,7 @@ location="org.ofbiz.accounting.payment.GiftCertificateServices" invoke="createGiftCertificate" auth="true"> <description>Generate a Gift Certificate number/pin and store as a FinAccount</description> <attribute name="productStoreId" type="String" mode="IN" optional="false"/> - <attribute name="initialAmount" type="Double" mode="INOUT" optional="false"/> + <attribute name="initialAmount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="currency" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> <attribute name="cardNumber" type="String" mode="OUT" optional="false"/> @@ -278,11 +278,11 @@ <attribute name="productStoreId" type="String" mode="IN" optional="false"/> <attribute name="cardNumber" type="String" mode="IN" optional="false"/> <attribute name="pinNumber" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="currency" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="balance" type="Double" mode="OUT" optional="false"/> - <attribute name="previousBalance" type="Double" mode="OUT" optional="true"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="previousBalance" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> @@ -293,11 +293,11 @@ <attribute name="productStoreId" type="String" mode="IN" optional="false"/> <attribute name="cardNumber" type="String" mode="IN" optional="false"/> <attribute name="pinNumber" type="String" mode="IN" optional="false"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="currency" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="balance" type="Double" mode="OUT" optional="false"/> - <attribute name="previousBalance" type="Double" mode="OUT" optional="true"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="previousBalance" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> @@ -308,7 +308,7 @@ <attribute name="cardNumber" type="String" mode="IN" optional="false"/> <attribute name="pinNumber" type="String" mode="IN" optional="false"/> <attribute name="currency" type="String" mode="IN" optional="true"/> - <attribute name="balance" type="Double" mode="OUT" optional="false"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="false"/> </service> <service name="createGcFulFillmentRecord" engine="java" require-new-transaction="true" use-transaction="true" @@ -322,7 +322,7 @@ <attribute name="surveyResponseId" type="String" mode="IN" optional="true"/> <attribute name="cardNumber" type="String" mode="IN" optional="true"/> <attribute name="pinNumber" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="IN" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="IN" optional="true"/> <attribute name="responseCode" type="String" mode="IN" optional="true"/> <attribute name="referenceNum" type="String" mode="IN" optional="true"/> <attribute name="authCode" type="String" mode="IN" optional="true"/> Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_fixedasset.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_fixedasset.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_fixedasset.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_fixedasset.xml Mon Oct 27 01:58:56 2008 @@ -74,7 +74,7 @@ <attribute name="fixedAssetId" type="Id" mode="IN" optional="false"/> <attribute name="exceptionDateStartTime" type="Timestamp" mode="IN" optional="false"/> <attribute name="exceptionCapacity" type="Timestamp" mode="IN" optional="false"/> - <attribute name="capacity" type="Double" mode="IN" optional="true"/> + <attribute name="capacity" type="BigDecimal" mode="IN" optional="true"/> </service> --> @@ -258,8 +258,8 @@ <description>Interface to describe base parameters for Depreciation Calculation Services</description> <attribute name="expEndOfLifeYear" type="Integer" mode="IN" optional="false"/> <attribute name="assetAcquiredYear" type="Integer" mode="IN" optional="false"/> - <attribute name="purchaseCost" type="Double" mode="IN" optional="false"/> - <attribute name="salvageValue" type="Double" mode="IN" optional="false"/> + <attribute name="purchaseCost" type="BigDecimal" mode="IN" optional="false"/> + <attribute name="salvageValue" type="BigDecimal" mode="IN" optional="false"/> <attribute name="usageYears" type="Integer" mode="IN" optional="false"/> <attribute name="assetDepreciationTillDate" type="List" mode="OUT" optional="false"/> <attribute name="assetNBVAfterDepreciation" type="List" mode="OUT" optional="false"/> Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_invoice.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_invoice.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_invoice.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_invoice.xml Mon Oct 27 01:58:56 2008 @@ -174,7 +174,7 @@ </description> <attribute name="invoiceId" type="String" mode="IN" optional="false"/> <attribute name="invoiceItemSeqId" type="String" mode="IN" optional="true"/> - <attribute name="amountApplied" type="Double" mode="IN" optional="false"/> + <attribute name="amountApplied" type="BigDecimal" mode="IN" optional="false"/> <attribute name="invoicesCreated" type="List" mode="OUT" optional="true"/> </service> <service name="sampleInvoiceAffiliateCommission" engine="simple" @@ -262,7 +262,7 @@ <attribute name="contactMechId" type="String" mode="OUT" optional="true"/> </service> <service name="calculateInvoicedAdjustmentTotal" engine="java" - location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="calculateInvoicedAdjustmentTotalBd"> + location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="calculateInvoicedAdjustmentTotal"> <description>Calculate the previously invoiced amount for an OrderAdjustment</description> <attribute name="orderAdjustment" type="GenericValue" mode="IN" optional="false"/> <attribute name="invoicedTotal" type="BigDecimal" mode="OUT" optional="false"/> Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_ledger.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_ledger.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_ledger.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_ledger.xml Mon Oct 27 01:58:56 2008 @@ -93,9 +93,9 @@ <description>Calculate Trial Balance for a GlJournal</description> <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="VIEW"/> <auto-attributes include="pk" mode="IN" optional="false"/> - <attribute name="debitTotal" type="Double" mode="OUT" optional="false"/> - <attribute name="creditTotal" type="Double" mode="OUT" optional="false"/> - <attribute name="debitCreditDifference" type="Double" mode="OUT" optional="false"/> + <attribute name="debitTotal" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="creditTotal" type="BigDecimal" mode="OUT" optional="false"/> + <attribute name="debitCreditDifference" type="BigDecimal" mode="OUT" optional="false"/> </service> <service name="postGlJournal" default-entity-name="GlJournal" engine="simple" location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="postGlJournal" auth="true"> @@ -301,7 +301,7 @@ <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/> <attribute name="thruDate" type="Timestamp" mode="IN" optional="false"/> <attribute name="glFiscalTypeId" type="String" mode="IN" optional="false"/> - <attribute name="totalNetIncome" type="Double" mode="OUT" optional="false"/> + <attribute name="totalNetIncome" type="BigDecimal" mode="OUT" optional="false"/> <attribute name="glAccountTotalsMap" type="Map" mode="OUT" optional="true"/> <attribute name="glAccountTotalsList" type="List" mode="OUT" optional="true"/> </service> @@ -363,7 +363,7 @@ location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createAcctgTransForCanceledSalesShipmentIssuance"> <description>Create an accounting transaction for a canceled sales shipment issuance (D: INVENTORY_ACCOUNT, C: COGS_ACCOUNT)</description> <attribute name="itemIssuanceId" type="String" mode="IN" optional="false"/> - <attribute name="canceledQuantity" type="Double" mode="IN" optional="false"/> + <attribute name="canceledQuantity" type="BigDecimal" mode="IN" optional="false"/> <attribute name="acctgTransId" type="String" mode="OUT" optional="true"/> </service> <service name="createAcctgTransForInventoryItemCostChange" engine="simple" auth="true" Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_payment.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_payment.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_payment.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_payment.xml Mon Oct 27 01:58:56 2008 @@ -75,7 +75,7 @@ <attribute name="billingAccountId" type="String" mode="IN" optional="true"/> <attribute name="overrideGlAccountId" type="String" mode="IN" optional="true"/> <attribute name="taxAuthGeoId" type="String" mode="IN" optional="true"/> - <attribute name="amountApplied" type="Double" mode="IN" optional="false"/> + <attribute name="amountApplied" type="BigDecimal" mode="IN" optional="false"/> <attribute name="paymentApplicationId" type="String" mode="OUT" optional="false"/> </service> <service name="updatePaymentApplication" default-entity-name="PaymentApplication" engine="java" Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_paymentmethod.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_paymentmethod.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_paymentmethod.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_paymentmethod.xml Mon Oct 27 01:58:56 2008 @@ -187,7 +187,7 @@ <attribute name="paymentMethodId" type="String" mode="IN" optional="false"/> <attribute name="productStoreId" type="String" mode="IN" optional="false"/> <attribute name="securityCode" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="IN" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="IN" optional="false"/> </service> <service name="manualForcedCcTransaction" engine="java" location="org.ofbiz.accounting.payment.PaymentGatewayServices" invoke="processManualCcTx" auth="true"> @@ -217,7 +217,7 @@ <attribute name="stateProvinceGeoId" type="String" mode="IN" optional="true"/> <attribute name="postalCode" type="String" mode="IN" optional="false"/> <attribute name="countryGeoId" type="String" mode="IN" optional="false"/> - <attribute name="amount" type="Double" mode="IN" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="referenceCode" type="String" mode="IN" optional="true"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> <attribute name="tranRespMsgs" type="List" mode="OUT" optional="true"/> @@ -246,11 +246,11 @@ location="org.ofbiz.accounting.payment.PaymentGatewayServices" invoke="authOrderPaymentPreference" auth="true"> <description>Process (authorizes/re-authorizes) a single payment for an order with an optional overrideAmount</description> <attribute name="orderPaymentPreferenceId" type="String" mode="IN" optional="false"/> - <attribute name="overrideAmount" type="Double" mode="IN" optional="true"/> + <attribute name="overrideAmount" type="BigDecimal" mode="IN" optional="true"/> <attribute name="finished" type="Boolean" mode="OUT" optional="false"/> <attribute name="errors" type="Boolean" mode="OUT" optional="false"/> <attribute name="messages" type="List" mode="OUT" optional="true"/> - <attribute name="processAmount" type="Double" mode="OUT" optional="true"/> + <attribute name="processAmount" type="BigDecimal" mode="OUT" optional="true"/> </service> <service name="authOrderPayments" engine="java" @@ -289,7 +289,7 @@ <attribute name="orderId" type="String" mode="IN" optional="false"/> <attribute name="invoiceId" type="String" mode="IN" optional="true"/> <attribute name="billingAccountId" type="String" mode="IN" optional="true"/> - <attribute name="captureAmount" type="Double" mode="IN" optional="false"/> + <attribute name="captureAmount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="processResult" type="String" mode="OUT" optional="false"/> </service> @@ -299,7 +299,7 @@ <description>Records a settlement or payment of an invoice by a billing account for the given captureAmount</description> <attribute name="invoiceId" type="String" mode="IN" optional="false"/> <attribute name="billingAccountId" type="String" mode="IN" optional="false"/> - <attribute name="captureAmount" type="Double" mode="IN" optional="false"/> + <attribute name="captureAmount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="paymentId" type="String" mode="OUT" optional="false"/> <attribute name="paymentGatewayResponseId" type="String" mode="OUT" optional="true"/> @@ -309,7 +309,7 @@ <description>Applies (part of) the unapplied payment applications associated to the billing account to the given invoice.</description> <attribute name="billingAccountId" type="String" mode="IN" optional="false"/> <attribute name="invoiceId" type="String" mode="IN" optional="false"/> - <attribute name="captureAmount" type="Double" mode="INOUT" optional="false"/> + <attribute name="captureAmount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> </service> @@ -324,7 +324,7 @@ location="org.ofbiz.accounting.payment.PaymentGatewayServices" invoke="refundPayment" auth="true"> <description>Refunds A Payment</description> <attribute name="orderPaymentPreference" type="GenericValue" mode="IN" optional="false"/> - <attribute name="refundAmount" type="Double" mode="IN" optional="false"/> + <attribute name="refundAmount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="paymentId" type="String" mode="OUT" optional="false"/> </service> @@ -332,7 +332,7 @@ location="org.ofbiz.accounting.payment.PaymentGatewayServices" invoke="processAuthResult" auth="true"> <description>Process the payment authorization result(s)</description> <attribute name="orderPaymentPreference" type="GenericValue" mode="IN" optional="false"/> - <attribute name="processAmount" type="Double" mode="IN" optional="false"/> + <attribute name="processAmount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="currencyUomId" type="String" mode="IN" optional="true"/> <attribute name="authResult" type="Boolean" mode="IN" optional="false"/> <attribute name="serviceTypeEnum" type="String" mode="IN" optional="true"/> @@ -354,7 +354,7 @@ <attribute name="serviceTypeEnum" type="String" mode="IN" optional="true"/> <attribute name="payToPartyId" type="String" mode="IN" optional="true"/> <attribute name="invoiceId" type="String" mode="IN" optional="true"/> - <attribute name="captureAmount" type="Double" mode="IN" optional="false"/> + <attribute name="captureAmount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="currencyUomId" type="String" mode="IN" optional="true"/> <attribute name="captureResult" type="Boolean" mode="IN" optional="false"/> <attribute name="captureAltRefNum" type="String" mode="IN" optional="true"/> @@ -369,7 +369,7 @@ location="org.ofbiz.accounting.payment.PaymentGatewayServices" invoke="processReleaseResult" auth="true"> <description>Process the payment release result(s)</description> <attribute name="orderPaymentPreference" type="GenericValue" mode="IN" optional="false"/> - <attribute name="releaseAmount" type="Double" mode="IN" optional="false"/> + <attribute name="releaseAmount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="currencyUomId" type="String" mode="IN" optional="true"/> <attribute name="releaseResult" type="Boolean" mode="IN" optional="false"/> <attribute name="releaseAltRefNum" type="String" mode="IN" optional="true"/> @@ -388,7 +388,7 @@ <attribute name="payFromPartyId" type="String" mode="IN" optional="true"/> <attribute name="payToPartyId" type="String" mode="IN" optional="true"/> <attribute name="invoiceId" type="String" mode="IN" optional="true"/> - <attribute name="refundAmount" type="Double" mode="IN" optional="false"/> + <attribute name="refundAmount" type="BigDecimal" mode="IN" optional="false"/> <attribute name="currencyUomId" type="String" mode="IN" optional="true"/> <attribute name="refundResult" type="Boolean" mode="IN" optional="false"/> <attribute name="refundAltRefNum" type="String" mode="IN" optional="true"/> @@ -420,7 +420,7 @@ <description>Generic Payment Processing Interface</description> <attribute name="orderId" type="String" mode="IN" optional="false"/> <attribute name="orderPaymentPreference" type="GenericValue" mode="IN" optional="false"/> - <attribute name="processAmount" type="Double" mode="INOUT" optional="false"/> + <attribute name="processAmount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="orderItems" type="List" mode="IN" optional="false"/> <attribute name="billToParty" type="GenericValue" mode="IN" optional="false"/> <attribute name="billToEmail" type="GenericValue" mode="IN" optional="true"/> @@ -455,7 +455,7 @@ <service name="paymentReleaseInterface" engine="interface" location="" invoke=""> <description>Generic Payment Release (reverse) Interface</description> <attribute name="orderPaymentPreference" type="GenericValue" mode="IN" optional="false"/> - <attribute name="releaseAmount" type="Double" mode="INOUT" optional="false"/> + <attribute name="releaseAmount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="currency" type="String" mode="IN" optional="true"/> <attribute name="paymentConfig" type="String" mode="IN" optional="true"/> <attribute name="authTrans" type="GenericValue" mode="IN" optional="true"/> @@ -471,7 +471,7 @@ <service name="paymentCreditInterface" engine="interface" location="" invoke=""> <description>Generic Payment Credit Interface</description> <attribute name="referenceCode" type="String" mode="IN" optional="false"/> - <attribute name="creditAmount" type="Double" mode="INOUT" optional="false"/> + <attribute name="creditAmount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="orderItems" type="List" mode="IN" optional="true"/> <attribute name="billToParty" type="GenericValue" mode="IN" optional="false"/> <attribute name="billToEmail" type="GenericValue" mode="IN" optional="true"/> @@ -490,7 +490,7 @@ <service name="paymentRefundInterface" engine="interface" location="" invoke=""> <description>Generic Payment Refund Interface</description> <attribute name="orderPaymentPreference" type="GenericValue" mode="IN" optional="false"/> - <attribute name="refundAmount" type="Double" mode="INOUT" optional="false"/> + <attribute name="refundAmount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="currency" type="String" mode="IN" optional="true"/> <attribute name="paymentConfig" type="String" mode="IN" optional="true"/> <attribute name="refundResult" type="Boolean" mode="OUT" optional="false"/> @@ -513,7 +513,7 @@ <service name="ccCaptureInterface" engine="interface" location="" invoke=""> <description>Credit Card Capture Interface</description> <attribute name="orderPaymentPreference" type="GenericValue" mode="IN" optional="false"/> - <attribute name="captureAmount" type="Double" mode="INOUT" optional="false"/> + <attribute name="captureAmount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="currency" type="String" mode="IN" optional="true"/> <attribute name="paymentConfig" type="String" mode="IN" optional="true"/> <attribute name="authTrans" type="GenericValue" mode="IN" optional="true"/> Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_valuelink.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_valuelink.xml?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_valuelink.xml (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/servicedef/services_valuelink.xml Mon Oct 27 01:58:56 2008 @@ -84,7 +84,7 @@ <attribute name="currency" type="String" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> @@ -101,7 +101,7 @@ <attribute name="currency" type="String" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> @@ -120,12 +120,12 @@ <attribute name="currency" type="String" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> - <attribute name="previousAmount" type="Double" mode="OUT" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> + <attribute name="previousAmount" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> - <attribute name="cashBack" type="Double" mode="OUT" optional="true"/> + <attribute name="cashBack" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="expireDate" type="String" mode="OUT" optional="true"/> <attribute name="cardClass" type="String" mode="OUT" optional="true"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> @@ -139,12 +139,12 @@ <attribute name="currency" type="String" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> - <attribute name="previousAmount" type="Double" mode="OUT" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> + <attribute name="previousAmount" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> - <attribute name="cashBack" type="Double" mode="OUT" optional="true"/> + <attribute name="cashBack" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="expireDate" type="String" mode="OUT" optional="true"/> <attribute name="cardClass" type="String" mode="OUT" optional="true"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> @@ -158,8 +158,8 @@ <attribute name="currency" type="String" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> - <attribute name="previousAmount" type="Double" mode="OUT" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> + <attribute name="previousAmount" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> @@ -176,8 +176,8 @@ <attribute name="currency" type="String" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> - <attribute name="previousAmount" type="Double" mode="OUT" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> + <attribute name="previousAmount" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> @@ -196,7 +196,7 @@ <attribute name="partyId" type="String" mode="IN" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> - <attribute name="balance" type="Double" mode="OUT" optional="true"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="expireDate" type="String" mode="OUT" optional="true"/> <attribute name="cardClass" type="String" mode="OUT" optional="true"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> @@ -211,7 +211,7 @@ <attribute name="partyId" type="String" mode="IN" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> - <attribute name="balance" type="Double" mode="OUT" optional="true"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="history" type="List" mode="OUT" optional="true"/> <attribute name="expireDate" type="String" mode="OUT" optional="true"/> <attribute name="cardClass" type="String" mode="OUT" optional="true"/> @@ -226,8 +226,8 @@ <attribute name="currency" type="String" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> - <attribute name="previousAmount" type="Double" mode="OUT" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> + <attribute name="previousAmount" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> @@ -244,8 +244,8 @@ <attribute name="currency" type="String" mode="IN" optional="false"/> <attribute name="orderId" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="amount" type="Double" mode="INOUT" optional="false"/> - <attribute name="previousAmount" type="Double" mode="OUT" optional="true"/> + <attribute name="amount" type="BigDecimal" mode="INOUT" optional="false"/> + <attribute name="previousAmount" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> @@ -265,7 +265,7 @@ <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> <attribute name="authCode" type="String" mode="OUT" optional="true"/> - <attribute name="amount" type="Double" mode="OUT" optional="false"/> + <attribute name="amount" type="BigDecimal" mode="OUT" optional="false"/> <attribute name="expireDate" type="String" mode="OUT" optional="true"/> <attribute name="cardClass" type="String" mode="OUT" optional="true"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> @@ -280,7 +280,7 @@ <attribute name="partyId" type="String" mode="IN" optional="true"/> <attribute name="processResult" type="Boolean" mode="OUT" optional="false"/> <attribute name="responseCode" type="String" mode="OUT" optional="false"/> - <attribute name="balance" type="Double" mode="OUT" optional="true"/> + <attribute name="balance" type="BigDecimal" mode="OUT" optional="true"/> <attribute name="expireDate" type="String" mode="OUT" optional="true"/> <attribute name="cardClass" type="String" mode="OUT" optional="true"/> <attribute name="referenceNum" type="String" mode="OUT" optional="false"/> Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/GlEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/GlEvents.java?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/GlEvents.java (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/GlEvents.java Mon Oct 27 01:58:56 2008 @@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.math.BigDecimal; import java.util.Map; import java.util.List; import java.util.Iterator; @@ -50,13 +51,13 @@ String acctgTransEntrySeqId; String glAccountId = null; String organizationPartyId = null; - double reconciledBalance = 0.00; + BigDecimal reconciledBalance = BigDecimal.ZERO; boolean isSelected; String debitCreditFlag; // The number of multi form rows is retrieved int rowCount = UtilHttp.getMultiFormRowCount(ctx); for (int i = 0; i < rowCount; i++) { //for calculating amount per glAccountId - double amount = 0.00; + BigDecimal amount = BigDecimal.ZERO; String suffix = UtilHttp.MULTI_ROW_DELIMITER + i; isSelected = (ctx.containsKey("_rowSubmit" + suffix) && "Y".equalsIgnoreCase((String)ctx.get("_rowSubmit" + suffix))); if (!isSelected) { @@ -75,20 +76,20 @@ acctgTransEntry = (GenericValue) acctgTransEntryItr.next(); debitCreditFlag = (String) acctgTransEntry.getString("debitCreditFlag"); if ("D".equalsIgnoreCase(debitCreditFlag)) { - amount += acctgTransEntry.getDouble("amount"); //for debit + amount = amount.add(acctgTransEntry.getBigDecimal("amount")); //for debit } else { - amount -= acctgTransEntry.getDouble("amount"); //for credit + amount = amount.subtract(acctgTransEntry.getBigDecimal("amount")); //for credit } } } - reconciledBalance += amount; //total balance per glAccountId + reconciledBalance = reconciledBalance.add(amount); //total balance per glAccountId } catch (GenericEntityException e) { Debug.logError(e, module); return "error"; } } - Map fieldMap = UtilMisc.toMap("glReconciliationName", "Reconciliation at date " + UtilDateTime.nowTimestamp(), "glAccountId", glAccountId, "organizationPartyId", organizationPartyId, "reconciledDate", UtilDateTime.nowTimestamp(), "reconciledBalance", new Double(reconciledBalance), "userLogin", userLogin); + Map fieldMap = UtilMisc.toMap("glReconciliationName", "Reconciliation at date " + UtilDateTime.nowTimestamp(), "glAccountId", glAccountId, "organizationPartyId", organizationPartyId, "reconciledDate", UtilDateTime.nowTimestamp(), "reconciledBalance", reconciledBalance, "userLogin", userLogin); Map glReconResult = null; try { glReconResult = dispatcher.runSync("createGlReconciliation", fieldMap); //create GlReconciliation for the glAccountId Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java Mon Oct 27 01:58:56 2008 @@ -65,7 +65,7 @@ String finAccountPin = (String) context.get("finAccountPin"); String finAccountId = (String) context.get("finAccountId"); String orderId = (String) context.get("orderId"); - Double amount = (Double) context.get("processAmount"); + BigDecimal amount = (BigDecimal) context.get("processAmount"); // check for an existing auth trans and cancel it GenericValue authTrans = PaymentGatewayServices.getAuthTransaction(paymentPref); @@ -201,7 +201,7 @@ availableBalance = FinAccountHelper.ZERO; } else { BigDecimal availableBalanceOriginal = availableBalance; - availableBalance = (availableBalance).setScale(FinAccountHelper.decimals, FinAccountHelper.rounding); + availableBalance = availableBalance.setScale(FinAccountHelper.decimals, FinAccountHelper.rounding); if (availableBalance != availableBalanceOriginal) { Debug.logWarning("In finAccountPreAuth for finAccountId [" + finAccountId + "] availableBalance [" + availableBalanceOriginal + "] was different after rounding [" + availableBalance + "]; it should never have made it into the database this way, so check whatever put it there.", module); } @@ -213,13 +213,13 @@ Boolean processResult; String refNum; - // turn amount into a big decimal, making sure to round and scale it to the same as availableBalance - BigDecimal amountBd = (new BigDecimal(amount)).setScale(FinAccountHelper.decimals, FinAccountHelper.rounding); + // make sure to round and scale it to the same as availableBalance + amount = amount.setScale(FinAccountHelper.decimals, FinAccountHelper.rounding); - Debug.logInfo("Allow auth to negative: " + allowAuthToNegative + " :: available: " + availableBalance + " comp: " + minBalance + " = " + availableBalance.compareTo(minBalance) + " :: req: " + amountBd, module); + Debug.logInfo("Allow auth to negative: " + allowAuthToNegative + " :: available: " + availableBalance + " comp: " + minBalance + " = " + availableBalance.compareTo(minBalance) + " :: req: " + amount, module); // check the available balance to see if we can auth this tx if (("Y".equals(allowAuthToNegative) && availableBalance.compareTo(minBalance) > -1) - || (availableBalance.compareTo(amountBd) > -1)) { + || (availableBalance.compareTo(amount) > -1)) { Timestamp thruDate; if (finAccountSettings != null && finAccountSettings.getLong("authValidDays") != null) { @@ -286,7 +286,7 @@ Map result = ServiceUtil.returnSuccess(); result.put("releaseRefNum", authTransaction.getString("referenceNum")); - result.put("releaseAmount", authTransaction.getDouble("amount")); + result.put("releaseAmount", authTransaction.getBigDecimal("amount")); result.put("releaseResult", Boolean.TRUE); // if there's an error, don't release @@ -308,7 +308,7 @@ GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); GenericValue userLogin = (GenericValue) context.get("userLogin"); GenericValue authTrans = (GenericValue) context.get("authTrans"); - Double amount = (Double) context.get("captureAmount"); + BigDecimal amount = (BigDecimal) context.get("captureAmount"); String currency = (String) context.get("currency"); // get the authorization transaction @@ -408,7 +408,7 @@ // create the capture response Map result = ServiceUtil.returnSuccess(); Boolean processResult = (Boolean) withdrawResp.get("processResult"); - Double withdrawAmount = (Double) withdrawResp.get("amount"); + BigDecimal withdrawAmount = (BigDecimal) withdrawResp.get("amount"); String referenceNum = (String) withdrawResp.get("referenceNum"); result.put("captureResult", processResult); result.put("captureRefNum", referenceNum); @@ -425,7 +425,7 @@ GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); GenericValue userLogin = (GenericValue) context.get("userLogin"); - Double amount = (Double) context.get("refundAmount"); + BigDecimal amount = (BigDecimal) context.get("refundAmount"); String currency = (String) context.get("currency"); String finAccountId = (String) context.get("finAccountId"); @@ -479,7 +479,7 @@ // create the refund response Map result = ServiceUtil.returnSuccess(); Boolean processResult = (Boolean) depositResp.get("processResult"); - Double depositAmount = (Double) depositResp.get("amount"); + BigDecimal depositAmount = (BigDecimal) depositResp.get("amount"); String referenceNum = (String) depositResp.get("referenceNum"); result.put("refundResult", processResult); result.put("refundRefNum", referenceNum); @@ -502,7 +502,7 @@ String reasonEnumId = (String) context.get("reasonEnumId"); String orderId = (String) context.get("orderId"); Boolean requireBalance = (Boolean) context.get("requireBalance"); - Double amount = (Double) context.get("amount"); + BigDecimal amount = (BigDecimal) context.get("amount"); if (requireBalance == null) requireBalance = Boolean.TRUE; final String WITHDRAWAL = "WITHDRAWAL"; @@ -517,7 +517,7 @@ } // validate the amount - if (amount < 0.00) { + if (amount.compareTo(BigDecimal.ZERO) < 0) { return ServiceUtil.returnError("Amount should be a positive number."); } @@ -548,7 +548,7 @@ BigDecimal balance; String refNum; Boolean procResult; - if (requireBalance && previousBalance.doubleValue() < amount) { + if (requireBalance && previousBalance.compareTo(amount) < 0) { procResult = Boolean.FALSE; balance = previousBalance; refNum = "N/A"; @@ -571,8 +571,8 @@ } Map result = ServiceUtil.returnSuccess(); - result.put("previousBalance", previousBalance.doubleValue()); - result.put("balance", balance.doubleValue()); + result.put("previousBalance", previousBalance); + result.put("balance", balance); result.put("amount", amount); result.put("processResult", procResult); result.put("referenceNum", refNum); @@ -591,7 +591,7 @@ String reasonEnumId = (String) context.get("reasonEnumId"); String orderId = (String) context.get("orderId"); Boolean isRefund = (Boolean) context.get("isRefund"); - Double amount = (Double) context.get("amount"); + BigDecimal amount = (BigDecimal) context.get("amount"); final String DEPOSIT = isRefund == null || !isRefund ? "DEPOSIT" : "ADJUSTMENT"; @@ -646,7 +646,7 @@ if (actualBalance == null) { actualBalance = FinAccountHelper.ZERO; } else { - if (actualBalance.doubleValue() < 0) { + if (actualBalance.compareTo(BigDecimal.ZERO) < 0) { // balance went below zero, set negative pending replenishment status so that no more auths or captures will go through until it is replenished try { Map rollbackCtx = UtilMisc.toMap("userLogin", userLogin, "finAccountId", finAccountId, "statusId", "FNACT_NEGPENDREPL"); @@ -659,8 +659,8 @@ } Map result = ServiceUtil.returnSuccess(); - result.put("previousBalance", previousBalance.doubleValue()); - result.put("balance", actualBalance.doubleValue()); + result.put("previousBalance", previousBalance); + result.put("balance", actualBalance); result.put("amount", amount); result.put("processResult", Boolean.TRUE); result.put("referenceNum", refNum); @@ -727,15 +727,14 @@ return ServiceUtil.returnSuccess(); } - Double replThres = finAccountSettings.getDouble("replenishThreshold"); - if (replThres == null) { + BigDecimal replenishThreshold = finAccountSettings.getBigDecimal("replenishThreshold"); + if (replenishThreshold == null) { Debug.logWarning("finAccountReplenish Warning: not replenishing FinAccount [" + finAccountId + "] because ProductStoreFinActSetting.replenishThreshold field was null for: " + psfasFindMap, module); return ServiceUtil.returnSuccess(); } - BigDecimal replenishThreshold = new BigDecimal(replThres); BigDecimal replenishLevel = finAccount.getBigDecimal("replenishLevel"); - if (replenishLevel == null || replenishLevel.compareTo(FinAccountHelper.ZERO) == 0) { + if (replenishLevel == null || replenishLevel.compareTo(BigDecimal.ZERO) == 0) { Debug.logWarning("finAccountReplenish Warning: not replenishing FinAccount [" + finAccountId + "] because FinAccount.replenishLevel field was null or 0", module); // no replenish level set; this account goes not support auto-replenish return ServiceUtil.returnSuccess(); @@ -803,7 +802,7 @@ } // hit the payment method for the amount to replenish - Map orderItemMap = UtilMisc.toMap("Auto-Replenishment FA #" + finAccountId, depositAmount.doubleValue()); + Map orderItemMap = UtilMisc.toMap("Auto-Replenishment FA #" + finAccountId, depositAmount); Map replOrderCtx = FastMap.newInstance(); replOrderCtx.put("productStoreId", productStoreId); replOrderCtx.put("paymentMethodId", paymentMethod.getString("paymentMethodId")); @@ -831,7 +830,7 @@ depositCtx.put("partyId", ownerPartyId); depositCtx.put("orderId", orderId); depositCtx.put("orderItemSeqId", "00001"); // always one item on a replish order - depositCtx.put("amount", new Double(depositAmount.doubleValue())); + depositCtx.put("amount", depositAmount); depositCtx.put("reasonEnumId", "FATR_REPLENISH"); depositCtx.put("userLogin", userLogin); try { @@ -897,7 +896,7 @@ return null; } - private static String createFinAcctPaymentTransaction(GenericDelegator delegator, LocalDispatcher dispatcher, GenericValue userLogin, Double amount, + private static String createFinAcctPaymentTransaction(GenericDelegator delegator, LocalDispatcher dispatcher, GenericValue userLogin, BigDecimal amount, String productStoreId, String partyId, String orderId, String orderItemSeqId, String currencyUom, String txType, String finAccountId, String reasonEnumId) throws GeneralException { final String coParty = ProductStoreWorker.getProductStorePayToPartyId(productStoreId, delegator); @@ -910,7 +909,7 @@ String paymentType; String partyIdFrom; String partyIdTo; - Double paymentAmount; + BigDecimal paymentAmount; // determine the payment type and which direction the parties should go if ("DEPOSIT".equals(txType)) { @@ -924,11 +923,11 @@ partyIdTo = partyId; paymentAmount = amount; } else if ("ADJUSTMENT".equals(txType)) { - if (amount < 0) { + if (amount.compareTo(BigDecimal.ZERO) < 0) { paymentType = "DISBURSEMENT"; partyIdFrom = coParty; partyIdTo = partyId; - paymentAmount = amount * -1; // must be positive + paymentAmount = amount.negate(); // must be positive } else { paymentType = "RECEIPT"; partyIdFrom = partyId; Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java Mon Oct 27 01:58:56 2008 @@ -194,7 +194,7 @@ // if we auto-replenish this type; set the level to the initial deposit if (replenishEnumId != null && "FARP_AUTOMATIC".equals(replenishEnumId)) { - createCtx.put("replenishLevel", new Double(deposit.doubleValue())); + createCtx.put("replenishLevel", deposit); createCtx.put("replenishPaymentId", paymentMethodId); } @@ -239,7 +239,7 @@ depositCtx.put("partyId", partyId); depositCtx.put("orderId", orderId); depositCtx.put("orderItemSeqId", orderItemSeqId); - depositCtx.put("amount", new Double(deposit.doubleValue())); + depositCtx.put("amount", deposit); depositCtx.put("reasonEnumId", "FATR_IDEPOSIT"); depositCtx.put("userLogin", userLogin); Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java?rev=708113&r1=708112&r2=708113&view=diff ============================================================================== --- ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java (original) +++ ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java Mon Oct 27 01:58:56 2008 @@ -265,8 +265,8 @@ Debug.log("FinAccount Balance [" + balance + "] Available [" + availableBalance + "] - Status: " + statusId, module); Map result = ServiceUtil.returnSuccess(); - result.put("availableBalance", new Double(availableBalance.doubleValue())); - result.put("balance", new Double(balance.doubleValue())); + result.put("availableBalance", availableBalance); + result.put("balance", balance); result.put("statusId", statusId); return result; } @@ -345,7 +345,7 @@ } // now we make sure there is something to refund - if (actualBalance.doubleValue() > 0) { + if (actualBalance.compareTo(BigDecimal.ZERO) > 0) { BigDecimal remainingBalance = new BigDecimal(actualBalance.toString()); BigDecimal refundAmount = BigDecimal.ZERO; @@ -394,9 +394,9 @@ returnItemCtx.put("orderId", orderId); returnItemCtx.put("description", orderItem.getString("itemDescription")); returnItemCtx.put("orderItemSeqId", orderItemSeqId); - returnItemCtx.put("returnQuantity", new Double(1)); - returnItemCtx.put("receivedQuantity", new Double(1)); - returnItemCtx.put("returnPrice", new Double(refAmt.doubleValue())); + returnItemCtx.put("returnQuantity", BigDecimal.ONE); + returnItemCtx.put("receivedQuantity", BigDecimal.ONE); + returnItemCtx.put("returnPrice", refAmt); returnItemCtx.put("returnReasonId", "RTN_NOT_WANT"); returnItemCtx.put("returnTypeId", "RTN_REFUND"); // refund return returnItemCtx.put("returnItemTypeId", "RET_NPROD_ITEM"); @@ -438,7 +438,7 @@ txCtx.put("orderId", orderId); txCtx.put("orderItemSeqId", orderItemSeqId); txCtx.put("paymentId", paymentId); - txCtx.put("amount", new Double(refAmt.doubleValue() * -1)); + txCtx.put("amount", refAmt.negate()); txCtx.put("partyId", finAccount.getString("ownerPartyId")); txCtx.put("userLogin", userLogin); |
Free forum by Nabble | Edit this page |