Added: ofbiz/trunk/applications/order/template/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/order/orderitems.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/order/orderitems.ftl (added) +++ ofbiz/trunk/applications/order/template/order/orderitems.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,788 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#if orderHeader?has_content> + <div class="screenlet"> + <div class="screenlet-title-bar"> + <ul> + <li class="h3"> ${uiLabelMap.OrderOrderItems}</li> + </ul> + <br class="clear" /> + </div> + <div class="screenlet-body"> + <table class="order-items basic-table" cellspacing='0'> + <tr valign="bottom" class="header-row"> + <td width="30%">${uiLabelMap.ProductProduct}</td> + <td width="33%">${uiLabelMap.CommonStatus}</td> + <td width="5%">${uiLabelMap.OrderQuantity}</td> + <td width="10%" align="right">${uiLabelMap.OrderUnitList}</td> + <td width="10%" align="right">${uiLabelMap.OrderAdjustments}</td> + <td width="10%" align="right">${uiLabelMap.OrderSubTotal}</td> + <td width="2%"> </td> + </tr> + <#if !orderItemList?has_content> + <tr> + <td colspan="7"> + <font color="red">${uiLabelMap.checkhelper_sales_order_lines_lookup_failed}</font> + </td> + </tr> + <#else> + <#assign itemClass = "2"> + <#list orderItemList as orderItem> + <#assign orderItemContentWrapper = Static["org.ofbiz.order.order.OrderContentWrapper"].makeOrderContentWrapper(orderItem, request)> + <#assign orderItemShipGrpInvResList = orderReadHelper.getOrderItemShipGrpInvResList(orderItem)> + <#if orderHeader.orderTypeId == "SALES_ORDER"><#assign pickedQty = orderReadHelper.getItemPickedQuantityBd(orderItem)></#if> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <#assign orderItemType = orderItem.getRelatedOne("OrderItemType", false)!> + <#assign productId = orderItem.productId!> + <#if productId?? && productId == "shoppingcart.CommentLine"> + <td colspan="7" valign="top" class="label"> >> ${orderItem.itemDescription}</td> + <#else> + <td colspan="7"> + <div class="order-item-description"> + <#if orderItem.supplierProductId?has_content> + ${orderItem.supplierProductId} - ${orderItem.itemDescription!} + <#elseif productId??> + ${orderItem.productId?default("N/A")} - ${orderItem.itemDescription!} + <#if (product.salesDiscontinuationDate)?? && Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().after(product.salesDiscontinuationDate)> + <br /> + <span style="color: red;">${uiLabelMap.OrderItemDiscontinued}: ${Static["org.ofbiz.base.util.UtilFormatOut"].formatDateTime(product.salesDiscontinuationDate, "", locale, timeZone)!}</span> + </#if> + <#elseif orderItemType??> + ${orderItemType.description} - ${orderItem.itemDescription!} + <#else> + ${orderItem.itemDescription!} + </#if> + <#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/> + <#if orderItemAttributes?has_content> + <ul> + <#list orderItemAttributes as orderItemAttribute> + <li> + ${orderItemAttribute.attrName} : ${orderItemAttribute.attrValue} + </li> + </#list> + </ul> + </#if> + </div> + <div style="float:right;"> + <#assign downloadContents = delegator.findByAnd("OrderItemAndProductContentInfo", { + "orderId" : orderItem.orderId, + "orderItemSeqId" : orderItem.orderItemSeqId, + "productContentTypeId" : "DIGITAL_DOWNLOAD", + "statusId" : "ITEM_COMPLETED"}, + null, + false)/> + <#if downloadContents?has_content> + <#list downloadContents as downloadContent> + <a href="/content/control/ViewSimpleContent?contentId=${downloadContent.contentId}" class="buttontext" target="_blank">${uiLabelMap.ContentDownload}</a> + </#list> + </#if> + <a href="/catalog/control/EditProduct?productId=${productId}${StringUtil.wrapString(externalKeyParam)}" class="buttontext" target="_blank">${uiLabelMap.ProductCatalog}</a> + <a href="/ecommerce/control/product?product_id=${productId}" class="buttontext" target="_blank">${uiLabelMap.OrderEcommerce}</a> + <#if orderItemContentWrapper.get("IMAGE_URL", "url")?has_content> + <a href="<@ofbizUrl>viewimage?orderId=${orderId}&orderItemSeqId=${orderItem.orderItemSeqId}&orderContentTypeId=IMAGE_URL</@ofbizUrl>" + target="_orderImage" class="buttontext">${uiLabelMap.OrderViewImage}</a> + </#if> + </div> + </td> + </#if> + </tr> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <#if productId?? && productId == "shoppingcart.CommentLine"> + <td colspan="7" valign="top" class="label"> >> ${orderItem.itemDescription}</td> + <#else> + <td valign="top"> + <#if productId?has_content> + <#assign product = orderItem.getRelatedOne("Product", true)> + </#if> + <#if productId??> + <#-- INVENTORY --> + <#if (orderHeader.statusId != "ORDER_COMPLETED") && availableToPromiseMap?? && quantityOnHandMap?? && availableToPromiseMap.get(productId)?? && quantityOnHandMap.get(productId)??> + <#assign quantityToProduce = 0> + <#assign atpQuantity = availableToPromiseMap.get(productId)?default(0)> + <#assign qohQuantity = quantityOnHandMap.get(productId)?default(0)> + <#assign mktgPkgATP = mktgPkgATPMap.get(productId)?default(0)> + <#assign mktgPkgQOH = mktgPkgQOHMap.get(productId)?default(0)> + <#assign requiredQuantity = requiredProductQuantityMap.get(productId)?default(0)> + <#assign onOrderQuantity = onOrderProductQuantityMap.get(productId)?default(0)> + <#assign inProductionQuantity = productionProductQuantityMap.get(productId)?default(0)> + <#assign unplannedQuantity = requiredQuantity - qohQuantity - inProductionQuantity - onOrderQuantity - mktgPkgQOH> + <#if unplannedQuantity < 0><#assign unplannedQuantity = 0></#if> + <div class="screenlet order-item-inventory"> + <div class="screenlet-body"> + <table cellspacing="0" cellpadding="0" border="0"> + <tr> + <td style="text-align: right; padding-bottom: 10px;"> + <a class="buttontext" + href="/catalog/control/EditProductInventoryItems?productId=${productId}&showAllFacilities=Y${StringUtil.wrapString(externalKeyParam)}" + target="_blank">${uiLabelMap.ProductInventory}</a> + </td> + <td> </td> + </tr> + <tr> + <td>${uiLabelMap.OrderRequiredForSO}</td> + <td style="padding-left: 15px; text-align: left;">${requiredQuantity}</td> + </tr> + <#if availableToPromiseByFacilityMap?? && quantityOnHandByFacilityMap?? && quantityOnHandByFacilityMap.get(productId)?? && availableToPromiseByFacilityMap.get(productId)??> + <#assign atpQuantityByFacility = availableToPromiseByFacilityMap.get(productId)?default(0)> + <#assign qohQuantityByFacility = quantityOnHandByFacilityMap.get(productId)?default(0)> + <tr> + <td> + ${uiLabelMap.ProductInInventory} [${facility.facilityName!}] ${uiLabelMap.ProductQoh} + </td> + <td style="padding-left: 15px; text-align: left;"> + ${qohQuantityByFacility} (${uiLabelMap.ProductAtp}: ${atpQuantityByFacility}) + </td> + </tr> + </#if> + <tr> + <td> + ${uiLabelMap.ProductInInventory} [${uiLabelMap.CommonAll} ${uiLabelMap.ProductFacilities}] ${uiLabelMap.ProductQoh} + </td> + <td style="padding-left: 15px; text-align: left;"> + ${qohQuantity} (${uiLabelMap.ProductAtp}: ${atpQuantity}) + </td> + </tr> + <#if (product?has_content) && (product.productTypeId?has_content) && Static["org.ofbiz.entity.util.EntityTypeUtil"].hasParentType(delegator, "ProductType", "productTypeId", product.productTypeId, "parentTypeId", "MARKETING_PKG")> + <tr> + <td>${uiLabelMap.ProductMarketingPackageQOH}</td> + <td style="padding-left: 15px; text-align: left;"> + ${mktgPkgQOH} (${uiLabelMap.ProductAtp}: ${mktgPkgATP}) + </td> + </tr> + </#if> + <tr> + <td>${uiLabelMap.OrderOnOrder}</td> + <td style="padding-left: 15px; text-align: left;">${onOrderQuantity}</td> + </tr> + <tr> + <td>${uiLabelMap.OrderInProduction}</td> + <td style="padding-left: 15px; text-align: left;">${inProductionQuantity}</td> + </tr> + <tr> + <td>${uiLabelMap.OrderUnplanned}</td> + <td style="padding-left: 15px; text-align: left;">${unplannedQuantity}</td> + </tr> + </table> + </div> + </div> + </#if> + </#if> + </td> + <#-- now show status details per line item --> + <#assign currentItemStatus = orderItem.getRelatedOne("StatusItem", false)> + <td colspan="1" valign="top"> + <div class="screenlet order-item-status-list<#if currentItemStatus.statusCode?has_content> ${currentItemStatus.statusCode}</#if>"> + <div class="screenlet-body"> + <div class="current-status"> + <span class="label">${uiLabelMap.CommonCurrent}</span> ${currentItemStatus.get("description",locale)?default(currentItemStatus.statusId)} + </div> + <#if ("ITEM_CREATED" == (currentItemStatus.statusId) && "ORDER_APPROVED" == (orderHeader.statusId)) && security.hasEntityPermission("ORDERMGR", "_UPDATE", session)> + <div> + <a href="javascript:document.OrderApproveOrderItem_${orderItem.orderItemSeqId?default("")}.submit()" class="buttontext">${uiLabelMap.OrderApproveOrder}</a> + <form name="OrderApproveOrderItem_${orderItem.orderItemSeqId?default("")}" method="post" action="<@ofbizUrl>changeOrderItemStatus</@ofbizUrl>"> + <input type="hidden" name="statusId" value="ITEM_APPROVED"/> + <input type="hidden" name="orderId" value="${orderId!}"/> + <input type="hidden" name="orderItemSeqId" value="${orderItem.orderItemSeqId!}"/> + </form> + </div> + </#if> + <#assign orderItemStatuses = orderReadHelper.getOrderItemStatuses(orderItem)> + <#list orderItemStatuses as orderItemStatus> + <#assign loopStatusItem = orderItemStatus.getRelatedOne("StatusItem", false)> + <#if orderItemStatus.statusDatetime?has_content>${Static["org.ofbiz.base.util.UtilFormatOut"].formatDateTime(orderItemStatus.statusDatetime, "", locale, timeZone)!} </#if>${loopStatusItem.get("description",locale)?default(orderItemStatus.statusId)} + </#list> + </div> + </div> + <#assign returns = orderItem.getRelated("ReturnItem", null, null, false)!> + <#if returns?has_content> + <#list returns as returnItem> + <#assign returnHeader = returnItem.getRelatedOne("ReturnHeader", false)> + <#if returnHeader.statusId != "RETURN_CANCELLED"> + <font color="red">${uiLabelMap.OrderReturned}</font> + ${uiLabelMap.CommonNbr}<a href="<@ofbizUrl>returnMain?returnId=${returnItem.returnId}</@ofbizUrl>" class="buttontext">${returnItem.returnId}</a> + </#if> + </#list> + </#if> + </td> + <#-- QUANTITY --> + <td align="right" valign="top" nowrap="nowrap"> + <div class="screenlet order-item-quantity"> + <div class="screenlet-body"> + <table> + <tr valign="top"> + <#assign shippedQuantity = orderReadHelper.getItemShippedQuantity(orderItem)> + <#assign shipmentReceipts = delegator.findByAnd("ShipmentReceipt", {"orderId" : orderHeader.getString("orderId"), "orderItemSeqId" : orderItem.orderItemSeqId}, null, false)/> + <#assign totalReceived = 0.0> + <#if shipmentReceipts?? && shipmentReceipts?has_content> + <#list shipmentReceipts as shipmentReceipt> + <#if shipmentReceipt.quantityAccepted?? && shipmentReceipt.quantityAccepted?has_content> + <#assign quantityAccepted = shipmentReceipt.quantityAccepted> + <#assign totalReceived = quantityAccepted + totalReceived> + </#if> + <#if shipmentReceipt.quantityRejected?? && shipmentReceipt.quantityRejected?has_content> + <#assign quantityRejected = shipmentReceipt.quantityRejected> + <#assign totalReceived = quantityRejected + totalReceived> + </#if> + </#list> + </#if> + <#if orderHeader.orderTypeId == "PURCHASE_ORDER"> + <#assign remainingQuantity = ((orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - totalReceived?double)> + <#else> + <#assign remainingQuantity = ((orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - shippedQuantity?double)> + </#if> + <#-- to compute shortfall amount, sum up the orderItemShipGrpInvRes.quantityNotAvailable --> + <#assign shortfalledQuantity = 0/> + <#list orderItemShipGrpInvResList as orderItemShipGrpInvRes> + <#if (orderItemShipGrpInvRes.quantityNotAvailable?has_content && orderItemShipGrpInvRes.quantityNotAvailable > 0)> + <#assign shortfalledQuantity = shortfalledQuantity + orderItemShipGrpInvRes.quantityNotAvailable/> + </#if> + </#list> + <td><b>${uiLabelMap.OrderOrdered}</b></td> + <td>${orderItem.quantity?default(0)?string.number}</td> + <td><b>${uiLabelMap.OrderShipRequest}</b></td> + <td>${orderReadHelper.getItemReservedQuantity(orderItem)}</td> + </tr> + <tr valign="top"> + <td><b>${uiLabelMap.OrderCancelled}</b></td> + <td>${orderItem.cancelQuantity?default(0)?string.number}</td> + <#if orderHeader.orderTypeId == "SALES_ORDER"> + <#if pickedQty gt 0 && orderHeader.statusId == "ORDER_APPROVED"> + <td><font color="red"><b>${uiLabelMap.OrderQtyPicked}</b></font></td> + <td><font color="red">${pickedQty?default(0)?string.number}</font></td> + <#else> + <td><b>${uiLabelMap.OrderQtyPicked}</b></td> + <td>${pickedQty?default(0)?string.number}</td> + </#if> + <#else> + <td> </td> + <td> </td> + </#if> + </tr> + <tr valign="top"> + <td><b>${uiLabelMap.OrderRemaining}</b></td> + <td>${remainingQuantity}</td> + <#if orderHeader.orderTypeId == "PURCHASE_ORDER"> + <td><b>${uiLabelMap.OrderPlannedInReceive}</b></td> + <td>${totalReceived}</td> + <#else> + <td><b>${uiLabelMap.OrderQtyShipped}</b></td> + <td>${shippedQuantity}</td> + </#if> + </tr> + <tr valign="top"> + <td><b>${uiLabelMap.OrderShortfalled}</b></td> + <td>${shortfalledQuantity}</td> + <td><b>${uiLabelMap.OrderOutstanding}</b></td> + <td> + <#-- Make sure digital goods without shipments don't always remainn "outstanding": if item is completed, it must have no outstanding quantity. --> + <#if (orderItem.statusId?has_content) && (orderItem.statusId == "ITEM_COMPLETED")> + 0 + <#elseif orderHeader.orderTypeId == "PURCHASE_ORDER"> + ${(orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - totalReceived?double} + <#elseif orderHeader.orderTypeId == "SALES_ORDER"> + ${(orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - shippedQuantity?double} + </#if> + </td> + </tr> + <tr valign="top"> + <td><b>${uiLabelMap.OrderInvoiced}</b></td> + <td>${orderReadHelper.getOrderItemInvoicedQuantity(orderItem)}</td> + <td><b>${uiLabelMap.OrderReturned}</b></td> + <td>${returnQuantityMap.get(orderItem.orderItemSeqId)?default(0)}</td> + </tr> + </table> + </div> + </div> + </td> + <td align="right" valign="top" nowrap="nowrap"> + <@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/> + / <@ofbizCurrency amount=orderItem.unitListPrice isoCode=currencyUomId/> + </td> + <td align="right" valign="top" nowrap="nowrap"> + <@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentsTotal(orderItem, orderAdjustments, true, false, false) isoCode=currencyUomId/> + </td> + <td align="right" valign="top" nowrap="nowrap"> + <#if orderItem.statusId != "ITEM_CANCELLED"> + <@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemSubTotal(orderItem, orderAdjustments) isoCode=currencyUomId/> + <#else> + <@ofbizCurrency amount=0.00 isoCode=currencyUomId/> + </#if> + </td> + <td> </td> + </#if> + </tr> + <#-- show info from workeffort --> + <#assign workOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment", null, null, false)!> + <#if workOrderItemFulfillments?has_content> + <#list workOrderItemFulfillments as workOrderItemFulfillment> + <#assign workEffort = workOrderItemFulfillment.getRelatedOne("WorkEffort", true)> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td> </td> + <td colspan="6"> + <#if orderItem.orderItemTypeId != "RENTAL_ORDER_ITEM"> + <span class="label">${uiLabelMap.ManufacturingProductionRun}</span> + <a href="/manufacturing/control/ShowProductionRun?productionRunId=${workEffort.workEffortId}${StringUtil.wrapString(externalKeyParam)}" + class="buttontext">${workEffort.workEffortId}</a> + ${uiLabelMap.OrderCurrentStatus} + ${(delegator.findOne("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId")), true).get("description",locale))!} + <#else> + ${uiLabelMap.CommonFrom} + : <#if workEffort.estimatedStartDate?has_content>${Static["org.ofbiz.base.util.UtilFormatOut"].formatDate(workEffort.estimatedStartDate, "", locale, timeZone)!}</#if> ${uiLabelMap.CommonTo} + : <#if workEffort.estimatedCompletionDate?has_content>${Static["org.ofbiz.base.util.UtilFormatOut"].formatDate(workEffort.estimatedCompletionDate, "", locale, timeZone)!}</#if> ${uiLabelMap.OrderNumberOfPersons} + : ${workEffort.reservPersons?default("")} + </#if> + </td> + </tr> + <#break><#-- need only the first one --> + </#list> + </#if> + <#-- show linked order lines --> + <#assign linkedOrderItemsTo = delegator.findByAnd("OrderItemAssoc", Static["org.ofbiz.base.util.UtilMisc"].toMap("orderId", orderItem.getString("orderId"), "orderItemSeqId", orderItem.getString("orderItemSeqId")), null, false)> + <#assign linkedOrderItemsFrom = delegator.findByAnd("OrderItemAssoc", Static["org.ofbiz.base.util.UtilMisc"].toMap("toOrderId", orderItem.getString("orderId"), "toOrderItemSeqId", orderItem.getString("orderItemSeqId")), null, false)> + <#if linkedOrderItemsTo?has_content> + <#list linkedOrderItemsTo as linkedOrderItem> + <#assign linkedOrderId = linkedOrderItem.toOrderId> + <#assign linkedOrderItemSeqId = linkedOrderItem.toOrderItemSeqId> + <#assign linkedOrderItemValue = linkedOrderItem.getRelatedOne("ToOrderItem", false)> + <#assign linkedOrderItemValueStatus = linkedOrderItemValue.getRelatedOne("StatusItem", false)> + <#assign description = linkedOrderItem.getRelatedOne("OrderItemAssocType", false).getString("description")/> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td> </td> + <td colspan="6"> + <span class="label">${uiLabelMap.OrderLinkedToOrderItem}</span> (${description!}) + <a href="/ordermgr/control/orderview?orderId=${linkedOrderId}" + class="buttontext">${linkedOrderId}/${linkedOrderItemSeqId}</a> ${linkedOrderItemValueStatus.description!} + </td> + </tr> + </#list> + </#if> + <#if linkedOrderItemsFrom?has_content> + <#list linkedOrderItemsFrom as linkedOrderItem> + <#assign linkedOrderId = linkedOrderItem.orderId> + <#assign linkedOrderItemSeqId = linkedOrderItem.orderItemSeqId> + <#assign linkedOrderItemValue = linkedOrderItem.getRelatedOne("FromOrderItem", false)> + <#assign linkedOrderItemValueStatus = linkedOrderItemValue.getRelatedOne("StatusItem", false)> + <#assign description = linkedOrderItem.getRelatedOne("OrderItemAssocType", false).getString("description")/> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td> </td> + <td colspan="6"> + <span class="label">${uiLabelMap.OrderLinkedFromOrderItem}</span> (${description!}) + <a href="/ordermgr/control/orderview?orderId=${linkedOrderId}" + class="buttontext">${linkedOrderId}/${linkedOrderItemSeqId}</a> ${linkedOrderItemValueStatus.description!} + </td> + </tr> + </#list> + </#if> + <#-- show linked requirements --> + <#assign linkedRequirements = orderItem.getRelated("OrderRequirementCommitment", null, null, false)!> + <#if linkedRequirements?has_content> + <#list linkedRequirements as linkedRequirement> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td> </td> + <td colspan="6"> + <span class="label">${uiLabelMap.OrderLinkedToRequirement}</span> + <a href="<@ofbizUrl>EditRequirement?requirementId=${linkedRequirement.requirementId}</@ofbizUrl>" + class="buttontext">${linkedRequirement.requirementId}</a> + </td> + </tr> + </#list> + </#if> + <#-- show linked quote --> + <#assign linkedQuote = orderItem.getRelatedOne("QuoteItem", true)!> + <#if linkedQuote?has_content> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td> </td> + <td colspan="6"> + <span class="label">${uiLabelMap.OrderLinkedToQuote}</span> + <a href="<@ofbizUrl>EditQuoteItem?quoteId=${linkedQuote.quoteId}&quoteItemSeqId=${linkedQuote.quoteItemSeqId}</@ofbizUrl>" + class="buttontext">${linkedQuote.quoteId}-${linkedQuote.quoteItemSeqId}</a> + </td> + </tr> + </#if> + <#-- now show adjustment details per line item --> + <#assign orderItemAdjustments = Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentList(orderItem, orderAdjustments)> + <#if orderItemAdjustments?? && orderItemAdjustments?has_content> + <#list orderItemAdjustments as orderItemAdjustment> + <#assign adjustmentType = orderItemAdjustment.getRelatedOne("OrderAdjustmentType", true)> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.OrderAdjustment}</span> ${adjustmentType.get("description",locale)} + ${StringUtil.wrapString(orderItemAdjustment.get("description",locale)!)} + <#if orderItemAdjustment.comments?has_content> + (${orderItemAdjustment.comments?default("")}) + </#if> + <#if orderItemAdjustment.productPromoId?has_content> + <a href="/catalog/control/EditProductPromo?productPromoId=${orderItemAdjustment.productPromoId}${StringUtil.wrapString(externalKeyParam)}" + >${orderItemAdjustment.getRelatedOne("ProductPromo", false).getString("promoName")}</a> + </#if> + <#if orderItemAdjustment.orderAdjustmentTypeId == "SALES_TAX"> + <#if orderItemAdjustment.primaryGeoId?has_content> + <#assign primaryGeo = orderItemAdjustment.getRelatedOne("PrimaryGeo", true)/> + <#if primaryGeo.geoName?has_content> + <span class="label">${uiLabelMap.OrderJurisdiction}</span> ${primaryGeo.geoName} [${primaryGeo.abbreviation!}] + </#if> + <#if orderItemAdjustment.secondaryGeoId?has_content> + <#assign secondaryGeo = orderItemAdjustment.getRelatedOne("SecondaryGeo", true)/> + <span class="label">${uiLabelMap.CommonIn}</span> ${secondaryGeo.geoName} [${secondaryGeo.abbreviation!}]) + </#if> + </#if> + <#if orderItemAdjustment.sourcePercentage??> + <span class="label">${uiLabelMap.OrderRate}</span> ${orderItemAdjustment.sourcePercentage?string("0.######")} + </#if> + <#if orderItemAdjustment.customerReferenceId?has_content> + <span class="label">${uiLabelMap.OrderCustomerTaxId}</span> ${orderItemAdjustment.customerReferenceId} + </#if> + <#if orderItemAdjustment.exemptAmount??> + <span class="label">${uiLabelMap.OrderExemptAmount}</span> ${orderItemAdjustment.exemptAmount} + </#if> + </#if> + </td> + <td> </td> + <td> </td> + <td align="right"> + <@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].calcItemAdjustment(orderItemAdjustment, orderItem) isoCode=currencyUomId/> + </td> + <td colspan="2"> </td> + </tr> + </#list> + </#if> + <#-- now show price info per line item --> + <#assign orderItemPriceInfos = orderReadHelper.getOrderItemPriceInfos(orderItem)> + <#if orderItemPriceInfos?? && orderItemPriceInfos?has_content> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td colspan="7"> </td> + </tr> + <#list orderItemPriceInfos as orderItemPriceInfo> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.ProductPriceRuleNameId}</span> [${orderItemPriceInfo.productPriceRuleId!}:${orderItemPriceInfo.productPriceActionSeqId!}] + ${orderItemPriceInfo.description!} + </td> + <td> </td> + <td align="right"> + <@ofbizCurrency amount=orderItemPriceInfo.modifyAmount isoCode=currencyUomId/> + </td> + <td colspan="3"> </td> + </tr> + </#list> + </#if> + <#-- now show survey information per line item --> + <#assign orderItemSurveyResponses = Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemSurveyResponse(orderItem)> + <#if orderItemSurveyResponses?? && orderItemSurveyResponses?has_content> + <#list orderItemSurveyResponses as survey> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.CommonSurveys}</span> + <a href="/content/control/ViewSurveyResponses?surveyResponseId=${survey.surveyResponseId}&surveyId=${survey.surveyId}${StringUtil.wrapString(externalKeyParam)}" + class="buttontext">${survey.surveyId}</a> + </td> + <td colspan="5"> </td> + </tr> + </#list> + </#if> + <#-- display the ship estimated/before/after dates --> + <#if orderItem.estimatedShipDate??> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.OrderEstimatedShipDate}</span> ${Static["org.ofbiz.base.util.UtilFormatOut"].formatDate(orderItem.estimatedShipDate, "", locale, timeZone)!} + </td> + <td colspan="5"> </td> + </tr> + </#if> + <#if orderItem.estimatedDeliveryDate??> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.OrderOrderQuoteEstimatedDeliveryDate}</span> ${Static["org.ofbiz.base.util.UtilFormatOut"].formatDate(orderItem.estimatedDeliveryDate, "", locale, timeZone)!} + </td> + <td colspan="5"> </td> + </tr> + </#if> + <#if orderItem.shipAfterDate??> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.OrderShipAfterDate}</span> ${Static["org.ofbiz.base.util.UtilFormatOut"].formatDate(orderItem.shipAfterDate, "", locale, timeZone)!} + </td> + <td colspan="5"> </td> + </tr> + </#if> + <#if orderItem.shipBeforeDate??> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.OrderShipBeforeDate}</span> ${Static["org.ofbiz.base.util.UtilFormatOut"].formatDate(orderItem.shipBeforeDate, "", locale, timeZone)!} + </td> + <td colspan="5"> </td> + </tr> + </#if> + <#-- now show ship group info per line item --> + <#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<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.OrderShipGroup}</span> [${shipGroup.shipGroupSeqId}] + ${shipGroupAddress.address1?default("${uiLabelMap.OrderNotShipped}")} + </td> + <td align="center"> + ${shipGroupAssoc.quantity?string.number} + </td> + <td colspan="4"> </td> + </tr> + </#list> + </#if> + <#-- now show inventory reservation info per line item --> + <#if orderItemShipGrpInvResList?? && orderItemShipGrpInvResList?has_content> + <#list orderItemShipGrpInvResList as orderItemShipGrpInvRes> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.CommonInventory}</span> + <a href="/facility/control/EditInventoryItem?inventoryItemId=${orderItemShipGrpInvRes.inventoryItemId}${StringUtil.wrapString(externalKeyParam)}" + class="buttontext">${orderItemShipGrpInvRes.inventoryItemId}</a> + <span class="label">${uiLabelMap.OrderShipGroup}</span> ${orderItemShipGrpInvRes.shipGroupSeqId} + </td> + <td align="center"> + ${orderItemShipGrpInvRes.quantity?string.number} + </td> + <td> + <#if (orderItemShipGrpInvRes.quantityNotAvailable?has_content && orderItemShipGrpInvRes.quantityNotAvailable > 0)> + <span style="color: red;"> + [${orderItemShipGrpInvRes.quantityNotAvailable?string.number} ${uiLabelMap.OrderBackOrdered}] + </span> + <#--<a href="<@ofbizUrl>balanceInventoryItems?inventoryItemId=${orderItemShipGrpInvRes.inventoryItemId}&orderId=${orderId}&priorityOrderId=${orderId}&priorityOrderItemSeqId=${orderItemShipGrpInvRes.orderItemSeqId}</@ofbizUrl>" class="buttontext" style="font-size: xx-small;">Raise Priority</a> --> + </#if> + + </td> + <td colspan="3"> </td> + </tr> + </#list> + </#if> + <#-- now show planned shipment info per line item --> + <#assign orderShipments = orderItem.getRelated("OrderShipment", null, null, false)!> + <#if orderShipments?has_content> + <#list orderShipments as orderShipment> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <span class="label">${uiLabelMap.OrderPlannedInShipment}</span> <a + target="facility" + href="/facility/control/ViewShipment?shipmentId=${orderShipment.shipmentId}${StringUtil.wrapString(externalKeyParam)}" + class="buttontext">${orderShipment.shipmentId}</a>: ${orderShipment.shipmentItemSeqId} + </td> + <td align="center"> + ${orderShipment.quantity?string.number} + </td> + <td colspan="4"> </td> + </tr> + </#list> + </#if> + <#-- now show item issuances (shipment) per line item --> + <#assign itemIssuances = itemIssuancesPerItem.get(orderItem.get("orderItemSeqId"))!> + <#if itemIssuances?has_content> + <#list itemIssuances as itemIssuance> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <#if itemIssuance.shipmentId?has_content> + <span class="label">${uiLabelMap.OrderIssuedToShipmentItem}</span> + <a target="facility" + href="/facility/control/ViewShipment?shipmentId=${itemIssuance.shipmentId}${StringUtil.wrapString(externalKeyParam)}" + class="buttontext">${itemIssuance.shipmentId}</a>: ${itemIssuance.shipmentItemSeqId!} + <#else> + <span class="label">${uiLabelMap.OrderIssuedWithoutShipment}</span> + </#if> + </td> + <td align="center"> + ${itemIssuance.quantity?default(0) - itemIssuance.cancelQuantity?default(0)} + </td> + <td colspan="4"> </td> + </tr> + </#list> + </#if> + <#-- now show item issuances (inventory item) per line item --> + <#if itemIssuances?has_content> + <#list itemIssuances as itemIssuance> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <#if itemIssuance.inventoryItemId?has_content> + <#assign inventoryItem = itemIssuance.getRelatedOne("InventoryItem", false)/> + <span class="label">${uiLabelMap.CommonInventory}</span> + <a href="/facility/control/EditInventoryItem?inventoryItemId=${itemIssuance.inventoryItemId}${StringUtil.wrapString(externalKeyParam)}" + class="buttontext">${itemIssuance.inventoryItemId}</a> + <span class="label">${uiLabelMap.OrderShipGroup}</span> ${itemIssuance.shipGroupSeqId!} + <#if (inventoryItem.serialNumber?has_content)> + <br /> + <span class="label">${uiLabelMap.ProductSerialNumber}</span> ${inventoryItem.serialNumber} + </#if> + </#if> + </td> + <td align="center"> + ${itemIssuance.quantity?default(0) - itemIssuance.cancelQuantity?default(0)} + </td> + <td colspan="4"> </td> + </tr> + </#list> + </#if> + <#-- now show shipment receipts per line item --> + <#assign shipmentReceipts = orderItem.getRelated("ShipmentReceipt", null, null, false)!> + <#if shipmentReceipts?has_content> + <#list shipmentReceipts as shipmentReceipt> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td align="right" colspan="2"> + <#if shipmentReceipt.shipmentId?has_content> + <span class="label">${uiLabelMap.OrderShipmentReceived}</span> + <a target="facility" + href="/facility/control/ViewShipment?shipmentId=${shipmentReceipt.shipmentId}${StringUtil.wrapString(externalKeyParam)}" + class="buttontext">${shipmentReceipt.shipmentId}</a>:${shipmentReceipt.shipmentItemSeqId!} + </#if> + <#if shipmentReceipt.datetimeReceived?has_content>${Static["org.ofbiz.base.util.UtilFormatOut"].formatDateTime(shipmentReceipt.datetimeReceived, "", locale, timeZone)!}</#if> + <span class="label">${uiLabelMap.CommonInventory}</span> + <a href="/facility/control/EditInventoryItem?inventoryItemId=${shipmentReceipt.inventoryItemId}${StringUtil.wrapString(externalKeyParam)}" + class="buttontext">${shipmentReceipt.inventoryItemId}</a> + </td> + <td align="center"> + ${shipmentReceipt.quantityAccepted?string.number} / ${shipmentReceipt.quantityRejected?default(0)?string.number} + </td> + <td colspan="4"> </td> + </tr> + </#list> + </#if> + <#if orderItem.comments?has_content> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td> </td> + <td> + <div class= "screenlet"> + <div class = "screenlet-body"> + <table> + <tr> + <td align="right"> + <span class="label">${uiLabelMap.CommonComments}</span> + </td> + <td align=""> + <span class="label">${uiLabelMap.CommonCurrent}:</span> ${orderItem.comments} + <#assign orderItemSeqId = orderItem.orderItemSeqId!> + <#if comments?has_content> + <hr/> + <#list comments as comm> + <#if comm.orderItemSeqId?has_content && orderItemSeqId?has_content && comm.orderItemSeqId == orderItemSeqId> + <#if comm.changeComments?has_content> + <div> + ${(comm.changeComments)!} + + <#if comm.changeDatetime?has_content>${Static["org.ofbiz.base.util.UtilFormatOut"].formatDateTime(comm.changeDatetime, "", locale, timeZone)?default("0000-00-00 00:00:00")}</#if> ${uiLabelMap.CommonBy} - [${(comm.changeUserLogin)!}] + </div> + </#if> + </#if> + </#list> + </#if> + </td> + </tr> + </table> + </div> + </div> + </td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + </tr> + </#if> + <#if itemClass == "2"> + <#assign itemClass = "1"> + <#else> + <#assign itemClass = "2"> + </#if> + </#list> + </#if> + <tr><td colspan="7"><hr /></td></tr> + <#list orderHeaderAdjustments as orderHeaderAdjustment> + <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType", false)> + <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)> + <#if adjustmentAmount != 0> + <tr> + <td align="right" colspan="5"> + <#if orderHeaderAdjustment.comments?has_content>${orderHeaderAdjustment.comments} - </#if> + <#if orderHeaderAdjustment.description?has_content>${orderHeaderAdjustment.description} - </#if> + <span class="label">${adjustmentType.get("description", locale)}</span> + </td> + <td align="right" nowrap="nowrap"> + <@ofbizCurrency amount=adjustmentAmount isoCode=currencyUomId/> + </td> + <td> </td> + </tr> + </#if> + </#list> + <#-- subtotal --> + <tr> + <td colspan="1"></td> + <td colspan="6"><hr /></td> + </tr> + <tr> + <td align="right" colspan="5"> + <span class="label">${uiLabelMap.OrderItemsSubTotal}</span> + </td> + <td align="right" nowrap="nowrap"> + <@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/> + </td> + <td> </td> + </tr> + <#-- other adjustments --> + <tr> + <td align="right" colspan="5"> + <span class="label">${uiLabelMap.OrderTotalOtherOrderAdjustments}</span> + </td> + <td align="right" nowrap="nowrap"> + <@ofbizCurrency amount=otherAdjAmount isoCode=currencyUomId/> + </td> + <td> </td> + </tr> + <#-- shipping adjustments --> + <tr> + <td align="right" colspan="5"> + <span class="label">${uiLabelMap.OrderTotalShippingAndHandling}</span> + </td> + <td align="right" nowrap="nowrap"> + <@ofbizCurrency amount=shippingAmount isoCode=currencyUomId/> + </td> + <td> </td> + </tr> + <#-- tax adjustments --> + <tr> + <td align="right" colspan="5"> + <span class="label">${uiLabelMap.OrderTotalSalesTax}</span> + </td> + <td align="right" nowrap="nowrap"> + <@ofbizCurrency amount=taxAmount isoCode=currencyUomId/> + </td> + <td> </td> + </tr> + <#-- grand total --> + <tr> + <td align="right" colspan="5"> + <span class="label">${uiLabelMap.OrderTotalDue}</span> + </td> + <td align="right" nowrap="nowrap"> + <@ofbizCurrency amount=grandTotal isoCode=currencyUomId/> + </td> + <td> </td> + </tr> + </table> + </div> + </div> +</#if> Propchange: ofbiz/trunk/applications/order/template/order/orderitems.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/order/orderitems.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/order/orderitems.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/order/template/order/orderlist.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/order/orderlist.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/order/orderlist.ftl (added) +++ ofbiz/trunk/applications/order/template/order/orderlist.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,238 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<script type="text/javascript"> + var checkBoxNameStart = "view"; + var formName = "findorder"; + + + function setCheckboxes() { + // This would be clearer with camelCase variable names + var allCheckbox = document.forms[formName].elements[checkBoxNameStart + "all"]; + for(i = 0;i < document.forms[formName].elements.length;i++) { + var elem = document.forms[formName].elements[i]; + if (elem.name.indexOf(checkBoxNameStart) == 0 && elem.name.indexOf("_") < 0 && elem.type == "checkbox") { + elem.checked = allCheckbox.checked; + } + } + } + +</script> + +<#macro pagination> + <table class="basic-table" cellspacing='0'> + <tr> + <td> + <#if state.hasPrevious()> + <a href="<@ofbizUrl>orderlist?viewIndex=${state.getViewIndex() - 1}&viewSize=${state.getViewSize()}&filterDate=${filterDate!}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> + </#if> + </td> + <td align="right"> + <#if state.hasNext()> + <a href="<@ofbizUrl>orderlist?viewIndex=${state.getViewIndex() + 1}&viewSize=${state.getViewSize()}&filterDate=${filterDate!}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a> + </#if> + </td> + </tr> + </table> +</#macro> + +<#-- order list --> +<div id="orderLookup" class="screenlet"> + <div class="screenlet-title-bar"> + <ul> + <li class="h3">${uiLabelMap.OrderLookupOrder}</li> + </ul> + <br class="clear"/> + </div> + <div class="screenlet-body"> + <form method="post" name="findorder" action="<@ofbizUrl>orderlist</@ofbizUrl>"> + <input type="hidden" name="changeStatusAndTypeState" value="Y" /> + <table class="basic-table" cellspacing='0'> + <tr> + <td align="right" class="label">${uiLabelMap.CommonStatus}</td> + <td> </td> + <td nowrap="nowrap"> + <div> + <input type="checkbox" name="viewall" value="Y" onclick="javascript:setCheckboxes()" <#if state.hasAllStatus()>checked="checked"</#if> />${uiLabelMap.CommonAll} + <input type="checkbox" name="viewcreated" value="Y" <#if state.hasStatus('viewcreated')>checked="checked"</#if> />${uiLabelMap.CommonCreated} + <input type="checkbox" name="viewprocessing" value="Y" <#if state.hasStatus('viewprocessing')>checked="checked"</#if> />${uiLabelMap.CommonProcessing} + <input type="checkbox" name="viewapproved" value="Y" <#if state.hasStatus('viewapproved')>checked="checked"</#if> />${uiLabelMap.CommonApproved} + <input type="checkbox" name="viewhold" value="Y" <#if state.hasStatus('viewhold')>checked="checked"</#if> />${uiLabelMap.CommonHeld} + <input type="checkbox" name="viewcompleted" value="Y" <#if state.hasStatus('viewcompleted')>checked="checked"</#if> />${uiLabelMap.CommonCompleted} + <#--input type="checkbox" name="viewsent" value="Y" <#if state.hasStatus('viewsent')>checked="checked"</#if> />${uiLabelMap.CommonSent}--> + <input type="checkbox" name="viewrejected" value="Y" <#if state.hasStatus('viewrejected')>checked="checked"</#if> />${uiLabelMap.CommonRejected} + <input type="checkbox" name="viewcancelled" value="Y" <#if state.hasStatus('viewcancelled')>checked="checked"</#if> />${uiLabelMap.CommonCancelled} + </div> + </td> + </tr> + <tr> + <td align="right" class="label">${uiLabelMap.CommonType}</td> + <td> </td> + <td nowrap="nowrap"> + <div> + <input type="checkbox" name="view_SALES_ORDER" value="Y" <#if state.hasType('view_SALES_ORDER')>checked="checked"</#if>/> + ${descr_SALES_ORDER} + <input type="checkbox" name="view_PURCHASE_ORDER" value="Y" <#if state.hasType('view_PURCHASE_ORDER')>checked="checked"</#if>/> + ${descr_PURCHASE_ORDER} + </div> + </td> + </tr> + <tr> + <td align="right" class="label">${uiLabelMap.CommonFilter}</td> + <td> </td> + <td nowrap="nowrap"> + <div> + <input type="checkbox" name="filterInventoryProblems" value="Y" + <#if state.hasFilter('filterInventoryProblems')>checked="checked"</#if>/> + ${uiLabelMap.OrderFilterInventoryProblems} + <input type="checkbox" name="filterAuthProblems" value="Y" + <#if state.hasFilter('filterAuthProblems')>checked="checked"</#if>/> + ${uiLabelMap.OrderFilterAuthProblems} + </div> + </td> + </tr> + <tr> + <td align="right" class="label">${uiLabelMap.CommonFilter} (${uiLabelMap.OrderFilterPOs})</td> + <td> </td> + <td nowrap="nowrap"> + <div> + <input type="checkbox" name="filterPartiallyReceivedPOs" value="Y" + <#if state.hasFilter('filterPartiallyReceivedPOs')>checked="checked"</#if>/> + ${uiLabelMap.OrderFilterPartiallyReceivedPOs} + <input type="checkbox" name="filterPOsOpenPastTheirETA" value="Y" + <#if state.hasFilter('filterPOsOpenPastTheirETA')>checked="checked"</#if>/> + ${uiLabelMap.OrderFilterPOsOpenPastTheirETA} + <input type="checkbox" name="filterPOsWithRejectedItems" value="Y" + <#if state.hasFilter('filterPOsWithRejectedItems')>checked="checked"</#if>/> + ${uiLabelMap.OrderFilterPOsWithRejectedItems} + </div> + </td> + </tr> + <tr> + <td colspan="3" align="center"> + <br /> + </td> + </tr> + <tr> + <td colspan="3" align="center"> + <a href="javascript:document.findorder.submit()" class="buttontext">${uiLabelMap.CommonFind}</a> + </td> + </tr> + </table> + </form> + </div> + </div> +<#if hasPermission> + <div id="findOrdersList" class="screenlet"> + <div class="screenlet-title-bar"> + <ul> + <li class="h3">${uiLabelMap.OrderOrderList}</li> + </ul> + <br class="clear"/> + </div> + <div class="screenlet-body"> + <table class="basic-table hover-bar" cellspacing='0'> + <tr class="header-row"> + <td width="15%">${uiLabelMap.CommonDate}</td> + <td width="10%">${uiLabelMap.OrderOrder} ${uiLabelMap.CommonNbr}</td> + <td width="10%">${uiLabelMap.OrderOrderName}</td> + <td width="10%">${uiLabelMap.OrderOrderType}</td> + <td width="10%">${uiLabelMap.OrderOrderBillFromParty}</td> + <td width="10%">${uiLabelMap.OrderOrderBillToParty}</td> + <td width="10%">${uiLabelMap.OrderProductStore}</td> + <td width="10%">${uiLabelMap.CommonAmount}</td> + <td width="10%">${uiLabelMap.OrderTrackingCode}</td> + <#if state.hasFilter('filterInventoryProblems') || state.hasFilter('filterAuthProblems') || state.hasFilter('filterPOsOpenPastTheirETA') || state.hasFilter('filterPOsWithRejectedItems') || state.hasFilter('filterPartiallyReceivedPOs')> + <td width="10%">${uiLabelMap.CommonStatus}</td> + <td width="5%">${uiLabelMap.CommonFilter}</td> + <#else> + <td colspan="2" width="15%">${uiLabelMap.CommonStatus}</td> + </#if> + </tr> + <#list orderHeaderList as orderHeader> + <#assign status = orderHeader.getRelatedOne("StatusItem", true)> + <#assign orh = Static["org.ofbiz.order.order.OrderReadHelper"].getHelper(orderHeader)> + <#assign billToParty = orh.getBillToParty()!> + <#assign billFromParty = orh.getBillFromParty()!> + <#if billToParty?has_content> + <#assign billToPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", billToParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/> + <#assign billTo = billToPartyNameResult.fullName?default("[${uiLabelMap.OrderPartyNameNotFound}]")/> + <#-- <#assign billTo = Static["org.ofbiz.party.party.PartyHelper"].getPartyName(billToParty, true)!> --> + <#else> + <#assign billTo = ''/> + </#if> + <#if billFromParty?has_content> + <#assign billFrom = Static["org.ofbiz.party.party.PartyHelper"].getPartyName(billFromParty, true)!> + <#else> + <#assign billFrom = ''/> + </#if> + <#assign productStore = orderHeader.getRelatedOne("ProductStore", true)! /> + <tr> + <td><#if orderHeader.orderDate?has_content>${Static["org.ofbiz.base.util.UtilFormatOut"].formatDateTime(orderHeader.orderDate, "", locale, timeZone)!}</#if></td> + <td> + <a href="<@ofbizUrl>orderview?orderId=${orderHeader.orderId}</@ofbizUrl>" class="buttontext">${orderHeader.orderId}</a> + </td> + <td>${orderHeader.orderName!}</td> + <td>${orderHeader.getRelatedOne("OrderType", true).get("description",locale)}</td> + <td>${billFrom!}</td> + <td>${billTo!}</td> + <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", null, null, false)> + <#list trackingCodes as trackingCode> + <#if trackingCode?has_content> + <a href="/marketing/control/FindTrackingCodeOrders?trackingCodeId=${trackingCode.trackingCodeId}&externalLoginKey=${requestAttributes.externalLoginKey!}">${trackingCode.trackingCodeId}</a><br /> + </#if> + </#list> + </td> + <td>${orderHeader.getRelatedOne("StatusItem", true).get("description",locale)}</td> + <#if state.hasFilter('filterInventoryProblems') || state.hasFilter('filterAuthProblems') || state.hasFilter('filterPOsOpenPastTheirETA') || state.hasFilter('filterPOsWithRejectedItems') || state.hasFilter('filterPartiallyReceivedPOs')> + <td> + <#if filterInventoryProblems.contains(orderHeader.orderId)> + Inv + </#if> + <#if filterAuthProblems.contains(orderHeader.orderId)> + Aut + </#if> + <#if filterPOsOpenPastTheirETA.contains(orderHeader.orderId)> + ETA + </#if> + <#if filterPOsWithRejectedItems.contains(orderHeader.orderId)> + Rej + </#if> + <#if filterPartiallyReceivedPOs.contains(orderHeader.orderId)> + Part + </#if> + </td> + <#else> + <td> </td> + </#if> + </tr> + </#list> + <#if !orderHeaderList?has_content> + <tr><td colspan="9"><h3>${uiLabelMap.OrderNoOrderFound}</h3></td></tr> + </#if> + </table> + <@pagination/> + </div> + </div> +<#else> + <h3>${uiLabelMap.OrderViewPermissionError}</h3> +</#if> Propchange: ofbiz/trunk/applications/order/template/order/orderlist.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/order/orderlist.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/order/orderlist.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/order/template/order/ordernotes.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/order/ordernotes.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/order/ordernotes.ftl (added) +++ ofbiz/trunk/applications/order/template/order/ordernotes.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,83 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#if orderHeader?has_content> + +<div class="screenlet"> + <div class="screenlet-title-bar"> + <ul> + <li class="h3"> ${uiLabelMap.OrderNotes}</li> + <#if security.hasEntityPermission("ORDERMGR", "_NOTE", session)> + <li><a href="<@ofbizUrl>createnewnote?${paramString}</@ofbizUrl>">${uiLabelMap.OrderNotesCreateNew}</a></li> + </#if> + </ul> + <br class="clear"/> + </div> + <div class="screenlet-body"> + <table class="basic-table" cellspacing='0'> + <tr> + <td> + <#if orderNotes?has_content> + <table class="basic-table" cellspacing='0'> + <#list orderNotes as note> + <tr> + <td valign="top" width="35%"> + <#if note.noteParty?has_content> + <div> <span class="label">${uiLabelMap.CommonBy}</span> ${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, note.noteParty, true)}</div> + </#if> + <div> <span class="label">${uiLabelMap.CommonAt}</span> <#if note.noteDateTime?has_content>${Static["org.ofbiz.base.util.UtilFormatOut"].formatDateTime(note.noteDateTime, "", locale, timeZone)!}</#if></div> + </td> + <td valign="top" width="50%"> + ${note.noteInfo?replace("\n", "<br/>")} + </td> + <td align="right" valign="top" width="15%"> + <#if note.internalNote! == "N"> + ${uiLabelMap.OrderPrintableNote} + <form name="privateNotesForm_${note_index}" method="post" action="<@ofbizUrl>updateOrderNote</@ofbizUrl>"> + <input type="hidden" name="orderId" value="${orderId}"/> + <input type="hidden" name="noteId" value="${note.noteId}"/> + <input type="hidden" name="internalNote" value="Y"/> + <a href="javascript:document.privateNotesForm_${note_index}.submit()" class="buttontext">${uiLabelMap.OrderNotesPrivate}</a> + </form> + </#if> + <#if note.internalNote! == "Y"> + ${uiLabelMap.OrderNotPrintableNote} + <form name="publicNotesForm_${note_index}" method="post" action="<@ofbizUrl>updateOrderNote</@ofbizUrl>"> + <input type="hidden" name="orderId" value="${orderId}"/> + <input type="hidden" name="noteId" value="${note.noteId}"/> + <input type="hidden" name="internalNote" value="N"/> + <a href="javascript:document.publicNotesForm_${note_index}.submit()" class="buttontext">${uiLabelMap.OrderNotesPublic}</a> + </form> + </#if> + </td> + </tr> + <#if note_has_next> + <tr><td colspan="3"><hr/></td></tr> + </#if> + </#list> + </table> + <#else> + <span class="label"> ${uiLabelMap.OrderNoNotes}.</span> + </#if> + </td> + </tr> + </table> + </div> +</div> +</#if> Propchange: ofbiz/trunk/applications/order/template/order/ordernotes.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/order/ordernotes.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/order/ordernotes.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain |
Free forum by Nabble | Edit this page |