Skip to content

OBPIH-6691 Add partially invoiced order summary status for order adjustments#4884

Merged
awalkowiak merged 1 commit intorelease/0.9.2-hotfix1from
OBPIH-6691-3
Oct 9, 2024
Merged

OBPIH-6691 Add partially invoiced order summary status for order adjustments#4884
awalkowiak merged 1 commit intorelease/0.9.2-hotfix1from
OBPIH-6691-3

Conversation

@alannadolny
Copy link
Collaborator

✨ Description of Change

Link to GitHub issue or Jira ticket: https://pihemr.atlassian.net/browse/OBPIH-6691

Description:
This reopen was due to the following behavior:
- Create PO, add an item, and adjustment with a percentage value for that item
- Generate prepayment invoice
- Generate final invoice for adjustment
- Edit unit price/qty of the item to lower value
- Generate final invoice pending value difference for adjustment
- Ship item
- Generate invoice for item
See that status remains Partially Invoiced.

This issue was caused by the fact, that if we are editing an order item that is bound with order adjustment we have to invoice the value difference, which is a negative value, but the value of the adjustment is positive. After summing the absolute amount values for the order we had, for example:

  • total_adjustments: 0.2
  • invoiced_adjustments_amount: 1
    invoicing the "difference" in values is the only case when we are able to invoice the same order adjustment with negative and positive values because we have validation for that in every editting.

@alannadolny alannadolny self-assigned this Oct 8, 2024
@github-actions github-actions bot added the flag: schema change Hilights a pull request that contains a change to the database schema label Oct 8, 2024
@awalkowiak awalkowiak merged commit cc3c531 into release/0.9.2-hotfix1 Oct 9, 2024
@awalkowiak awalkowiak deleted the OBPIH-6691-3 branch October 9, 2024 08:42
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flag: schema change Hilights a pull request that contains a change to the database schema

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants