Skip to content

[OBPIH-6659] Display quantity of invoiced items only after invoice has been posted#4819

Merged
awalkowiak merged 1 commit intofeature/OBPIH-6398-partial-invoices-for-prepaid-pofrom
bugfix/OBPIH-6659-incorrect-content-of-invoiced-column-on-item-status-tab-on-po
Sep 3, 2024
Merged

[OBPIH-6659] Display quantity of invoiced items only after invoice has been posted#4819
awalkowiak merged 1 commit intofeature/OBPIH-6398-partial-invoices-for-prepaid-pofrom
bugfix/OBPIH-6659-incorrect-content-of-invoiced-column-on-item-status-tab-on-po

Conversation

@drodzewicz
Copy link
Collaborator

@drodzewicz drodzewicz commented Sep 3, 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: OBPIH-6659

Description:
Issue was that when user would generate a partial invoice but "save & exit" instead of posting, it would display invoiced quantity on Item statuses. The expected behavior is that the quantity invoiced should display only after the the invoice has been posted


📷 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.


📈 Test Plan

We require that all code changes come paired with a method of testing them. Please select which of the following testing approaches you've included with this change:

  • Frontend automation tests (unit)
  • Backend automation tests (unit, API, smoke)
  • End-to-end tests (Playwright)
  • Manual tests (please describe below)
  • Not Applicable

Description of test plan (if applicable):


✅ Quality Checks

Please confirm and check each of the following to ensure that your change conforms to the coding standards of the project:

  • The pull request title is prefixed with the issue/ticket number (Ex: [OBS-123] for Jira, [#0000] for GitHub, or [OBS-123, OBPIH-123] if there are multiple), or with [N/A] if not applicable
  • The pull request description has enough information for someone without context to be able to understand the change and why it is needed
  • The change has tests that prove the issue is fixed / the feature works as intended

@drodzewicz drodzewicz self-assigned this Sep 3, 2024
@github-actions github-actions bot added type: bug Addresses unintended behaviours of the app domain: frontend Changes or discussions relating to the frontend UI domain: backend Changes or discussions relating to the backend server labels Sep 3, 2024
@drodzewicz drodzewicz force-pushed the bugfix/OBPIH-6659-incorrect-content-of-invoiced-column-on-item-status-tab-on-po branch from 1bd951a to de42ec5 Compare September 3, 2024 10:42
return allInvoiceItems?.findAll {
it?.invoice?.datePosted != null && !it?.invoice?.isPrepaymentInvoice && !it.inverse
}?.collect { it.quantity }?.sum() ?: 0
}?.sum { it.quantity } ?: 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume the quantity cannot be null right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Your assumption is correct

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep

@awalkowiak awalkowiak merged commit 45bb93d into feature/OBPIH-6398-partial-invoices-for-prepaid-po Sep 3, 2024
@awalkowiak awalkowiak deleted the bugfix/OBPIH-6659-incorrect-content-of-invoiced-column-on-item-status-tab-on-po branch September 3, 2024 10:54
awalkowiak pushed a commit that referenced this pull request Sep 6, 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 domain: frontend Changes or discussions relating to the frontend UI type: bug Addresses unintended behaviours of the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants