Skip to content

OBPIH-6726 Bugfix to allow pre-migration prepayment invoices to be edited#4852

Merged
ewaterman merged 3 commits intorelease/0.9.2-hotfix1from
bugfix/OBPIH-6726-edit-migrated-prepayment-invoices
Sep 23, 2024
Merged

OBPIH-6726 Bugfix to allow pre-migration prepayment invoices to be edited#4852
ewaterman merged 3 commits intorelease/0.9.2-hotfix1from
bugfix/OBPIH-6726-edit-migrated-prepayment-invoices

Conversation

@ewaterman
Copy link
Member

@ewaterman ewaterman commented Sep 19, 2024

✨ Description of Change

A concise summary of what is being changed. Please provide enough context for reviewers to be able to understand the change and why it is necessary. If the issue/ticket already provides enough information, you can put "See ticket" as the description.

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

Description: See ticket for the full breakdown. This fix is to ensure that when migrating existing invoices we're properly creating an inverse invoice item for each matching shipment item in a regular invoice. Previously we were only checking the prepayment invoice item, which is based on order item and so had no shipment association. This worked fine for cancelled items and adjustments, but for orders with shipments, the invoice needs to be built off of the regular invoice item (which itself is built from shipment items).

A diagram to help me understand the complex relationships going on here:

image

@ewaterman ewaterman self-assigned this Sep 19, 2024
@github-actions github-actions bot added type: bug Addresses unintended behaviours of the app domain: backend Changes or discussions relating to the backend server labels Sep 19, 2024
Copy link
Collaborator

@awalkowiak awalkowiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a first sight it looks good to me, but I'd like to test it locally with my recent changes as well, before merging

@ewaterman ewaterman merged commit 25b38ca into release/0.9.2-hotfix1 Sep 23, 2024
@ewaterman ewaterman deleted the bugfix/OBPIH-6726-edit-migrated-prepayment-invoices branch September 23, 2024 14:26
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

domain: backend Changes or discussions relating to the backend server type: bug Addresses unintended behaviours of the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants