Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The beginning balance is incorrect on the Inventory Trial Bal / Valuation Variance (10.640.00) report after closing Inventory for the year


Symptoms

When you return an inventory item by using an RFC sales order with a disposition of scrap, the BegBal for that item is not calculated correctly when the Inventory Module is closed into the new fiscal year. When this occurs the inventory item incorrectly appears on the Inventory Trial Bal / Valuation Variance (10.640.00) report even though the item balances on the Trial Balance (10.630.00) and the Inventory Valuation (10.620.00) reports.

↑ Back to the top


Cause

A bug was reported where the beginning balance was not calculated correctly when closing Inventory for the year for items having "return for scrap" transactions.   

↑ Back to the top


Resolution

Run the following script to update the BegBal for the incorrect items.  Replace the FiscYR value with your current fiscal year.

update I set i.user3=i.begbal, i.begbal=c.theBegBal
from ItemHist I
inner join (select sum(-ytdcogs+YTDCostAdjd-YTDCostIssd+YTDCostRcvd
+YTDCostTrsfrIn-YTDCostTrsfrOut) as theBegBal, invtid, siteid
from ItemHist where FiscYr<'2010'
group by invtid, siteid) c on I.InvtID=c.InvtID and i.SiteID=c.SiteID
inner join vr_10640_costvariance v on v.InvtID=I.InvtID and v.SiteID=I.SiteID
where I.FiscYr='2010' and i.User3=0


update I set i.user3=i.begqty, i.begqty=c.theBegQty
from Item2Hist I
inner join (select sum(-ytdQtysls+YTDqtyAdjd-YTDQtyIssd+YTDQtyRcvd
+YTDQtyTrsfrIn-YTDQtyTrsfrOut) as theBegqty, invtid, siteid
from Item2Hist where FiscYr<'2010'
group by invtid, siteid) c on I.InvtID=c.InvtID and i.SiteID=c.SiteID
inner join vr_10640_Qtyvariance v on v.InvtID=I.InvtID and v.SiteID=I.SiteID
where I.FiscYr='2010' and i.User3=0

↑ Back to the top


Keywords: kbmbsmigrate, kbmbspartner, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2950119
Revision : 2
Created on : 2/3/2017
Published on : 2/3/2017
Exists online : False
Views : 71