From 2e093211cf02edd8a74dd033ba9b3377f16a4e39 Mon Sep 17 00:00:00 2001 From: Scott Gray Date: Fri, 13 Nov 2009 02:10:15 +0000 Subject: [PATCH] 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 --- .../accounting/invoice/InvoiceServices.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java b/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java index d80629dadc..2d7c699513 100644 --- a/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java @@ -153,8 +153,6 @@ public class InvoiceServices { String orderId = (String) context.get("orderId"); List 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 billedItems = delegator.findByAnd("OrderItemBilling", UtilMisc.toMap("orderId", orderId)); - if (billedItems.size() > 0) { - boolean nonDigitalInvoice = false; - Iterator 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;