Removed a block of unused code.
I checked back through the revision history and it was originally used to decide whether shipping adjustments had been already been charged. That determination was refactored quite a while ago and this portion was left behind. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@835707 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -153,8 +153,6 @@ public class InvoiceServices {
|
||||
String orderId = (String) context.get("orderId");
|
||||
List<GenericValue> billItems = UtilGenerics.checkList(context.get("billItems"));
|
||||
String invoiceId = (String) context.get("invoiceId");
|
||||
// FIXME: This variable is never read, what is its purpose?
|
||||
boolean previousInvoiceFound = false;
|
||||
|
||||
if (UtilValidate.isEmpty(billItems)) {
|
||||
Debug.logVerbose("No order items to invoice; not creating invoice; returning success", module);
|
||||
@@ -167,28 +165,6 @@ public class InvoiceServices {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingNoOrderHeader",locale));
|
||||
}
|
||||
|
||||
// get list of previous invoices for the order
|
||||
List<GenericValue> billedItems = delegator.findByAnd("OrderItemBilling", UtilMisc.toMap("orderId", orderId));
|
||||
if (billedItems.size() > 0) {
|
||||
boolean nonDigitalInvoice = false;
|
||||
Iterator<GenericValue> bii = billedItems.iterator();
|
||||
while (bii.hasNext() && !nonDigitalInvoice) {
|
||||
GenericValue orderItemBilling = (GenericValue) bii.next();
|
||||
GenericValue invoiceItem = orderItemBilling.getRelatedOne("InvoiceItem");
|
||||
if (invoiceItem != null) {
|
||||
String invoiceItemType = invoiceItem.getString("invoiceItemTypeId");
|
||||
if (invoiceItemType != null) {
|
||||
if ("INV_FPROD_ITEM".equals(invoiceItemType) || "INV_PROD_FEATR_ITEM".equals(invoiceItemType)) {
|
||||
nonDigitalInvoice = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nonDigitalInvoice) {
|
||||
previousInvoiceFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// figure out the invoice type
|
||||
String invoiceType = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user