JacquesLeRoux commented on code in PR #517: URL: https://github.com/apache/ofbiz-framework/pull/517#discussion_r1147866821
########## applications/product/groovyScripts/facility/shipment/PrintPickSheets.groovy: ########## @@ -60,16 +59,18 @@ if (toPrintOrders) { orderMap.orderId = orderId orderMap.orderDate = orderHeader.orderDate billingOrderContactMechs = [] - billingOrderContactMechs = from("OrderContactMech").where("orderId", orderId, "contactMechPurposeTypeId", "BILLING_LOCATION").queryList() + billingOrderContactMechs = from('OrderContactMech') + .where('orderId', orderId, 'contactMechPurposeTypeId', 'BILLING_LOCATION').queryList() if (billingOrderContactMechs.size() > 0) { billingContactMechId = EntityUtil.getFirst(billingOrderContactMechs).contactMechId - billingAddress = from("PostalAddress").where("contactMechId", billingContactMechId).queryOne() + billingAddress = from('PostalAddress').where('contactMechId', billingContactMechId).queryOne() } - shippingContactMechId = from("OrderContactMech").where("orderId", orderId, "contactMechPurposeTypeId", "SHIPPING_LOCATION").queryFirst().contactMechId - shippingAddress = from("PostalAddress").where("contactMechId", shippingContactMechId).queryOne() + shippingContactMechId = from('OrderContactMech') + .where('orderId', orderId, 'contactMechPurposeTypeId', 'SHIPPING_LOCATION').queryFirst().contactMechId + shippingAddress = from('PostalAddress').where('contactMechId', shippingContactMechId).queryOne() orderItemShipGroups.each { orderItemShipGroup -> if (orderItemShipGroup.orderId == orderId) { - orderMap.shipmentMethodType = EntityUtil.getFirst(orderItemShipGroup.getRelated("ShipmentMethodType", null, null, false)).description + orderMap.shipmentMethodType = orderItemShipGroup.getRelated('ShipmentMethodType', null, null, false)[0]?.description Review Comment: OK ########## applications/product/groovyScripts/product/cost/CostServices.groovy: ########## @@ -495,15 +497,14 @@ def getProductAverageCost() { /** * Formula that creates a cost component equal to a percentage of total product cost - * @return */ -def productCostPercentageFormula() { +Map productCostPercentageFormula() { Map result = success() GenericValue productCostComponentCalc = parameters.productCostComponentCalc GenericValue costComponentCalc = parameters.costComponentCalc - Map inputMap = [productId: productCostComponentCalc.productId, currencyUomId: parameters.currencyUomId, costComponentTypePrefix: parameters.costComponentTypePrefix] - Map serviceResult = run service: "getProductCost", with: inputMap - BigDecimal productCost = serviceResult.productCost + Map inputMap = [productId: productCostComponentCalc.productId, currencyUomId: parameters.currencyUomId, + costComponentTypePrefix: parameters.costComponentTypePrefix] + run service: 'getProductCost', with: inputMap // set field="productCostAdjustment" value="${parameters.baseCost * costComponentCalc.fixedCost}" type="BigDecimal"/ Review Comment: OK -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ofbiz.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org