perhaps i am missing something, but the description talks about invoice items and the code change is about orderitems?
On Sat, 2011-03-26 at 14:46 +0000, jler...@apache.org wrote: > Author: jleroux > Date: Sat Mar 26 14:46:46 2011 > New Revision: 1085726 > > URL: http://svn.apache.org/viewvc?rev=1085726&view=rev > Log: > A patch from Rene Scheibe "Invoice items should be sorted." > https://issues.apache.org/jira/browse/OFBIZ-4230 - OFBIZ-4230 > > When creating an invoice via the service "createInvoiceForOrderAllItems" the > order items are currently just fetched from the database without any sorting. > This can result in a different sorting of invoice items vs. order items. Or > when creating a new invoice due to a changed order the sorting between > invoices can be different. > > Sorts invoice items (in case they are derived from OrderItems) by > "orderItemSeqId". > > Modified: > > ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java > > Modified: > ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=1085726&r1=1085725&r2=1085726&view=diff > ============================================================================== > --- > ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java > (original) > +++ > ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java > Sat Mar 26 14:46:46 2011 > @@ -115,7 +115,7 @@ public class InvoiceServices { > LocalDispatcher dispatcher = dctx.getDispatcher(); > Locale locale = (Locale) context.get("locale"); > try { > - List<GenericValue> orderItems = delegator.findByAnd("OrderItem", > UtilMisc.toMap("orderId", (String) context.get("orderId"))); > + List<GenericValue> orderItems = delegator.findByAnd("OrderItem", > UtilMisc.toMap("orderId", (String) context.get("orderId")), > UtilMisc.toList("orderItemSeqId")); > if (orderItems.size() > 0) { > context.put("billItems", orderItems); > } > > -- Ofbiz on twitter: http://twitter.com/apache_ofbiz Myself on twitter: http://twitter.com/hansbak Antwebsystems.com: Quality services for competitive rates.