orderItem.getProductSku().setStocks(null);
orderItem.getProductSku().setProductMarketing(null);
orderItem.getProductSku().setStores(null);
}
final OrderCustomerPojo orderCustomerPojo = orderPojoService.handleOrderMapping(order);
final String jrxml = getShippingConfirmationTemplateByMarketArea(marketArea);
File fileJrxml = new File (jrxml);
final String resourcePath = jrxml.replace(fileJrxml.getName(), "");
final JasperReport jasperReport = JasperCompileManager.compileReport(jrxml);
Map <String, Object> parameters = new HashMap<String, Object>();
parameters.put("RESOURCE_PATH", resourcePath);
parameters.put("RECORD_DELIMITER", "\r\n");
parameters.put("order", orderCustomerPojo);
Object[] orderInformationsParams = { orderCustomerPojo.getOrderNum() };
parameters.put("orderInformations", coreMessageSource.getDocumentMessage(ScopeDocumentMessage.SHIPPING_CONFIRMATION.getPropertyKey(), "header_order_informations", orderInformationsParams, locale));
parameters.put("date", orderCustomerPojo.getDateUpdate().toString());
parameters.put("billingAddress", orderCustomerPojo.getBillingAddress());
parameters.put("shippingAddress", orderCustomerPojo.getShippingAddress());
Map<String, String> wording = coreMessageSource.loadWording(I18nKeyValueUniverse.DOCUMENT.getPropertyKey(), locale);
parameters.put("wording", wording);
List<OrderItem> orderItems = new ArrayList<OrderItem>();
Set<OrderShipment> orderShipments = orderCustomerPojo.getOrderShipments();
for (Iterator<OrderShipment> iterator = orderShipments.iterator(); iterator.hasNext();) {
OrderShipment orderShipment = (OrderShipment) iterator.next();
orderItems.addAll(orderShipment.getOrderItems());
}