You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/10/27 09:58:58 UTC
svn commit: r708113 [5/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...
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java Mon Oct 27 01:58:56 2008
@@ -19,6 +19,7 @@
package org.ofbiz.accounting.thirdparty.verisign;
import java.util.*;
+import java.math.BigDecimal;
import java.net.URLEncoder;
import java.io.UnsupportedEncodingException;
@@ -52,7 +53,7 @@
GenericValue authTrans = (GenericValue) context.get("authTrans");
String orderId = (String) context.get("orderId");
String cvv2 = (String) context.get("cardSecurityCode");
- Double processAmount = (Double) context.get("processAmount");
+ BigDecimal processAmount = (BigDecimal) context.get("processAmount");
GenericValue party = (GenericValue) context.get("billToParty");
GenericValue cc = (GenericValue) context.get("creditCard");
GenericValue ps = (GenericValue) context.get("billingAddress");
@@ -153,7 +154,7 @@
public static Map ccCapture(DispatchContext dctx, Map context) {
GenericValue paymentPref = (GenericValue) context.get("orderPaymentPreference");
GenericValue authTrans = (GenericValue) context.get("authTrans");
- Double amount = (Double) context.get("captureAmount");
+ BigDecimal amount = (BigDecimal) context.get("captureAmount");
String configString = (String) context.get("paymentConfig");
if (configString == null) {
configString = "payment.properties";
@@ -216,7 +217,7 @@
public static Map ccVoid(DispatchContext dctx, Map context) {
GenericValue paymentPref = (GenericValue) context.get("orderPaymentPreference");
GenericValue authTrans = (GenericValue) context.get("authTrans");
- Double amount = (Double) context.get("releaseAmount");
+ BigDecimal amount = (BigDecimal) context.get("releaseAmount");
String configString = (String) context.get("paymentConfig");
if (configString == null) {
configString = "payment.properties";
@@ -278,7 +279,7 @@
public static Map ccRefund(DispatchContext dctx, Map context) {
GenericValue paymentPref = (GenericValue) context.get("orderPaymentPreference");
- Double amount = (Double) context.get("refundAmount");
+ BigDecimal amount = (BigDecimal) context.get("refundAmount");
String configString = (String) context.get("paymentConfig");
if (configString == null) {
configString = "payment.properties";
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java Mon Oct 27 01:58:56 2008
@@ -19,6 +19,7 @@
package org.ofbiz.accounting.thirdparty.worldpay;
import java.io.IOException;
+import java.math.BigDecimal;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
@@ -35,6 +36,7 @@
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.StringUtil;
import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.webapp.view.JPublishWrapper;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
@@ -128,10 +130,10 @@
}
// the order total MUST match the auth amount or we do not process
- Double wpTotal = new Double(authAmount);
- Double orderTotal = orderHeader != null ? orderHeader.getDouble("grandTotal") : null;
+ BigDecimal wpTotal = new BigDecimal(authAmount);
+ BigDecimal orderTotal = orderHeader.getBigDecimal("grandTotal");
if (orderTotal != null && wpTotal != null) {
- if (orderTotal.doubleValue() != wpTotal.doubleValue()) {
+ if (orderTotal.compareTo(wpTotal) != 0) {
Debug.logError("AuthAmount (" + wpTotal + ") does not match OrderTotal (" + orderTotal + ")", module);
callError(request);
}
@@ -258,7 +260,7 @@
paymentPreference.set("authDate", authDate);
paymentPreference.set("authFlag", transStatus);
paymentPreference.set("authMessage", rawAuthMessage);
- paymentPreference.set("maxAmount", new Double(authAmount));
+ paymentPreference.set("maxAmount", new BigDecimal(authAmount));
// create a payment record too -- this method does not store the object so we must here
Map results = null;
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java Mon Oct 27 01:58:56 2008
@@ -19,6 +19,7 @@
package org.ofbiz.accounting.util;
+import java.math.BigDecimal;
import java.util.Iterator;
import java.util.List;
@@ -95,9 +96,9 @@
* Little method to figure out the net or ending balance of a GlAccountHistory or GlAccountAndHistory value, based on what kind
* of account (DEBIT or CREDIT) it is
* @param account - GlAccountHistory or GlAccountAndHistory value
- * @return balance - a Double
+ * @return balance - a BigDecimal
*/
- public static Double getNetBalance(GenericValue account, String debugModule) {
+ public static BigDecimal getNetBalance(GenericValue account, String debugModule) {
try {
return getNetBalance(account);
} catch (GenericEntityException ex) {
@@ -105,15 +106,15 @@
return null;
}
}
- public static Double getNetBalance(GenericValue account) throws GenericEntityException {
+ public static BigDecimal getNetBalance(GenericValue account) throws GenericEntityException {
GenericValue glAccount = account.getRelatedOne("GlAccount");
- double balance = 0.0;
+ BigDecimal balance = BigDecimal.ZERO;
if (isDebitAccount(glAccount)) {
- balance = account.getDouble("postedDebits").doubleValue() - account.getDouble("postedCredits").doubleValue();
+ balance = account.getBigDecimal("postedDebits").subtract(account.getBigDecimal("postedCredits"));
} else if (isCreditAccount(glAccount)) {
- balance = account.getDouble("postedCredits").doubleValue() - account.getDouble("postedDebits").doubleValue();
+ balance = account.getBigDecimal("postedCredits").subtract(account.getBigDecimal("postedDebits"));
}
- return new Double(balance);
+ return balance;
}
public static List getDescendantGlAccountClassIds(GenericValue glAccountClass) throws GenericEntityException {
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy Mon Oct 27 01:58:56 2008
@@ -38,7 +38,7 @@
itemmap = [:];
itemmap.invoiceId = invoiceAppl.invoiceId;
itemmap.invoiceItemSeqId = invoiceAppl.invoiceItemSeqId;
- itemmap.total = InvoiceWorker.getInvoiceTotalBd(invoice).doubleValue();
+ itemmap.total = InvoiceWorker.getInvoiceTotal(invoice);
itemmap.paymentApplicationId = invoiceAppl.paymentApplicationId;
itemmap.paymentId = invoiceAppl.paymentId;
itemmap.billingAccountId = invoiceAppl.billingAccountId;
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy Mon Oct 27 01:58:56 2008
@@ -70,11 +70,11 @@
if (!conversionRate) {
result = dispatcher.runSync("convertUom", [uomId : invoice.currencyUomId,
uomIdTo : otherCurrency,
- originalValue : new Double("1.00"),
+ originalValue : new BigDecimal("1.00"),
asOfDate : invoice.invoiceDate]);
if (result.convertedValue != null) {
- conversionRate = new BigDecimal(result.convertedValue.doubleValue());
+ conversionRate = result.convertedValue;
invoice.invoiceMessage = invoice.get("invoiceMessage") ?
invoice.invoiceMessage.concat(" Converted from " + invoice.currencyUomId + " Rate: " + conversionRate.setScale(6, rounding).toString()) :
"Converted from " + invoice.currencyUomId + " Rate: " + conversionRate.setScale(6, rounding).toString();
@@ -98,10 +98,10 @@
context.invoiceItems = invoiceItemsConv;
- invoiceTotal = InvoiceWorker.getInvoiceTotalBd(invoice).multiply(conversionRate).setScale(decimals, rounding).doubleValue();
- invoiceNoTaxTotal = InvoiceWorker.getInvoiceNoTaxTotalBd(invoice).multiply(conversionRate).setScale(decimals, rounding).doubleValue();
- context.invoiceTotal = new Double(invoiceTotal);
- context.invoiceNoTaxTotal = new Double(invoiceNoTaxTotal);
+ invoiceTotal = InvoiceWorker.getInvoiceTotal(invoice).multiply(conversionRate).setScale(decimals, rounding);
+ invoiceNoTaxTotal = InvoiceWorker.getInvoiceNoTaxTotal(invoice).multiply(conversionRate).setScale(decimals, rounding);
+ context.invoiceTotal = invoiceTotal;
+ context.invoiceNoTaxTotal = invoiceNoTaxTotal;
// each invoice of course has two billing addresses, but the one that is relevant for purchase invoices is the PAYMENT_LOCATION of the invoice
// (ie Accounts Payable address for the supplier), while the right one for sales invoices is the BILLING_LOCATION (ie Accounts Receivable or
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy Mon Oct 27 01:58:56 2008
@@ -59,12 +59,12 @@
List getPayments(List payments, boolean actual) {
if (payments) {
paymentList = []; // to pass back to the screeen list of unapplied payments
- invoiceApplied = InvoiceWorker.getInvoiceAppliedBd(invoice);
- invoiceAmount = InvoiceWorker.getInvoiceTotalBd(invoice);
+ invoiceApplied = InvoiceWorker.getInvoiceApplied(invoice);
+ invoiceAmount = InvoiceWorker.getInvoiceTotal(invoice);
invoiceToApply = InvoiceWorker.getInvoiceNotApplied(invoice);
payments.each { payment ->
paymentMap = [:];
- paymentApplied = PaymentWorker.getPaymentAppliedBd(payment, true);
+ paymentApplied = PaymentWorker.getPaymentApplied(payment, true);
if (actual) {
paymentMap.amount = payment.actualCurrencyAmount;
paymentMap.currencyUomId = payment.actualCurrencyUomId;
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy Mon Oct 27 01:58:56 2008
@@ -63,14 +63,14 @@
List getInvoices(List invoices, boolean actual) {
if (invoices) {
invoicesList = []; // to pass back to the screeen list of unapplied invoices
- paymentApplied = PaymentWorker.getPaymentAppliedBd(payment);
+ paymentApplied = PaymentWorker.getPaymentApplied(payment);
paymentToApply = payment.getBigDecimal("amount").setScale(decimals,rounding).subtract(paymentApplied);
if (actual) {
paymentToApply = payment.getBigDecimal("actualCurrencyAmount").setScale(decimals,rounding).subtract(paymentApplied);
}
invoices.each { invoice ->
- invoiceAmount = InvoiceWorker.getInvoiceTotalBd(invoice).setScale(decimals,rounding);
- invoiceApplied = InvoiceWorker.getInvoiceAppliedBd(invoice).setScale(decimals,rounding);
+ invoiceAmount = InvoiceWorker.getInvoiceTotal(invoice).setScale(decimals,rounding);
+ invoiceApplied = InvoiceWorker.getInvoiceApplied(invoice).setScale(decimals,rounding);
invoiceToApply = invoiceAmount.subtract(invoiceApplied);
if (invoiceToApply.signum() == 1) {
invoiceMap = [:];
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy Mon Oct 27 01:58:56 2008
@@ -65,11 +65,11 @@
payments = delegator.findList("Payment", topCond, null, ["effectiveDate"], null, false);
if (payments) {
- basePaymentApplied = PaymentWorker.getPaymentAppliedBd(basePayment);
+ basePaymentApplied = PaymentWorker.getPaymentApplied(basePayment);
basePaymentAmount = basePayment.getBigDecimal("amount");
basePaymentToApply = basePaymentAmount.subtract(basePaymentApplied);
payments.each { payment ->
- if (PaymentWorker.getPaymentNotAppliedBd(payment).signum() == 1) { // positiv not applied amount?
+ if (PaymentWorker.getPaymentNotApplied(payment).signum() == 1) { // positiv not applied amount?
// yes, put in the map
paymentMap = [:];
paymentMap.paymentId = basePaymentId;
@@ -77,8 +77,8 @@
paymentMap.currencyUomId = payment.currencyUomId;
paymentMap.effectiveDate = payment.effectiveDate.toString().substring(0,10); // list as YYYY-MM-DD
paymentMap.amount = payment.getBigDecimal("amount");
- paymentMap.amountApplied = PaymentWorker.getPaymentAppliedBd(payment);
- paymentToApply = PaymentWorker.getPaymentNotAppliedBd(payment);
+ paymentMap.amountApplied = PaymentWorker.getPaymentApplied(payment);
+ paymentToApply = PaymentWorker.getPaymentNotApplied(payment);
if (paymentToApply.compareTo(basePaymentToApply) < 0 ) {
paymentMap.amountToApply = paymentToApply;
} else {
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy Mon Oct 27 01:58:56 2008
@@ -49,11 +49,11 @@
postedMap = FastMap.newInstance();
postedMap.glAccountId = value.glAccountId;
if ("C".equals(value.debitCreditFlag)) {
- postedMap.credit = value.getDouble("totalAmount");
- postedMap.debit = new Double(0.0);
+ postedMap.credit = value.getBigDecimal("totalAmount");
+ postedMap.debit = BigDecimal.ZERO;
} else {
- postedMap.credit = new Double(0.0);
- postedMap.debit = value.getDouble("totalAmount");
+ postedMap.credit = BigDecimal.ZERO;
+ postedMap.debit = value.getBigDecimal("totalAmount");
}
postedTransTotalList.add(postedMap);
}
@@ -71,11 +71,11 @@
Map unpostedMap = FastMap.newInstance();
unpostedMap.glAccountId = value.glAccountId;
if ("C".equals(value.debitCreditFlag)) {
- unpostedMap.credit = value.getDouble("totalAmount");
- unpostedMap.debit = new Double(0.0);
+ unpostedMap.credit = value.getBigDecimal("totalAmount");
+ unpostedMap.debit = BigDecimal.ZERO;
} else {
- unpostedMap.credit = new Double(0.0);
- unpostedMap.debit = value.getDouble("totalAmount");
+ unpostedMap.credit = BigDecimal.ZERO;
+ unpostedMap.debit = value.getBigDecimal("totalAmount");
}
unpostedTransTotalList.add(unpostedMap);
}
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy Mon Oct 27 01:58:56 2008
@@ -33,7 +33,7 @@
if(orderHeader) {
orh = new OrderReadHelper(orderHeader);
context.orh = orh;
- context.overrideAmount = new Double(orh.getOrderGrandTotal().doubleValue());
+ context.overrideAmount = orh.getOrderGrandTotal();
}
if(orderPaymentPreferenceId) {
@@ -44,5 +44,5 @@
if(orderPaymentPreference) {
paymentMethodType = orderPaymentPreference.getRelatedOneCache("PaymentMethodType");
context.paymentMethodType = paymentMethodType;
- context.overrideAmount = orderPaymentPreference.getDouble("maxAmount");
+ context.overrideAmount = orderPaymentPreference.getBigDecimal("maxAmount");
}
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy Mon Oct 27 01:58:56 2008
@@ -54,7 +54,7 @@
if (gatewayResponses) {
latestAuth = gatewayResponses[0];
- context.captureAmount = latestAuth.getDouble("amount");
+ context.captureAmount = latestAuth.getBigDecimal("amount");
} else {
// todo: some kind of error telling user to re-authorize
}
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml Mon Oct 27 01:58:56 2008
@@ -88,7 +88,7 @@
<actions>
<set field="total" value="${bsh:
import java.text.NumberFormat;
- return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(invoice)));}"/>
+ return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)));}"/>
<service service-name="getPartyNameForDate" result-map-name="partyNameResultFrom">
<field-map field-name="partyId" env-name="invoice.partyIdFrom"/>
<field-map field-name="compareDate" env-name="invoice.invoiceDate"/>
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl Mon Oct 27 01:58:56 2008
@@ -132,7 +132,7 @@
<fo:block> <#if invoiceItem.quantity?exists><@ofbizCurrency amount=invoiceItem.amount?if_exists isoCode=invoice.currencyUomId?if_exists/></#if> </fo:block>
</fo:table-cell>
<fo:table-cell text-align="right">
- <fo:block> <#if invoiceItem.quantity?exists><@ofbizCurrency amount=(invoiceItem.quantity?double * invoiceItem.amount?double) isoCode=invoice.currencyUomId?if_exists/><#else><@ofbizCurrency amount=(invoiceItem.amount?double) isoCode=invoice.currencyUomId?if_exists/></#if> </fo:block>
+ <fo:block> <@ofbizCurrency amount=(Static["org.ofbiz.accounting.invoice.InvoiceWorker"].getInvoiceItemTotal(invoiceItem)) isoCode=invoice.currencyUomId?if_exists/> </fo:block>
</fo:table-cell>
</fo:table-row>
</#list>
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/payment/PaymentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/payment/PaymentForms.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/payment/PaymentForms.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/webapp/accounting/payment/PaymentForms.xml Mon Oct 27 01:58:56 2008
@@ -57,7 +57,7 @@
</service>
</actions>
<row-actions>
- <set field="amountToApply" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(delegator,paymentId);}"/>
+ <set field="amountToApply" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(delegator,paymentId);}"/>
</row-actions>
<field name="paymentId" widget-style="buttontext">
<hyperlink description="${paymentId}" target="paymentOverview?paymentId=${paymentId}"/>
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/BillingAccountForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/BillingAccountForms.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/BillingAccountForms.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/BillingAccountForms.xml Mon Oct 27 01:58:56 2008
@@ -76,7 +76,7 @@
return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)));}"/>
<set field="total" value="${bsh:
import java.text.NumberFormat;
- return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)));}"/>
+ return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)));}"/>
</row-actions>
<field name="billingAccountId"><hidden/></field>
<field name="invoiceId" widget-style="buttontext">
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/InvoiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/InvoiceScreens.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/InvoiceScreens.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/InvoiceScreens.xml Mon Oct 27 01:58:56 2008
@@ -212,9 +212,9 @@
</entity-and>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy"/>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy"/>
- <set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(invoice)}" type="BigDecimal"/>
+ <set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
<set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
- <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceAppliedBd(invoice)}" type="BigDecimal"/>
+ <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
</actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
@@ -336,9 +336,9 @@
<entity-one entity-name="Invoice" value-name="invoice"/>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy"/>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy"/>
- <set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(invoice)}" type="BigDecimal"/>
+ <set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
<set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
- <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceAppliedBd(invoice)}" type="BigDecimal"/>
+ <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
</actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/PaymentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/PaymentScreens.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/PaymentScreens.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/PaymentScreens.xml Mon Oct 27 01:58:56 2008
@@ -138,11 +138,11 @@
<entity-one entity-name="Payment" value-name="payment"/>
<set field="appliedAmount" type="String" value="${bsh:
import java.text.NumberFormat;
- return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.payment.PaymentWorker.getPaymentAppliedBd(payment)));}"/>
- <set field="notAppliedAmount" type="BigDecimal" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(payment)}"/>
+ return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.payment.PaymentWorker.getPaymentApplied(payment)));}"/>
+ <set field="notAppliedAmount" type="BigDecimal" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(payment)}"/>
<set field="notAppliedAmountStr" type="String" value="${bsh:
import java.text.NumberFormat;
- return(NumberFormat.getCurrencyInstance(context.get("locale")).format(org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(payment)));}"/>
+ return(NumberFormat.getCurrencyInstance(context.get("locale")).format(org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(payment)));}"/>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy"/>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy"/>
<entity-one entity-name="PartyNameView" value-name="partyNameViewTo">
@@ -316,8 +316,8 @@
<set field="labelTitleProperty" value="PageTitlePaymentOverview"/>
<set field="paymentId" from-field="parameters.paymentId"/>
<entity-one entity-name="Payment" value-name="payment"/>
- <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentAppliedBd(payment).toString()}"/>
- <set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotAppliedBd(payment).toString()}"/>
+ <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentApplied(payment).toString()}"/>
+ <set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(payment).toString()}"/>
</actions>
<widgets>
<decorator-screen name="CommonPaymentDecorator" location="${parameters.mainDecoratorLocation}">
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryForms.xml Mon Oct 27 01:58:56 2008
@@ -81,12 +81,12 @@
</entity-one>
<set field="showDebit" value="${bsh:(postedBalance >= 0 && org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount)) || (postedBalance < 0 && org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount))}" type="Boolean"/>
<set field="showCredit" value="${bsh:(postedBalance >= 0 && org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount)) || (postedBalance < 0 && org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount))}" type="Boolean"/>
- <set field="absolutePostedBalance" value="${bsh:(postedBalance >= 0? postedBalance: (-1)*postedBalance)}" type="Double"/>
+ <set field="absolutePostedBalance" value="${bsh:(postedBalance.abs())}" type="BigDecimal"/>
<set field="showTotals" value="${bsh:(isLastRow != null && isLastRow==true)}" type="Boolean"/>
<set field="debitTotal" from-field="parameters.debitTotal" type="Double"/>
<set field="creditTotal" from-field="parameters.creditTotal" type="Double"/>
- <set field="parameters.debitTotal" value="${bsh:(showDebit? (debitTotal + absolutePostedBalance): (debitTotal))}" type="Double"/>
- <set field="parameters.creditTotal" value="${bsh:(showCredit? (creditTotal + absolutePostedBalance): (creditTotal))}" type="Double"/>
+ <set field="parameters.debitTotal" value="${bsh:(showDebit? (debitTotal.add(absolutePostedBalance)): (debitTotal))}" type="BigDecimal"/>
+ <set field="parameters.creditTotal" value="${bsh:(showCredit? (creditTotal.add(absolutePostedBalance)): (creditTotal))}" type="BigDecimal"/>
</row-actions>
<field name="glAccountId" use-when="!showTotals">
<hyperlink target="FindAcctgTransEntries?glAccountId=${glAccountId}&organizationPartyId=${organizationPartyId}" description="[${glAccountId}] [${glAccount.accountCode}] ${glAccount.accountName}"/>
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ReportFinancialSummaryScreens.xml Mon Oct 27 01:58:56 2008
@@ -293,10 +293,10 @@
<order-by field-name="glAccountId"/>
</entity-condition>
<set field="totalsRow.isLastRow" value="true" type="Boolean"/>
- <set field="totalsRow.postedBalance" value="0" type="Double"/>
+ <set field="totalsRow.postedBalance" value="0" type="BigDecimal"/>
<set field="trialBalances[]" from-field="totalsRow" type="Object"/>
- <set field="parameters.debitTotal" value="0" type="Double"/>
- <set field="parameters.creditTotal" value="0" type="Double"/>
+ <set field="parameters.debitTotal" value="0" type="BigDecimal"/>
+ <set field="parameters.creditTotal" value="0" type="BigDecimal"/>
</actions>
<widgets>
<decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}">
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ap/forms/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ap/forms/InvoiceForms.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ap/forms/InvoiceForms.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ap/forms/InvoiceForms.xml Mon Oct 27 01:58:56 2008
@@ -48,7 +48,7 @@
return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)));}"/>
<set field="total" value="${bsh:
import java.text.NumberFormat;
- return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)));}"/>
+ return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)));}"/>
</row-actions>
<field name="invoiceId" widget-style="buttontext">
<hyperlink description="${invoiceId}" target="invoiceOverview?invoiceId=${invoiceId}"/>
Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ar/forms/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ar/forms/InvoiceForms.xml?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ar/forms/InvoiceForms.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/widget/ar/forms/InvoiceForms.xml Mon Oct 27 01:58:56 2008
@@ -49,7 +49,7 @@
return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)));}"/>
<set field="total" value="${bsh:
import java.text.NumberFormat;
- return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)));}"/>
+ return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)));}"/>
</row-actions>
<field name="invoiceId" widget-style="buttontext">
<hyperlink description="${invoiceId}" target="invoiceOverview?invoiceId=${invoiceId}"/>
Modified: ofbiz/branches/typecheckcleanup200810/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy?rev=708113&r1=708112&r2=708113&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy Mon Oct 27 01:58:56 2008
@@ -64,8 +64,8 @@
while (inv.hasNext()) {
invoice = (GenericValue) inv.next();
if (invoice.statusId.equals("INVOICE_CANCELLED")) continue;
- BigDecimal invoiceAmount = InvoiceWorker.getInvoiceTotalBd(invoice).setScale(2,BigDecimal.ROUND_HALF_UP);
- invoiceApplied = InvoiceWorker.getInvoiceAppliedBd(invoice).setScale(2,BigDecimal.ROUND_HALF_UP);
+ BigDecimal invoiceAmount = InvoiceWorker.getInvoiceTotal(invoice).setScale(2,BigDecimal.ROUND_HALF_UP);
+ invoiceApplied = InvoiceWorker.getInvoiceApplied(invoice).setScale(2,BigDecimal.ROUND_HALF_UP);
if (invoice.getString("partyId").equals(partyId)) { //negate for outgoing payments
invoiceAmount = invoiceAmount.multiply(new BigDecimal("-1"));
invoiceApplied = invoiceApplied.multiply(new BigDecimal("-1"));
@@ -224,7 +224,7 @@
BigDecimal amount = payment.getBigDecimal("amount").setScale(2,BigDecimal.ROUND_HALF_UP);
if (amount.compareTo(new BigDecimal("0.00")) == 0)
continue;
- Debug.logInfo(" other company payments: " + payment.paymentId + " amount:" + payment.getBigDecimal("amount") + " applied:" + PaymentWorker.getPaymentAppliedBd(payment),"??");
+ Debug.logInfo(" other company payments: " + payment.paymentId + " amount:" + payment.getBigDecimal("amount") + " applied:" + PaymentWorker.getPaymentApplied(payment),"??");
List paymentApplications = payment.getRelated("PaymentApplication");
Iterator pa = paymentApplications.iterator();
while (pa.hasNext()) {
@@ -256,9 +256,9 @@
while (pm.hasNext()) {
payment = (GenericValue) pm.next();
payment = delegator.findByPrimaryKey("Payment",["paymentId" : payment.paymentId]);
- notApplied = payment.getBigDecimal("amount").subtract(PaymentWorker.getPaymentAppliedBd(payment)).setScale(2,BigDecimal.ROUND_HALF_UP);
+ notApplied = payment.getBigDecimal("amount").subtract(PaymentWorker.getPaymentApplied(payment)).setScale(2,BigDecimal.ROUND_HALF_UP);
// check if payment completely applied
- Debug.logInfo(" payment: " + payment.paymentId + " amount:" + payment.getBigDecimal("amount") + " applied:" + PaymentWorker.getPaymentAppliedBd(payment),"??");
+ Debug.logInfo(" payment: " + payment.paymentId + " amount:" + payment.getBigDecimal("amount") + " applied:" + PaymentWorker.getPaymentApplied(payment),"??");
if (notApplied.compareTo(new BigDecimal("0.00")) == 0)
continue;
Map historyItem = new HashMap();