Skip to content

OBPIH-6724 Fix invoice item count on invoice list page#4859

Merged
awalkowiak merged 1 commit intorelease/0.9.2-hotfix1from
feature/OBPIH-6724-incorrect-number-of-items-count-on-invoices-list-for-purchase-invoices-for-prepaid-p-os
Sep 25, 2024
Merged

OBPIH-6724 Fix invoice item count on invoice list page#4859
awalkowiak merged 1 commit intorelease/0.9.2-hotfix1from
feature/OBPIH-6724-incorrect-number-of-items-count-on-invoices-list-for-purchase-invoices-for-prepaid-p-os

Conversation

@drodzewicz
Copy link
Collaborator

@drodzewicz drodzewicz commented Sep 24, 2024

ignore inverse items

✨ 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: OBPIH-6724

Description:
Ignore the inverse items when counting invoice items on invoice list page


📷 Screenshots & Recordings (optional)

If this PR contains a UI change, consider adding one or more screenshots here or link to a screen recording to help reviewers visualize the change. Otherwise, you can remove this section.

@drodzewicz drodzewicz self-assigned this Sep 24, 2024
@github-actions github-actions bot added type: feature A new piece of functionality for the app flag: schema change Hilights a pull request that contains a change to the database schema labels Sep 24, 2024
LEFT JOIN reference_number ON invoice_reference_number.reference_number_id = reference_number.id AND reference_number.reference_number_type_id = 'VENDOR_INVOICE_NUMBER'
LEFT JOIN party ON invoice.party_id = party.id
LEFT JOIN invoice_type ON invoice.invoice_type_id = invoice_type.id
WHERE invoice_item.inverse IS FALSE
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure how it works now because we have the migration for the old data, but maybe it would be better to check if this field is null, just to be safe in case when something didn't go well with the migration?

@awalkowiak awalkowiak merged commit 3fce947 into release/0.9.2-hotfix1 Sep 25, 2024
@awalkowiak awalkowiak deleted the feature/OBPIH-6724-incorrect-number-of-items-count-on-invoices-list-for-purchase-invoices-for-prepaid-p-os branch September 25, 2024 13:00
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 type: feature A new piece of functionality for the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants