Description |
Steps:
# Create new inventory adjustment for origin item.
# Post quantity change.
# Check inventory Valuation.
{color:#b22222} *Issue:* {color}
Inventory Adjustment posting is not using the cost on the screen, it is using the last cost in item setup.
select * from ptitmmst where ptitm_itm_no = '1025-12 '
!pastedImage_d85685_0.png!
!pastedImage_d85685_1.png!
We create the following script to find when origin item cost does not match i21 item cost.
Select ptitm_itm_no,
ptitm_desc,
ptitm_loc_no,
ptitm_avg_cost,
ptitm_on_hand,
strItemNo, i21.strDescription, strLocationNumber, dblAverageCost, dblUnitOnHand
from
(
select
ptitm_itm_no,
ptitm_desc,
ptitm_loc_no,
ptitm_avg_cost,
ptitm_on_hand,
ptitm_avg_cost*ptitm_on_hand as TotalValue
from ptitmmst
) as Origin
left join
(
select strItemNo, tblICItem.strDescription, strLocationNumber, dblAverageCost, dblUnitOnHand from tblICItemPricing
left join tblICItem on tblICItemPricing.intItemId = tblICItem.intItemId
left join tblICItemLocation on tblICItemPricing.intItemLocationId = tblICItemLocation.intItemLocationId
left join tblSMCompanyLocation on tblICItemLocation.intLocationId = tblSMCompanyLocation.intCompanyLocationId
left join tblICItemStock on tblICItem.intItemId = tblICItemStock.intItemId
and tblICItemLocation.intItemLocationId = tblICItemStock.intItemLocationId
---and strType = 'Inventory'
) as i21
on i21.strItemNo = ptitm_itm_no collate SQL_Latin1_General_CP1_CS_AS
and i21.strLocationNumber = ptitm_loc_no collate SQL_Latin1_General_CP1_CS_AS
where ptitm_avg_cost <> dblAverageCost
Acceptance: It should use the correct cost.
|