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
This commit is contained in:
@@ -179,7 +179,7 @@ public class OrderChangeHelper {
|
||||
if (orderHeader != null) {
|
||||
List<GenericValue> 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);
|
||||
}
|
||||
|
||||
@@ -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<GenericValue> orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc");
|
||||
List<GenericValue> orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false);
|
||||
for (GenericValue orderItemShipGroupAssoc : orderItemShipGroupAssocs) {
|
||||
GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup", false);
|
||||
String shipGroupSeqId = orderItemShipGroup.getString("shipGroupSeqId");
|
||||
|
||||
@@ -186,7 +186,7 @@ public class OrderReadHelper {
|
||||
public List<GenericValue> 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<GenericValue> 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<EntityExpr> 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<EntityExpr> 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<GenericValue> 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<GenericValue> 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<GenericValue> 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<GenericValue> groups = orderHeader.getRelated("OrderItemShipGroup", UtilMisc.toList("shipByDate"));
|
||||
List<GenericValue> 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<GenericValue> groups = orderHeader.getRelated("OrderItemShipGroup", UtilMisc.toList("shipAfterDate DESC"));
|
||||
List<GenericValue> 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<GenericValue> orderItemBillings = orderHeader.getRelatedCache("OrderItemBilling");
|
||||
List<GenericValue> orderItemBillings = orderHeader.getRelated("OrderItemBilling", null, null, true);
|
||||
Set<String> invoiceIds = new HashSet<String>();
|
||||
for(GenericValue orderItemBilling : orderItemBillings) {
|
||||
invoiceIds.add(orderItemBilling.getString("invoiceId"));
|
||||
@@ -1334,7 +1334,7 @@ public class OrderReadHelper {
|
||||
public List<GenericValue> 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<GenericValue> 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<GenericValue> 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<GenericValue> 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<GenericValue> 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<GenericValue> billings = orderItem.getRelated("OrderItemBilling");
|
||||
List<GenericValue> billings = orderItem.getRelated("OrderItemBilling", null, null, false);
|
||||
for(GenericValue billing : billings) {
|
||||
BigDecimal quantity = billing.getBigDecimal("quantity");
|
||||
if (quantity != null) {
|
||||
|
||||
@@ -213,7 +213,7 @@ public class OrderReturnServices {
|
||||
List<GenericValue> returnItems = null;
|
||||
List<GenericValue> 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<GenericValue> 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<GenericValue> 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<GenericValue> 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<GenericValue> 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<EntityExpr> 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<String, GenericValue> returnInvoices = FastMap.newInstance(); // key is invoiceId, value is Invoice GenericValue
|
||||
List<GenericValue> items = response.getRelated("ReturnItem");
|
||||
List<GenericValue> items = response.getRelated("ReturnItem", null, null, false);
|
||||
for (GenericValue item : items) {
|
||||
List<GenericValue> billings = item.getRelated("ReturnItemBilling");
|
||||
List<GenericValue> 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<String, BigDecimal> 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<GenericValue> billings = invoice.getRelated("ReturnItemBilling");
|
||||
List<GenericValue> 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<GenericValue> contactMechs = FastList.newInstance();
|
||||
List<GenericValue> 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<GenericValue> 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<GenericValue> orderRoles = orderHeader.getRelated("OrderRole");
|
||||
List<GenericValue> orderRoles = orderHeader.getRelated("OrderRole", null, null, false);
|
||||
Map<String, List<String>> orderRolesMap = FastMap.newInstance();
|
||||
if (orderRoles != null) {
|
||||
for(GenericValue orderRole : orderRoles) {
|
||||
|
||||
@@ -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<GenericValue> 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<GenericValue> 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<GenericValue> allProductContent = product.getRelated("ProductContent");
|
||||
List<GenericValue> 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<String, Object> productRequirementQuantities = new HashMap<String, Object>();
|
||||
List<GenericValue> orderItems = orderHeader.getRelated("OrderItem");
|
||||
List<GenericValue> 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<GenericValue> orderItems = orderHeader.getRelated("OrderItem");
|
||||
List<GenericValue> 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<GenericValue> shipmentReceipts = orderItem.getRelated("ShipmentReceipt");
|
||||
List<GenericValue> 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<GenericValue> orderItems = orderHeader.getRelated("OrderItem", UtilMisc.toList("orderItemSeqId"));
|
||||
List<GenericValue> 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<GenericValue> orderItemBillings = delegator.findByAnd("OrderItemBilling", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItem.get("orderItemSeqId")), null, false);
|
||||
|
||||
@@ -215,7 +215,7 @@ public class RequirementServices {
|
||||
return ServiceUtil.returnSuccess();
|
||||
}
|
||||
String facilityId = productStore.getString("inventoryFacilityId");
|
||||
List<GenericValue> orderItems = order.getRelated("OrderItem");
|
||||
List<GenericValue> 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<GenericValue> orderItems = order.getRelated("OrderItem");
|
||||
List<GenericValue> orderItems = order.getRelated("OrderItem", null, null, false);
|
||||
for(GenericValue item : orderItems) {
|
||||
GenericValue product = item.getRelatedOne("Product", false);
|
||||
if (product == null) continue;
|
||||
|
||||
@@ -1304,7 +1304,7 @@ public class CheckOutHelper {
|
||||
if (orderHeader != null) {
|
||||
List<GenericValue> 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()));
|
||||
|
||||
@@ -986,7 +986,7 @@ public class ShoppingCartHelper {
|
||||
cart.setAgreementId(agreementId);
|
||||
try {
|
||||
// set the currency based on the pricing agreement
|
||||
List<GenericValue> agreementItems = agreement.getRelated("AgreementItem", UtilMisc.toMap("agreementItemTypeId", "AGREEMENT_PRICING_PR"), null);
|
||||
List<GenericValue> 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<GenericValue> agreementTerms = EntityUtil.filterByDate(agreement.getRelated("AgreementTerm"));
|
||||
List<GenericValue> 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);
|
||||
|
||||
@@ -1848,7 +1848,7 @@ public class ShoppingCartItem implements java.io.Serializable {
|
||||
if (product != null) {
|
||||
List<GenericValue> featureAppls = null;
|
||||
try {
|
||||
featureAppls = product.getRelated("ProductFeatureAppl");
|
||||
featureAppls = product.getRelated("ProductFeatureAppl", null, null, false);
|
||||
List<EntityExpr> 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<GenericValue> featureAppls = product.getRelated("ProductFeatureAndAppl");
|
||||
List<GenericValue> 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<GenericValue> featureAppls = null;
|
||||
try {
|
||||
featureAppls = product.getRelated("ProductFeatureAppl");
|
||||
featureAppls = product.getRelated("ProductFeatureAppl", null, null, false);
|
||||
List<EntityExpr> filterExprs = UtilMisc.toList(EntityCondition.makeCondition("productFeatureApplTypeId", EntityOperator.EQUALS, "STANDARD_FEATURE"));
|
||||
filterExprs.add(EntityCondition.makeCondition("productFeatureApplTypeId", EntityOperator.EQUALS, "REQUIRED_FEATURE"));
|
||||
featureAppls = EntityUtil.filterByOr(featureAppls, filterExprs);
|
||||
|
||||
@@ -693,11 +693,11 @@ public class ShoppingCartServices {
|
||||
List<GenericValue>quoteAttributes = null;
|
||||
List<GenericValue>quoteTerms = 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 {
|
||||
|
||||
List<GenericValue>shoppingListItems = 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());
|
||||
|
||||
+2
-2
@@ -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<GenericValue> curPcms = productsCategory.getRelatedCache("ProductCategoryMember");
|
||||
List<GenericValue> 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<GenericValue> orderItems = orderRole.getRelated("OrderItem");
|
||||
List<GenericValue> orderItems = orderRole.getRelated("OrderItem", null, null, false);
|
||||
Iterator<GenericValue> orderItemsIter = UtilMisc.toIterator(orderItems);
|
||||
|
||||
while (orderItemsIter != null && orderItemsIter.hasNext()) {
|
||||
|
||||
+14
-14
@@ -112,7 +112,7 @@ public class ProductPromoWorker {
|
||||
}
|
||||
|
||||
if (productStore != null) {
|
||||
Iterator<GenericValue> productStorePromoAppls = UtilMisc.toIterator(EntityUtil.filterByDate(productStore.getRelatedCache("ProductStorePromoAppl", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNum")), true));
|
||||
Iterator<GenericValue> 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<GenericValue> productPromoRules = productPromo.getRelatedCache("ProductPromoRule", null, null);
|
||||
List<GenericValue> 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<GenericValue> productPromoConds = UtilMisc.toIterator(promoRule.getRelatedCache("ProductPromoCond", null, UtilMisc.toList("productPromoCondSeqId")));
|
||||
Iterator<GenericValue> 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<GenericValue> productStorePromoAppls = UtilMisc.toIterator(EntityUtil.filterByDate(productStore.getRelatedCache("ProductStorePromoAppl", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNum")), true));
|
||||
Iterator<GenericValue> 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<GenericValue> productPromoCodesIter = UtilMisc.toIterator(productPromo.getRelatedCache("ProductPromoCode", null, null));
|
||||
Iterator<GenericValue> 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<GenericValue> productStorePromoApplsList = productStore.getRelatedCache("ProductStorePromoAppl", null, UtilMisc.toList("sequenceNum"));
|
||||
List<GenericValue> 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<GenericValue> agreementPromoApplsList = agreementItem.getRelatedCache("AgreementPromoAppl", null, UtilMisc.toList("sequenceNum"));
|
||||
List<GenericValue> 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<GenericValue> productPromoRules = productPromo.getRelatedCache("ProductPromoRule", null, null);
|
||||
List<GenericValue> 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<GenericValue> productPromoRules = productPromo.getRelatedCache("ProductPromoRule", null, null);
|
||||
List<GenericValue> productPromoRules = productPromo.getRelated("ProductPromoRule", null, null, true);
|
||||
Iterator<GenericValue> promoRulesIter = productPromoRules.iterator();
|
||||
while (promoRulesIter != null && promoRulesIter.hasNext()) {
|
||||
GenericValue productPromoRule = promoRulesIter.next();
|
||||
|
||||
List<GenericValue> 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<GenericValue> productPromoCondIter = UtilMisc.toIterator(productPromoConds);
|
||||
while (productPromoCondIter != null && productPromoCondIter.hasNext()) {
|
||||
GenericValue productPromoCond = productPromoCondIter.next();
|
||||
@@ -677,7 +677,7 @@ public class ProductPromoWorker {
|
||||
}
|
||||
}
|
||||
|
||||
List<GenericValue> productPromoActions = productPromoRule.getRelatedCache("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId"));
|
||||
List<GenericValue> productPromoActions = productPromoRule.getRelated("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId"), true);
|
||||
Iterator<GenericValue> 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<GenericValue> 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<GenericValue> productPromoCondIter = UtilMisc.toIterator(productPromoConds);
|
||||
@@ -774,7 +774,7 @@ public class ProductPromoWorker {
|
||||
if (performActions) {
|
||||
// perform all actions, either apply or unapply
|
||||
|
||||
List<GenericValue> productPromoActions = productPromoRule.getRelatedCache("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId"));
|
||||
List<GenericValue> productPromoActions = productPromoRule.getRelated("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId"), true);
|
||||
Iterator<GenericValue> 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<GenericValue> productAssocs = EntityUtil.filterByDate(product.getRelatedCache("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("sequenceNum")));
|
||||
List<GenericValue> productAssocs = EntityUtil.filterByDate(product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("sequenceNum"), true));
|
||||
for(GenericValue productAssoc : productAssocs) {
|
||||
optionProductIds.add(productAssoc.getString("productIdTo"));
|
||||
}
|
||||
|
||||
@@ -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<GenericValue> childShoppingLists = shoppingList.getRelated("ChildShoppingList");
|
||||
List<GenericValue> childShoppingLists = shoppingList.getRelated("ChildShoppingList", null, null, false);
|
||||
for(GenericValue v : childShoppingLists) {
|
||||
List<GenericValue> items = v.getRelated("ShoppingListItem");
|
||||
List<GenericValue> 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<GenericValue> shoppingListItems = shoppingList.getRelated("ShoppingListItem");
|
||||
List<GenericValue> shoppingListItems = shoppingList.getRelated("ShoppingListItem", null, null, false);
|
||||
if (UtilValidate.isNotEmpty(shoppingListItems)) {
|
||||
currentListSize = shoppingListItems.size();
|
||||
}
|
||||
@@ -588,7 +588,7 @@ public class ShoppingListEvents {
|
||||
List<String> responseIds = FastList.newInstance();
|
||||
List<GenericValue> surveyResp = null;
|
||||
try {
|
||||
surveyResp = item.getRelated("ShoppingListItemSurvey");
|
||||
surveyResp = item.getRelated("ShoppingListItemSurvey", null, null, false);
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logError(e, module);
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ public class ShoppingListServices {
|
||||
|
||||
List<GenericValue> 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<GenericValue> shoppingListItems = null;
|
||||
try {
|
||||
shoppingListItems = sl.getRelated("ShoppingListItem");
|
||||
shoppingListItems = sl.getRelated("ShoppingListItem", null, null, false);
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logError(e.getMessage(), module);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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 = [];
|
||||
|
||||
+1
-1
@@ -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")]);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
<#if itemProductAssocList?exists && itemProductAssocList?has_content>
|
||||
<tr><td colspan="8"><hr /></td></tr>
|
||||
|
||||
@@ -76,7 +76,7 @@ under the License.
|
||||
</tr>
|
||||
<#-- 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>
|
||||
|
||||
@@ -59,7 +59,7 @@ under the License.
|
||||
<td><#if productStore?has_content>${productStore.storeName?default(productStore.productStoreId)}</#if></td>
|
||||
<td><@ofbizCurrency amount=orderHeader.grandTotal isoCode=orderHeader.currencyUom/></td>
|
||||
<td>
|
||||
<#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder")>
|
||||
<#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder", null, null, false)>
|
||||
<#list trackingCodes as trackingCode>
|
||||
<#if trackingCode?has_content>
|
||||
<a href="/marketing/control/FindTrackingCodeOrders?trackingCodeId=${trackingCode.trackingCodeId}&externalLoginKey=${requestAttributes.externalLoginKey?if_exists}">${trackingCode.trackingCodeId}</a><br />
|
||||
|
||||
@@ -123,7 +123,7 @@ under the License.
|
||||
<#if orderItemStatus.statusDatetime?has_content>${orderItemStatus.statusDatetime.toString()}</#if>
|
||||
${loopStatusItem.get("description",locale)?default(orderItemStatus.statusId)}<br />
|
||||
</#list>
|
||||
<#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.
|
||||
</#if>
|
||||
|
||||
<#-- 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>
|
||||
<tr><td colspan="8"> </td></tr>
|
||||
<#list orderItemShipGroupAssocs as shipGroupAssoc>
|
||||
|
||||
@@ -32,7 +32,7 @@ under the License.
|
||||
</fo:table-header>
|
||||
<fo:table-body>
|
||||
<#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>
|
||||
|
||||
@@ -29,7 +29,7 @@ under the License.
|
||||
<option value="${contactMechAddress.contactMechId}"></option>
|
||||
<#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>
|
||||
<option value="${contactMech.contactMechId?if_exists}">${(postalAddress.address1)?default("")} - ${postalAddress.city?default("")}</option>
|
||||
@@ -41,7 +41,7 @@ under the License.
|
||||
<option value="${contactMechAddress.contactMechId}"></option>
|
||||
<#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>
|
||||
<option value="${contactMech.contactMechId?if_exists}">${telecomNumber.countryCode?if_exists} <#if telecomNumber.areaCode?exists>${telecomNumber.areaCode}-</#if>${telecomNumber.contactNumber}</option>
|
||||
@@ -52,7 +52,7 @@ under the License.
|
||||
<option value="${contactMechAddress.contactMechId}">${(contactMechAddress.infoString)?default("")}</option>
|
||||
<option value="${contactMechAddress.contactMechId}"></option>
|
||||
<#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>
|
||||
<option value="${contactMech.contactMechId?if_exists}">${contactMech.infoString?if_exists}</option>
|
||||
|
||||
@@ -69,7 +69,7 @@ under the License.
|
||||
<#else>
|
||||
${orderItem.itemDescription?if_exists}
|
||||
</#if>
|
||||
<#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute")/>
|
||||
<#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/>
|
||||
<#if orderItemAttributes?has_content>
|
||||
<ul>
|
||||
<#list orderItemAttributes as orderItemAttribute>
|
||||
@@ -204,7 +204,7 @@ under the License.
|
||||
</#list>
|
||||
</div>
|
||||
</div>
|
||||
<#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.
|
||||
</#if>
|
||||
</tr>
|
||||
<#-- 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.
|
||||
</#list>
|
||||
</#if>
|
||||
<#-- 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>
|
||||
<tr<#if itemClass == "1"> class="alternate-row"</#if>>
|
||||
@@ -520,7 +520,7 @@ under the License.
|
||||
</tr>
|
||||
</#if>
|
||||
<#-- 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.
|
||||
</#list>
|
||||
</#if>
|
||||
<#-- 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>
|
||||
<tr<#if itemClass == "1"> class="alternate-row"</#if>>
|
||||
@@ -628,7 +628,7 @@ under the License.
|
||||
</#list>
|
||||
</#if>
|
||||
<#-- 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>
|
||||
<tr<#if itemClass == "1"> class="alternate-row"</#if>>
|
||||
|
||||
@@ -195,7 +195,7 @@ under the License.
|
||||
<td><#if productStore?has_content>${productStore.storeName?default(productStore.productStoreId)}</#if></td>
|
||||
<td><@ofbizCurrency amount=orderHeader.grandTotal isoCode=orderHeader.currencyUom/></td>
|
||||
<td>
|
||||
<#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder")>
|
||||
<#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder", null, null, false)>
|
||||
<#list trackingCodes as trackingCode>
|
||||
<#if trackingCode?has_content>
|
||||
<a href="/marketing/control/FindTrackingCodeOrders?trackingCodeId=${trackingCode.trackingCodeId}&externalLoginKey=${requestAttributes.externalLoginKey?if_exists}">${trackingCode.trackingCodeId}</a><br />
|
||||
|
||||
@@ -49,7 +49,7 @@ under the License.
|
||||
<th>${uiLabelMap.CommonStatus}</th>
|
||||
</tr>
|
||||
<#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.
|
||||
<tr><td colspan="4"><hr /></td></tr>
|
||||
<#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/>
|
||||
<tr>
|
||||
<td align="right" valign="top" width="29%">
|
||||
@@ -317,7 +317,7 @@ under the License.
|
||||
</#if>
|
||||
<#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>
|
||||
|
||||
@@ -564,7 +564,7 @@ under the License.
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<#assign shipGroupShipments = shipGroup.getRelated("PrimaryShipment")>
|
||||
<#assign shipGroupShipments = shipGroup.getRelated("PrimaryShipment", null, null, false)>
|
||||
<#if shipGroupShipments?has_content>
|
||||
<tr><td colspan="3"><hr /></td></tr>
|
||||
<tr>
|
||||
|
||||
@@ -60,7 +60,7 @@ under the License.
|
||||
<#assign selectedAmount = 1/>
|
||||
</#if>
|
||||
<#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>
|
||||
|
||||
@@ -45,7 +45,7 @@ under the License.
|
||||
<#assign product = quoteItem.getRelatedOne("Product", false)>
|
||||
</#if>
|
||||
<#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>
|
||||
|
||||
@@ -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.
|
||||
</#if>
|
||||
</tr>
|
||||
<#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 -->
|
||||
|
||||
@@ -78,7 +78,7 @@ under the License.
|
||||
</fo:table-row>
|
||||
<#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/>
|
||||
|
||||
Reference in New Issue
Block a user