When testing and I noticed that it is possible to make Stock on Hand a negative number. As for now it is a bit unclear what exactly causes the bug. A few files attached for better understanding of the issue.
Mind that this is not the only way to reproduce this bug. The SoH value can be influenced through Requisitions, Physical Inventory, Adjustments etc.
Redeploy application to UAT server to make sure you operate on the same numbers
Log in as an administrator
Go to Stock Management → Adjustments → Family Planning → choose Levora lot MA2017A and submit 13 lost items
Go to Stock Management → Issue → Family Planning → Levora MA2017A → transfer out 11 items to Balaka
Go to Stock Management → Stock on Hand → Family Planning → everything should be OK in numbers, check if it is
Go to Stock Management → Physical Inventory → Family Planning → set everything just as it is except for Levora lot MA2017A (set it to 50 instead of 66, no reasons)
Go to Stock Management → Stock on Hand → notice diifferent Stock on Hand’s values
Go to Stock Management → Issue → Family Planning → transfer out to Balaka 40 items (more than in visible SoH) of Levora lot MA2017A
Go to Stock Management → Stock on Hand → notice how confusing the numbers are looking now
Go to Stock Management → Adjustments → SoH should be e negative number → notice that you can declare 8 damaged items but not 12 (different SoH values are in use now - visible and the real one)
1. Stock on Hand cannot be a negative number at any time and it should always show the correct value