Does anyone know the criteria required to produce system message 143 when changing an inventory item from non-stock (inventory.stkitem) to stock by checking the "Stock Item" checkbox on Inventory Item 10.250.00.
The stored proc or query that is called would be helpful. I know that any open Purchase Orders, Sales Orders and transaction batches will cause this issue. This item has all transactions closed. However, the "On purchase Order" quantity is 4. Unfortunately, inventory integrity check - recal on order quantities does not recalc items that are flagged as non-stock.
Update ItemSite Set QtyonPO = Coalesce(Round((Select Sum(Case When d.QtyOrd > d.QtyRcvd Then Case When d.CnvFact = 0
Then d.QtyOrd - d.QtyRcvd
Else Case When d.UnitMultDiv = 'D'
Then Round((d.QtyOrd - d.QtyRcvd) / d.CnvFact, @DecPlQty)
Else Round((d.QtyOrd - d.QtyRcvd) * d.CnvFact, @DecPlQty)
End
End Else 0 End)
From PurchOrd p Join PurOrdDet d
On p.PONbr = d.PONbr
Join Inventory i
On d.Invtid = i.Invtid
Where d.Invtid = ItemSite.InvtId and d.Siteid = ItemSite.SiteId and p.Status IN ('O','P')
And p.POType IN ('OR','DP') And i.Stkitem = 1 And d.OpenLine = 1), @DecPlQty), 0)