Running total of Part Transaction History Tracker Showing 0

Is there any reason that the running total field in part transaction history tracker would be showing a 0 (for all history) for a part that has several PUR-STK and STK-CUS transactions? It’s only like this in our Production environment. The total is correct in our other instances.

I don’t think that column has ever worked. Here’s a snippet you could use

--Create proc [dbo].[AshPartTranRunningTotal] 
--			@Company nvarchar(10) = null
--			,@PartNum nvarchar(30) = null
--			,@warehouse nvarchar(10) = null
--as

	select pt.company,
			pt.SysDate,
			pt.SysTime,	
			pt.trandate,
			pt.TranNum,
			pt.trantype,
			pt.TranClass,
			pt.partnum,
			pt.WareHouseCode,
			pt.WareHouse2,
			pt.BinNum,
			pt.BinNum2,
			pt.lotnum,
			pt.EntryPerson, 
			pt.extcost, 
			pt.InvAdjReason, 
			isnull(rs.Description,'') as 'Reason',
			PT.TranQty,
			SignedTranQty = (case when PT.TranType IN ('STK-ASM', 'STK-CUS','STK-STK', 'STK-INS', 'STK-KIT', 'STK-FAM', 'STK-MTL', 'STK-PLT', 'STK-UKN', 'STK-DMR') then -1
								when PT.TranType IN ('ADJ-QTY','AST-STK', 'DMR-STK', 'INS-STK', 'MFG-STK', 'PLT-STK', 'PUR-STK', 'STK-STK', 'SVG-STK') then 1
								else 0
							end) * PT.TranQty,
			pt.UM,
			RunningTotal = SUM(CASE WHEN PT.TranClass IN ('A','R') THEN PT.TranQty * 1 
									WHEN PT.TranClass IN ('I','S') THEN -1 * PT.TranQty END) 
								OVER (PARTITION BY PT.Company, PT.PartNum, PT.LotNum, pt.WareHouseCode,pt.BinNum ORDER BY PT.TranNum ROWS UNBOUNDED PRECEDING)
		FROM Ashworth.Erp.PartTran pt (nolock)
			LEFT JOIN Ashworth.Erp.Reason rs (nolock) ON	pt.Company = rs.Company AND	pt.InvAdjReason = rs.ReasonCode and ReasonType='M'
			INNER JOIN Ashworth.Erp.Warehse wh (nolock) ON pt.Company = wh.Company AND pt.WareHouseCode = wh.WarehouseCode
			INNER JOIN Ashworth.Erp.WhseBin wb (nolock) ON pt.Company = wb.Company AND pt.WareHouseCode = wb.WarehouseCode AND pt.BinNum = wb.BinNum AND	wh.WarehouseCode = wb.WarehouseCode
		Where (@company = '*ALL*' or PT.Company = @company) and
			PT.partnum = @partnum and
			(@warehouse = '*ALL*' or PT.WareHouseCode = @warehouse)
		Order by PT.Company, PT.PartNum, PT.LotNum, pt.WareHouseCode,pt.BinNum,TranNum 
	end
2 Likes

You’re logged into site A and viewing the history of site B.

It’s a bug. I’ve never reported it.

#disaffected

2 Likes

Actually, a coworker discovered that the quantity bearing checkbox under the Site>Detail had been unchecked in production for some reason. It was still checked under the general detail tab. Ran the refresh QOH after that was checked and everything looks normal again.

1 Like

Ah, well, yes, that’s an example of Epicor telling the truth.

But the site bug just lies to you.