Connect to stores SQL and run the following select case on to show all mobile download headers.
SELECT TOP 1000 [stamp] ,[mobile_data_id] ,[terminal_id] ,[user_no] ,[date_time] ,[download_type] ,[description] ,[complete] ,[used_for] ,[doc_terminal_id] ,[doc_no] FROM [priarch].[dbo].[mobile_data_hdr] order by date_time desc
Obtain the mobile download ID of the acquire mobile download that needs re-instating. Use the mobile download ID in the following select statement to return all products in that mobile download and confirm with store.
SELECT TOP 1000 [stamp] ,[row_id] ,[mobile_data_id] ,[quantity] ,[quantity_adjusted] ,[barcode] ,[location] ,[product] ,[whs_location] ,[location2] ,[whs_location2] ,[manual_addition] ,[deleted] ,[complete] FROM [priarch].[dbo].[mobile_data_det] where mobile_data_ID = '?'
The number of rows corresponds to the number of items in the mobile download. Once confirmed with store, use the following two update statements to change the “Complete” flags to 0 (0 = Not complete, 1 = Complete) so the download appears back onto the stores Traxs. These will change the flags in the hdr table and the det table.
begin transaction Update [priarch].[dbo].[mobile_data_hdr] set complete = 0 where mobile_data_id = '?' Update [priarch].[dbo].[mobile_data_det] set complete = 0 where mobile_data_id = '?' --commit transaction
Once happy with data, use the “commit transaction” to finalise the change and check the stores Traxs under “Mobile Downloads” to confirm the download has been re-instated. Once confirmed, notify the store.