Skip to content

OBPIH-6641 Allow invoicing uncanceled order adjustments (even if it w…#4811

Merged
awalkowiak merged 3 commits intofeature/OBPIH-6398-partial-invoices-for-prepaid-pofrom
OBPIH-6641
Aug 30, 2024
Merged

OBPIH-6641 Allow invoicing uncanceled order adjustments (even if it w…#4811
awalkowiak merged 3 commits intofeature/OBPIH-6398-partial-invoices-for-prepaid-pofrom
OBPIH-6641

Conversation

@awalkowiak
Copy link
Collaborator

…as already invoiced as a canceled)

✨ Description of Change

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

Description:
If the adjustment was canceled -> invoiced (as canceled, with quantity 0) -> uncanceled, then it should be possible to invoice it again with full (1) quantity.


📈 Test Plan

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

✅ Quality Checks

  • 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

@github-actions github-actions bot added the domain: backend Changes or discussions relating to the backend server label Aug 29, 2024
}

/**
* Overall inversed quantity for this adjustment. Expected is either 0 or 1. Should not be more than 1.
Copy link
Collaborator

Choose a reason for hiding this comment

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

with that being said, I'm wondering if we shouldn't throw any exception if it turns out to be more than 1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is rather just my "loud thinking" and I left it here just for the future (if someone would wonder what should be expected here). I think throwing an exception here or in the service that is using this one is not the best idea (the service rather ensures it's not already > 0 before creating the new inverse). So technically this Expected is either 0 or 1. Should not be more than 1. part of comment rather should land in the service, but there is already a very simple if check that is self-explanatory (that's why I left it here)

Copy link
Collaborator

Choose a reason for hiding this comment

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

sounds good

@awalkowiak
Copy link
Collaborator Author

[DNM] I am going to add here a fix for the order summary issue

@awalkowiak awalkowiak added the warn: do not merge Marks a pull request that is not yet ready to be merged label Aug 30, 2024
Co-authored-by: Alan Nadolny <[email protected]>
@github-actions github-actions bot added the flag: schema change Hilights a pull request that contains a change to the database schema label Aug 30, 2024
@awalkowiak awalkowiak removed the warn: do not merge Marks a pull request that is not yet ready to be merged label Aug 30, 2024
@awalkowiak awalkowiak merged commit a5975d4 into feature/OBPIH-6398-partial-invoices-for-prepaid-po Aug 30, 2024
@awalkowiak awalkowiak deleted the OBPIH-6641 branch August 30, 2024 15:46
awalkowiak added 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 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.

4 participants