On occasions, a store will adjust out all of their stock by choosing “adjust all” rather than “adjust counted”.
In traxs_Stocktake_Adjust
-- @adjust_type -- 1 = Counted discrepancies only -- 2 = All discrepancies
You can use the following to reset the status from 3 to 1: traxs_Engineer_Stocktake_ResetStatusToSnapshot @session_no = ?
If the stocktake was completed (stocktake = 4), use the following to help you identify the movement and reverse it.
This is for Traxs (not hosted) version - from hosted you will need to use movement_hdr and movement_det
Look by day for recent stocktake
SELECT COUNT(*), CONVERT(date, date_time) FROM movements WHERE tran_type = 9 AND date_time > '2016-06-14' GROUP BY CONVERT(date, date_time)
For that day with suspicious movements take a closer look
SELECT * FROM movements WHERE Tran_type = 9 AND CONVERT(date, date_time) = '2016-06-21'
Find the related stocktake - for hosted you will need to use stocktake_hdr and stocktake_det
SELECT TOP 11 * FROM stocktake..stocktake_log WHERE adjusted_terminal = ? AND adjusted_doc = ?
For the bad adjustment
DECLARE @message varchar(100) EXEC traxs_Utility_MovementReverse @doc_terminal_id = ?, @doc_no = ?, @message = @message OUTPUT print @message
The status will then need to be reversed but not using traxs_Engineer_Stocktake_ResetStatusToSnapshot.