Skip to content

OBPIH-7230 still create baseline transaction if QoH is zero#5517

Merged
ewaterman merged 4 commits intodevelopfrom
ft/OBPIH-7230-baseline-when-zero-qoh
Oct 3, 2025
Merged

OBPIH-7230 still create baseline transaction if QoH is zero#5517
ewaterman merged 4 commits intodevelopfrom
ft/OBPIH-7230-baseline-when-zero-qoh

Conversation

@ewaterman
Copy link
Member

✨ Description of Change

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

Description: We rely on the existance of transactions for last counted date, so even when we do a count on a product with no quantity and we count no quantity again, we still want that count action to be tracked and update last counted date.

This change will insert a baseline with quantity zero in the default lot and bin in the above scenario.


📷 Screenshots & Recordings (optional)

First I set the stock to zero with a record stock, then I did a second record stock, also setting stock to zero. You can see that we still create the second baseline in that scenario, even though there's no stock at the time
Screenshot from 2025-09-26 14-49-42

@ewaterman ewaterman self-assigned this Sep 26, 2025
@github-actions github-actions bot added type: feature A new piece of functionality for the app domain: backend Changes or discussions relating to the backend server labels Sep 26, 2025
@ewaterman ewaterman requested review from SebastianLib, alannadolny, awalkowiak and kchelstowski and removed request for alannadolny September 26, 2025 22:59
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.

I think it looks good to me (there is one redundant method)

return map.entrySet()
}

boolean isEmpty() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this used?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so. I must have removed where I was using this.

@codecov
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.12%. Comparing base (1bb7314) to head (65708a4).
⚠️ Report is 138 commits behind head on develop.

Files with missing lines Patch % Lines
...nventory/ProductInventoryTransactionService.groovy 54.54% 3 Missing and 2 partials ⚠️
...ces/org/pih/warehouse/data/MigrationService.groovy 0.00% 2 Missing ⚠️
...rehouse/importer/InventoryImportDataService.groovy 0.00% 1 Missing ⚠️
...ntory/product/availability/AvailableItemMap.groovy 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             develop   #5517   +/-   ##
=========================================
  Coverage       9.12%   9.12%           
  Complexity      1170    1170           
=========================================
  Files            701     701           
  Lines          45281   45281           
  Branches       10851   10851           
=========================================
  Hits            4131    4131           
  Misses         40497   40497           
  Partials         653     653           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ewaterman ewaterman merged commit e72e5f3 into develop Oct 3, 2025
7 checks passed
@ewaterman ewaterman deleted the ft/OBPIH-7230-baseline-when-zero-qoh branch October 3, 2025 22:28
@ewaterman
Copy link
Member Author

Just to be verbose, I reverted the change in #5526 as a part of this PR. That PR was designed to be a temporary fix that was meant only for release/0.9.5-hotfix3. This PR is the "proper" solution.

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: feature A new piece of functionality for the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants