OBPIH-7542 Include items with no expiration date in the reorder report#5592
OBPIH-7542 Include items with no expiration date in the reorder report#5592kchelstowski merged 2 commits intodevelopfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5592 +/- ##
============================================
- Coverage 9.12% 8.50% -0.63%
+ Complexity 1170 1116 -54
============================================
Files 701 711 +10
Lines 45281 45572 +291
Branches 10851 10904 +53
============================================
- Hits 4131 3874 -257
- Misses 40497 41124 +627
+ Partials 653 574 -79 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if (expirationFilter == ExpirationFilter.REMOVE_EXPIRED_STOCK) { | ||
| return Restrictions.and(Restrictions.ge("ii.expirationDate", new Date()), Restrictions.gt("quantityOnHand", 0)) | ||
| } | ||
| return Restrictions.and(Restrictions.between("ii.expirationDate", new Date(), new Date() + expirationFilter.days), Restrictions.gt("quantityOnHand", 0)) |
There was a problem hiding this comment.
Previously, if this was not REMOVE_EXPIRED_STOCK you had exp date between today and today + exp filter days, now for this case, you have exp date greater than today + exp filter days (or null). Is this expected? Or should it still be a range with today's date and a today's date plus expiration filter days?
There was a problem hiding this comment.
@awalkowiak yeah, previously I implemented the opposite, so I INCLUDED only those that e.g. expire in 30 days. Now I switched the logic to REMOVE them as expected.
✨ Description of Change
Link to GitHub issue or Jira ticket:
Description:
📷 Screenshots & Recordings (optional)