📄 orderview.fo.ftl
字号:
<#if orderTerms?has_content> <fo:table-row> <fo:table-cell><fo:block>${uiLabelMap.OrderOrderTerms}: </fo:block></fo:table-cell> <fo:table-cell white-space-collapse="false"><fo:block><#list orderTerms as orderTerm>${orderTerm.getRelatedOne("TermType").get("description")} ${orderTerm.termValue?default("")} ${orderTerm.termDays?default("")}</#list></fo:block></fo:table-cell> </fo:table-row> </#if> </fo:table-body> </fo:table> </fo:static-content> <#-- this part is the footer. Use it for standard boilerplate text. --> <fo:static-content flow-name="xsl-region-after"><#if orderHeader.getString("orderTypeId") == "SALES_ORDER"> <fo:block font-size="14pt" font-weight="bold" text-align="center">THANK YOU FOR YOUR PATRONAGE!</fo:block> <fo:block font-size="8pt" white-space-collapse="false">Here is a good place to put policies and return information.</fo:block><#elseif orderHeader.getString("orderTypeId") == "PURCHASE_ORDER"> <fo:block font-size="8pt" white-space-collapse="false">Here is a good place to put boilerplate terms and conditions for a purchase order.</fo:block></#if> <#-- displays page number. "theEnd" is an id of a fo:block at the very end --> <fo:block font-size="10pt" text-align="center">Page <fo:page-number/> of <fo:page-number-citation ref-id="theEnd"/></fo:block> </fo:static-content> <#-- end of footer --> <fo:flow flow-name="xsl-region-body"> <#-- order items --> <#if orderHeader?has_content> <fo:table border-spacing="3pt"> <fo:table-column column-width="3.5in"/> <fo:table-column column-width="1in"/> <fo:table-column column-width="1in"/> <fo:table-column column-width="1in"/> <fo:table-header> <fo:table-row> <fo:table-cell><fo:block font-weight="bold">${uiLabelMap.ProductProduct}</fo:block></fo:table-cell> <fo:table-cell text-align="center"><fo:block font-weight="bold">${uiLabelMap.OrderQuantity}</fo:block></fo:table-cell> <fo:table-cell text-align="center"><fo:block font-weight="bold">${uiLabelMap.OrderUnitList}</fo:block></fo:table-cell> <fo:table-cell text-align="center"><fo:block font-weight="bold">${uiLabelMap.OrderSubTotal}</fo:block></fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <#list orderItemList as orderItem> <#assign orderItemType = orderItem.getRelatedOne("OrderItemType")?if_exists> <#assign productId = orderItem.productId?if_exists> <#assign remainingQuantity = (orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0))> <#assign itemAdjustment = Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentsTotal(orderItem, orderAdjustments, true, false, false)> <fo:table-row> <fo:table-cell> <fo:block> <#if productId?exists> ${orderItem.productId?default("N/A")} - ${orderItem.itemDescription?xml?if_exists} <#elseif orderItemType?exists> ${orderItemType.description} - ${orderItem.itemDescription?xml?if_exists} <#else> ${orderItem.itemDescription?xml?if_exists} </#if> </fo:block> </fo:table-cell> <fo:table-cell text-align="right"><fo:block>${remainingQuantity}</fo:block></fo:table-cell> <fo:table-cell text-align="right"><fo:block><@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/></fo:block></fo:table-cell> <fo:table-cell text-align="right"><fo:block> <#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></fo:block></fo:table-cell> </fo:table-row> <#if itemAdjustment != 0> <fo:table-row> <fo:table-cell number-columns-spanned="2"><fo:block><fo:inline font-style="italic">${uiLabelMap.OrderAdjustments}</fo:inline>: <@ofbizCurrency amount=itemAdjustment isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> </#if> </#list> <#list orderHeaderAdjustments as orderHeaderAdjustment> <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType")> <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)> <#if adjustmentAmount != 0> <fo:table-row> <fo:table-cell></fo:table-cell> <fo:table-cell number-columns-spanned="2"><fo:block font-weight="bold">${adjustmentType.get("description",locale)} : <#if orderHeaderAdjustment.get("description")?has_content>(${orderHeaderAdjustment.get("description")?if_exists})</#if> </fo:block></fo:table-cell> <fo:table-cell text-align="right"><fo:block><@ofbizCurrency amount=adjustmentAmount isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> </#if> </#list> <#-- summary of order amounts --> <fo:table-row> <fo:table-cell></fo:table-cell> <fo:table-cell number-columns-spanned="2"><fo:block font-weight="bold">${uiLabelMap.OrderItemsSubTotal}</fo:block></fo:table-cell> <fo:table-cell text-align="right"><fo:block><@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> <#if otherAdjAmount != 0> <fo:table-row> <fo:table-cell></fo:table-cell> <fo:table-cell number-columns-spanned="2"><fo:block font-weight="bold">${uiLabelMap.OrderTotalOtherOrderAdjustments}</fo:block></fo:table-cell> <fo:table-cell text-align="right"><fo:block><@ofbizCurrency amount=otherAdjAmount isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> </#if> <#if shippingAmount != 0> <fo:table-row> <fo:table-cell></fo:table-cell> <fo:table-cell number-columns-spanned="2"><fo:block font-weight="bold">${uiLabelMap.OrderTotalShippingAndHandling}</fo:block></fo:table-cell> <fo:table-cell text-align="right"><fo:block><@ofbizCurrency amount=shippingAmount isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> </#if> <#if taxAmount != 0> <fo:table-row> <fo:table-cell></fo:table-cell> <fo:table-cell number-columns-spanned="2"><fo:block font-weight="bold">${uiLabelMap.OrderTotalSalesTax}</fo:block></fo:table-cell> <fo:table-cell text-align="right"><fo:block><@ofbizCurrency amount=taxAmount isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> </#if> <#if grandTotal != 0> <fo:table-row> <fo:table-cell></fo:table-cell> <fo:table-cell number-columns-spanned="2" background-color="#EEEEEE"><fo:block font-weight="bold">${uiLabelMap.OrderTotalDue}</fo:block></fo:table-cell> <fo:table-cell text-align="right"><fo:block><@ofbizCurrency amount=grandTotal isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> </#if> <#-- notes --> <#if orderNotes?has_content> <fo:table-row > <fo:table-cell number-columns-spanned="3"> <fo:block font-weight="bold">${uiLabelMap.OrderNotes}</fo:block> </fo:table-cell> </fo:table-row> <#list orderNotes as note> <#if (note.internalNote?has_content) && (note.internalNote != "Y")> <fo:table-row> <fo:table-cell number-columns-spanned="6"> <fo:block><fo:leader leader-length="19cm" leader-pattern="rule" /></fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell number-columns-spanned="1"> <fo:block>${note.noteInfo?if_exists}</fo:block> </fo:table-cell> <fo:table-cell number-columns-spanned="2"> <#assign notePartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", note.noteParty, "compareDate", note.noteDateTime, "lastNameFirst", "Y", "userLogin", userLogin))/> <fo:block>${uiLabelMap.CommonBy}: ${notePartyNameResult.fullName?default("Name Not Found")}</fo:block> </fo:table-cell> <fo:table-cell number-columns-spanned="1"> <fo:block>${uiLabelMap.CommonAt}: ${note.noteDateTime?string?if_exists}</fo:block> </fo:table-cell> </fo:table-row> </#if> </#list> </#if> </fo:table-body> </fo:table> </#if> <fo:block id="theEnd"/> <#-- marks the end of the pages and used to identify page-number at the end --> </fo:flow> </fo:page-sequence></fo:root>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -