diff --git a/ecommerce/data/DemoProduct.xml b/ecommerce/data/DemoProduct.xml index b4a05174a..d92632b59 100644 --- a/ecommerce/data/DemoProduct.xml +++ b/ecommerce/data/DemoProduct.xml @@ -1562,4 +1562,16 @@ under the License. + + + + + + + + + + + + diff --git a/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy b/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy index 479dea4f1..aa7e08fe1 100644 --- a/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy +++ b/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy @@ -93,7 +93,7 @@ if (shoppingListId) { price = calcPriceOutMap.price; totalPrice = price * shoppingListItem.quantity; // similar code at ShoppingCartItem.java getRentalAdjustment - if ("ASSET_USAGE".equals(product.productTypeId)) { + if ("ASSET_USAGE".equals(product.productTypeId) || "ASSET_USAGE_OUT_IN".equals(product.productTypeId)) { persons = shoppingListItem.reservPersons ?: 0; reservNthPPPerc = product.reservNthPPPerc ?: 0; reserv2ndPPPerc = product.reserv2ndPPPerc ?: 0; diff --git a/ecommerce/webapp/ecommerce/cart/showcart.ftl b/ecommerce/webapp/ecommerce/cart/showcart.ftl index 683395d3b..877cc5398 100644 --- a/ecommerce/webapp/ecommerce/cart/showcart.ftl +++ b/ecommerce/webapp/ecommerce/cart/showcart.ftl @@ -117,7 +117,7 @@ function setAlternateGwp(field) {
${uiLabelMap.EcommerceProductNumber} <#-- 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/ecommerce/webapp/ecommerce/catalog/productdetail.ftl b/ecommerce/webapp/ecommerce/catalog/productdetail.ftl index 774e29a18..74449662f 100644 --- a/ecommerce/webapp/ecommerce/catalog/productdetail.ftl +++ b/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/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl b/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl index 0cc0c6da9..1e924ab22 100644 --- a/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl +++ b/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/ecommerce/widget/CommonScreens.xml b/ecommerce/widget/CommonScreens.xml index c8af35bc3..2ef8cda32 100644 --- a/ecommerce/widget/CommonScreens.xml +++ b/ecommerce/widget/CommonScreens.xml @@ -40,7 +40,10 @@ under the License. - + + + +