From d868606e2c24ff41e7afa93d2fa6712a9a43e5fa Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Tue, 29 May 2012 04:18:30 +0000 Subject: [PATCH] DEPRECATION: applications/order: GenericValue.getRelated/getRelatedCache variants replaced with a getRelated that takes a boolean useCache parameter. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343515 13f79535-47bb-0310-9956-ffa450edef68 --- .../ofbiz/order/order/OrderChangeHelper.java | 2 +- .../org/ofbiz/order/order/OrderEvents.java | 2 +- .../ofbiz/order/order/OrderReadHelper.java | 32 ++++++++-------- .../order/order/OrderReturnServices.java | 38 +++++++++---------- .../org/ofbiz/order/order/OrderServices.java | 20 +++++----- .../requirement/RequirementServices.java | 4 +- .../order/shoppingcart/CheckOutHelper.java | 2 +- .../shoppingcart/ShoppingCartHelper.java | 4 +- .../order/shoppingcart/ShoppingCartItem.java | 6 +-- .../shoppingcart/ShoppingCartServices.java | 12 +++--- .../product/ProductDisplayWorker.java | 4 +- .../product/ProductPromoWorker.java | 28 +++++++------- .../shoppinglist/ShoppingListEvents.java | 10 ++--- .../shoppinglist/ShoppingListServices.java | 4 +- .../WEB-INF/actions/entry/BillSettings.groovy | 2 +- .../actions/entry/CheckoutPayment.groovy | 4 +- .../actions/entry/StorePaymentOptions.groovy | 2 +- .../entry/catalog/ProductDetail.groovy | 2 +- .../entry/catalog/ProductSummary.groovy | 2 +- .../lookup/LookupAssociatedProducts.groovy | 2 +- .../WEB-INF/actions/order/OrderView.groovy | 12 +++--- .../actions/order/OrderViewWebSecure.groovy | 4 +- .../WEB-INF/actions/order/ShipGroups.groovy | 2 +- .../actions/request/GetNextSequenceNum.groovy | 2 +- .../ordermgr/entry/cart/showcartitems.ftl | 2 +- .../ordermgr/entry/order/orderitems.ftl | 2 +- .../webapp/ordermgr/order/OrderListByDate.ftl | 2 +- .../webapp/ordermgr/order/editorderitems.ftl | 4 +- .../order/orderReportConditions.fo.ftl | 2 +- .../ordermgr/order/ordercontactinfo.ftl | 6 +-- .../webapp/ordermgr/order/orderitems.ftl | 14 +++---- .../order/webapp/ordermgr/order/orderlist.ftl | 2 +- .../ordermgr/order/orderpaymentinfo.ftl | 8 ++-- .../ordermgr/order/ordershippinginfo.ftl | 2 +- .../ordermgr/quote/ViewQuoteItemInfo.ftl | 2 +- .../ordermgr/quote/quoteReportBody.fo.ftl | 2 +- .../webapp/ordermgr/return/returnItems.ftl | 4 +- .../ordermgr/return/returnReportBody.fo.ftl | 2 +- 38 files changed, 128 insertions(+), 128 deletions(-) diff --git a/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java b/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java index f53be8c8c3..9d5b572e42 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java +++ b/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java @@ -179,7 +179,7 @@ public class OrderChangeHelper { if (orderHeader != null) { List orderItems = null; try { - orderItems = orderHeader.getRelated("OrderItem"); + orderItems = orderHeader.getRelated("OrderItem", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, "ERROR: Unable to get OrderItem records for OrderHeader : " + orderId, module); } diff --git a/applications/order/src/org/ofbiz/order/order/OrderEvents.java b/applications/order/src/org/ofbiz/order/order/OrderEvents.java index fc5db60996..38f40cd35e 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderEvents.java +++ b/applications/order/src/org/ofbiz/order/order/OrderEvents.java @@ -111,7 +111,7 @@ public class OrderEvents { for (String orderItemSeqId : orderItemSeqIds) { try { GenericValue orderItem = delegator.findOne("OrderItem", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId), false); - List orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc"); + List orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false); for (GenericValue orderItemShipGroupAssoc : orderItemShipGroupAssocs) { GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup", false); String shipGroupSeqId = orderItemShipGroup.getString("shipGroupSeqId"); diff --git a/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java b/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java index 978e8f75b9..958b0fdc89 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java +++ b/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java @@ -186,7 +186,7 @@ public class OrderReadHelper { public List getAdjustments() { if (adjustments == null) { try { - adjustments = orderHeader.getRelated("OrderAdjustment"); + adjustments = orderHeader.getRelated("OrderAdjustment", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -199,7 +199,7 @@ public class OrderReadHelper { public List getPaymentPreferences() { if (paymentPrefs == null) { try { - paymentPrefs = orderHeader.getRelated("OrderPaymentPreference", UtilMisc.toList("orderPaymentPreferenceId")); + paymentPrefs = orderHeader.getRelated("OrderPaymentPreference", null, UtilMisc.toList("orderPaymentPreferenceId"), false); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -219,7 +219,7 @@ public class OrderReadHelper { try { List exprs = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED"), EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_CONFIRMED")); - payments = paymentPref.getRelated("Payment"); + payments = paymentPref.getRelated("Payment", null, null, false); payments = EntityUtil.filterByOr(payments, exprs); List conds = UtilMisc.toList(EntityCondition.makeCondition("paymentTypeId", EntityOperator.EQUALS, "CUSTOMER_PAYMENT"), EntityCondition.makeCondition("paymentTypeId", EntityOperator.EQUALS, "CUSTOMER_DEPOSIT"), @@ -296,7 +296,7 @@ public class OrderReadHelper { if (prefs != null) { for(GenericValue payPref : prefs) { try { - orderPayments.addAll(payPref.getRelated("Payment")); + orderPayments.addAll(payPref.getRelated("Payment", null, null, false)); } catch (GenericEntityException e) { Debug.logError(e, module); return null; @@ -309,7 +309,7 @@ public class OrderReadHelper { public List getOrderStatuses() { if (orderStatuses == null) { try { - orderStatuses = orderHeader.getRelated("OrderStatus"); + orderStatuses = orderHeader.getRelated("OrderStatus", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -319,7 +319,7 @@ public class OrderReadHelper { public List getOrderTerms() { try { - return orderHeader.getRelated("OrderTerm"); + return orderHeader.getRelated("OrderTerm", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); return null; @@ -419,7 +419,7 @@ public class OrderReadHelper { public List getOrderItemShipGroups() { try { - return orderHeader.getRelated("OrderItemShipGroup", UtilMisc.toList("shipGroupSeqId")); + return orderHeader.getRelated("OrderItemShipGroup", null, UtilMisc.toList("shipGroupSeqId"), false); } catch (GenericEntityException e) { Debug.logWarning(e, module); } @@ -566,7 +566,7 @@ public class OrderReadHelper { public Timestamp getEarliestShipByDate() { try { - List groups = orderHeader.getRelated("OrderItemShipGroup", UtilMisc.toList("shipByDate")); + List groups = orderHeader.getRelated("OrderItemShipGroup", null, UtilMisc.toList("shipByDate"), false); if (groups.size() > 0) { GenericValue group = groups.get(0); return group.getTimestamp("shipByDate"); @@ -579,7 +579,7 @@ public class OrderReadHelper { public Timestamp getLatestShipAfterDate() { try { - List groups = orderHeader.getRelated("OrderItemShipGroup", UtilMisc.toList("shipAfterDate DESC")); + List groups = orderHeader.getRelated("OrderItemShipGroup", null, UtilMisc.toList("shipAfterDate DESC"), false); if (groups.size() > 0) { GenericValue group = groups.get(0); return group.getTimestamp("shipAfterDate"); @@ -1066,7 +1066,7 @@ public class OrderReadHelper { try { // get a set of invoice IDs that belong to the order - List orderItemBillings = orderHeader.getRelatedCache("OrderItemBilling"); + List orderItemBillings = orderHeader.getRelated("OrderItemBilling", null, null, true); Set invoiceIds = new HashSet(); for(GenericValue orderItemBilling : orderItemBillings) { invoiceIds.add(orderItemBilling.getString("invoiceId")); @@ -1334,7 +1334,7 @@ public class OrderReadHelper { public List getOrderItems() { if (orderItems == null) { try { - orderItems = orderHeader.getRelated("OrderItem", UtilMisc.toList("orderItemSeqId")); + orderItems = orderHeader.getRelated("OrderItem", null, UtilMisc.toList("orderItemSeqId"), false); } catch (GenericEntityException e) { Debug.logWarning(e, module); } @@ -1400,7 +1400,7 @@ public class OrderReadHelper { for(GenericValue item : items) { List receipts = null; try { - receipts = item.getRelated("ShipmentReceipt"); + receipts = item.getRelated("ShipmentReceipt", null, null, false); } catch (GenericEntityException e) { Debug.logWarning(e, module); } @@ -1434,7 +1434,7 @@ public class OrderReadHelper { for(GenericValue item : items) { List receipts = null; try { - receipts = item.getRelated("ShipmentReceipt"); + receipts = item.getRelated("ShipmentReceipt", null, null, false); } catch (GenericEntityException e) { Debug.logWarning(e, module); } @@ -1495,7 +1495,7 @@ public class OrderReadHelper { // make sure we have an OrderItemBilling record List orderItemBillings = null; try { - orderItemBillings = item.getRelated("OrderItemBilling"); + orderItemBillings = item.getRelated("OrderItemBilling", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Unable to get OrderItemBilling from OrderItem"); } @@ -1504,7 +1504,7 @@ public class OrderReadHelper { // get the ProductContent records List productContents = null; try { - productContents = product.getRelated("ProductContent"); + productContents = product.getRelated("ProductContent", null, null, false); } catch (GenericEntityException e) { Debug.logError("Unable to get ProductContent from Product", module); } @@ -2741,7 +2741,7 @@ public class OrderReadHelper { BigDecimal invoiced = BigDecimal.ZERO; try { // this is simply the sum of quantity billed in all related OrderItemBillings - List billings = orderItem.getRelated("OrderItemBilling"); + List billings = orderItem.getRelated("OrderItemBilling", null, null, false); for(GenericValue billing : billings) { BigDecimal quantity = billing.getBigDecimal("quantity"); if (quantity != null) { diff --git a/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java b/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java index 8accd0d05a..cf600baab0 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java +++ b/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java @@ -213,7 +213,7 @@ public class OrderReturnServices { List returnItems = null; List returnAdjustments = FastList.newInstance(); try { - returnItems = returnHeader.getRelated("ReturnItem"); + returnItems = returnHeader.getRelated("ReturnItem", null, null, false); returnAdjustments = delegator.findList("ReturnAdjustment", EntityCondition.makeCondition( EntityCondition.makeCondition("returnId", EntityOperator.EQUALS, returnId), EntityOperator.AND, EntityCondition.makeCondition("returnItemSeqId", EntityOperator.EQUALS, "_NA_")), null, UtilMisc.toList("returnAdjustmentTypeId"), null, true); @@ -419,7 +419,7 @@ public class OrderReturnServices { if (returnable && (itemStatus.equals("ITEM_APPROVED") || itemStatus.equals("ITEM_COMPLETED"))) { List returnedItems = null; try { - returnedItems = orderItem.getRelated("ReturnItem"); + returnedItems = orderItem.getRelated("ReturnItem", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, @@ -567,7 +567,7 @@ public class OrderReturnServices { // Order item adjustments List itemAdjustments = null; try { - itemAdjustments = item.getRelated("OrderAdjustment"); + itemAdjustments = item.getRelated("OrderAdjustment", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, @@ -612,7 +612,7 @@ public class OrderReturnServices { try { returnHeader = delegator.findOne("ReturnHeader", UtilMisc.toMap("returnId", returnId), false); if (returnHeader != null) { - returnItems = returnHeader.getRelated("ReturnItem"); + returnItems = returnHeader.getRelated("ReturnItem", null, null, false); } } catch (GenericEntityException e) { Debug.logError(e, "Problems looking up return information", module); @@ -1132,7 +1132,7 @@ public class OrderReturnServices { List orderPayPrefs = FastList.newInstance(); try { orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false); - orderPayPrefs = orderHeader.getRelated("OrderPaymentPreference", UtilMisc.toList("-maxAmount")); + orderPayPrefs = orderHeader.getRelated("OrderPaymentPreference", null, UtilMisc.toList("-maxAmount"), false); } catch (GenericEntityException e) { Debug.logError("Problem looking up order information for orderId #" + orderId, module); return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, @@ -1143,7 +1143,7 @@ public class OrderReturnServices { if (UtilValidate.isEmpty(orderPayPrefs)) { List returnItemResponses = FastList.newInstance(); try { - returnItemResponses = orderHeader.getRelated("ReplacementReturnItemResponse"); + returnItemResponses = orderHeader.getRelated("ReplacementReturnItemResponse", null, null, false); } catch (GenericEntityException e) { Debug.logError("Problem getting ReturnItemResponses", module); return ServiceUtil.returnError(e.getMessage()); @@ -1153,7 +1153,7 @@ public class OrderReturnServices { GenericValue returnItem = null; GenericValue returnHeader = null; try { - returnItem = EntityUtil.getFirst(returnItemResponse.getRelated("ReturnItem")); + returnItem = EntityUtil.getFirst(returnItemResponse.getRelated("ReturnItem", null, null, false)); returnHeader = returnItem.getRelatedOne("ReturnHeader", false); } catch (GenericEntityException e) { Debug.logError("Problem getting ReturnItem", module); @@ -1234,7 +1234,7 @@ public class OrderReturnServices { try { orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false); // sort these desending by maxAmount - orderPayPrefs = orderHeader.getRelated("OrderPaymentPreference", UtilMisc.toList("-maxAmount")); + orderPayPrefs = orderHeader.getRelated("OrderPaymentPreference", null, UtilMisc.toList("-maxAmount"), false); List exprs = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_SETTLED"), EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_RECEIVED")); orderPayPrefs = EntityUtil.filterByOr(orderPayPrefs, exprs); @@ -1245,7 +1245,7 @@ public class OrderReturnServices { if (UtilValidate.isNotEmpty(orderItemAssocs)) { String originalOrderId = EntityUtil.getFirst(orderItemAssocs).getString("orderId"); orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", originalOrderId), false); - orderPayPrefs = orderHeader.getRelated("OrderPaymentPreference", UtilMisc.toList("-maxAmount")); + orderPayPrefs = orderHeader.getRelated("OrderPaymentPreference", null, UtilMisc.toList("-maxAmount"), false); orderPayPrefs = EntityUtil.filterByOr(orderPayPrefs, exprs); orderId = originalOrderId; } @@ -1628,9 +1628,9 @@ public class OrderReturnServices { // for each return item in the response, get the list of return item billings and then a list of invoices Map returnInvoices = FastMap.newInstance(); // key is invoiceId, value is Invoice GenericValue - List items = response.getRelated("ReturnItem"); + List items = response.getRelated("ReturnItem", null, null, false); for (GenericValue item : items) { - List billings = item.getRelated("ReturnItemBilling"); + List billings = item.getRelated("ReturnItemBilling", null, null, false); for (GenericValue billing : billings) { GenericValue invoice = billing.getRelatedOne("Invoice", false); @@ -1645,7 +1645,7 @@ public class OrderReturnServices { Map invoiceTotals = FastMap.newInstance(); // key is invoiceId, value is the sum of all billings for that invoice BigDecimal grandTotal = ZERO; // The sum of all return invoice totals for (GenericValue invoice : returnInvoices.values()) { - List billings = invoice.getRelated("ReturnItemBilling"); + List billings = invoice.getRelated("ReturnItemBilling", null, null, false); BigDecimal runningTotal = ZERO; for (GenericValue billing : billings) { runningTotal = runningTotal.add(billing.getBigDecimal("amount").multiply(billing.getBigDecimal("quantity")).setScale(decimals, rounding)); @@ -1764,7 +1764,7 @@ public class OrderReturnServices { List contactMechs = FastList.newInstance(); List orderCm = null; try { - orderCm = orderHeader.getRelated("OrderContactMech"); + orderCm = orderHeader.getRelated("OrderContactMech", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -1781,7 +1781,7 @@ public class OrderReturnServices { List shipmentPrefs = new ArrayList(); List orderSp = null; try { - orderSp = orderHeader.getRelated("OrderShipmentPreference"); + orderSp = orderHeader.getRelated("OrderShipmentPreference", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -1825,7 +1825,7 @@ public class OrderReturnServices { if ("CUSTOMER_RETURN".equals(returnHeaderTypeId)) { try { if (UtilValidate.isNotEmpty(product)) { - GenericValue refurbItemAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_REFURB"), UtilMisc.toList("sequenceNum")))); + GenericValue refurbItemAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_REFURB"), UtilMisc.toList("sequenceNum"), false))); if (UtilValidate.isNotEmpty(refurbItemAssoc)) { refurbItem = refurbItemAssoc.getRelatedOne("AssocProduct", false); } @@ -1882,7 +1882,7 @@ public class OrderReturnServices { // GenericValue orderItemShipGroupAssoc = null; try { - orderItemShipGroupAssoc = EntityUtil.getFirst(orderItem.getRelated("OrderItemShipGroupAssoc")); + orderItemShipGroupAssoc = EntityUtil.getFirst(orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false)); if (orderItemShipGroupAssoc != null) { if (!orderItemShipGroupIds.contains(orderItemShipGroupAssoc.getString("shipGroupSeqId"))) { GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup", false); @@ -1908,7 +1908,7 @@ public class OrderReturnServices { List repairItems = null; try { if (UtilValidate.isNotEmpty(product)) { - repairItems = EntityUtil.filterByDate(product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_REPAIR_SRV"), UtilMisc.toList("sequenceNum"))); + repairItems = EntityUtil.filterByDate(product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_REPAIR_SRV"), UtilMisc.toList("sequenceNum"), false)); } } catch (GenericEntityException e) { Debug.logError(e, module); @@ -2052,13 +2052,13 @@ public class OrderReturnServices { // we'll assume new order is under same terms as original. note orderTerms is a required parameter of storeOrder try { - orderMap.put("orderTerms", orderHeader.getRelated("OrderTerm")); + orderMap.put("orderTerms", orderHeader.getRelated("OrderTerm", null, null, false)); } catch (GenericEntityException e) { Debug.logError(e, "Cannot create replacement order because order terms for original order are not available", module); } // we'll assume the new order has the same order roles of the original one try { - List orderRoles = orderHeader.getRelated("OrderRole"); + List orderRoles = orderHeader.getRelated("OrderRole", null, null, false); Map> orderRolesMap = FastMap.newInstance(); if (orderRoles != null) { for(GenericValue orderRole : orderRoles) { diff --git a/applications/order/src/org/ofbiz/order/order/OrderServices.java b/applications/order/src/org/ofbiz/order/order/OrderServices.java index e6c16069ea..49af8fe3c5 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderServices.java +++ b/applications/order/src/org/ofbiz/order/order/OrderServices.java @@ -1090,9 +1090,9 @@ public class OrderServices { GenericValue productFacility = null; try { - productFacilities = product.getRelatedCache("ProductFacility"); + productFacilities = product.getRelated("ProductFacility", product, null, true); } catch (GenericEntityException e) { - Debug.logWarning(e, "Error invoking getRelatedCache in isCatalogInventoryAvailable", module); + Debug.logWarning(e, "Error invoking getRelated in isCatalogInventoryAvailable", module); } if (UtilValidate.isNotEmpty(productFacilities)) { @@ -2687,7 +2687,7 @@ public class OrderServices { List assignments = null; if (workEffort != null) { try { - assignments = workEffort.getRelated("WorkEffortPartyAssignment"); + assignments = workEffort.getRelated("WorkEffortPartyAssignment", null, null, false); } catch (GenericEntityException e1) { Debug.logError(e1, "Problems getting assignements", module); } @@ -3117,7 +3117,7 @@ public class OrderServices { List orderItems = null; if (orderHeader != null) { try { - orderItems = orderHeader.getRelated("OrderItem"); + orderItems = orderHeader.getRelated("OrderItem", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, "ERROR: Unable to get OrderItem list for orderId : " + orderId, module); return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, @@ -3298,7 +3298,7 @@ public class OrderServices { "OrderErrorCannotCheckForFulfillmentProductNotFound", locale)); } - List allProductContent = product.getRelated("ProductContent"); + List allProductContent = product.getRelated("ProductContent", null, null, false); // try looking up the parent product if the product has no content and is a variant if (UtilValidate.isEmpty(allProductContent) && ("Y".equals(product.getString("isVariant")))) { @@ -3307,7 +3307,7 @@ public class OrderServices { allProductContent = FastList.newInstance(); } if (parentProduct != null) { - allProductContent.addAll(parentProduct.getRelated("ProductContent")); + allProductContent.addAll(parentProduct.getRelated("ProductContent", null, null, false)); } } @@ -4961,7 +4961,7 @@ public class OrderServices { // Build a map of productId -> quantity cancelled over all order items Map productRequirementQuantities = new HashMap(); - List orderItems = orderHeader.getRelated("OrderItem"); + List orderItems = orderHeader.getRelated("OrderItem", null, null, false); for(GenericValue orderItem : orderItems) { if (! "PRODUCT_ORDER_ITEM".equals(orderItem.getString("orderItemTypeId"))) continue; @@ -5031,7 +5031,7 @@ public class OrderServices { return ServiceUtil.returnError(errorMessage); } - List orderItems = orderHeader.getRelated("OrderItem"); + List orderItems = orderHeader.getRelated("OrderItem", null, null, false); for(GenericValue orderItem : orderItems) { if (! "PRODUCT_ORDER_ITEM".equals(orderItem.getString("orderItemTypeId"))) continue; @@ -5046,7 +5046,7 @@ public class OrderServices { } // Get the received quantity for the order item - ignore the quantityRejected, since rejected items should be reordered - List shipmentReceipts = orderItem.getRelated("ShipmentReceipt"); + List shipmentReceipts = orderItem.getRelated("ShipmentReceipt", null, null, false); BigDecimal receivedQuantity = BigDecimal.ZERO; for(GenericValue shipmentReceipt : shipmentReceipts) { if (! UtilValidate.isEmpty(shipmentReceipt.get("quantityAccepted"))) { @@ -5263,7 +5263,7 @@ public class OrderServices { BigDecimal itemAdjustments = ZERO; // Item-level tax- and shipping-adjustments // Aggregate the order items subtotal - List orderItems = orderHeader.getRelated("OrderItem", UtilMisc.toList("orderItemSeqId")); + List orderItems = orderHeader.getRelated("OrderItem", null, UtilMisc.toList("orderItemSeqId"), false); for(GenericValue orderItem : orderItems) { // Look at the orderItemBillings to discover the amount and quantity ever invoiced for this order item List orderItemBillings = delegator.findByAnd("OrderItemBilling", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItem.get("orderItemSeqId")), null, false); diff --git a/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java b/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java index 18847b2bd4..b93ad324bd 100644 --- a/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java +++ b/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java @@ -215,7 +215,7 @@ public class RequirementServices { return ServiceUtil.returnSuccess(); } String facilityId = productStore.getString("inventoryFacilityId"); - List orderItems = order.getRelated("OrderItem"); + List orderItems = order.getRelated("OrderItem", null, null, false); for(GenericValue item : orderItems) { GenericValue product = item.getRelatedOne("Product", false); if (product == null) continue; @@ -274,7 +274,7 @@ public class RequirementServices { return ServiceUtil.returnSuccess(); } String facilityId = productStore.getString("inventoryFacilityId"); - List orderItems = order.getRelated("OrderItem"); + List orderItems = order.getRelated("OrderItem", null, null, false); for(GenericValue item : orderItems) { GenericValue product = item.getRelatedOne("Product", false); if (product == null) continue; diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java b/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java index 733ec93012..7f2b81ff13 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java @@ -1304,7 +1304,7 @@ public class CheckOutHelper { if (orderHeader != null) { List paymentPrefs = null; try { - paymentPrefs = orderHeader.getRelated("OrderPaymentPreference"); + paymentPrefs = orderHeader.getRelated("OrderPaymentPreference", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Problems getting order payments", module); errMsg = UtilProperties.getMessage(resource_error,"checkhelper.problems_getting_payment_preference", (cart != null ? cart.getLocale() : Locale.getDefault())); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java index 0681a84513..4d2e656b74 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java @@ -986,7 +986,7 @@ public class ShoppingCartHelper { cart.setAgreementId(agreementId); try { // set the currency based on the pricing agreement - List agreementItems = agreement.getRelated("AgreementItem", UtilMisc.toMap("agreementItemTypeId", "AGREEMENT_PRICING_PR"), null); + List agreementItems = agreement.getRelated("AgreementItem", UtilMisc.toMap("agreementItemTypeId", "AGREEMENT_PRICING_PR"), null, false); if (agreementItems.size() > 0) { GenericValue agreementItem = agreementItems.get(0); String currencyUomId = (String) agreementItem.get("currencyUomId"); @@ -1009,7 +1009,7 @@ public class ShoppingCartHelper { // clear the existing order terms cart.removeOrderTerms(); // set order terms based on agreement terms - List agreementTerms = EntityUtil.filterByDate(agreement.getRelated("AgreementTerm")); + List agreementTerms = EntityUtil.filterByDate(agreement.getRelated("AgreementTerm", null, null, false)); if (agreementTerms.size() > 0) { for (int i = 0; agreementTerms.size() > i;i++) { GenericValue agreementTerm = agreementTerms.get(i); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java index 2cc0229b79..e32afac08c 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java @@ -1848,7 +1848,7 @@ public class ShoppingCartItem implements java.io.Serializable { if (product != null) { List featureAppls = null; try { - featureAppls = product.getRelated("ProductFeatureAppl"); + featureAppls = product.getRelated("ProductFeatureAppl", null, null, false); List filterExprs = UtilMisc.toList(EntityCondition.makeCondition("productFeatureApplTypeId", EntityOperator.EQUALS, "STANDARD_FEATURE")); filterExprs.add(EntityCondition.makeCondition("productFeatureApplTypeId", EntityOperator.EQUALS, "REQUIRED_FEATURE")); featureAppls = EntityUtil.filterByOr(featureAppls, filterExprs); @@ -1874,7 +1874,7 @@ public class ShoppingCartItem implements java.io.Serializable { GenericValue product = this.getProduct(); if (product != null) { try { - List featureAppls = product.getRelated("ProductFeatureAndAppl"); + List featureAppls = product.getRelated("ProductFeatureAndAppl", null, null, false); features=EntityUtil.filterByAnd(featureAppls,UtilMisc.toMap("productFeatureApplTypeId","STANDARD_FEATURE")); } catch (GenericEntityException e) { Debug.logError(e, "Unable to get features from product : " + product.get("productId"), module); @@ -2169,7 +2169,7 @@ public class ShoppingCartItem implements java.io.Serializable { if (product != null) { List featureAppls = null; try { - featureAppls = product.getRelated("ProductFeatureAppl"); + featureAppls = product.getRelated("ProductFeatureAppl", null, null, false); List filterExprs = UtilMisc.toList(EntityCondition.makeCondition("productFeatureApplTypeId", EntityOperator.EQUALS, "STANDARD_FEATURE")); filterExprs.add(EntityCondition.makeCondition("productFeatureApplTypeId", EntityOperator.EQUALS, "REQUIRED_FEATURE")); featureAppls = EntityUtil.filterByOr(featureAppls, filterExprs); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java index 92845ec9e2..13b8855917 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java @@ -693,11 +693,11 @@ public class ShoppingCartServices { ListquoteAttributes = null; ListquoteTerms = null; try { - quoteItems = quote.getRelated("QuoteItem", UtilMisc.toList("quoteItemSeqId")); - quoteAdjs = quote.getRelated("QuoteAdjustment"); - quoteRoles = quote.getRelated("QuoteRole"); - quoteAttributes = quote.getRelated("QuoteAttribute"); - quoteTerms = quote.getRelated("QuoteTerm"); + quoteItems = quote.getRelated("QuoteItem", null, UtilMisc.toList("quoteItemSeqId"), false); + quoteAdjs = quote.getRelated("QuoteAdjustment", null, null, false); + quoteRoles = quote.getRelated("QuoteRole", null, null, false); + quoteAttributes = quote.getRelated("QuoteAttribute", null, null, false); + quoteTerms = quote.getRelated("QuoteTerm", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); @@ -1004,7 +1004,7 @@ public class ShoppingCartServices { ListshoppingListItems = null; try { - shoppingListItems = shoppingList.getRelated("ShoppingListItem"); + shoppingListItems = shoppingList.getRelated("ShoppingListItem", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java index 37fd24948d..3a2cddf07f 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java @@ -84,7 +84,7 @@ public class ProductDisplayWorker { for(GenericValue productsCategoryMember : productsCategories) { GenericValue productsCategory = productsCategoryMember.getRelatedOne("ProductCategory", true); if ("CROSS_SELL_CATEGORY".equals(productsCategory.getString("productCategoryTypeId"))) { - List curPcms = productsCategory.getRelatedCache("ProductCategoryMember"); + List curPcms = productsCategory.getRelated("ProductCategoryMember", null, null, true); if (curPcms != null) { for(GenericValue curPcm : curPcms) { if (!products.containsKey(curPcm.getString("productId"))) { @@ -175,7 +175,7 @@ public class ProductDisplayWorker { while (ordersIter != null && ordersIter.hasNext()) { GenericValue orderRole = ordersIter.next(); // for each order role get all order items - List orderItems = orderRole.getRelated("OrderItem"); + List orderItems = orderRole.getRelated("OrderItem", null, null, false); Iterator orderItemsIter = UtilMisc.toIterator(orderItems); while (orderItemsIter != null && orderItemsIter.hasNext()) { diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java index b163efc532..3842389288 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java @@ -112,7 +112,7 @@ public class ProductPromoWorker { } if (productStore != null) { - Iterator productStorePromoAppls = UtilMisc.toIterator(EntityUtil.filterByDate(productStore.getRelatedCache("ProductStorePromoAppl", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNum")), true)); + Iterator productStorePromoAppls = UtilMisc.toIterator(EntityUtil.filterByDate(productStore.getRelated("ProductStorePromoAppl", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNum"), true), true)); while (productStorePromoAppls != null && productStorePromoAppls.hasNext()) { GenericValue productStorePromoAppl = productStorePromoAppls.next(); if (UtilValidate.isNotEmpty(productStorePromoAppl.getString("manualOnly")) && "Y".equals(productStorePromoAppl.getString("manualOnly"))) { @@ -121,7 +121,7 @@ public class ProductPromoWorker { continue; } GenericValue productPromo = productStorePromoAppl.getRelatedOne("ProductPromo", true); - List productPromoRules = productPromo.getRelatedCache("ProductPromoRule", null, null); + List productPromoRules = productPromo.getRelated("ProductPromoRule", null, null, true); if (productPromoRules != null) { @@ -129,7 +129,7 @@ public class ProductPromoWorker { while (condResult && promoRulesItr != null && promoRulesItr.hasNext()) { GenericValue promoRule = promoRulesItr.next(); - Iterator productPromoConds = UtilMisc.toIterator(promoRule.getRelatedCache("ProductPromoCond", null, UtilMisc.toList("productPromoCondSeqId"))); + Iterator productPromoConds = UtilMisc.toIterator(promoRule.getRelated("ProductPromoCond", null, UtilMisc.toList("productPromoCondSeqId"), true)); while (condResult && productPromoConds != null && productPromoConds.hasNext()) { GenericValue productPromoCond = productPromoConds.next(); @@ -173,7 +173,7 @@ public class ProductPromoWorker { return promoCodes; } try { - Iterator productStorePromoAppls = UtilMisc.toIterator(EntityUtil.filterByDate(productStore.getRelatedCache("ProductStorePromoAppl", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNum")), true)); + Iterator productStorePromoAppls = UtilMisc.toIterator(EntityUtil.filterByDate(productStore.getRelated("ProductStorePromoAppl", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNum"), true), true)); while (productStorePromoAppls != null && productStorePromoAppls.hasNext()) { GenericValue productStorePromoAppl = productStorePromoAppls.next(); if (UtilValidate.isNotEmpty(productStorePromoAppl.getString("manualOnly")) && "Y".equals(productStorePromoAppl.getString("manualOnly"))) { @@ -182,7 +182,7 @@ public class ProductPromoWorker { continue; } GenericValue productPromo = productStorePromoAppl.getRelatedOne("ProductPromo", true); - Iterator productPromoCodesIter = UtilMisc.toIterator(productPromo.getRelatedCache("ProductPromoCode", null, null)); + Iterator productPromoCodesIter = UtilMisc.toIterator(productPromo.getRelated("ProductPromoCode", null, null, true)); while (productPromoCodesIter != null && productPromoCodesIter.hasNext()) { GenericValue productPromoCode = productPromoCodesIter.next(); promoCodes.add(productPromoCode.getString("productPromoCodeId")); @@ -213,7 +213,7 @@ public class ProductPromoWorker { try { // loop through promotions and get a list of all of the rules... - List productStorePromoApplsList = productStore.getRelatedCache("ProductStorePromoAppl", null, UtilMisc.toList("sequenceNum")); + List productStorePromoApplsList = productStore.getRelated("ProductStorePromoAppl", null, UtilMisc.toList("sequenceNum"), true); productStorePromoApplsList = EntityUtil.filterByDate(productStorePromoApplsList, nowTimestamp); if (UtilValidate.isEmpty(productStorePromoApplsList)) { @@ -267,7 +267,7 @@ public class ProductPromoWorker { try { // loop through promotions and get a list of all of the rules... - List agreementPromoApplsList = agreementItem.getRelatedCache("AgreementPromoAppl", null, UtilMisc.toList("sequenceNum")); + List agreementPromoApplsList = agreementItem.getRelated("AgreementPromoAppl", null, UtilMisc.toList("sequenceNum"), true); agreementPromoApplsList = EntityUtil.filterByDate(agreementPromoApplsList, nowTimestamp); if (UtilValidate.isEmpty(agreementPromoApplsList)) { @@ -404,7 +404,7 @@ public class ProductPromoWorker { for(GenericValue productPromo : productPromoList) { String productPromoId = productPromo.getString("productPromoId"); - List productPromoRules = productPromo.getRelatedCache("ProductPromoRule", null, null); + List productPromoRules = productPromo.getRelated("ProductPromoRule", null, null, true); if (UtilValidate.isNotEmpty(productPromoRules)) { // always have a useLimit to avoid unlimited looping, default to 1 if no other is specified Long candidateUseLimit = getProductPromoUseLimit(productPromo, partyId, delegator); @@ -647,14 +647,14 @@ public class ProductPromoWorker { return ""; } StringBuilder promoDescBuf = new StringBuilder(); - List productPromoRules = productPromo.getRelatedCache("ProductPromoRule", null, null); + List productPromoRules = productPromo.getRelated("ProductPromoRule", null, null, true); Iterator promoRulesIter = productPromoRules.iterator(); while (promoRulesIter != null && promoRulesIter.hasNext()) { GenericValue productPromoRule = promoRulesIter.next(); List productPromoConds = delegator.findByAnd("ProductPromoCond", UtilMisc.toMap("productPromoId", productPromo.get("productPromoId")), UtilMisc.toList("productPromoCondSeqId"), true); productPromoConds = EntityUtil.filterByAnd(productPromoConds, UtilMisc.toMap("productPromoRuleId", productPromoRule.get("productPromoRuleId"))); - // using the other method to consolodate cache entries because the same cache is used elsewhere: List productPromoConds = productPromoRule.getRelatedCache("ProductPromoCond", null, UtilMisc.toList("productPromoCondSeqId")); + // using the other method to consolodate cache entries because the same cache is used elsewhere: List productPromoConds = productPromoRule.getRelated("ProductPromoCond", null, UtilMisc.toList("productPromoCondSeqId"), true); Iterator productPromoCondIter = UtilMisc.toIterator(productPromoConds); while (productPromoCondIter != null && productPromoCondIter.hasNext()) { GenericValue productPromoCond = productPromoCondIter.next(); @@ -677,7 +677,7 @@ public class ProductPromoWorker { } } - List productPromoActions = productPromoRule.getRelatedCache("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId")); + List productPromoActions = productPromoRule.getRelated("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId"), true); Iterator productPromoActionIter = UtilMisc.toIterator(productPromoActions); while (productPromoActionIter != null && productPromoActionIter.hasNext()) { GenericValue productPromoAction = productPromoActionIter.next(); @@ -755,7 +755,7 @@ public class ProductPromoWorker { // loop through conditions for rule, if any false, set allConditionsTrue to false List productPromoConds = delegator.findByAnd("ProductPromoCond", UtilMisc.toMap("productPromoId", productPromo.get("productPromoId")), UtilMisc.toList("productPromoCondSeqId"), true); productPromoConds = EntityUtil.filterByAnd(productPromoConds, UtilMisc.toMap("productPromoRuleId", productPromoRule.get("productPromoRuleId"))); - // using the other method to consolodate cache entries because the same cache is used elsewhere: List productPromoConds = productPromoRule.getRelatedCache("ProductPromoCond", null, UtilMisc.toList("productPromoCondSeqId")); + // using the other method to consolodate cache entries because the same cache is used elsewhere: List productPromoConds = productPromoRule.getRelated("ProductPromoCond", null, UtilMisc.toList("productPromoCondSeqId"), true); if (Debug.verboseOn()) Debug.logVerbose("Checking " + productPromoConds.size() + " conditions for rule " + productPromoRule, module); Iterator productPromoCondIter = UtilMisc.toIterator(productPromoConds); @@ -774,7 +774,7 @@ public class ProductPromoWorker { if (performActions) { // perform all actions, either apply or unapply - List productPromoActions = productPromoRule.getRelatedCache("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId")); + List productPromoActions = productPromoRule.getRelated("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId"), true); Iterator productPromoActionIter = UtilMisc.toIterator(productPromoActions); while (productPromoActionIter != null && productPromoActionIter.hasNext()) { GenericValue productPromoAction = productPromoActionIter.next(); @@ -1423,7 +1423,7 @@ public class ProductPromoWorker { throw new CartItemModifyException(errMsg); } if ("Y".equals(product.getString("isVirtual"))) { - List productAssocs = EntityUtil.filterByDate(product.getRelatedCache("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("sequenceNum"))); + List productAssocs = EntityUtil.filterByDate(product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("sequenceNum"), true)); for(GenericValue productAssoc : productAssocs) { optionProductIds.add(productAssoc.getString("productIdTo")); } diff --git a/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java b/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java index 0e8945e0ac..5d6fc8dbde 100644 --- a/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java +++ b/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java @@ -219,16 +219,16 @@ public class ShoppingListEvents { throw new IllegalArgumentException(errMsg); } - shoppingListItems = shoppingList.getRelated("ShoppingListItem"); + shoppingListItems = shoppingList.getRelated("ShoppingListItem", null, null, false); if (shoppingListItems == null) { shoppingListItems = FastList.newInstance(); } // include all items of child lists if flagged to do so if (includeChild) { - List childShoppingLists = shoppingList.getRelated("ChildShoppingList"); + List childShoppingLists = shoppingList.getRelated("ChildShoppingList", null, null, false); for(GenericValue v : childShoppingLists) { - List items = v.getRelated("ShoppingListItem"); + List items = v.getRelated("ShoppingListItem", null, null, false); shoppingListItems.addAll(items); } } @@ -406,7 +406,7 @@ public class ShoppingListEvents { GenericValue shoppingList = delegator.findOne("ShoppingList", UtilMisc.toMap("shoppingListId", autoSaveListId), false); Integer currentListSize = 0; if (UtilValidate.isNotEmpty(shoppingList)) { - List shoppingListItems = shoppingList.getRelated("ShoppingListItem"); + List shoppingListItems = shoppingList.getRelated("ShoppingListItem", null, null, false); if (UtilValidate.isNotEmpty(shoppingListItems)) { currentListSize = shoppingListItems.size(); } @@ -588,7 +588,7 @@ public class ShoppingListEvents { List responseIds = FastList.newInstance(); List surveyResp = null; try { - surveyResp = item.getRelated("ShoppingListItemSurvey"); + surveyResp = item.getRelated("ShoppingListItemSurvey", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } diff --git a/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java b/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java index 629ca65c7f..1e0c41fe07 100644 --- a/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java +++ b/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java @@ -446,7 +446,7 @@ public class ShoppingListServices { List items = null; try { - items = shoppingList.getRelated("ShoppingListItem", UtilMisc.toList("shoppingListItemSeqId")); + items = shoppingList.getRelated("ShoppingListItem", null, UtilMisc.toList("shoppingListItemSeqId"), false); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -617,7 +617,7 @@ public class ShoppingListServices { if (expireDate.equals(nowDate) || nowDate.after(expireDate)) { List shoppingListItems = null; try { - shoppingListItems = sl.getRelated("ShoppingListItem"); + shoppingListItems = sl.getRelated("ShoppingListItem", null, null, false); } catch (GenericEntityException e) { Debug.logError(e.getMessage(), module); } diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy index 6f60f9590a..06cf9873b7 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy @@ -46,7 +46,7 @@ if (orderPartyId && !orderPartyId.equals("_NA_")) { context.orderParty = orderParty; context.orderPerson = orderPerson; if (orderParty) { - context.paymentMethodList = EntityUtil.filterByDate(orderParty.getRelated("PaymentMethod"), true); + context.paymentMethodList = EntityUtil.filterByDate(orderParty.getRelated("PaymentMethod", null, null, false), true); billingAccountList = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, orderPartyId, delegator, dispatcher); if (billingAccountList) { diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutPayment.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutPayment.groovy index 6acf6d0d63..06431e6edb 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutPayment.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutPayment.groovy @@ -49,7 +49,7 @@ context.shoppingCart = cart; context.userLogin = userLogin; context.productStoreId = productStoreId; context.checkOutPaymentId = checkOutPaymentId; -context.paymentMethodList = EntityUtil.filterByDate(party.getRelated("PaymentMethod", null, ["paymentMethodTypeId"]), true); +context.paymentMethodList = EntityUtil.filterByDate(party.getRelated("PaymentMethod", null, ["paymentMethodTypeId"], false), true); billingAccountList = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, partyId, delegator, dispatcher); if (billingAccountList) { @@ -59,7 +59,7 @@ if (billingAccountList) { checkIdealPayment = false; productStore = ProductStoreWorker.getProductStore(request); -productStorePaymentSettingList = productStore.getRelatedCache("ProductStorePaymentSetting"); +productStorePaymentSettingList = productStore.getRelated("ProductStorePaymentSetting", null, null, true); productStorePaymentSettingIter = productStorePaymentSettingList.iterator(); while (productStorePaymentSettingIter.hasNext()) { productStorePaymentSetting = productStorePaymentSettingIter.next(); diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/StorePaymentOptions.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/StorePaymentOptions.groovy index a22e994f8e..46ac807e0a 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/StorePaymentOptions.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/StorePaymentOptions.groovy @@ -24,7 +24,7 @@ import org.ofbiz.product.store.*; productStore = ProductStoreWorker.getProductStore(request); productStorePaymentMethodTypeIdMap = new HashMap(); -productStorePaymentSettingList = productStore.getRelatedCache("ProductStorePaymentSetting"); +productStorePaymentSettingList = productStore.getRelated("ProductStorePaymentSetting", null, null, true); productStorePaymentSettingIter = productStorePaymentSettingList.iterator(); while (productStorePaymentSettingIter.hasNext()) { productStorePaymentSetting = productStorePaymentSettingIter.next(); diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy index 46b6342843..2a1cde6a0c 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy @@ -193,7 +193,7 @@ if (product) { if (cart.isSalesOrder()) { reviewByAnd.productStoreId = productStoreId; } - reviews = product.getRelatedCache("ProductReview", reviewByAnd, ["-postedDateTime"]); + reviews = product.getRelated("ProductReview", reviewByAnd, ["-postedDateTime"], true); context.productReviews = reviews; // get the average rating if (reviews) { diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy index 33e270cd06..ecbe4f979a 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy @@ -126,7 +126,7 @@ if (product) { } // get the product review(s) - reviews = product.getRelatedCache("ProductReview", null, ["-postedDateTime"]); + reviews = product.getRelated("ProductReview", null, ["-postedDateTime"], true); // get product variant for Box/Case/Each productVariants = []; diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy index 02a1fae0e7..4af99d2fad 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy @@ -27,7 +27,7 @@ productId = request.getParameter("productId"); if (productId != null) { product = delegator.findOne("Product", [productId : productId], false); - prodAssocs = product.getRelated("MainProductAssoc"); + prodAssocs = product.getRelated("MainProductAssoc", null, null, false); if (UtilValidate.isNotEmpty(prodAssocs)) { products = EntityUtil.filterByAnd(prodAssocs, [EntityCondition.makeCondition("productAssocTypeId", EntityOperator.NOT_EQUAL, "PRODUCT_VARIANT")]); diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy index 0edbd4ced2..5036818ca9 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy @@ -70,7 +70,7 @@ if (orderHeader) { orderAdjustments = orderReadHelper.getAdjustments(); orderHeaderAdjustments = orderReadHelper.getOrderHeaderAdjustments(); orderSubTotal = orderReadHelper.getOrderItemsSubTotal(); - orderTerms = orderHeader.getRelated("OrderTerm"); + orderTerms = orderHeader.getRelated("OrderTerm", null, null, false); context.orderHeader = orderHeader; context.orderReadHelper = orderReadHelper; @@ -82,7 +82,7 @@ if (orderHeader) { context.orderTerms = orderTerms; // get sales reps - context.salesReps = orderHeader.getRelated("OrderRole", [orderId : orderHeader.orderId, roleTypeId : "SALES_REP"], null); + context.salesReps = orderHeader.getRelated("OrderRole", [orderId : orderHeader.orderId, roleTypeId : "SALES_REP"], null, false); // get the order type orderType = orderHeader.orderTypeId; @@ -145,12 +145,12 @@ if (orderHeader) { // get a list of all shipments, and a list of ItemIssuances per order item allShipmentsMap = [:]; - primaryShipments = orderHeader.getRelated("PrimaryShipment"); + primaryShipments = orderHeader.getRelated("PrimaryShipment", null, null, false); primaryShipments.each { primaryShipment -> allShipmentsMap[primaryShipment.shipmentId] = primaryShipment; } itemIssuancesPerItem = [:]; - itemIssuances = orderHeader.getRelated("ItemIssuance", null, ["shipmentId", "shipmentItemSeqId"]); + itemIssuances = orderHeader.getRelated("ItemIssuance", null, ["shipmentId", "shipmentItemSeqId"], false); itemIssuances.each { itemIssuance -> if (!allShipmentsMap.containsKey(itemIssuance.shipmentId)) { iiShipment = itemIssuance.getRelatedOne("Shipment", false); @@ -388,7 +388,7 @@ if (workEffortId && assignPartyId && assignRoleTypeId && fromDate) { actFields = [packageId : workEffort.workflowPackageId, packageVersion : workEffort.workflowPackageVersion, processId : workEffort.workflowProcessId, processVersion : workEffort.workflowProcessVersion, activityId : workEffort.workflowActivityId]; activity = delegator.findOne("WorkflowActivity", actFields, false); if (activity) { - transitions = activity.getRelated("FromWorkflowTransition", null, ["-transitionId"]); + transitions = activity.getRelated("FromWorkflowTransition", null, ["-transitionId"], false); context.wfTransitions = transitions; } } @@ -477,7 +477,7 @@ if (orderItems) { carrierShipmentMethod = EntityUtil.getFirst(delegator.findByAnd("CarrierShipmentMethod", [partyId : "UPS", carrierServiceCode : serviceCode], null, false)); shipmentMethodTypeId = carrierShipmentMethod.shipmentMethodTypeId; rate = shippingRate.get(serviceCode); - shipmentMethodDescription = EntityUtil.getFirst(carrierShipmentMethod.getRelated("ShipmentMethodType")).description; + shipmentMethodDescription = EntityUtil.getFirst(carrierShipmentMethod.getRelated("ShipmentMethodType", null, null, false)).description; shippingMethodAndRate.shipmentMethodTypeId = carrierShipmentMethod.shipmentMethodTypeId; shippingMethodAndRate.rate = rate; shippingMethodAndRate.shipmentMethodDescription = shipmentMethodDescription; diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderViewWebSecure.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderViewWebSecure.groovy index 36c0d4eb4e..380918879d 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderViewWebSecure.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderViewWebSecure.groovy @@ -35,14 +35,14 @@ if (orderHeader) { hasPermission = true; canViewInternalDetails = true; } else if (security.hasEntityPermission("ORDERMGR_ROLE", "_VIEW", session)) { - currentUserOrderRoles = orderHeader.getRelated("OrderRole", [partyId : userLogin.partyId], null); + currentUserOrderRoles = orderHeader.getRelated("OrderRole", [partyId : userLogin.partyId], null, false); if (currentUserOrderRoles) { hasPermission = true; canViewInternalDetails = true; } } else { // regardless of permission, allow if this is the supplier - currentUserSupplierOrderRoles = orderHeader.getRelated("OrderRole", [partyId : userLogin.partyId, roleTypeId : "SUPPLIER_AGENT"], null); + currentUserSupplierOrderRoles = orderHeader.getRelated("OrderRole", [partyId : userLogin.partyId, roleTypeId : "SUPPLIER_AGENT"], null, false); if (currentUserSupplierOrderRoles) { hasPermission = true; } diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy index dc16ba9c48..88803b0452 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy @@ -76,7 +76,7 @@ shipGroups.each { shipGroup -> lines = FastList.newInstance(); // process the order item to ship group associations, each being a line item for the group - orderItemAssocs = shipGroup.getRelated("OrderItemShipGroupAssoc", ["orderItemSeqId"]); + orderItemAssocs = shipGroup.getRelated("OrderItemShipGroupAssoc", null, ["orderItemSeqId"], false); orderItemAssocs.each { orderItemAssoc -> orderItem = orderItemAssoc.getRelatedOne("OrderItem", false); product = orderItem.getRelatedOne("Product", false); diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy index 4797714ef1..07b707fac1 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy @@ -23,7 +23,7 @@ import org.ofbiz.entity.GenericValue; long nextSequenceNum = 10; if (!custRequestItem && custRequest) { - items = custRequest.getRelated("CustRequestItem", ["-sequenceNum"]); + items = custRequest.getRelated("CustRequestItem", null, ["-sequenceNum"], false); lastItem = EntityUtil.getFirst(items); if (lastItem?.sequenceNum) { lastSequenceNum = lastItem.sequenceNum; diff --git a/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl b/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl index a261a3f8fb..3a55a254dd 100644 --- a/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl +++ b/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl @@ -212,7 +212,7 @@ under the License. <#-- Show Associated Products (not for Variants) --> <#if cartLine.getProductId()?exists> - <#assign itemProductAssocList = cartLine.getProduct().getRelated("MainProductAssoc", Static["org.ofbiz.base.util.UtilMisc"].toList("productAssocTypeId", "sequenceNum"))?if_exists/> + <#assign itemProductAssocList = cartLine.getProduct().getRelated("MainProductAssoc", Static["org.ofbiz.base.util.UtilMisc"].toList("productAssocTypeId", "sequenceNum"), false)?if_exists/> <#if itemProductAssocList?exists && itemProductAssocList?has_content>
diff --git a/applications/order/webapp/ordermgr/entry/order/orderitems.ftl b/applications/order/webapp/ordermgr/entry/order/orderitems.ftl index cc07bc33c5..de117f17cf 100644 --- a/applications/order/webapp/ordermgr/entry/order/orderitems.ftl +++ b/applications/order/webapp/ordermgr/entry/order/orderitems.ftl @@ -76,7 +76,7 @@ under the License. <#-- show info from workeffort if it was a rental item --> <#if orderItem.orderItemTypeId?exists && orderItem.orderItemTypeId == "RENTAL_ORDER_ITEM"> - <#assign WorkOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment")?if_exists> + <#assign WorkOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment", null, null, false)?if_exists> <#if WorkOrderItemFulfillments?has_content> <#list WorkOrderItemFulfillments as WorkOrderItemFulfillment> <#assign workEffort = WorkOrderItemFulfillment.getRelatedOne("WorkEffort", true)?if_exists> diff --git a/applications/order/webapp/ordermgr/order/OrderListByDate.ftl b/applications/order/webapp/ordermgr/order/OrderListByDate.ftl index e430740176..dbc0dabfb0 100644 --- a/applications/order/webapp/ordermgr/order/OrderListByDate.ftl +++ b/applications/order/webapp/ordermgr/order/OrderListByDate.ftl @@ -59,7 +59,7 @@ under the License. <#if productStore?has_content>${productStore.storeName?default(productStore.productStoreId)} <@ofbizCurrency amount=orderHeader.grandTotal isoCode=orderHeader.currencyUom/> - <#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder")> + <#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder", null, null, false)> <#list trackingCodes as trackingCode> <#if trackingCode?has_content> ${trackingCode.trackingCodeId}
diff --git a/applications/order/webapp/ordermgr/order/editorderitems.ftl b/applications/order/webapp/ordermgr/order/editorderitems.ftl index c119f6facd..d8567fcb5d 100644 --- a/applications/order/webapp/ordermgr/order/editorderitems.ftl +++ b/applications/order/webapp/ordermgr/order/editorderitems.ftl @@ -123,7 +123,7 @@ under the License. <#if orderItemStatus.statusDatetime?has_content>${orderItemStatus.statusDatetime.toString()}  ${loopStatusItem.get("description",locale)?default(orderItemStatus.statusId)}
- <#assign returns = orderItem.getRelated("ReturnItem")?if_exists> + <#assign returns = orderItem.getRelated("ReturnItem", null, null, false)?if_exists> <#if returns?has_content> <#list returns as returnItem> <#assign returnHeader = returnItem.getRelatedOne("ReturnHeader", false)> @@ -238,7 +238,7 @@ under the License. <#-- now show ship group info per line item --> - <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc")?if_exists> + <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false)?if_exists> <#if orderItemShipGroupAssocs?has_content>   <#list orderItemShipGroupAssocs as shipGroupAssoc> diff --git a/applications/order/webapp/ordermgr/order/orderReportConditions.fo.ftl b/applications/order/webapp/ordermgr/order/orderReportConditions.fo.ftl index 3183ae4c79..8f7984d585 100644 --- a/applications/order/webapp/ordermgr/order/orderReportConditions.fo.ftl +++ b/applications/order/webapp/ordermgr/order/orderReportConditions.fo.ftl @@ -32,7 +32,7 @@ under the License. <#list shipGroups as shipGroup> - <#assign orderItemShipGroupAssocs = shipGroup.getRelated("OrderItemShipGroupAssoc")?if_exists> + <#assign orderItemShipGroupAssocs = shipGroup.getRelated("OrderItemShipGroupAssoc", null, null, false)?if_exists> <#if orderItemShipGroupAssocs?has_content> <#list orderItemShipGroupAssocs as shipGroupAssoc> <#assign orderItem = shipGroupAssoc.getRelatedOne("OrderItem", false)?if_exists> diff --git a/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl b/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl index 33193c590f..dde9c87d40 100644 --- a/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl +++ b/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl @@ -29,7 +29,7 @@ under the License. <#list contactMechList as contactMech> <#assign postalAddress = contactMech.getRelatedOne("PostalAddress", false)?if_exists /> - <#assign partyContactPurposes = postalAddress.getRelated("PartyContactMechPurpose")?if_exists /> + <#assign partyContactPurposes = postalAddress.getRelated("PartyContactMechPurpose", null, null, false)?if_exists /> <#list partyContactPurposes as partyContactPurpose> <#if contactMech.contactMechId?has_content && partyContactPurpose.contactMechPurposeTypeId == contactMechPurposeTypeId> @@ -41,7 +41,7 @@ under the License. <#list contactMechList as contactMech> <#assign telecomNumber = contactMech.getRelatedOne("TelecomNumber", false)?if_exists /> - <#assign partyContactPurposes = telecomNumber.getRelated("PartyContactMechPurpose")?if_exists /> + <#assign partyContactPurposes = telecomNumber.getRelated("PartyContactMechPurpose", null, null, false)?if_exists /> <#list partyContactPurposes as partyContactPurpose> <#if contactMech.contactMechId?has_content && partyContactPurpose.contactMechPurposeTypeId == contactMechPurposeTypeId> @@ -52,7 +52,7 @@ under the License. <#list contactMechList as contactMech> - <#assign partyContactPurposes = contactMech.getRelated("PartyContactMechPurpose")?if_exists /> + <#assign partyContactPurposes = contactMech.getRelated("PartyContactMechPurpose", null, null, false)?if_exists /> <#list partyContactPurposes as partyContactPurpose> <#if contactMech.contactMechId?has_content && partyContactPurpose.contactMechPurposeTypeId == contactMechPurposeTypeId> diff --git a/applications/order/webapp/ordermgr/order/orderitems.ftl b/applications/order/webapp/ordermgr/order/orderitems.ftl index 7649b814a1..30c930edc0 100644 --- a/applications/order/webapp/ordermgr/order/orderitems.ftl +++ b/applications/order/webapp/ordermgr/order/orderitems.ftl @@ -69,7 +69,7 @@ under the License. <#else> ${orderItem.itemDescription?if_exists} - <#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute")/> + <#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/> <#if orderItemAttributes?has_content>
    <#list orderItemAttributes as orderItemAttribute> @@ -204,7 +204,7 @@ under the License. - <#assign returns = orderItem.getRelated("ReturnItem")?if_exists> + <#assign returns = orderItem.getRelated("ReturnItem", null, null, false)?if_exists> <#if returns?has_content> <#list returns as returnItem> <#assign returnHeader = returnItem.getRelatedOne("ReturnHeader", false)> @@ -318,7 +318,7 @@ under the License. <#-- show info from workeffort --> - <#assign workOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment")?if_exists> + <#assign workOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment", null, null, false)?if_exists> <#if workOrderItemFulfillments?has_content> <#list workOrderItemFulfillments as workOrderItemFulfillment> <#assign workEffort = workOrderItemFulfillment.getRelatedOne("WorkEffort", true)> @@ -380,7 +380,7 @@ under the License. <#-- show linked requirements --> - <#assign linkedRequirements = orderItem.getRelated("OrderRequirementCommitment")?if_exists> + <#assign linkedRequirements = orderItem.getRelated("OrderRequirementCommitment", null, null, false)?if_exists> <#if linkedRequirements?has_content> <#list linkedRequirements as linkedRequirement> class="alternate-row"> @@ -520,7 +520,7 @@ under the License. <#-- now show ship group info per line item --> - <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc")?if_exists> + <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false)?if_exists> <#if orderItemShipGroupAssocs?has_content> <#list orderItemShipGroupAssocs as shipGroupAssoc> <#assign shipGroup = shipGroupAssoc.getRelatedOne("OrderItemShipGroup", false)> @@ -564,7 +564,7 @@ under the License. <#-- now show planned shipment info per line item --> - <#assign orderShipments = orderItem.getRelated("OrderShipment")?if_exists> + <#assign orderShipments = orderItem.getRelated("OrderShipment", null, null, false)?if_exists> <#if orderShipments?has_content> <#list orderShipments as orderShipment> class="alternate-row"> @@ -628,7 +628,7 @@ under the License. <#-- now show shipment receipts per line item --> - <#assign shipmentReceipts = orderItem.getRelated("ShipmentReceipt")?if_exists> + <#assign shipmentReceipts = orderItem.getRelated("ShipmentReceipt", null, null, false)?if_exists> <#if shipmentReceipts?has_content> <#list shipmentReceipts as shipmentReceipt> class="alternate-row"> diff --git a/applications/order/webapp/ordermgr/order/orderlist.ftl b/applications/order/webapp/ordermgr/order/orderlist.ftl index 560bbbdd12..b835893968 100644 --- a/applications/order/webapp/ordermgr/order/orderlist.ftl +++ b/applications/order/webapp/ordermgr/order/orderlist.ftl @@ -195,7 +195,7 @@ under the License. <#if productStore?has_content>${productStore.storeName?default(productStore.productStoreId)} <@ofbizCurrency amount=orderHeader.grandTotal isoCode=orderHeader.currencyUom/> - <#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder")> + <#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder", null, null, false)> <#list trackingCodes as trackingCode> <#if trackingCode?has_content> ${trackingCode.trackingCodeId}
    diff --git a/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl b/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl index 01f9f633d0..26c63cf4e3 100644 --- a/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl +++ b/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl @@ -49,7 +49,7 @@ under the License. ${uiLabelMap.CommonStatus} <#list orderPaymentPreferences as orderPaymentPreference> - <#assign payments = orderPaymentPreference.getRelated("Payment")> + <#assign payments = orderPaymentPreference.getRelated("Payment", null, null, false)> <#list payments as payment> <#assign statusItem = payment.getRelatedOne("StatusItem", false)> <#assign partyName = delegator.findOne("PartyNameView", {"partyId" : payment.partyIdTo}, true)> @@ -112,7 +112,7 @@ under the License.
    <#if orderPaymentPreferences?has_content || billingAccount?has_content || invoices?has_content> <#list orderPaymentPreferences as orderPaymentPreference> - <#assign paymentList = orderPaymentPreference.getRelated("Payment")> + <#assign paymentList = orderPaymentPreference.getRelated("Payment", null, null, false)> <#assign pmBillingAddress = {}> <#assign oppStatusItem = orderPaymentPreference.getRelatedOne("StatusItem", false)> <#if outputted?default("false") == "true"> @@ -174,7 +174,7 @@ under the License. <#elseif paymentMethodType.paymentMethodTypeId == "FIN_ACCOUNT"> <#assign finAccount = orderPaymentPreference.getRelatedOne("FinAccount", false)?if_exists/> <#if (finAccount?has_content)> - <#assign gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse")> + <#assign gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse", null, null, false)> <#assign finAccountType = finAccount.getRelatedOne("FinAccountType", false)?if_exists/> @@ -317,7 +317,7 @@ under the License. <#else> <#if paymentMethod.paymentMethodTypeId?if_exists == "CREDIT_CARD"> - <#assign gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse")> + <#assign gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse", null, null, false)> <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false)?if_exists> <#if creditCard?has_content> <#assign pmBillingAddress = creditCard.getRelatedOne("PostalAddress", false)?if_exists> diff --git a/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl b/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl index 00ce2a544b..ddccfaa213 100644 --- a/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl +++ b/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl @@ -564,7 +564,7 @@ under the License. - <#assign shipGroupShipments = shipGroup.getRelated("PrimaryShipment")> + <#assign shipGroupShipments = shipGroup.getRelated("PrimaryShipment", null, null, false)> <#if shipGroupShipments?has_content>
    diff --git a/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl b/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl index 4855933385..4b0a3a4448 100644 --- a/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl +++ b/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl @@ -60,7 +60,7 @@ under the License. <#assign selectedAmount = 1/> <#assign quoteItemAmount = quoteItem.quoteUnitPrice?default(0) * quoteItem.quantity?default(0) * selectedAmount> - <#assign quoteItemAdjustments = quoteItem.getRelated("QuoteAdjustment")> + <#assign quoteItemAdjustments = quoteItem.getRelated("QuoteAdjustment", null, null, false)> <#assign totalQuoteItemAdjustmentAmount = 0.0> <#list quoteItemAdjustments as quoteItemAdjustment> <#assign totalQuoteItemAdjustmentAmount = quoteItemAdjustment.amount?default(0) + totalQuoteItemAdjustmentAmount> diff --git a/applications/order/webapp/ordermgr/quote/quoteReportBody.fo.ftl b/applications/order/webapp/ordermgr/quote/quoteReportBody.fo.ftl index 0078a8b167..ad38e32e8c 100644 --- a/applications/order/webapp/ordermgr/quote/quoteReportBody.fo.ftl +++ b/applications/order/webapp/ordermgr/quote/quoteReportBody.fo.ftl @@ -45,7 +45,7 @@ under the License. <#assign product = quoteItem.getRelatedOne("Product", false)> <#assign quoteItemAmount = quoteItem.quoteUnitPrice?default(0) * quoteItem.quantity?default(0)> - <#assign quoteItemAdjustments = quoteItem.getRelated("QuoteAdjustment")> + <#assign quoteItemAdjustments = quoteItem.getRelated("QuoteAdjustment", null, null, false)> <#assign totalQuoteItemAdjustmentAmount = 0.0> <#list quoteItemAdjustments as quoteItemAdjustment> <#assign totalQuoteItemAdjustmentAmount = quoteItemAdjustment.amount?default(0) + totalQuoteItemAdjustmentAmount> diff --git a/applications/order/webapp/ordermgr/return/returnItems.ftl b/applications/order/webapp/ordermgr/return/returnItems.ftl index 5204093f7e..e2d72589d4 100644 --- a/applications/order/webapp/ordermgr/return/returnItems.ftl +++ b/applications/order/webapp/ordermgr/return/returnItems.ftl @@ -147,7 +147,7 @@ under the License. <#assign returnReason = item.getRelatedOne("ReturnReason", false)?if_exists> <#assign returnType = item.getRelatedOne("ReturnType", false)?if_exists> <#assign status = item.getRelatedOne("InventoryStatusItem", false)?if_exists> - <#assign shipmentReceipts = item.getRelated("ShipmentReceipt")?if_exists> + <#assign shipmentReceipts = item.getRelated("ShipmentReceipt", null, null, false)?if_exists> <#if (item.get("returnQuantity")?exists && item.get("returnPrice")?exists)> <#assign returnTotal = returnTotal + item.get("returnQuantity") * item.get("returnPrice") > <#assign returnItemSubTotal = item.get("returnQuantity") * item.get("returnPrice") > @@ -273,7 +273,7 @@ under the License. <#assign rowCount = rowCount + 1> - <#assign returnItemAdjustments = item.getRelated("ReturnAdjustment")> + <#assign returnItemAdjustments = item.getRelated("ReturnAdjustment", null, null, false)> <#if (returnItemAdjustments?has_content)> <#list returnItemAdjustments as returnItemAdjustment> <@displayReturnAdjustment returnAdjustment=returnItemAdjustment adjEditable=false/> <#-- adjustments of return items should never be editable --> diff --git a/applications/order/webapp/ordermgr/return/returnReportBody.fo.ftl b/applications/order/webapp/ordermgr/return/returnReportBody.fo.ftl index fb6171f85e..cf17365587 100644 --- a/applications/order/webapp/ordermgr/return/returnReportBody.fo.ftl +++ b/applications/order/webapp/ordermgr/return/returnReportBody.fo.ftl @@ -78,7 +78,7 @@ under the License. <#assign total = total + returnItem.returnQuantity.doubleValue() * returnItem.returnPrice.doubleValue()/> - <#assign returnItemAdjustments = returnItem.getRelated("ReturnAdjustment")> + <#assign returnItemAdjustments = returnItem.getRelated("ReturnAdjustment", null, null, false)> <#if (returnItemAdjustments?has_content)> <#list returnItemAdjustments as returnItemAdjustment> <@displayReturnAdjustment returnAdjustment=returnItemAdjustment/>