Author: hansbak
Date: Wed Jun 4 08:15:32 2008 New Revision: 663177 URL: http://svn.apache.org/viewvc?rev=663177&view=rev Log: corrected some groovy errors introduced with the conversion Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedInvoices.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.groovy Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedInvoices.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedInvoices.groovy?rev=663177&r1=663176&r2=663177&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedInvoices.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedInvoices.groovy Wed Jun 4 08:15:32 2008 @@ -50,10 +50,10 @@ invoiceToApply = invoiceAmount.subtract(invoiceApplied); invoiceMap = [:]; invoiceMap.invoiceId = invoice.invoiceId; - invoiceMap.currencyUomId = invoice.currencyUomId); + invoiceMap.currencyUomId = invoice.currencyUomId; invoiceMap.amount = invoiceAmount; invoiceMap.description = invoice.description; - invoiceMap.invoiceDate = invoice.invoiceDate.substring(0,10)); // display only YYYY-MM-DD + invoiceMap.invoiceDate = invoice.invoiceDate.toString().substring(0,10); // display only YYYY-MM-DD invoiceMap.amountApplied = invoiceApplied; if (paymentToApply.compareTo(invoiceToApply) < 0 ) { invoiceMap.amountToApply = paymentToApply; Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.groovy?rev=663177&r1=663176&r2=663177&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.groovy Wed Jun 4 08:15:32 2008 @@ -26,13 +26,13 @@ import org.ofbiz.accounting.util.UtilAccounting; import java.text.DateFormat; import java.math.*; +import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityConditionList; import org.ofbiz.entity.condition.EntityExpr; import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.model.*; import java.text.NumberFormat; - basePaymentId = parameters.paymentId; basePayment = delegator.findByPrimaryKey("Payment", [paymentId : basePaymentId]); @@ -43,7 +43,6 @@ // retrieve payments for the related parties which have not been (fully) applied yet List payments = null; -GenericValue payment = null; exprList = []; expr = EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, basePayment.getString("partyIdFrom")); exprList.add(expr); @@ -76,9 +75,9 @@ paymentMap.paymentId = basePaymentId; paymentMap.toPaymentId = payment.paymentId; paymentMap.currencyUomId = payment.currencyUomId; - paymentMap.effectiveDate = payment.effectiveDate.substring(0,10)); // list as YYYY-MM-DD - paymentMap.amount = payment.getBigDecimal("amount")); - paymentMap.amountApplied = PaymentWorker.getPaymentAppliedBd(payment)); + 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); if (paymentToApply.compareTo(basePaymentToApply) < 0 ) { paymentMap.amountToApply = paymentToApply; |
Free forum by Nabble | Edit this page |