svn commit: r441602 - in /incubator/ofbiz/trunk/applications/order: config/OrderUiLabels.properties webapp/ordermgr/order/orderReportContactMechs.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: r441602 - in /incubator/ofbiz/trunk/applications/order: config/OrderUiLabels.properties webapp/ordermgr/order/orderReportContactMechs.fo.ftl

sichen
Author: sichen
Date: Fri Sep  8 11:33:24 2006
New Revision: 441602

URL: http://svn.apache.org/viewvc?view=rev&rev=441602
Log:
Cleaned order pdf: put purchased from to left of shipping destination.  Also will not show payment info unless there are some payment methods

Modified:
    incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties
    incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl

Modified: incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties?view=diff&rev=441602&r1=441601&r2=441602
==============================================================================
--- incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties (original)
+++ incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties Fri Sep  8 11:33:24 2006
@@ -305,6 +305,7 @@
 OrderProcessingInHoldNote=** Note: If this state is a result of an automated activity, releasing may not have an effect until all conditions are met.
 OrderProductStore = Product Store
 OrderPromotionCouponCodes = Promotion/Coupon Codes
+OrderPurchasedFrom = Purchased From
 OrderPurchaseOrder = Purchase Order
 OrderPurchaseReportOptions=Order Purchase Report Options
 OrderQty=Qty

Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl?view=diff&rev=441602&r1=441601&r2=441602
==============================================================================
--- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl (original)
+++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl Fri Sep  8 11:33:24 2006
@@ -19,6 +19,25 @@
           <fo:table-column column-width="3.75in"/>
           <fo:table-body>
             <fo:table-row>    <#-- this part could use some improvement -->
+            
+             <#-- a special purchased from address for Purchase Orders -->
+             <#if orderHeader.getString("orderTypeId") == "PURCHASE_ORDER">
+             <#if supplierGeneralContactMechValueMap?exists>
+               <#assign contactMech = supplierGeneralContactMechValueMap.contactMech>
+               <fo:table-cell>
+                 <fo:block white-space-collapse="false">
+<fo:block font-weight="bold">${uiLabelMap.OrderPurchasedFrom}:</fo:block><#assign postalAddress = supplierGeneralContactMechValueMap.postalAddress><#if postalAddress?has_content><#if postalAddress.toName?has_content>${postalAddress.toName}</#if><#if postalAddress.attnName?has_content>
+${postalAddress.attnName}</#if>
+${postalAddress.address1}<#if postalAddress.address2?has_content>
+${postalAddress.address2}</#if>
+${postalAddress.city}<#if postalAddress.stateProvinceGeoId?has_content>, ${postalAddress.stateProvinceGeoId} </#if></#if><#if postalAddress.postalCode?has_content>${postalAddress.postalCode}</#if>
+${postalAddress.countryGeoId?if_exists}
+</fo:block>
+               </fo:table-cell>
+             </#if>
+             </#if>
+            
+             <#-- list all postal addresses of the order.  there should be just a billing and a shipping here. -->
              <#list orderContactMechValueMaps as orderContactMechValueMap>
                <#assign contactMech = orderContactMechValueMap.contactMech>
                <#assign contactMechPurpose = orderContactMechValueMap.contactMechPurposeType>
@@ -34,20 +53,7 @@
                 </fo:table-cell>
                 </#if>
              </#list>
-             <#if orderHeader.getString("orderTypeId") == "PURCHASE_ORDER">
-             <#if supplierGeneralContactMechValueMap?exists>
-               <#assign contactMech = supplierGeneralContactMechValueMap.contactMech>
-               <fo:table-cell>
-                 <fo:block white-space-collapse="false">
-<fo:block font-weight="bold">${uiLabelMap.ProductSupplier}:</fo:block><#assign postalAddress = supplierGeneralContactMechValueMap.postalAddress><#if postalAddress?has_content><#if postalAddress.toName?has_content>${postalAddress.toName}</#if><#if postalAddress.attnName?has_content>
-${postalAddress.attnName}</#if>
-${postalAddress.address1}<#if postalAddress.address2?has_content>
-${postalAddress.address2}</#if>
-${postalAddress.city}<#if postalAddress.stateProvinceGeoId?has_content>, ${postalAddress.stateProvinceGeoId} </#if></#if><#if postalAddress.postalCode?has_content>${postalAddress.postalCode}</#if>
-</fo:block>
-               </fo:table-cell>
-             </#if>
-             </#if>
+            
             </fo:table-row>
          </fo:table-body>
        </fo:table>
@@ -60,10 +66,10 @@
           
   <#-- payment info -->                
           <fo:table-body>
+           <#if orderPaymentPreferences?has_content>
             <fo:table-row>
                 <fo:table-cell><fo:block>${uiLabelMap.AccountingPaymentInformation}</fo:block></fo:table-cell>
                 <fo:table-cell><fo:block>
-                   <#if orderPaymentPreferences?has_content>
                       <#list orderPaymentPreferences as orderPaymentPreference>
                          <#assign paymentMethodType = orderPaymentPreference.getRelatedOne("PaymentMethodType")?if_exists>
                          <#if ((orderPaymentPreference != null) && (orderPaymentPreference.getString("paymentMethodTypeId") == "CREDIT_CARD") && (orderPaymentPreference.getString("paymentMethodId")?has_content))>
@@ -73,10 +79,11 @@
                              ${paymentMethodType.get("description",locale)?if_exists}
                          </#if>
                       </#list>
-                   </#if>
-                         </fo:block>
+                      </fo:block>
                  </fo:table-cell>
             </fo:table-row>
+         </#if>
+        
         <#-- shipping method.  currently not shown for PO's because we are not recording a shipping method for PO's in order entry -->
            <#if orderHeader.getString("orderTypeId") == "SALES_ORDER">
             <fo:table-row>