[OFBiz] SVN: r7560 - trunk/applications/order/webapp/ordermgr/return

jacopo@svn.ofbiz.org jacopo at svn.ofbiz.org
Thu May 11 04:57:10 CDT 2006


Author: jacopo
Date: 2006-05-11 04:57:03 -0500 (Thu, 11 May 2006)
New Revision: 7560

Modified:
   trunk/applications/order/webapp/ordermgr/return/returnView.fo.ftl
Log:
Eetun adjustments are now shown in the return PDF report: OFBIZ-856


Modified: trunk/applications/order/webapp/ordermgr/return/returnView.fo.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/return/returnView.fo.ftl	2006-05-11 01:32:45 UTC (rev 7559)
+++ trunk/applications/order/webapp/ordermgr/return/returnView.fo.ftl	2006-05-11 09:57:03 UTC (rev 7560)
@@ -30,6 +30,25 @@
 <#assign fromPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", returnHeader.fromPartyId, "compareDate", returnHeader.entryDate, "userLogin", userLogin))/>
 <#assign toPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", returnHeader.toPartyId, "compareDate", returnHeader.entryDate, "userLogin", userLogin))/>
 
+<#macro displayReturnAdjustment returnAdjustment>
+    <#assign returnHeader = returnAdjustment.getRelatedOne("ReturnHeader")>
+    <#assign adjReturnType = returnAdjustment.getRelatedOne("ReturnType")?if_exists>
+    <fo:table-row>
+    <fo:table-cell padding="1mm"/>
+    <fo:table-cell padding="1mm"/>
+    <fo:table-cell padding="1mm">
+      <fo:block wrap-option="wrap">
+        ${returnAdjustment.description?default("N/A")}
+        <#if returnAdjustment.comments?has_content>: ${returnAdjustment.comments}</#if>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell padding="1mm"/>
+    <fo:table-cell padding="1mm"/>
+    <fo:table-cell padding="1mm" text-align="right"><fo:block>${returnAdjustment.amount}</fo:block></fo:table-cell>
+    </fo:table-row>
+    <#assign total = total + returnAdjustment.get("amount")>
+</#macro>
+
 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
 
   <fo:layout-master-set>
@@ -231,6 +250,15 @@
                 <fo:table-cell padding="1mm" text-align="right"><fo:block>${(returnItem.returnPrice * returnItem.returnQuantity)}</fo:block></fo:table-cell>
               </fo:table-row>
               <#assign total = total + returnItem.returnQuantity.doubleValue() * returnItem.returnPrice.doubleValue()/>
+              
+              <#assign returnItemAdjustments = returnItem.getRelated("ReturnAdjustment")>
+              <#if (returnItemAdjustments?has_content)>
+                  <#list returnItemAdjustments as returnItemAdjustment>
+                     <@displayReturnAdjustment returnAdjustment=returnItemAdjustment/>
+                  </#list>
+              </#if>
+
+              
             </#list>
 
         </fo:table-body>
@@ -246,6 +274,11 @@
           <fo:table-column column-width="0.85in"/>
           <fo:table-column column-width="0.85in"/>
           <fo:table-body>
+            <#if (returnAdjustments?has_content)>                  
+                <#list returnAdjustments as returnAdjustment>
+                    <@displayReturnAdjustment returnAdjustment=returnAdjustment/>
+                </#list>
+            </#if>
             <fo:table-row>
               <fo:table-cell/>
               <fo:table-cell/>
@@ -255,7 +288,7 @@
                 <fo:block font-weight="bold" text-align="center">Total</fo:block>
               </fo:table-cell>
               <fo:table-cell text-align="right" padding="1mm" border-style="solid" border-width="0.2pt">
-                <fo:block>${total}</fo:block>
+                <fo:block><@ofbizCurrency amount=total isoCode=returnHeader.currencyUomId/></fo:block>
               </fo:table-cell>
             </fo:table-row>
           </fo:table-body>



More information about the Svn mailing list