Modified: ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderHeader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderHeader.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderHeader.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderHeader.ftl Sat Sep 17 07:17:15 2016 @@ -26,288 +26,304 @@ under the License. <div id="orderHeader"> <#-- left side --> -<div class="columnLeft"> -<div class="screenlet"> - <h3> - <#if maySelectItems?default("N") == "Y" && returnLink?default("N") == "Y" && (orderHeader.statusId)! == "ORDER_COMPLETED" && roleTypeId! == "PLACING_CUSTOMER"> - <a href="<@ofbizUrl fullPath="true">makeReturn?orderId=${orderHeader.orderId}</@ofbizUrl>" class="submenutextright">${uiLabelMap.OrderRequestReturn}</a> - </#if> - ${uiLabelMap.OrderOrder} - <#if orderHeader?has_content> - ${uiLabelMap.CommonNbr}<a href="<@ofbizUrl fullPath="true">orderstatus?orderId=${orderHeader.orderId}</@ofbizUrl>" class="lightbuttontext">${orderHeader.orderId}</a> - </#if> - ${uiLabelMap.CommonInformation} - <#if (orderHeader.orderId)??> - ${externalOrder!} [ <a href="<@ofbizUrl fullPath="true">order.pdf?orderId=${(orderHeader.orderId)!}</@ofbizUrl>" target="_BLANK" class="lightbuttontext">PDF</a> ] - </#if> - </h3> - <#-- placing customer information --> - <ul> - <#if localOrderReadHelper?? && orderHeader?has_content> - <#assign displayParty = localOrderReadHelper.getPlacingParty()!/> - <#if displayParty?has_content> - <#assign displayPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("partyId", displayParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/> + <div class="columnLeft"> + <div class="screenlet"> + <h3> + <#if maySelectItems?default("N") == "Y" && returnLink?default("N") == "Y" && (orderHeader.statusId)! == "ORDER_COMPLETED" && roleTypeId! == "PLACING_CUSTOMER"> + <a href="<@ofbizUrl fullPath="true">makeReturn?orderId=${orderHeader.orderId}</@ofbizUrl>" + class="submenutextright">${uiLabelMap.OrderRequestReturn}</a> </#if> - <li> - ${uiLabelMap.PartyName} - ${(displayPartyNameResult.fullName)?default("[Name Not Found]")} - </li> - </#if> - <#-- order status information --> - <li> - ${uiLabelMap.CommonStatus} + ${uiLabelMap.OrderOrder} <#if orderHeader?has_content> - ${localOrderReadHelper.getStatusString(locale)} - <#else> - ${uiLabelMap.OrderNotYetOrdered} + ${uiLabelMap.CommonNbr} + <a href="<@ofbizUrl fullPath="true">orderstatus?orderId=${orderHeader.orderId}</@ofbizUrl>" + class="lightbuttontext">${orderHeader.orderId}</a> </#if> - </li> - <#-- ordered date --> - <#if orderHeader?has_content> - <li> - ${uiLabelMap.CommonDate} - ${orderHeader.orderDate.toString()} - </li> - </#if> - <#if distributorId??> - <li> - ${uiLabelMap.OrderDistributor} - ${distributorId} - </li> - </#if> - </ul> -</div> - -<div class="screenlet"> - <#if paymentMethods?has_content || paymentMethodType?has_content || billingAccount?has_content> - <#-- order payment info --> - <h3>${uiLabelMap.AccountingPaymentInformation}</h3> - <#-- offline payment address infomation :: change this to use Company's address --> - <ul> - <#if !paymentMethod?has_content && paymentMethodType?has_content> + ${uiLabelMap.CommonInformation} + <#if (orderHeader.orderId)??> + ${externalOrder!} [ <a href="<@ofbizUrl fullPath="true">order.pdf?orderId=${(orderHeader.orderId)!}</@ofbizUrl>" + target="_BLANK" class="lightbuttontext">PDF</a> ] + </#if> + </h3> + <#-- placing customer information --> + <ul> + <#if localOrderReadHelper?? && orderHeader?has_content> + <#assign displayParty = localOrderReadHelper.getPlacingParty()!/> + <#if displayParty?has_content> + <#assign displayPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("partyId", displayParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/> + </#if> + <li> + ${uiLabelMap.PartyName} + ${(displayPartyNameResult.fullName)?default("[Name Not Found]")} + </li> + </#if> + <#-- order status information --> <li> - <#if paymentMethodType.paymentMethodTypeId == "EXT_OFFLINE"> - ${uiLabelMap.AccountingOfflinePayment} - <#if orderHeader?has_content && paymentAddress?has_content> - ${uiLabelMap.OrderSendPaymentTo}: - <#if paymentAddress.toName?has_content>${paymentAddress.toName}</#if> - <#if paymentAddress.attnName?has_content>${uiLabelMap.PartyAddrAttnName}: ${paymentAddress.attnName}</#if> - ${paymentAddress.address1} - <#if paymentAddress.address2?has_content>${paymentAddress.address2}</#if> - <#assign paymentStateGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.stateProvinceGeoId!}, false))! /> - ${paymentAddress.city}<#if paymentStateGeo?has_content>, ${paymentStateGeo.geoName!}</#if> ${paymentAddress.postalCode!} - <#assign paymentCountryGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.countryGeoId!}, false))! /> - <#if paymentCountryGeo?has_content>${paymentCountryGeo.geoName!}</#if> - ${uiLabelMap.EcommerceBeSureToIncludeYourOrderNb} - </#if> + ${uiLabelMap.CommonStatus} + <#if orderHeader?has_content> + ${localOrderReadHelper.getStatusString(locale)} <#else> - <#assign outputted = true> - ${uiLabelMap.AccountingPaymentVia} ${paymentMethodType.get("description",locale)} + ${uiLabelMap.OrderNotYetOrdered} </#if> </li> - </#if> - <#if paymentMethods?has_content> - <#list paymentMethods as paymentMethod> - <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId> - <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false)> - <#assign formattedCardNumber = Static["org.apache.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)> - <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId> - <#assign giftCard = paymentMethod.getRelatedOne("GiftCard", false)> - <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId> - <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount", false)> - </#if> - <#-- credit card info --> - <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId && creditCard?has_content> - <#if outputted?default(false)> - </#if> - <#assign pmBillingAddress = creditCard.getRelatedOne("PostalAddress", false)!> + <#-- ordered date --> + <#if orderHeader?has_content> + <li> + ${uiLabelMap.CommonDate} + ${orderHeader.orderDate.toString()} + </li> + </#if> + <#if distributorId??> + <li> + ${uiLabelMap.OrderDistributor} + ${distributorId} + </li> + </#if> + </ul> + </div> + + <div class="screenlet"> + <#if paymentMethods?has_content || paymentMethodType?has_content || billingAccount?has_content> + <#-- order payment info --> + <h3>${uiLabelMap.AccountingPaymentInformation}</h3> + <#-- offline payment address infomation :: change this to use Company's address --> + <ul> + <#if !paymentMethod?has_content && paymentMethodType?has_content> <li> - <ul> - <li> ${uiLabelMap.AccountingCreditCard} - <#if creditCard.companyNameOnCard?has_content>${creditCard.companyNameOnCard}</#if> - <#if creditCard.titleOnCard?has_content>${creditCard.titleOnCard}</#if> - ${creditCard.firstNameOnCard} - <#if creditCard.middleNameOnCard?has_content>${creditCard.middleNameOnCard}</#if> - ${creditCard.lastNameOnCard} - <#if creditCard.suffixOnCard?has_content>${creditCard.suffixOnCard}</#if> - </li> - <li>${formattedCardNumber}</li> - </ul> - </li> - <#-- Gift Card info --> - <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId && giftCard?has_content> - <#if outputted?default(false)> - </#if> - <#if giftCard?has_content && giftCard.cardNumber?has_content> - <#assign pmBillingAddress = giftCard.getRelatedOne("PostalAddress", false)!> - <#assign giftCardNumber = ""> - <#assign pcardNumber = giftCard.cardNumber> - <#if pcardNumber?has_content> - <#assign psize = pcardNumber?length - 4> - <#if 0 < psize> - <#list 0 .. psize-1 as foo> - <#assign giftCardNumber = giftCardNumber + "*"> - </#list> - <#assign giftCardNumber = giftCardNumber + pcardNumber[psize .. psize + 3]> - <#else> - <#assign giftCardNumber = pcardNumber> + <#if paymentMethodType.paymentMethodTypeId == "EXT_OFFLINE"> + ${uiLabelMap.AccountingOfflinePayment} + <#if orderHeader?has_content && paymentAddress?has_content> + ${uiLabelMap.OrderSendPaymentTo}: + <#if paymentAddress.toName?has_content>${paymentAddress.toName}</#if> + <#if paymentAddress.attnName?has_content> + ${uiLabelMap.PartyAddrAttnName} : ${paymentAddress.attnName} + </#if> + ${paymentAddress.address1} + <#if paymentAddress.address2?has_content>${paymentAddress.address2}</#if> + <#assign paymentStateGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.stateProvinceGeoId!}, false))! /> + ${paymentAddress.city} + <#if paymentStateGeo?has_content>, ${paymentStateGeo.geoName!}</#if> + ${paymentAddress.postalCode!} + <#assign paymentCountryGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.countryGeoId!}, false))! /> + <#if paymentCountryGeo?has_content>${paymentCountryGeo.geoName!}</#if> + ${uiLabelMap.EcommerceBeSureToIncludeYourOrderNb} </#if> + <#else> + <#assign outputted = true> + ${uiLabelMap.AccountingPaymentVia} ${paymentMethodType.get("description",locale)} </#if> - </#if> - <li> - ${uiLabelMap.AccountingGiftCard} - ${giftCardNumber} </li> - <#-- EFT account info --> - <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId && eftAccount?has_content> - <#if outputted?default(false)> - </#if> - <#assign pmBillingAddress = eftAccount.getRelatedOne("PostalAddress", false)!> - <li> - <ul> + </#if> + <#if paymentMethods?has_content> + <#list paymentMethods as paymentMethod> + <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId> + <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false)> + <#assign formattedCardNumber = Static["org.apache.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)> + <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId> + <#assign giftCard = paymentMethod.getRelatedOne("GiftCard", false)> + <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId> + <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount", false)> + </#if> + <#-- credit card info --> + <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId && creditCard?has_content> + <#if outputted?default(false)></#if> + <#assign pmBillingAddress = creditCard.getRelatedOne("PostalAddress", false)!> <li> - ${uiLabelMap.AccountingEFTAccount} - ${eftAccount.nameOnAccount!} + <ul> + <li> ${uiLabelMap.AccountingCreditCard} + <#if creditCard.companyNameOnCard?has_content>${creditCard.companyNameOnCard}</#if> + <#if creditCard.titleOnCard?has_content>${creditCard.titleOnCard}</#if> + ${creditCard.firstNameOnCard} + <#if creditCard.middleNameOnCard?has_content>${creditCard.middleNameOnCard}</#if> + ${creditCard.lastNameOnCard} + <#if creditCard.suffixOnCard?has_content>${creditCard.suffixOnCard}</#if> + </li> + <li>${formattedCardNumber}</li> + </ul> </li> + <#-- Gift Card info --> + <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId && giftCard?has_content> + <#if outputted?default(false)></#if> + <#if giftCard?has_content && giftCard.cardNumber?has_content> + <#assign pmBillingAddress = giftCard.getRelatedOne("PostalAddress", false)!> + <#assign giftCardNumber = ""> + <#assign pcardNumber = giftCard.cardNumber> + <#if pcardNumber?has_content> + <#assign psize = pcardNumber?length - 4> + <#if 0 < psize> + <#list 0 .. psize-1 as foo> + <#assign giftCardNumber = giftCardNumber + "*"> + </#list> + <#assign giftCardNumber = giftCardNumber + pcardNumber[psize .. psize + 3]> + <#else> + <#assign giftCardNumber = pcardNumber> + </#if> + </#if> + </#if> <li> - <#if eftAccount.companyNameOnAccount?has_content>${eftAccount.companyNameOnAccount}</#if> + ${uiLabelMap.AccountingGiftCard} + ${giftCardNumber} </li> + <#-- EFT account info --> + <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId && eftAccount?has_content> + <#if outputted?default(false)></#if> + <#assign pmBillingAddress = eftAccount.getRelatedOne("PostalAddress", false)!> <li> - ${uiLabelMap.AccountingBank}: ${eftAccount.bankName}, ${eftAccount.routingNumber} + <ul> + <li> + ${uiLabelMap.AccountingEFTAccount} + ${eftAccount.nameOnAccount!} + </li> + <li> + <#if eftAccount.companyNameOnAccount?has_content>${eftAccount.companyNameOnAccount}</#if> + </li> + <li> + ${uiLabelMap.AccountingBank}: ${eftAccount.bankName}, ${eftAccount.routingNumber} + </li> + <li> + ${uiLabelMap.AccountingAccount} #: ${eftAccount.accountNumber} + </li> + </ul> </li> + </#if> + <#if pmBillingAddress?has_content> <li> - ${uiLabelMap.AccountingAccount} #: ${eftAccount.accountNumber} + <ul> + <li> + <#if pmBillingAddress.toName?has_content>${uiLabelMap.CommonTo}: ${pmBillingAddress.toName}</#if> + </li> + <li> + <#if pmBillingAddress.attnName?has_content> + ${uiLabelMap.CommonAttn} : ${pmBillingAddress.attnName} + </#if> + </li> + <li> + ${pmBillingAddress.address1} + </li> + <li> + <#if pmBillingAddress.address2?has_content>${pmBillingAddress.address2}</#if> + </li> + <li> + <#assign pmBillingStateGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.stateProvinceGeoId!}, false))! /> + ${pmBillingAddress.city} + <#if pmBillingStateGeo?has_content> , ${ pmBillingStateGeo.geoName!}</#if> + ${pmBillingAddress.postalCode!} + <#assign pmBillingCountryGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.countryGeoId!}, false))! /> + <#if pmBillingCountryGeo?has_content>${pmBillingCountryGeo.geoName!}</#if> + </li> + </ul> </li> - </ul> + </#if> + <#assign outputted = true> + </#list> + </#if> + <#-- billing account info --> + <#if billingAccount?has_content> + <#if outputted?default(false)></#if> + <#assign outputted = true> + <li> + ${uiLabelMap.AccountingBillingAccount} + #${billingAccount.billingAccountId!} - ${billingAccount.description!} </li> </#if> - <#if pmBillingAddress?has_content> + <#if (customerPoNumberSet?has_content)> + <li> + ${uiLabelMap.OrderPurchaseOrderNumber} + <#list customerPoNumberSet as customerPoNumber> + ${customerPoNumber!} + </#list> + </li> + </#if> + </ul> + </#if> + </div> + </div> + <#-- right side --> + <div class="screenlet columnRight"> + <#if orderItemShipGroups?has_content> + <h3>${uiLabelMap.OrderShippingInformation}</h3> + <#-- shipping address --> + <#assign groupIdx = 0> + <#list orderItemShipGroups as shipGroup> + <#if orderHeader?has_content> + <#assign shippingAddress = shipGroup.getRelatedOne("PostalAddress", false)!> + <#assign groupNumber = shipGroup.shipGroupSeqId!> + <#else> + <#assign shippingAddress = cart.getShippingAddress(groupIdx)!> + <#assign groupNumber = groupIdx + 1> + </#if> + <ul> + <#if shippingAddress?has_content> <li> <ul> <li> - <#if pmBillingAddress.toName?has_content>${uiLabelMap.CommonTo}: ${pmBillingAddress.toName}</#if> + ${uiLabelMap.OrderDestination} [${groupNumber}] + <#if shippingAddress.toName?has_content>${uiLabelMap.CommonTo}: ${shippingAddress.toName}</#if> </li> <li> - <#if pmBillingAddress.attnName?has_content>${uiLabelMap.CommonAttn}: ${pmBillingAddress.attnName}</#if> + <#if shippingAddress.attnName?has_content> + ${uiLabelMap.PartyAddrAttnName} : ${shippingAddress.attnName} + </#if> </li> <li> - ${pmBillingAddress.address1} + ${shippingAddress.address1} </li> <li> - <#if pmBillingAddress.address2?has_content>${pmBillingAddress.address2}</#if> + <#if shippingAddress.address2?has_content>${shippingAddress.address2}</#if> </li> <li> - <#assign pmBillingStateGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.stateProvinceGeoId!}, false))! /> - ${pmBillingAddress.city}<#if pmBillingStateGeo?has_content>, ${ pmBillingStateGeo.geoName!}</#if> ${pmBillingAddress.postalCode!} - <#assign pmBillingCountryGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.countryGeoId!}, false))! /> - <#if pmBillingCountryGeo?has_content>${pmBillingCountryGeo.geoName!}</#if> + <#assign shippingStateGeo = (delegator.findOne("Geo", {"geoId", shippingAddress.stateProvinceGeoId!}, false))! /> + ${shippingAddress.city} + <#if shippingStateGeo?has_content>, ${shippingStateGeo.geoName!}</#if> + ${shippingAddress.postalCode!} + </li> + <li> + <#assign shippingCountryGeo = (delegator.findOne("Geo", {"geoId", shippingAddress.countryGeoId!}, false))! /> + <#if shippingCountryGeo?has_content>${shippingCountryGeo.geoName!}</#if> </li> </ul> </li> </#if> - <#assign outputted = true> - </#list> - </#if> - <#-- billing account info --> - <#if billingAccount?has_content> - <#if outputted?default(false)> - </#if> - <#assign outputted = true> - <li> - ${uiLabelMap.AccountingBillingAccount} - #${billingAccount.billingAccountId!} - ${billingAccount.description!} - </li> - </#if> - <#if (customerPoNumberSet?has_content)> - <li> - ${uiLabelMap.OrderPurchaseOrderNumber} - <#list customerPoNumberSet as customerPoNumber> - ${customerPoNumber!} - </#list> - </li> - </#if> - </ul> - </#if> -</div> -</div> -<#-- right side --> -<div class="screenlet columnRight"> - <#if orderItemShipGroups?has_content> - <h3>${uiLabelMap.OrderShippingInformation}</h3> - <#-- shipping address --> - <#assign groupIdx = 0> - <#list orderItemShipGroups as shipGroup> - <#if orderHeader?has_content> - <#assign shippingAddress = shipGroup.getRelatedOne("PostalAddress", false)!> - <#assign groupNumber = shipGroup.shipGroupSeqId!> - <#else> - <#assign shippingAddress = cart.getShippingAddress(groupIdx)!> - <#assign groupNumber = groupIdx + 1> - </#if> - <ul> - <#if shippingAddress?has_content> <li> <ul> <li> - ${uiLabelMap.OrderDestination} [${groupNumber}] - <#if shippingAddress.toName?has_content>${uiLabelMap.CommonTo}: ${shippingAddress.toName}</#if> - </li> - <li> - <#if shippingAddress.attnName?has_content>${uiLabelMap.PartyAddrAttnName}: ${shippingAddress.attnName}</#if> - </li> - <li> - ${shippingAddress.address1} - </li> - <li> - <#if shippingAddress.address2?has_content>${shippingAddress.address2}</#if> - </li> - <li> - <#assign shippingStateGeo = (delegator.findOne("Geo", {"geoId", shippingAddress.stateProvinceGeoId!}, false))! /> - ${shippingAddress.city}<#if shippingStateGeo?has_content>, ${shippingStateGeo.geoName!}</#if> ${shippingAddress.postalCode!} + ${uiLabelMap.OrderMethod}: + <#if orderHeader?has_content> + <#assign shipmentMethodType = shipGroup.getRelatedOne("ShipmentMethodType", false)!> + <#assign carrierPartyId = shipGroup.carrierPartyId!> + <#else> + <#assign shipmentMethodType = cart.getShipmentMethodType(groupIdx)!> + <#assign carrierPartyId = cart.getCarrierPartyId(groupIdx)!> + </#if> + <#if carrierPartyId?? && carrierPartyId != "_NA_">${carrierPartyId!}</#if> + ${(shipmentMethodType.description)?default("N/A")} </li> <li> - <#assign shippingCountryGeo = (delegator.findOne("Geo", {"geoId", shippingAddress.countryGeoId!}, false))! /> - <#if shippingCountryGeo?has_content>${shippingCountryGeo.geoName!}</#if> + <#if shippingAccount??>${uiLabelMap.AccountingUseAccount}: ${shippingAccount}</#if> </li> </ul> </li> - </#if> - <li> - <ul> + <#-- tracking number --> + <#if trackingNumber?has_content || orderShipmentInfoSummaryList?has_content> <li> - ${uiLabelMap.OrderMethod}: - <#if orderHeader?has_content> - <#assign shipmentMethodType = shipGroup.getRelatedOne("ShipmentMethodType", false)!> - <#assign carrierPartyId = shipGroup.carrierPartyId!> - <#else> - <#assign shipmentMethodType = cart.getShipmentMethodType(groupIdx)!> - <#assign carrierPartyId = cart.getCarrierPartyId(groupIdx)!> + ${uiLabelMap.OrderTrackingNumber} + <#-- TODO: add links to UPS/FEDEX/etc based on carrier partyId --> + <#if shipGroup.trackingNumber?has_content> + ${shipGroup.trackingNumber} + </#if> + <#if orderShipmentInfoSummaryList?has_content> + <#list orderShipmentInfoSummaryList as orderShipmentInfoSummary> + <#if (orderShipmentInfoSummaryList?size > 1)>${orderShipmentInfoSummary.shipmentPackageSeqId}: </#if> + Code: ${orderShipmentInfoSummary.trackingCode?default("[Not Yet Known]")} + <#if orderShipmentInfoSummary.boxNumber?has_content> + ${uiLabelMap.OrderBoxNumber}${orderShipmentInfoSummary.boxNumber} + </#if> + <#if orderShipmentInfoSummary.carrierPartyId?has_content> + (${uiLabelMap.ProductCarrier}: ${orderShipmentInfoSummary.carrierPartyId}) + </#if> + </#list> </#if> - <#if carrierPartyId?? && carrierPartyId != "_NA_">${carrierPartyId!}</#if> - ${(shipmentMethodType.description)?default("N/A")} - </li> - <li> - <#if shippingAccount??>${uiLabelMap.AccountingUseAccount}: ${shippingAccount}</#if> </li> - </ul> - </li> - <#-- tracking number --> - <#if trackingNumber?has_content || orderShipmentInfoSummaryList?has_content> - <li> - ${uiLabelMap.OrderTrackingNumber} - <#-- TODO: add links to UPS/FEDEX/etc based on carrier partyId --> - <#if shipGroup.trackingNumber?has_content> - ${shipGroup.trackingNumber} - </#if> - <#if orderShipmentInfoSummaryList?has_content> - <#list orderShipmentInfoSummaryList as orderShipmentInfoSummary> - <#if (orderShipmentInfoSummaryList?size > 1)>${orderShipmentInfoSummary.shipmentPackageSeqId}: </#if> - Code: ${orderShipmentInfoSummary.trackingCode?default("[Not Yet Known]")} - <#if orderShipmentInfoSummary.boxNumber?has_content>${uiLabelMap.OrderBoxNumber}${orderShipmentInfoSummary.boxNumber}</#if> - <#if orderShipmentInfoSummary.carrierPartyId?has_content>(${uiLabelMap.ProductCarrier}: ${orderShipmentInfoSummary.carrierPartyId})</#if> - </#list> - </#if> - </li> </#if> <#-- splitting preference --> <#if orderHeader?has_content> @@ -328,8 +344,7 @@ under the License. </#if> <#if shippingInstructions?has_content> <li> - ${uiLabelMap.OrderInstructions} - ${shippingInstructions} + ${uiLabelMap.OrderInstructions} ${shippingInstructions} </li> </#if> <#-- gift settings --> @@ -341,25 +356,23 @@ under the License. <#assign giftMessage = cart.getGiftMessage(groupIdx)!> </#if> <#if productStore.showCheckoutGiftOptions! != "N"> - <li> - ${uiLabelMap.OrderGift}? - <#if isGift?default("N") == "N">${uiLabelMap.OrderThisIsNotGift}.</#if> - <#if isGift?default("N") == "Y">${uiLabelMap.OrderThisIsGift}.</#if> - </li> - <#if giftMessage?has_content> <li> - ${uiLabelMap.OrderGiftMessage} - ${giftMessage} + ${uiLabelMap.OrderGift}? + <#if isGift?default("N") == "N">${uiLabelMap.OrderThisIsNotGift}.</#if> + <#if isGift?default("N") == "Y">${uiLabelMap.OrderThisIsGift}.</#if> </li> + <#if giftMessage?has_content> + <li> + ${uiLabelMap.OrderGiftMessage} ${giftMessage} + </li> + </#if> </#if> - </#if> - <#if shipGroup_has_next> - </#if> - </ul> - <#assign groupIdx = groupIdx + 1> - </#list><#-- end list of orderItemShipGroups --> - </#if> -</div> + <#if shipGroup_has_next></#if> + </ul> + <#assign groupIdx = groupIdx + 1> + </#list><#-- end list of orderItemShipGroups --> + </#if> + </div> -<div class="clearBoth"></div> + <div class="clearBoth"></div> </div> Modified: ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderHistory.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderHistory.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderHistory.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderHistory.ftl Sat Sep 17 07:17:15 2016 @@ -46,13 +46,19 @@ under the License. <#if distinctInvoiceIds?has_content> <td> <#list distinctInvoiceIds as invoiceId> - <a href="<@ofbizUrl>invoice.pdf?invoiceId=${invoiceId}</@ofbizUrl>" class="buttontext">(${invoiceId} PDF) </a> + <a href="<@ofbizUrl>invoice.pdf?invoiceId=${invoiceId}</@ofbizUrl>" class="buttontext"> + (${invoiceId} PDF) + </a> </#list> </td> <#else> <td></td> </#if> - <td><a href="<@ofbizUrl>orderstatus?orderId=${orderHeader.orderId}</@ofbizUrl>" class="button">${uiLabelMap.CommonView}</a></td> + <td> + <a href="<@ofbizUrl>orderstatus?orderId=${orderHeader.orderId}</@ofbizUrl>" class="button"> + ${uiLabelMap.CommonView} + </a> + </td> </tr> </#list> <#else> @@ -82,7 +88,12 @@ under the License. <td>${porderHeader.orderId}</td> <td><@ofbizCurrency amount=porderHeader.grandTotal isoCode=porderHeader.currencyUom /></td> <td>${pstatus.get("description",locale)}</td> - <td><a href="<@ofbizUrl>orderstatus?orderId=${porderHeader.orderId}</@ofbizUrl>" class="button">${uiLabelMap.CommonView}</a></td> + <td> + <a href="<@ofbizUrl>orderstatus?orderId=${porderHeader.orderId}</@ofbizUrl>" + class="button"> + ${uiLabelMap.CommonView} + </a> + </td> </tr> </#list> <#else> Modified: ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderItems.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderItems.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderItems.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderItems.ftl Sat Sep 17 07:17:15 2016 @@ -22,280 +22,319 @@ under the License. <#if baseEcommerceSecureUrl??><#assign urlPrefix = baseEcommerceSecureUrl/></#if> <div class="screenlet"> <h3> - <#assign numColumns = 8> - <#if maySelectItems?default("N") == "Y" && roleTypeId! == "PLACING_CUSTOMER"> - <#assign numColumns = 11> - <a href="javascript:document.addCommonToCartForm.add_all.value='true';document.addCommonToCartForm.submit()" class="submenutext">${uiLabelMap.OrderAddAllToCart}</a><a href="javascript:document.addCommonToCartForm.add_all.value='false';document.addCommonToCartForm.submit()" class="submenutext">${uiLabelMap.OrderAddCheckedToCart}</a><a href="<@ofbizUrl fullPath="true">createShoppingListFromOrder?orderId=${orderHeader.orderId}&frequency=6&intervalNumber=1&shoppingListTypeId=SLT_AUTO_REODR</@ofbizUrl>" class="submenutextright">${uiLabelMap.OrderSendMeThisEveryMonth}</a> - </#if> - ${uiLabelMap.OrderOrderItems} + <#assign numColumns = 8> + <#if maySelectItems?default("N") == "Y" && roleTypeId! == "PLACING_CUSTOMER"> + <#assign numColumns = 11> + <a href="javascript:document.addCommonToCartForm.add_all.value='true';document.addCommonToCartForm.submit()" + class="submenutext">${uiLabelMap.OrderAddAllToCart}</a> + <a href="javascript:document.addCommonToCartForm.add_all.value='false';document.addCommonToCartForm.submit()" + class="submenutext">${uiLabelMap.OrderAddCheckedToCart}</a> + <a href="<@ofbizUrl fullPath="true">createShoppingListFromOrder?orderId=${orderHeader.orderId}&frequency=6&intervalNumber=1&shoppingListTypeId=SLT_AUTO_REODR</@ofbizUrl>" + class="submenutextright">${uiLabelMap.OrderSendMeThisEveryMonth}</a> + </#if> + ${uiLabelMap.OrderOrderItems} </h3> <table> <thead> - <tr> - <th>${uiLabelMap.OrderProduct}</th> - <#if maySelectItems?default("N") == "Y"> - <th>${uiLabelMap.OrderQtyOrdered}</th> - <th>${uiLabelMap.OrderQtyPicked}</th> - <th>${uiLabelMap.OrderQtyShipped}</th> - <th>${uiLabelMap.OrderQtyCanceled}</th> - <#else> - <th></th> - <th></th> - <th></th> - <th>${uiLabelMap.OrderQtyOrdered}</th> - </#if> - <th >${uiLabelMap.EcommerceUnitPrice}</th> - <th >${uiLabelMap.OrderAdjustments}</th> - <th >${uiLabelMap.CommonSubtotal}</th> - <#if maySelectItems?default("N") == "Y" && roleTypeId! == "PLACING_CUSTOMER"> - <th colspan="3"></th> - </#if> - </tr> + <tr> + <th>${uiLabelMap.OrderProduct}</th> + <#if maySelectItems?default("N") == "Y"> + <th>${uiLabelMap.OrderQtyOrdered}</th> + <th>${uiLabelMap.OrderQtyPicked}</th> + <th>${uiLabelMap.OrderQtyShipped}</th> + <th>${uiLabelMap.OrderQtyCanceled}</th> + <#else> + <th></th> + <th></th> + <th></th> + <th>${uiLabelMap.OrderQtyOrdered}</th> + </#if> + <th>${uiLabelMap.EcommerceUnitPrice}</th> + <th>${uiLabelMap.OrderAdjustments}</th> + <th>${uiLabelMap.CommonSubtotal}</th> + <#if maySelectItems?default("N") == "Y" && roleTypeId! == "PLACING_CUSTOMER"> + <th colspan="3"></th> + </#if> + </tr> </thead> <tfoot> - <tr> - <th colspan="7">${uiLabelMap.CommonSubtotal}</th> - <td><@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> - <#list headerAdjustmentsToShow as orderHeaderAdjustment> <tr> - <th colspan="7">${localOrderReadHelper.getAdjustmentType(orderHeaderAdjustment)}</th> - <td><@ofbizCurrency amount=localOrderReadHelper.getOrderAdjustmentTotal(orderHeaderAdjustment) isoCode=currencyUomId/></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> + <th colspan="7">${uiLabelMap.CommonSubtotal}</th> + <td><@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/></td> + <#if maySelectItems?default("N") == "Y"> + <td colspan="3"></td> + </#if> + </tr> + <#list headerAdjustmentsToShow as orderHeaderAdjustment> + <tr> + <th colspan="7">${localOrderReadHelper.getAdjustmentType(orderHeaderAdjustment)}</th> + <td><@ofbizCurrency amount=localOrderReadHelper.getOrderAdjustmentTotal(orderHeaderAdjustment) isoCode=currencyUomId/></td> + <#if maySelectItems?default("N") == "Y"> + <td colspan="3"></td> + </#if> + </tr> + </#list> + <tr> + <th colspan="7">${uiLabelMap.OrderShippingAndHandling}</th> + <td><@ofbizCurrency amount=orderShippingTotal isoCode=currencyUomId/></td> + <#if maySelectItems?default("N") == "Y"> + <td colspan="3"></td> + </#if> + </tr> + <tr> + <th colspan="7">${uiLabelMap.OrderSalesTax}</th> + <td><@ofbizCurrency amount=orderTaxTotal isoCode=currencyUomId/></td> + <#if maySelectItems?default("N") == "Y"> + <td colspan="3"></td> + </#if> </tr> - </#list> - <tr> - <th colspan="7">${uiLabelMap.OrderShippingAndHandling}</th> - <td><@ofbizCurrency amount=orderShippingTotal isoCode=currencyUomId/></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> - <tr> - <th colspan="7">${uiLabelMap.OrderSalesTax}</th> - <td><@ofbizCurrency amount=orderTaxTotal isoCode=currencyUomId/></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> - <tr> - <td colspan="3"></td> - <#if maySelectItems?default("N") == "Y"> - <td colspan="${numColumns - 6}"></td> + <tr> <td colspan="3"></td> - <#else> - <td colspan="${numColumns - 3}"></td> - </#if> - </tr> - <tr> - <th colspan="7">${uiLabelMap.OrderGrandTotal}</th> - <td> - <@ofbizCurrency amount=orderGrandTotal isoCode=currencyUomId/> - </td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> + <#if maySelectItems?default("N") == "Y"> + <td colspan="${numColumns - 6}"></td> + <td colspan="3"></td> + <#else> + <td colspan="${numColumns - 3}"></td> + </#if> + </tr> + <tr> + <th colspan="7">${uiLabelMap.OrderGrandTotal}</th> + <td> + <@ofbizCurrency amount=orderGrandTotal isoCode=currencyUomId/> + </td> + <#if maySelectItems?default("N") == "Y"> + <td colspan="3"></td> + </#if> + </tr> </tfoot> <tbody> - <#list orderItems as orderItem> - <#-- get info from workeffort and calculate rental quantity, if it was a rental item --> - <#assign rentalQuantity = 1> <#-- no change if no rental item --> - <#if orderItem.orderItemTypeId == "RENTAL_ORDER_ITEM" && workEfforts??> - <#list workEfforts as workEffort> - <#if workEffort.workEffortId == orderItem.orderItemSeqId> - <#assign rentalQuantity = localOrderReadHelper.getWorkEffortRentalQuantity(workEffort)> - <#assign workEffortSave = workEffort> - <#break> + <#list orderItems as orderItem> + <#-- get info from workeffort and calculate rental quantity, if it was a rental item --> + <#assign rentalQuantity = 1> <#-- no change if no rental item --> + <#if orderItem.orderItemTypeId == "RENTAL_ORDER_ITEM" && workEfforts??> + <#list workEfforts as workEffort> + <#if workEffort.workEffortId == orderItem.orderItemSeqId> + <#assign rentalQuantity = localOrderReadHelper.getWorkEffortRentalQuantity(workEffort)> + <#assign workEffortSave = workEffort> + <#break> + </#if> + </#list> + <#else> + <#assign WorkOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment", null, null, false)!> + <#if WorkOrderItemFulfillments?has_content> + <#list WorkOrderItemFulfillments as WorkOrderItemFulfillment> + <#assign workEffortSave = WorkOrderItemFulfillment.getRelatedOne("WorkEffort", true)!> + <#break> + </#list> </#if> - </#list> - <#else> - <#assign WorkOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment", null, null, false)!> - <#if WorkOrderItemFulfillments?has_content> - <#list WorkOrderItemFulfillments as WorkOrderItemFulfillment> - <#assign workEffortSave = WorkOrderItemFulfillment.getRelatedOne("WorkEffort", true)!> - <#break> - </#list> </#if> - </#if> - <tr><td colspan="${numColumns}"></td></tr> - <tr> - <#if !orderItem.productId?? || orderItem.productId == "_?_"> - <td > - ${orderItem.itemDescription?default("")} - </td> - <#else> - <#assign product = orderItem.getRelatedOne("Product", true)!/> <#-- should always exist because of FK constraint, but just in case --> - <td > - <a href="<@ofbizCatalogAltUrl fullPath="true" secure="false" productId=orderItem.productId/>" class="linktext">${orderItem.productId} - ${orderItem.itemDescription?default("")}</a> - <#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/> - <#if orderItemAttributes?has_content> + <tr> + <td colspan="${numColumns}"></td> + </tr> + <tr> + <#if !orderItem.productId?? || orderItem.productId == "_?_"> + <td>${orderItem.itemDescription?default("")}</td> + <#else> + <#assign product = orderItem.getRelatedOne("Product", true)!/> <#-- should always exist because of FK constraint, but just in case --> + <td> + <a href="<@ofbizCatalogAltUrl fullPath="true" secure="false" productId=orderItem.productId/>" + class="linktext">${orderItem.productId} - ${orderItem.itemDescription?default("")}</a> + <#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/> + <#if orderItemAttributes?has_content> <ul> - <#list orderItemAttributes as orderItemAttribute> - <li> - ${orderItemAttribute.attrName} : ${orderItemAttribute.attrValue} - </li> - </#list> + <#list orderItemAttributes as orderItemAttribute> + <li>${orderItemAttribute.attrName} : ${orderItemAttribute.attrValue}</li> + </#list> </ul> - </#if> - <#if product?has_content> - <#if product.piecesIncluded?? && product.piecesIncluded?long != 0> - [${uiLabelMap.OrderPieces}: ${product.piecesIncluded}] - </#if> - <#if (product.quantityIncluded?? && product.quantityIncluded != 0) || product.quantityUomId?has_content> - <#assign quantityUom = product.getRelatedOne("QuantityUom", true)!/> - [${uiLabelMap.CommonQuantity}: ${product.quantityIncluded!} ${((quantityUom.abbreviation)?default(product.quantityUomId))!}] - </#if> - <#if (product.productWeight?? && product.productWeight != 0) || product.weightUomId?has_content> - <#assign weightUom = product.getRelatedOne("WeightUom", true)!/> - [${uiLabelMap.CommonWeight}: ${product.productWeight!} ${((weightUom.abbreviation)?default(product.weightUomId))!}] - </#if> - <#if (product.productHeight?? && product.productHeight != 0) || product.heightUomId?has_content> - <#assign heightUom = product.getRelatedOne("HeightUom", true)!/> - [${uiLabelMap.CommonHeight}: ${product.productHeight!} ${((heightUom.abbreviation)?default(product.heightUomId))!}] </#if> - <#if (product.productWidth?? && product.productWidth != 0) || product.widthUomId?has_content> - <#assign widthUom = product.getRelatedOne("WidthUom", true)!/> - [${uiLabelMap.CommonWidth}: ${product.productWidth!} ${((widthUom.abbreviation)?default(product.widthUomId))!}] + <#if product?has_content> + <#if product.piecesIncluded?? && product.piecesIncluded?long != 0> + [${uiLabelMap.OrderPieces}: ${product.piecesIncluded}] + </#if> + <#if (product.quantityIncluded?? && product.quantityIncluded != 0) || product.quantityUomId?has_content> + <#assign quantityUom = product.getRelatedOne("QuantityUom", true)!/> + [${uiLabelMap.CommonQuantity} + : ${product.quantityIncluded!} ${((quantityUom.abbreviation)?default(product.quantityUomId))!}] + </#if> + <#if (product.productWeight?? && product.productWeight != 0) || product.weightUomId?has_content> + <#assign weightUom = product.getRelatedOne("WeightUom", true)!/> + [${uiLabelMap.CommonWeight} + : ${product.productWeight!} ${((weightUom.abbreviation)?default(product.weightUomId))!}] + </#if> + <#if (product.productHeight?? && product.productHeight != 0) || product.heightUomId?has_content> + <#assign heightUom = product.getRelatedOne("HeightUom", true)!/> + [${uiLabelMap.CommonHeight} + : ${product.productHeight!} ${((heightUom.abbreviation)?default(product.heightUomId))!}] + </#if> + <#if (product.productWidth?? && product.productWidth != 0) || product.widthUomId?has_content> + <#assign widthUom = product.getRelatedOne("WidthUom", true)!/> + [${uiLabelMap.CommonWidth} + : ${product.productWidth!} ${((widthUom.abbreviation)?default(product.widthUomId))!}] + </#if> + <#if (product.productDepth?? && product.productDepth != 0) || product.depthUomId?has_content> + <#assign depthUom = product.getRelatedOne("DepthUom", true)!/> + [${uiLabelMap.CommonDepth} + : ${product.productDepth!} ${((depthUom.abbreviation)?default(product.depthUomId))!}] + </#if> </#if> - <#if (product.productDepth?? && product.productDepth != 0) || product.depthUomId?has_content> - <#assign depthUom = product.getRelatedOne("DepthUom", true)!/> - [${uiLabelMap.CommonDepth}: ${product.productDepth!} ${((depthUom.abbreviation)?default(product.depthUomId))!}] + <#if maySelectItems?default("N") == "Y"> + <#assign returns = orderItem.getRelated("ReturnItem", null, null, false)!> + <#if returns?has_content> + <#list returns as return> + <#assign returnHeader = return.getRelatedOne("ReturnHeader", false)> + <#if returnHeader.statusId != "RETURN_CANCELLED"> + <#if returnHeader.statusId == "RETURN_REQUESTED" || returnHeader.statusId == "RETURN_APPROVED"> + <#assign displayState = "Return Pending"> + <#else> + <#assign displayState = "Returned"> + </#if> + ${displayState} (#${return.returnId}) + </#if> + </#list> + </#if> </#if> + </td> + <#if !(maySelectItems?default("N") == "Y")> + <td></td> + <td></td> + <td></td> </#if> + <td> + ${orderItem.quantity?string.number} + </td> <#if maySelectItems?default("N") == "Y"> - <#assign returns = orderItem.getRelated("ReturnItem", null, null, false)!> - <#if returns?has_content> - <#list returns as return> - <#assign returnHeader = return.getRelatedOne("ReturnHeader", false)> - <#if returnHeader.statusId != "RETURN_CANCELLED"> - <#if returnHeader.statusId == "RETURN_REQUESTED" || returnHeader.statusId == "RETURN_APPROVED"> - <#assign displayState = "Return Pending"> - <#else> - <#assign displayState = "Returned"> - </#if> - ${displayState} (#${return.returnId}) - </#if> - </#list> + <td> + <#assign pickedQty = localOrderReadHelper.getItemPickedQuantityBd(orderItem)> + <#if pickedQty gt 0 && orderHeader.statusId == "ORDER_APPROVED">${pickedQty?default(0)?string.number}<#else>${pickedQty?default(0)?string.number}</#if> + </td> + <td> + <#assign shippedQty = localOrderReadHelper.getItemShippedQuantity(orderItem)> + ${shippedQty?default(0)?string.number} + </td> + <td> + <#assign canceledQty = localOrderReadHelper.getItemCanceledQuantity(orderItem)> + ${canceledQty?default(0)?string.number} + </td> + </#if> + <td> + <@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/> + </td> + <td> + <@ofbizCurrency amount=localOrderReadHelper.getOrderItemAdjustmentsTotal(orderItem) isoCode=currencyUomId/> + </td> + <td> + <#if workEfforts??> + <@ofbizCurrency amount=localOrderReadHelper.getOrderItemTotal(orderItem)*rentalQuantity isoCode=currencyUomId/> + <#else> + <@ofbizCurrency amount=localOrderReadHelper.getOrderItemTotal(orderItem) isoCode=currencyUomId/> </#if> + </td> + <#if maySelectItems?default("N") == "Y" && roleTypeId! == "PLACING_CUSTOMER"> + <td></td> + <td> + <input name="item_id" value="${orderItem.orderItemSeqId}" type="checkbox"/> + </td> + <td></td> </#if> - </td> - <#if !(maySelectItems?default("N") == "Y")> - <td></td> - <td></td> - <td></td> </#if> - <td> - ${orderItem.quantity?string.number} - </td> - <#if maySelectItems?default("N") == "Y"> - <td> - <#assign pickedQty = localOrderReadHelper.getItemPickedQuantityBd(orderItem)> - <#if pickedQty gt 0 && orderHeader.statusId == "ORDER_APPROVED">${pickedQty?default(0)?string.number}<#else>${pickedQty?default(0)?string.number}</#if> - </td> - <td> - <#assign shippedQty = localOrderReadHelper.getItemShippedQuantity(orderItem)> - ${shippedQty?default(0)?string.number} - </td> - <td> - <#assign canceledQty = localOrderReadHelper.getItemCanceledQuantity(orderItem)> - ${canceledQty?default(0)?string.number} - </td> - </#if> - <td> - <@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/> - </td> - <td> - <@ofbizCurrency amount=localOrderReadHelper.getOrderItemAdjustmentsTotal(orderItem) isoCode=currencyUomId/> - </td> - <td> - <#if workEfforts??> - <@ofbizCurrency amount=localOrderReadHelper.getOrderItemTotal(orderItem)*rentalQuantity isoCode=currencyUomId/> - <#else> - <@ofbizCurrency amount=localOrderReadHelper.getOrderItemTotal(orderItem) isoCode=currencyUomId/> - </#if> - </td> - <#if maySelectItems?default("N") == "Y" && roleTypeId! == "PLACING_CUSTOMER"> - <td></td> - <td> - <input name="item_id" value="${orderItem.orderItemSeqId}" type="checkbox"/> + </tr> + <#-- now cancel reason and comment field --> + <#if maySelectItems?default("N") == "Y" && (orderHeader.statusId != "ORDER_SENT" && orderItem.statusId != "ITEM_COMPLETED" && orderItem.statusId != "ITEM_CANCELLED" && pickedQty == 0)> + <tr> + <td colspan="7">${uiLabelMap.OrderReturnReason} + <select name="irm_${orderItem.orderItemSeqId}" class="selectBox"> + <option value=""></option> + <#list orderItemChangeReasons as reason> + <option value="${reason.enumId}">${reason.get("description",locale)?default(reason.enumId)}</option> + </#list> + </select> + ${uiLabelMap.CommonComments} + <input class="inputBox" type="text" name="icm_${orderItem.orderItemSeqId}" value="" size="30" maxlength="60"/> </td> + <td colspan="4"><a + href="javascript:document.addCommonToCartForm.action='<@ofbizUrl>cancelOrderItem</@ofbizUrl>';document.addCommonToCartForm.submit()" + class="buttontext">${uiLabelMap.CommonCancel}</a> + <input type="hidden" name="orderItemSeqId" value="${orderItem.orderItemSeqId}"/> + </td> + </tr> + </#if> + <#-- show info from workeffort if it was a rental item --> + <#if orderItem.orderItemTypeId == "RENTAL_ORDER_ITEM"> + <#if workEffortSave??> + <tr> <td></td> + <td colspan="${numColumns}">${uiLabelMap.CommonFrom} + : ${workEffortSave.estimatedStartDate?string("yyyy-MM-dd")} ${uiLabelMap.CommonUntil} + ${workEffortSave.estimatedCompletionDate?string("yyyy-MM-dd")} + ${uiLabelMap.CommonFor} ${workEffortSave.reservPersons} ${uiLabelMap.CommonPerson}(s) + </td> + </tr> </#if> </#if> - </tr> - <#-- now cancel reason and comment field --> - <#if maySelectItems?default("N") == "Y" && (orderHeader.statusId != "ORDER_SENT" && orderItem.statusId != "ITEM_COMPLETED" && orderItem.statusId != "ITEM_CANCELLED" && pickedQty == 0)> - <tr> - <td colspan="7">${uiLabelMap.OrderReturnReason} - <select name="irm_${orderItem.orderItemSeqId}" class="selectBox"> - <option value=""></option> - <#list orderItemChangeReasons as reason> - <option value="${reason.enumId}">${reason.get("description",locale)?default(reason.enumId)}</option> - </#list> - </select> - ${uiLabelMap.CommonComments} - <input class="inputBox" type="text" name="icm_${orderItem.orderItemSeqId}" value="" size="30" maxlength="60"/> - </td> - <td colspan="4"><a href="javascript:document.addCommonToCartForm.action='<@ofbizUrl>cancelOrderItem</@ofbizUrl>';document.addCommonToCartForm.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a> - <input type="hidden" name="orderItemSeqId" value="${orderItem.orderItemSeqId}"/> - </td> - </tr> - </#if> - <#-- show info from workeffort if it was a rental item --> - <#if orderItem.orderItemTypeId == "RENTAL_ORDER_ITEM"> - <#if workEffortSave??> - <tr><td></td><td colspan="${numColumns}">${uiLabelMap.CommonFrom}: ${workEffortSave.estimatedStartDate?string("yyyy-MM-dd")} ${uiLabelMap.CommonUntil} ${workEffortSave.estimatedCompletionDate?string("yyyy-MM-dd")} ${uiLabelMap.CommonFor} ${workEffortSave.reservPersons} ${uiLabelMap.CommonPerson}(s)</td></tr> - </#if> - </#if> - <#-- now show adjustment details per line item --> - <#assign itemAdjustments = localOrderReadHelper.getOrderItemAdjustments(orderItem)> - <#list itemAdjustments as orderItemAdjustment> - <tr> - <td> - ${uiLabelMap.EcommerceAdjustment}: ${StringUtil.wrapString(localOrderReadHelper.getAdjustmentType(orderItemAdjustment))} - <#if orderItemAdjustment.description?has_content>: ${StringUtil.wrapString(orderItemAdjustment.description)}</#if> - <#if orderItemAdjustment.orderAdjustmentTypeId == "SALES_TAX"> - <#if orderItemAdjustment.primaryGeoId?has_content> - <#assign primaryGeo = orderItemAdjustment.getRelatedOne("PrimaryGeo", true)/> - <#if primaryGeo.geoName?has_content> + <#-- now show adjustment details per line item --> + <#assign itemAdjustments = localOrderReadHelper.getOrderItemAdjustments(orderItem)> + <#list itemAdjustments as orderItemAdjustment> + <tr> + <td> + ${uiLabelMap.EcommerceAdjustment} + : ${StringUtil.wrapString(localOrderReadHelper.getAdjustmentType(orderItemAdjustment))} + <#if orderItemAdjustment.description?has_content> + : ${StringUtil.wrapString(orderItemAdjustment.description)}</#if> + <#if orderItemAdjustment.orderAdjustmentTypeId == "SALES_TAX"> + <#if orderItemAdjustment.primaryGeoId?has_content> + <#assign primaryGeo = orderItemAdjustment.getRelatedOne("PrimaryGeo", true)/> + <#if primaryGeo.geoName?has_content> ${uiLabelMap.OrderJurisdiction}: ${primaryGeo.geoName} [${primaryGeo.abbreviation!}] + </#if> + <#if orderItemAdjustment.secondaryGeoId?has_content> + <#assign secondaryGeo = orderItemAdjustment.getRelatedOne("SecondaryGeo", true)/> + (${uiLabelMap.CommonIn}: ${secondaryGeo.geoName} [${secondaryGeo.abbreviation!}]) + </#if> </#if> - <#if orderItemAdjustment.secondaryGeoId?has_content> - <#assign secondaryGeo = orderItemAdjustment.getRelatedOne("SecondaryGeo", true)/> - (${uiLabelMap.CommonIn}: ${secondaryGeo.geoName} [${secondaryGeo.abbreviation!}]) - </#if> + <#if orderItemAdjustment.sourcePercentage??>${uiLabelMap.EcommerceRate} + : ${orderItemAdjustment.sourcePercentage}</#if> + <#if orderItemAdjustment.customerReferenceId?has_content>${uiLabelMap.OrderCustomerTaxId} + : ${orderItemAdjustment.customerReferenceId}</#if> + <#if orderItemAdjustment.exemptAmount??>${uiLabelMap.EcommerceExemptAmount} + : ${orderItemAdjustment.exemptAmount}</#if> </#if> - <#if orderItemAdjustment.sourcePercentage??>${uiLabelMap.EcommerceRate}: ${orderItemAdjustment.sourcePercentage}</#if> - <#if orderItemAdjustment.customerReferenceId?has_content>${uiLabelMap.OrderCustomerTaxId}: ${orderItemAdjustment.customerReferenceId}</#if> - <#if orderItemAdjustment.exemptAmount??>${uiLabelMap.EcommerceExemptAmount}: ${orderItemAdjustment.exemptAmount}</#if> - </#if> - </td> - <td colspan="5"></td> - <td> - <@ofbizCurrency amount=localOrderReadHelper.getOrderItemAdjustmentTotal(orderItem, orderItemAdjustment) isoCode=currencyUomId/> - </td> - <td></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> - </#list> - <#-- show the order item ship group info --> - <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false)!> - <#if orderItemShipGroupAssocs?has_content> - <#list orderItemShipGroupAssocs as shipGroupAssoc> - <#assign shipGroup = shipGroupAssoc.getRelatedOne("OrderItemShipGroup", false)!> - <#assign shipGroupAddress = (shipGroup.getRelatedOne("PostalAddress", false))!> - <tr> - <td> - ${uiLabelMap.OrderShipGroup}: [${shipGroup.shipGroupSeqId}] ${shipGroupAddress.address1?default("N/A")} </td> + <td colspan="5"></td> <td> - ${shipGroupAssoc.quantity?string.number} + <@ofbizCurrency amount=localOrderReadHelper.getOrderItemAdjustmentTotal(orderItem, orderItemAdjustment) isoCode=currencyUomId/> </td> - <td colspan="${numColumns - 2}"></td> + <td></td> + <#if maySelectItems?default("N") == "Y"> + <td colspan="3"></td> + </#if> </tr> </#list> + <#-- show the order item ship group info --> + <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false)!> + <#if orderItemShipGroupAssocs?has_content> + <#list orderItemShipGroupAssocs as shipGroupAssoc> + <#assign shipGroup = shipGroupAssoc.getRelatedOne("OrderItemShipGroup", false)!> + <#assign shipGroupAddress = (shipGroup.getRelatedOne("PostalAddress", false))!> + <tr> + <td> + ${uiLabelMap.OrderShipGroup}: [${shipGroup.shipGroupSeqId}] ${shipGroupAddress.address1?default("N/A")} + </td> + <td> + ${shipGroupAssoc.quantity?string.number} + </td> + <td colspan="${numColumns - 2}"></td> + </tr> + </#list> + </#if> + </#list> + <#if orderItems?size == 0 || !orderItems?has_content> + <tr> + <td colspan="${numColumns}">${uiLabelMap.OrderSalesOrderLookupFailed}</td> + </tr> </#if> - </#list> - <#if orderItems?size == 0 || !orderItems?has_content> - <tr><td colspan="${numColumns}">${uiLabelMap.OrderSalesOrderLookupFailed}</td></tr> - </#if> - <tr><td colspan="${numColumns}"></td></tr> + <tr> + <td colspan="${numColumns}"></td> + </tr> </tbody> </table> </div> Modified: ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderStatus.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderStatus.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderStatus.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/template/order/OrderStatus.ftl Sat Sep 17 07:17:15 2016 @@ -24,7 +24,6 @@ under the License. <br /> ${screens.render("component://ecommerce/widget/OrderScreens.xml#orderitems")} </form> - <#else> <h3>${uiLabelMap.OrderSpecifiedNotFound}.</h3> </#if> |
Free forum by Nabble | Edit this page |