OBPIH-6641 Allow invoicing uncanceled order adjustments (even if it w…#4811
Conversation
…as already invoiced as a canceled)
| } | ||
|
|
||
| /** | ||
| * Overall inversed quantity for this adjustment. Expected is either 0 or 1. Should not be more than 1. |
There was a problem hiding this comment.
with that being said, I'm wondering if we shouldn't throw any exception if it turns out to be more than 1?
There was a problem hiding this comment.
This is rather just my "loud thinking" and I left it here just for the future (if someone would wonder what should be expected here). I think throwing an exception here or in the service that is using this one is not the best idea (the service rather ensures it's not already > 0 before creating the new inverse). So technically this Expected is either 0 or 1. Should not be more than 1. part of comment rather should land in the service, but there is already a very simple if check that is self-explanatory (that's why I left it here)
|
[DNM] I am going to add here a fix for the order summary issue |
grails-app/domain/org/pih/warehouse/order/OrderAdjustment.groovy
Outdated
Show resolved
Hide resolved
Co-authored-by: Alan Nadolny <[email protected]>
a5975d4
into
feature/OBPIH-6398-partial-invoices-for-prepaid-po
#4811) Co-authored-by: Alan Nadolny <[email protected]>
…as already invoiced as a canceled)
✨ Description of Change
Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-6641
Description:
If the adjustment was canceled -> invoiced (as canceled, with quantity 0) -> uncanceled, then it should be possible to invoice it again with full (1) quantity.
📈 Test Plan
✅ Quality Checks
[OBS-123]for Jira,[#0000]for GitHub, or[OBS-123, OBPIH-123]if there are multiple), or with[N/A]if not applicable