diff --git a/applications/accounting/entitydef/entitymodel.xml b/applications/accounting/entitydef/entitymodel.xml index 5b5a337823..92e9c685e9 100644 --- a/applications/accounting/entitydef/entitymodel.xml +++ b/applications/accounting/entitydef/entitymodel.xml @@ -4069,4 +4069,12 @@ under the License. + + + + + + + + diff --git a/applications/order/config/OrderUiLabels.xml b/applications/order/config/OrderUiLabels.xml index 889c92b38b..a406fea2e9 100644 --- a/applications/order/config/OrderUiLabels.xml +++ b/applications/order/config/OrderUiLabels.xml @@ -12885,4 +12885,7 @@ Update Note + + Rent + diff --git a/applications/order/data/OrderTypeData.xml b/applications/order/data/OrderTypeData.xml index cdd57ff8d5..bb87e2326c 100644 --- a/applications/order/data/OrderTypeData.xml +++ b/applications/order/data/OrderTypeData.xml @@ -322,6 +322,8 @@ under the License. + + @@ -349,6 +351,7 @@ under the License. + @@ -358,6 +361,7 @@ under the License. + diff --git a/applications/order/entitydef/entitymodel_view.xml b/applications/order/entitydef/entitymodel_view.xml index c73f5b5e7d..8d20992992 100644 --- a/applications/order/entitydef/entitymodel_view.xml +++ b/applications/order/entitydef/entitymodel_view.xml @@ -1684,7 +1684,7 @@ under the License. - + @@ -1707,7 +1707,22 @@ under the License. - - + + + + + + + + + + + + + + diff --git a/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml b/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml index ae8047eff3..8676683647 100644 --- a/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml +++ b/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml @@ -1143,4 +1143,64 @@ under the License. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml b/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml index cb905da793..9e61326e71 100644 --- a/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml +++ b/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml @@ -261,6 +261,137 @@ under the License. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/applications/order/servicedef/secas.xml b/applications/order/servicedef/secas.xml index 2bff07d7f6..29336a67c7 100644 --- a/applications/order/servicedef/secas.xml +++ b/applications/order/servicedef/secas.xml @@ -93,6 +93,7 @@ under the License. + diff --git a/applications/order/servicedef/services.xml b/applications/order/servicedef/services.xml index 3cee48736f..9ab6a03366 100644 --- a/applications/order/servicedef/services.xml +++ b/applications/order/servicedef/services.xml @@ -1122,4 +1122,9 @@ under the License. Create Order Payment Application + + + Create Test Order Rental of an asset which is shipped from and returned to inventory + diff --git a/applications/order/servicedef/services_return.xml b/applications/order/servicedef/services_return.xml index fdb4e41029..1227e2e28b 100644 --- a/applications/order/servicedef/services_return.xml +++ b/applications/order/servicedef/services_return.xml @@ -369,4 +369,12 @@ under the License. Delete a ReturnContactMech + + + + Create the return item for rental (which items has product type is ASSET_USAGE_OUT_IN) + + + diff --git a/applications/order/src/org/ofbiz/order/order/OrderServices.java b/applications/order/src/org/ofbiz/order/order/OrderServices.java index a46256835b..72dcd924c3 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderServices.java +++ b/applications/order/src/org/ofbiz/order/order/OrderServices.java @@ -1346,6 +1346,105 @@ public class OrderServices { resErrorMessages.add(errMsg); } } + + // rent item + if (UtilValidate.isNotEmpty(orderItem.getString("productId")) && "RENTAL_ORDER_ITEM".equals(orderItem.getString("orderItemTypeId"))) { + try { + // get the product of the order item + GenericValue product = orderItem.getRelatedOne("Product"); + if (product == null) { + Debug.logError("Error when looking up product in reserveInventory service", module); + resErrorMessages.add("Error when looking up product in reserveInventory service"); + continue; + } + + // check product type for rent + String productType = (String) product.get("productTypeId"); + if ("ASSET_USAGE_OUT_IN".equals(productType)) { + if (reserveInventory) { + // for MARKETING_PKG_PICK reserve the components + if (EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG_PICK")) { + Map componentsRes = dispatcher.runSync("getAssociatedProducts", UtilMisc.toMap("productId", orderItem.getString("productId"), "type", "PRODUCT_COMPONENT")); + if (ServiceUtil.isError(componentsRes)) { + resErrorMessages.add((String)componentsRes.get(ModelService.ERROR_MESSAGE)); + continue; + } else { + List assocProducts = UtilGenerics.checkList(componentsRes.get("assocProducts")); + Iterator assocProductsIter = assocProducts.iterator(); + while (assocProductsIter.hasNext()) { + GenericValue productAssoc = assocProductsIter.next(); + BigDecimal quantityOrd = productAssoc.getBigDecimal("quantity"); + BigDecimal quantityKit = orderItemShipGroupAssoc.getBigDecimal("quantity"); + BigDecimal quantity = quantityOrd.multiply(quantityKit); + Map reserveInput = new HashMap(); + reserveInput.put("productStoreId", productStoreId); + reserveInput.put("productId", productAssoc.getString("productIdTo")); + reserveInput.put("orderId", orderItem.getString("orderId")); + reserveInput.put("orderItemSeqId", orderItem.getString("orderItemSeqId")); + reserveInput.put("shipGroupSeqId", orderItemShipGroupAssoc.getString("shipGroupSeqId")); + reserveInput.put("quantity", quantity); + reserveInput.put("userLogin", userLogin); + reserveInput.put("facilityId", shipGroupFacilityId); + Map reserveResult = dispatcher.runSync("reserveStoreInventory", reserveInput); + + if (ServiceUtil.isError(reserveResult)) { + String invErrMsg = "The product "; + if (product != null) { + invErrMsg += getProductName(product, orderItem); + } + invErrMsg += " with ID " + orderItem.getString("productId") + " is no longer in stock. Please try reducing the quantity or removing the product from this order."; + resErrorMessages.add(invErrMsg); + } + } + } + } else { + // reserve the product + Map reserveInput = new HashMap(); + reserveInput.put("productStoreId", productStoreId); + reserveInput.put("productId", orderItem.getString("productId")); + reserveInput.put("orderId", orderItem.getString("orderId")); + reserveInput.put("orderItemSeqId", orderItem.getString("orderItemSeqId")); + reserveInput.put("shipGroupSeqId", orderItemShipGroupAssoc.getString("shipGroupSeqId")); + reserveInput.put("facilityId", shipGroupFacilityId); + // use the quantity from the orderItemShipGroupAssoc, NOT the orderItem, these are reserved by item-group assoc + reserveInput.put("quantity", orderItemShipGroupAssoc.getBigDecimal("quantity")); + reserveInput.put("userLogin", userLogin); + Map reserveResult = dispatcher.runSync("reserveStoreInventory", reserveInput); + + if (ServiceUtil.isError(reserveResult)) { + String invErrMsg = "The product "; + if (product != null) { + invErrMsg += getProductName(product, orderItem); + } + invErrMsg += " with ID " + orderItem.getString("productId") + " is no longer in stock. Please try reducing the quantity or removing the product from this order."; + resErrorMessages.add(invErrMsg); + } + } + } + + if (EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG_AUTO")) { + GenericValue permUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system")); + Map inputMap = new HashMap(); + if (UtilValidate.isNotEmpty(shipGroupFacilityId)) { + inputMap.put("facilityId", shipGroupFacilityId); + } else { + inputMap.put("facilityId", productStore.getString("inventoryFacilityId")); + } + inputMap.put("orderId", orderItem.getString("orderId")); + inputMap.put("orderItemSeqId", orderItem.getString("orderItemSeqId")); + inputMap.put("userLogin", permUserLogin); + Map prunResult = dispatcher.runSync("createProductionRunForMktgPkg", inputMap); + if (ServiceUtil.isError(prunResult)) { + Debug.logError(ServiceUtil.getErrorMessage(prunResult) + " for input:" + inputMap, module); + } + } + } + } catch (GenericServiceException e) { + String errMsg = "Fatal error calling reserveStoreInventory service: " + e.toString(); + Debug.logError(e, errMsg, module); + resErrorMessages.add(errMsg); + } + } } } } diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java index d6433001ad..7ed94684f0 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java @@ -301,7 +301,7 @@ public class ShoppingCartEvents { } // get the renting data - if ("ASSET_USAGE".equals(ProductWorker.getProductTypeId(delegator, productId))) { + if ("ASSET_USAGE".equals(ProductWorker.getProductTypeId(delegator, productId)) || "ASSET_USAGE_OUT_IN".equals(ProductWorker.getProductTypeId(delegator, productId))) { if (paramMap.containsKey("reservStart")) { reservStartStr = (String) paramMap.remove("reservStart"); if (reservStartStr.length() == 10) // only date provided, no time string? diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java index c12a3543fc..c8344e5f06 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java @@ -419,7 +419,7 @@ public class ShoppingCartItem implements java.io.Serializable { ShoppingCart cart, Boolean triggerExternalOpsBool, Boolean triggerPriceRulesBool, GenericValue parentProduct, Boolean skipInventoryChecks, Boolean skipProductChecks) throws CartItemModifyException { ShoppingCartItem newItem = new ShoppingCartItem(product, additionalProductFeatureAndAppls, attributes, prodCatalogId, configWrapper, cart.getLocale(), itemType, itemGroup, parentProduct); - + selectedAmount = selectedAmount == null ? BigDecimal.ZERO : selectedAmount; unitPrice = unitPrice == null ? BigDecimal.ZERO : unitPrice; reservLength = reservLength == null ? BigDecimal.ZERO : reservLength; @@ -497,7 +497,7 @@ public class ShoppingCartItem implements java.io.Serializable { } // check to see if the product is a rental item - if ("ASSET_USAGE".equals(product.getString("productTypeId"))) { + if ("ASSET_USAGE".equals(product.getString("productTypeId")) || "ASSET_USAGE_OUT_IN".equals(product.getString("productTypeId"))) { if (reservStart == null) { String excMsg = UtilProperties.getMessage(resource_error, "item.missing_reservation_starting_date", cart.getLocale()); @@ -750,6 +750,8 @@ public class ShoppingCartItem implements java.io.Serializable { if (UtilValidate.isNotEmpty(_product.getString("productTypeId"))) { if ("ASSET_USAGE".equals(_product.getString("productTypeId"))) { this.itemType = "RENTAL_ORDER_ITEM"; // will create additional workeffort/asset usage records + } else if ("ASSET_USAGE_OUT_IN".equals(_product.getString("productTypeId"))) { + this.itemType = "RENTAL_ORDER_ITEM"; } else { this.itemType = "PRODUCT_ORDER_ITEM"; } diff --git a/applications/order/testdef/ShoppingCartTests.xml b/applications/order/testdef/ShoppingCartTests.xml index c5da23d12a..22d809c563 100644 --- a/applications/order/testdef/ShoppingCartTests.xml +++ b/applications/order/testdef/ShoppingCartTests.xml @@ -25,6 +25,11 @@ under the License. + + + + + diff --git a/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl b/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl index 5ad3b7af87..d64badda94 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl @@ -56,6 +56,8 @@ under the License. <#-- check to see if it is a rental item; will enter parameters on the detail screen--> <#elseif product.productTypeId?if_exists == "ASSET_USAGE"/> ${uiLabelMap.OrderMakeBooking}... + <#elseif product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"/> + ${uiLabelMap.OrderRent}... <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> <#elseif product.productTypeId?if_exists == "AGGREGATED"/> ${uiLabelMap.OrderConfigure}... @@ -158,6 +160,8 @@ under the License. <#-- check to see if it is a rental item; will enter parameters on the detail screen--> <#elseif product.productTypeId?if_exists == "ASSET_USAGE"/> ${uiLabelMap.OrderMakeBooking}... + <#elseif product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"/> + ${uiLabelMap.OrderRent}... <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> <#elseif product.productTypeId?if_exists == "AGGREGATED"/> ${uiLabelMap.OrderConfigure}... diff --git a/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl b/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl index 560468272f..ccb96fa34a 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl @@ -212,7 +212,7 @@ ${virtualJavaScript?if_exists} } function additemSubmit(){ - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> newdatevalue = validate(document.addform.reservStart.value); if (newdatevalue == false) { document.addform.reservStart.focus(); @@ -226,7 +226,7 @@ ${virtualJavaScript?if_exists} } function addShoplistSubmit(){ - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> if (document.addToShoppingList.reservStartStr.value == "") { document.addToShoppingList.submit(); } else { @@ -358,7 +358,7 @@ ${virtualJavaScript?if_exists} <#assign priceStyle = "regularPrice"> ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual?if_exists> ${uiLabelMap.CommonFrom} <@ofbizCurrency amount=price.price isoCode=price.currencyUsed/> - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> <#if product.reserv2ndPPPerc?exists && product.reserv2ndPPPerc != 0>
${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?exists || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons} <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed/> <#if product.reservNthPPPerc?exists &&product.reservNthPPPerc != 0>
${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} ${uiLabelMap.CommonUntil} ${product.reservMaxPersons}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed/> <#if (!product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?exists || product.reservNthPPPerc == 0)>
${uiLabelMap.ProductMaximum} ${product.reservMaxPersons} ${uiLabelMap.ProductPersons}. @@ -529,7 +529,7 @@ ${virtualJavaScript?if_exists} ${uiLabelMap.CommonAmount}:  - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> <@htmlTemplate.renderDateTimeField name="reservStart" event="" action="" value="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="startDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> <@htmlTemplate.renderDateTimeField name="reservEnd" event="" action="" value="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="endDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> @@ -566,7 +566,7 @@ ${virtualJavaScript?if_exists}    - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN">
 ${uiLabelMap.CommonStartDate} (yyyy-mm-dd)Number of days Number of personsQty 
