Author: mbrohl
Date: Sat Jun 20 09:00:17 2015
New Revision: 1686536
URL: http://svn.apache.org/r1686536
Log:
Fix for "Print Pick Sheet PDF using orderId.pdf as attachement name"
(OFBIZ-6398).
This was introduced by r1680671 during the improvement for (OFBIZ-4480). The
behaviour is changed to name the attachment PickSheet<orderId>.pdf for single
order pick sheets and preserve the original naming when used for multiple order
pick sheets.
Thanks Deepak for reporting the issue and everyone else who took part in the
discussion.
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=1686536&r1=1686535&r2=1686536&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
Sat Jun 20 09:00:17 2015
@@ -42,7 +42,11 @@ fromPartyId = parameters.fromPartyId;
if (!orderHeader && orderId) {
orderHeader = from("OrderHeader").where("orderId", orderId).queryOne();
- response.setHeader("Content-Disposition","attachment; filename=\"" +
orderId + ".pdf" + "\";");
+ if (parameters.facilityId) {
+ response.setHeader("Content-Disposition","attachment;
filename=\"PickSheet" + orderId + ".pdf" + "\";");
+ } else {
+ response.setHeader("Content-Disposition","attachment; filename=\"" +
orderId + ".pdf" + "\";");
+ }
} else if (shipmentId) {
shipment = from("Shipment").where("shipmentId", shipmentId).queryOne();
orderHeader = shipment.getRelatedOne("PrimaryOrderHeader", false);
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=1686536&r1=1686535&r2=1686536&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
Sat Jun 20 09:00:17 2015
@@ -126,4 +126,5 @@ if (toPrintOrders) {
}
}
}
+ response.setHeader("Content-Disposition","attachment;
filename=\"orderPickSheet.pdf" + "\";");
}