Author: pranayp
Date: Tue Jun 7 12:14:29 2016
New Revision: 1747202
URL:
http://svn.apache.org/viewvc?rev=1747202&view=revLog:
[OFBIZ-7209] Fixed Order Ship Group PDF.
This issue was due to the declaration of map with list syntax. It was introduced when we moved from Javolution collections to java collections.
One more issue found after fixing map syntax, that is missing block elements error. Added checks to handle that error as well.
Thanks Amardeep Singh Jhajj for the contribution.
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy
ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy?rev=1747202&r1=1747201&r2=1747202&view=diff==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy Tue Jun 7 12:14:29 2016
@@ -77,7 +77,7 @@ shipGroups.each { shipGroup ->
orderItemAssocs.each { orderItemAssoc ->
orderItem = orderItemAssoc.getRelatedOne("OrderItem", false);
product = orderItem.getRelatedOne("Product", false);
- line = [];
+ line = [:];
// the quantity in group
quantityInGroup = orderItemAssoc.quantity;
Modified: ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl?rev=1747202&r1=1747201&r2=1747202&view=diff==============================================================================
--- ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl (original)
+++ ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl Tue Jun 7 12:14:29 2016
@@ -54,22 +54,28 @@ under the License.
in the left side cell the "topLeft" template is included
in the right side cell the "topRight" template is included
-->
+ <#if sections.get("topLeft")?has_content || sections.get("topRight")?has_content>
<fo:static-content flow-name="xsl-region-before">
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-number="1" column-width="proportional-column-width(50)"/>
<fo:table-column column-number="2" column-width="proportional-column-width(50)"/>
<fo:table-body>
<fo:table-row>
+ <#if sections.get("topLeft")?has_content>
<fo:table-cell>
${sections.render("topLeft")}
</fo:table-cell>
+ </#if>
+ <#if sections.get("topRight")?has_content>
<fo:table-cell>
${sections.render("topRight")}
</fo:table-cell>
+ </#if>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
+ </#if>
<#-- the footer -->
<fo:static-content flow-name="xsl-region-after">