Wrong stock out days calculations

Description

Reproduce steps

  1. Go to Stock on Hand Page and find any item which haven’t been updated for few months and its SOH = 0 (if there isn’t any make a physical inventory with proper date)

2. Make sure that the requisition template is calculated basing on stock

3. Initiate the requisition for the next period (after the last product update, in this case June 2017) - the SOH is calculated as a difference between the last and first day between this period, delete this form

4. Make Physical Inventory - make sure that you entered the 0 for tested product (I chose the 15.06.2022)

5. Initiate the requisition once again - the Stockout days changed to 15 what is the difference between the last day of reporting period and the day from the last PI proceeded in this month)

 

To do

  1. Find exactly where the this calculation happens on backend

  2. Fix the issue

  3. On local machine make sure that everything is properly calculated

 

Expected behavior

If the product stock was 0 for the whole month the SOD should be displayed as a difference between last and first days of reporting period regardless the inventory was made or not.

Environment

None

Attachments

5

Checklists

Activity

Szymon Rujner August 31, 2022 at 1:21 PM

  • Checked on Chrome and Firefox via UAT instance;

  • Issue is no longer reproducing;

Michał Józefów August 31, 2022 at 9:51 AM

All changes has been uploaded on test and UAT instances. you can go ahead with testing. Now stock out days calculation should count correctly.

Nikola Laskowska August 29, 2022 at 6:30 AM

the fix has been merged, please make sure that it is on test and UAT instances ready for Szymon to test.

Michał Józefów August 25, 2022 at 3:09 PM

Kamil has fixed jenkins problem, and pipelines build succeed. Now everything with PR seems to be correct

Michał Józefów August 25, 2022 at 9:46 AM

I have pushed commit regarding changelog update. There is still some jenkins problem on master branch, Kamil is working on it.

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Original estimate

Time tracking

2w 1d 5h 30m logged

Fix versions

Affects versions

Priority

Time Assistant

Created June 22, 2022 at 7:13 AM
Updated February 28, 2025 at 2:08 PM
Resolved August 31, 2022 at 2:17 PM