Skip to content

Commit

Permalink
Merge pull request #32 from barsifedron/31-period-report-does-not-ret…
Browse files Browse the repository at this point in the history
…urn-the-proper-number-of-loans

 #31 : fix period report
  • Loading branch information
barsifedron authored Sep 9, 2024
2 parents 6084b28 + ae0c3f6 commit ae67f28
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public ReportDto handle(GetPeriodReportQuery query) {
Map<ItemId, Group> periodLoans = new JPAQueryFactory(entityManager)
.from(loan, item)
.where(
loan.itemId.eq(item.id),
loan.effectiveReturnOn.isNotNull(),
loan.borrowedOn.after(query.periodStartDate.minusDays(1)),
loan.effectiveReturnOn.before(query.periodEndDate.plusDays(1)))
Expand Down

0 comments on commit ae67f28

Please sign in to comment.