OBPIH-7032 Complete count after count with no discrepancy or after recount#5109
OBPIH-7032 Complete count after count with no discrepancy or after recount#5109
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5109 +/- ##
============================================
+ Coverage 8.09% 8.13% +0.03%
- Complexity 934 942 +8
============================================
Files 636 636
Lines 43086 43098 +12
Branches 10477 10478 +1
============================================
+ Hits 3488 3505 +17
+ Misses 39057 39050 -7
- Partials 541 543 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
awalkowiak
left a comment
There was a problem hiding this comment.
overall looks ok, but I have a minor question
|
|
||
| // The count completed successfully so update the request status to match and commit the adjustments. | ||
| cycleCount.cycleCountRequest.status = CycleCountRequestStatus.COMPLETED | ||
| cycleCountTransactionService.createTransactions(cycleCount, refreshQuantityOnHand) |
There was a problem hiding this comment.
Would it not be better to create a transaction and close afterward?
There was a problem hiding this comment.
sure I can flip these but this whole call is wrapped in a @Transactional so ultimately the order shouldn't matter much. If it fails at any point the whole thing should get rolled back
|
I'm merging this as the only real change I made was addressing the one comment |
✨ Description of Change
Link to GitHub issue or Jira ticket: https://pihemr.atlassian.net/browse/OBPIH-7032
Description: We're implementing the review and approval flows in 0.9.5 so this is a simple refactor to move the count straight to the COMPLETED state after a count is submitted with no discrepancies or after a recount is submitted (with or without discrepancies).
Please merge this after #5092. It fixes a bug in the product availability flow that this change uses.
📷 Screenshots & Recordings (optional)
https://jam.dev/c/1eb79d37-3ef4-4e77-bae7-9ebbbb9cb424
(There are two product inventories because I tested the same product twice.)