svn commit: r787185 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/order/OrderView.groovy WEB-INF/controller.xml order/newnote.ftl order/orderReportBody.fo.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r787185 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/order/OrderView.groovy WEB-INF/controller.xml order/newnote.ftl order/orderReportBody.fo.ftl

ashish-18
Author: ashish
Date: Mon Jun 22 10:18:01 2009
New Revision: 787185

URL: http://svn.apache.org/viewvc?rev=787185&view=rev
Log:
Applied patch from jira issue OFBIZ-2635. (Order notes are not displayed on sales order pdf, instead of that it gives error. )
Thanks Akash for your contribution.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/order/newnote.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=787185&r1=787184&r2=787185&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Mon Jun 22 10:18:01 2009
@@ -209,6 +209,12 @@
     notes = delegator.findByAnd("OrderHeaderNoteView", [orderId : orderId], ["-noteDateTime"]);
     context.orderNotes = notes;
 
+    showNoteHeadingOnPDF = false;
+    if (notes && EntityUtil.filterByCondition(notes, EntityCondition.makeCondition("internalNote", EntityOperator.EQUALS, "N")).size() > 0) {
+        showNoteHeadingOnPDF = true;
+    }
+    context.showNoteHeadingOnPDF = showNoteHeadingOnPDF;
+
     cmvm = ContactMechWorker.getOrderContactMechValueMaps(delegator, orderId);
     context.orderContactMechValueMaps = cmvm;
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=787185&r1=787184&r2=787185&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Mon Jun 22 10:18:01 2009
@@ -301,7 +301,7 @@
     <request-map uri="createordernote">
         <security https="true" auth="true"/>
         <event type="service" invoke="createOrderNote"/>
-        <response name="success" type="view" value="orderlist"/>
+        <response name="success" type="view" value="orderview"/>
         <response name="error" type="view" value="createnewnote"/>
     </request-map>
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/newnote.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/newnote.ftl?rev=787185&r1=787184&r2=787185&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/newnote.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/newnote.ftl Mon Jun 22 10:18:01 2009
@@ -29,7 +29,8 @@
         <a href="<@ofbizUrl>authview/${donePage}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonGoBack}</a>
         <a href="javascript:document.createnoteform.submit()" class="buttontext">${uiLabelMap.CommonSave}</a>
 
-        <form method="post" action="<@ofbizUrl>createordernote/${donePage}</@ofbizUrl>" name="createnoteform">
+        <form method="post" action="<@ofbizUrl>createordernote</@ofbizUrl>" name="createnoteform">
+            <input type="hidden" name="orderId" value="${orderId?if_exists}"/>
             <table class="basic-table" cellspacing='0'>
               <tr>
                 <td width="26%" align="right"><span class="label">${uiLabelMap.OrderNote}</span></td>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl?rev=787185&r1=787184&r2=787185&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl Mon Jun 22 10:18:01 2009
@@ -116,19 +116,17 @@
 
            <#-- notes -->
            <#if orderNotes?has_content>
+                   <#if showNoteHeadingOnPDF>
                    <fo:table-row >
                        <fo:table-cell number-columns-spanned="3">
                            <fo:block font-weight="bold">${uiLabelMap.OrderNotes}</fo:block>
+                           <fo:block><fo:leader leader-length="19cm" leader-pattern="rule"/></fo:block>
                        </fo:table-cell>
                    </fo:table-row>
+                   </#if>
                 <#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>