retd.setReturnToSupplier(ret);
retd.setQty(qty);
ReturnToSupplierDetail retResp = coreManager.save(ReturnToSupplierDetail.class, retd);
retResp = coreManager.getReturnToSupplierDetail(retd.getId());
DisplayReturnToSupplierDetail det = mapper.map(retResp, DisplayReturnToSupplierDetail.class);
det.setCostPrice(retResp.getProduct().getBuying().getCostPrice());
ProductMeasurement productMeasurement = null;
if(retResp.getProduct().getProductMeasurement() != null && !retResp.getProduct().getProductMeasurement().isEmpty()){
productMeasurement = retResp.getProduct().getProductMeasurement().iterator().next();
}
if(productMeasurement != null){
det.getProduct().setProductMeasurement(mapper.map(productMeasurement, DisplayProductMeasurement.class));
}
resp = det;
}catch (Exception e) {