diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java
index b77d12b28..75cf96b4e 100644
--- a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java
+++ b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java
@@ -1568,6 +1568,24 @@ public abstract class OrderElement extends IntegrationEntity implements
return workReportLineDAO.findByOrderElementAndChildren(this, sortedByDate);
}
+ /**
+ * Gets workReportLines of this order-element between the specified
+ * startDate and endDate
+ *
+ * @param startDate
+ * the startDate
+ * @param endDate
+ * the endDate
+ * @param sortedByDate
+ * @return list of workReportLines
+ */
+ public List getWorkReportLines(Date startDate,
+ Date endDate, boolean sortedByDate) {
+ IWorkReportLineDAO workReportLineDAO = Registry.getWorkReportLineDAO();
+ return workReportLineDAO.findByOrderElementAndChildrenFilteredByDate(
+ this, startDate, endDate, sortedByDate);
+ }
+
/**
* Checks if it has nay consolidated advance, if not checks if any parent
* has it