<#else> diff --git a/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl b/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl index 154d937339..1177518de4 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl @@ -109,6 +109,8 @@ ${virtualJavaScript?if_exists} <#-- check to see if the product requires an amount --> <#elseif product.requireAmount?exists && product.requireAmount == "Y"> ${uiLabelMap.OrderChooseAmount}... + <#elseif product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> + ${uiLabelMap.OrderRent}... <#else>
diff --git a/applications/order/webapp/ordermgr/return/returnItemInc.ftl b/applications/order/webapp/ordermgr/return/returnItemInc.ftl index 36e0844cd9..06a7b630d6 100644 --- a/applications/order/webapp/ordermgr/return/returnItemInc.ftl +++ b/applications/order/webapp/ordermgr/return/returnItemInc.ftl @@ -122,7 +122,14 @@ under the License.
<@ofbizCurrency amount=orderItem.unitPrice isoCode=orderHeader.currencyUom/>
- + <#if orderItem.productId?exists> + <#assign product = orderItem.getRelatedOne("Product")/> + <#if product.productTypeId == "ASSET_USAGE_OUT_IN"> + + <#else> + + + <#-- check if rental data present insert extra fields in Quick Add--> - <#if product?exists && product.getString("productTypeId") == "ASSET_USAGE"> + <#if (product?exists && product.getString("productTypeId") == "ASSET_USAGE") || (product?exists && product.getString("productTypeId") == "ASSET_USAGE_OUT_IN")> ${uiLabelMap.EcommerceStartDate}: ${uiLabelMap.EcommerceLength}: @@ -182,8 +182,22 @@ function setAlternateGwp(field) { <#else>   - <#if fixedAssetExist == true>
- ${uiLabelMap.EcommerceStartDate} -- ${uiLabelMap.EcommerceNbrOfDays} -
- ${uiLabelMap.EcommerceNbrOfPersons} -- ${uiLabelMap.CommonQuantity} -
- <#else>${uiLabelMap.CommonQuantity} + <#if fixedAssetExist == true> + + + + + + + + + + +
- ${uiLabelMap.EcommerceStartDate} -- ${uiLabelMap.EcommerceNbrOfDays} -
- ${uiLabelMap.EcommerceNbrOfPersons} -- ${uiLabelMap.CommonQuantity} -
+ + <#else> + ${uiLabelMap.CommonQuantity} + ${uiLabelMap.EcommerceUnitPrice} ${uiLabelMap.EcommerceAdjustments} ${uiLabelMap.EcommerceItemTotal} @@ -304,8 +318,27 @@ function setAlternateGwp(field) { <#if cartLine.getIsPromo() || cartLine.getShoppingListId()?exists> - <#if fixedAssetExist == true><#if cartLine.getReservStart()?exists>
 ${cartLine.getReservStart()?string("yyyy-mm-dd")}${cartLine.getReservLength()?string.number}
 ${cartLine.getReservPersons()?string.number}<#else> -
