OBPIH-6497 Fix comparing invoice quantities in UoM and in standard Uom#4781
OBPIH-6497 Fix comparing invoice quantities in UoM and in standard Uom#4781awalkowiak merged 1 commit intodevelopfrom
Conversation
|
@awalkowiak can you explain the difference between standard UOM vs. non-standard and when we want to use each? I'm not clear which is supposed to be used in any given scenario |
| return hasPrepaymentInvoice | ||
| } | ||
|
|
||
| return true |
There was a problem hiding this comment.
can be simplified to return !canceled || hasPrepaymentInvoice if you want
There was a problem hiding this comment.
Yeah, when I was doing the improvements to fix some edge cases, I wanted to keep it as clear as possible, to avoid any further confusion. I want to add a separate subtask for adding more tests (and improving currently existing ones) that will be done after the solution is working properly, then this could be changed to a one-liner there, if this is preferable.
| return hasPrepaymentInvoice | ||
| } | ||
|
|
||
| return true |
There was a problem hiding this comment.
same here. Can be simplified to return !canceled || hasPrepaymentInvoice if you want
|
@ewaterman sure: I know that there are some plans for the upcoming release(s) to make this less confusing. |
|
|
||
| Boolean hasInvoiceableOrderItem() { | ||
| return orderItems.any { it.invoiceable } | ||
| return orderItems.any { it.canBeOnRegularInvoice() && it.invoiceable } |
There was a problem hiding this comment.
Can we not move the canBeOnRegularInvoice methods to within the invoiceable methods? Do we ever need to know if an item/adjustment is invoiceable outside of the context of generating a regular invoice for it?
There was a problem hiding this comment.
It has to be separate for checking if the order isFullyInvoiceble. The canBeOnRegularInvoice still could be part of invoiceable for this case that you pointed out, but since I needed it separately for another place, I decided not to combine these together (at least for now).
✨ Description of Change
Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-6497
Description:
This is a fix to issues found during QA. Turned out that we had a few places that were mixing up quantities in UoM and quantities in standard UoM.
📈 Test Plan
Description of test plan (if applicable):
✅ 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