itemsite_location_comments,
itemsite_notes,
itemsite_perishable,
- itemsite_nnqoh,
itemsite_autoabcclass,
itemsite_ordergroup,
itemsite_disallowblankwip,
new.itemsite_location_comments,
new.itemsite_notes,
coalesce(new.itemsite_perishable, false),
- 0,
coalesce(new.itemsite_autoabcclass, false),
coalesce(new.itemsite_ordergroup, 1),
coalesce(new.itemsite_disallowblankwip, false),
(itemsite_qtyonhand + (_sense * pQty)),
itemsite_costmethod, itemsite_value,
-- sanity check to ensure that value = 0 when qtyonhand = 0
- CASE WHEN ((itemsite_qtyonhand + (_sense * pQty)) + itemsite_nnqoh) = 0.0 THEN 0.0
+ CASE WHEN ((itemsite_qtyonhand + (_sense * pQty))) = 0.0 THEN 0.0
ELSE itemsite_value + (_r.cost * _sense * pQty)
END,
pOrderType, pOrderNumber, pDocNumber, pComments,