OBPIH-6688 modify method checking if order adjustment is invoiceable#4843
Merged
awalkowiak merged 6 commits intorelease/0.9.2-hotfix1from Sep 17, 2024
Conversation
| return !postedPurchaseInvoiceItems.empty | ||
| } | ||
|
|
||
| HashSet<InvoiceItem> getInvoicedItems() { |
Collaborator
There was a problem hiding this comment.
Set should be the type here. We should use interfaces as types instead of a particular implementation of that interface, which is HashSet in this case.
| return invoiceItems?.findAll { it.invoice.isRegularInvoice && !it.inverse } | ||
| } | ||
|
|
||
| HashSet<InvoiceItem> getInverseItems() { |
01c60ea to
3aa006d
Compare
awalkowiak
reviewed
Sep 17, 2024
| "hasPrepaymentInvoice", | ||
| "hasRegularInvoice", | ||
| "disableRefresh", | ||
| "amountInvoiced", |
Collaborator
There was a problem hiding this comment.
Do you still have a transient for this? Is this potentially for the same thing as getInvoicedAmount?
Collaborator
Author
There was a problem hiding this comment.
don't need it, removing it now
awalkowiak
approved these changes
Sep 17, 2024
alannadolny
reviewed
Sep 17, 2024
Comment on lines
-159
to
+183
| return hasPrepaymentInvoice && !hasRegularInvoice && order.placed | ||
| } | ||
| Boolean invoicedFullAmount = invoicedAmount == totalAdjustments | ||
|
|
||
| // If is not canceled and has regular invoice, check if by any chance it was invoiced as cancelled | ||
| if (!canceled && hasRegularInvoice) { | ||
| return invoicedQuantity == 0 && order.placed | ||
| if (canceled) { | ||
| return hasPrepaymentInvoice && !hasRegularInvoice && order.placed && !invoicedFullAmount | ||
| } | ||
|
|
||
| return !hasRegularInvoice && order.placed | ||
| return order.placed && !invoicedFullAmount |
Collaborator
There was a problem hiding this comment.
Don't we need to change the comment above about when the order adjustment is invoiceable?
alannadolny
approved these changes
Sep 17, 2024
jwalbers
pushed a commit
to jwalbers/openboxes
that referenced
this pull request
Oct 29, 2024
jwalbers
pushed a commit
to jwalbers/openboxes
that referenced
this pull request
Oct 31, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Description of Change
Link to GitHub issue or Jira ticket: OBPIH-6688
Description:
The is invoiced transient value should handle case where we are trying to check if adjusment is invoiceable when there is only partially invoiced amount.
📷 Screenshots & Recordings (optional)