----
-- + <#if fixedAssetExist == true> + <#if cartLine.getReservStart()?exists> + + + + + + + + +
 ${cartLine.getReservStart()?string("yyyy-mm-dd")}${cartLine.getReservLength()?string.number}
 ${cartLine.getReservPersons()?string.number} + <#else> + + + + + + + +
----
-- + ${cartLine.getQuantity()?string.number}
<#else><#-- fixedAssetExist --> ${cartLine.getQuantity()?string.number} diff --git a/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl b/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl index 774e29a18c..74449662fb 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl @@ -219,7 +219,7 @@ ${virtualVariantJavaScript?if_exists} } function additemSubmit(){ - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> newdatevalue = validate(document.addform.reservStart.value); if (newdatevalue == false) { document.addform.reservStart.focus(); @@ -233,7 +233,7 @@ ${virtualVariantJavaScript?if_exists} } function addShoplistSubmit(){ - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> if (document.addToShoppingList.reservStartStr.value == "") { document.addToShoppingList.submit(); } else { @@ -456,7 +456,7 @@ ${virtualVariantJavaScript?if_exists} <#assign priceStyle = "regularPrice" /> ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual?if_exists> ${uiLabelMap.CommonFrom} <@ofbizCurrency amount=price.price isoCode=price.currencyUsed /> - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> <#if product.reserv2ndPPPerc?exists && product.reserv2ndPPPerc != 0>
${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?exists || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons?if_exists} <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed /> <#if product.reservNthPPPerc?exists &&product.reservNthPPPerc != 0>
${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} ${uiLabelMap.CommonUntil} ${product.reservMaxPersons?if_exists}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed /> <#if (!product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?exists || product.reservNthPPPerc == 0)>
${uiLabelMap.ProductMaximum} ${product.reservMaxPersons?if_exists} ${uiLabelMap.ProductPersons}. @@ -629,7 +629,7 @@ ${virtualVariantJavaScript?if_exists} ${uiLabelMap.CommonAmount}:  - <#if product.productTypeId?if_exists == "ASSET_USAGE"> + <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN">
<@htmlTemplate.renderDateTimeField event="" action="" name="reservStart" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="" size="25" maxlength="30" id="reservStart1" dateType="date" shortDateInput=true timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> <@htmlTemplate.renderDateTimeField event="" action="" name="reservEnd" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="" size="25" maxlength="30" id="reservEnd1" dateType="date" shortDateInput=true timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> @@ -689,8 +689,12 @@ ${virtualVariantJavaScript?if_exists}    + <#assign nowDate = Static["org.ofbiz.base.util.UtilDateTime"].nowDateString("yyyy-MM-dd")> <#if product.productTypeId?if_exists == "ASSET_USAGE"> -  ${uiLabelMap.CommonStartDate} (yyyy-mm-dd)Number of days Number of personsQty  +  ${uiLabelMap.CommonStartDate} (yyyy-mm-dd)<@htmlTemplate.renderDateTimeField name="reservStartStr" event="" action="" value="${nowDate}" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="15" maxlength="30" id="reservStartStr" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> Number of days   
Number of persons    Qty   + <#elseif product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> +  ${uiLabelMap.CommonStartDate} (yyyy-mm-dd)   <@htmlTemplate.renderDateTimeField name="reservStartStr" event="" action="" value="${nowDate}" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="15" maxlength="30" id="reservStartStr" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>  Number of days  
+ Qty  <#else> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl b/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl index 0cc0c6da97..1e924ab22e 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl @@ -406,8 +406,31 @@ under the License.
- <#if product.productTypeId == "ASSET_USAGE">
 
 <#else> -
----
-- + <#if product.productTypeId == "ASSET_USAGE" || product.productTypeId == "ASSET_USAGE_OUT_IN"> + + + + + + + + <#if product.productTypeId == "ASSET_USAGE"> + + + <#else> + + + +
 <@htmlTemplate.renderDateTimeField event="" action="" name="reservStartStr" className="inputBox" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${shoppingListItem.reservStart?if_exists}" size="15" maxlength="30" id="reservStartStr_${shoppingListItem.shoppingListItemSeqId}" dateType="date" shortDateInput=true timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
    + <#else> + + + + + + + +
----
--
diff --git a/specialpurpose/ecommerce/widget/CommonScreens.xml b/specialpurpose/ecommerce/widget/CommonScreens.xml index c8af35bc3e..2ef8cda32d 100644 --- a/specialpurpose/ecommerce/widget/CommonScreens.xml +++ b/specialpurpose/ecommerce/widget/CommonScreens.xml @@ -40,7 +40,10 @@ under the License. - + + + +