Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stock adjustement: newmoh calculation in stockmoves
02-26-2022, 04:50 AM, (This post was last modified: 02-26-2022, 04:56 AM by HDeriauFF.)
#1
Stock adjustement: newmoh calculation in stockmoves
    Hello webERP folks

Weberp 4.14.1

We recently discovered an inventory item with inaccurate values for the column newqoh in the stockmoves table after an inventory adjustment was made:

1219 + 16 should lead to 1235 instead of 1248. (see attachment )

Stock movements recorded from sales and purchases update the newqoh with: newqoh[i] =newqoh[i-1] + + (or -) quantity   

Looking at the code in StockAdjustments.php,  line 200:
Code:
// Need to get the current location quantity will need it later for the stock movement
        $SQL="SELECT locstock.quantity
            FROM locstock
            WHERE locstock.stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "'
            AND loccode= '" . $_SESSION['Adjustment' . $identifier]->StockLocation . "'";


it doesn't take the previous newmoh, but the full locstock.

So if an order is out of quotation with the item but not invoiced (qoh <> locstock) and someone makes an inventory adjustment during that time we have the problem leading to an inflated newmoh

Let me know what you think

Also, inventory adjustments are not displayed in StockMovements.php, any reason why?

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)