Author: mor
Date: Thu May 21 13:13:56 2009 New Revision: 777106 URL: http://svn.apache.org/viewvc?rev=777106&view=rev Log: Now Pick Ticket PDF for an order also includes promotions, discounts and adjustments. Applied patch from Anurag Singh Senger, part of OFBIZ-2497 (https://issues.apache.org/jira/browse/OFBIZ-2497) Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy?rev=777106&r1=777105&r2=777106&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy Thu May 21 13:13:56 2009 @@ -89,7 +89,9 @@ orderItems = orderReadHelper.getOrderItems(); orderAdjustments = orderReadHelper.getAdjustments(); orderHeaderAdjustments = orderReadHelper.getOrderHeaderAdjustments(); + context.orderHeaderAdjustments = orderHeaderAdjustments; orderSubTotal = orderReadHelper.getOrderItemsSubTotal(); + context.orderSubTotal = orderSubTotal; otherAdjAmount = orderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, true, false, false); shippingAmount = orderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, false, true); shippingAmount = shippingAmount.add(orderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true)); Modified: ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl?rev=777106&r1=777105&r2=777106&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl Thu May 21 13:13:56 2009 @@ -190,6 +190,16 @@ <fo:table-column column-width="425pt"/> <fo:table-column column-width="100pt"/> <fo:table-body> + <#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:block>${adjustmentType.get("description",locale)}:</fo:block></fo:table-cell> + <fo:table-cell><fo:block><@ofbizCurrency amount=adjustmentAmount isoCode=currencyUomId/></fo:block></fo:table-cell> + </fo:table-row> + </#if> + </#list> <#list orderChargeList as orderCharge> <#if orderCharge.get("${orderId}")?exists > <#assign charges = orderCharge.get("${orderId}")> @@ -198,11 +208,11 @@ <fo:table-cell><fo:block><@ofbizCurrency amount=charges.orderSubTotal isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> <fo:table-row> - <fo:table-cell><fo:block>${uiLabelMap.OrderSalesTax}:</fo:block></fo:table-cell> + <fo:table-cell><fo:block>${uiLabelMap.OrderTotalSalesTax}:</fo:block></fo:table-cell> <fo:table-cell><fo:block><@ofbizCurrency amount=charges.taxAmount isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> <fo:table-row> - <fo:table-cell><fo:block>${uiLabelMap.OrderShippingAndHandling}:</fo:block></fo:table-cell> + <fo:table-cell><fo:block>${uiLabelMap.OrderTotalShippingAndHandling}:</fo:block></fo:table-cell> <fo:table-cell><fo:block><@ofbizCurrency amount=charges.shippingAmount isoCode=currencyUomId/></fo:block></fo:table-cell> </fo:table-row> <fo:table-row> |
Free forum by Nabble | Edit this page |