svn commit: r662498 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy

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

svn commit: r662498 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy

jleroux@apache.org
Author: jleroux
Date: Mon Jun  2 10:53:22 2008
New Revision: 662498

URL: http://svn.apache.org/viewvc?rev=662498&view=rev
Log:
A patch from Rashko Rejmer "Typos in editInvoice.groovy script" (https://issues.apache.org/jira/browse/OFBIZ-1817) - OFBIZ-1817

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy?rev=662498&r1=662497&r2=662498&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy Mon Jun  2 10:53:22 2008
@@ -53,10 +53,10 @@
                                                asOfDate : invoice.invoiceDate]);
     
     if (result.convertedValue != null) {
-      conversionRate = new BigDecimal(result.convertedValue.doubleValue());
+      conversionRate = new BigDecimal(result.convertedValue.doubleValue());
       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());
+                          "Converted from " + invoice.currencyUomId + " Rate: " + conversionRate.setScale(6, rounding).toString();
       invoice.currencyUomId = otherCurrency;
     }
   }
@@ -66,7 +66,7 @@
     invoiceItems = invoice.getRelatedOrderBy("InvoiceItem", ["invoiceItemSeqId"]);
     invoiceItemsConv = FastList.newInstance();
     invoiceItems.each { invoiceItem ->
-      invoiceItem.amount = new Double((invoiceItem.getBigDecimal("amount").multiply(conversionRate).setScale(decimals, rounding)).doubleValue()));
+      invoiceItem.amount = new Double((invoiceItem.getBigDecimal("amount").multiply(conversionRate).setScale(decimals, rounding)).doubleValue());
       invoiceItemsConv.add(invoiceItem);
     }
     
@@ -75,8 +75,8 @@
     
     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));
+    context.invoiceTotal = new Double(invoiceTotal);    
+    context.invoiceNoTaxTotal = new Double(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
@@ -128,7 +128,7 @@
     paymentAppls = delegator.findByAnd("PaymentApplication", [invoiceId : invoiceId]);
     context.payments = paymentAppls;
     
-    orderItemBillings = delegator.findByAnd("OrderItemBilling", [invoiceId : invoiceId], [orderId]);
+    orderItemBillings = delegator.findByAnd("OrderItemBilling", [invoiceId : invoiceId], ['orderId']);
     orders = new LinkedHashSet();
     orderItemBillings.each { orderIb ->
         orders.add(orderIb.orderId);