"CASE  WHEN a.ID_Movement_Type='T' THEN 8100 
WHEN a.ID_Movement_Type='U' THEN 8005 
WHEN a.ID_Movement_Type='V' THEN 8000 
WHEN a.Id_Movement_Type = 'L' AND a.Id_Movement_SubType = '5' AND a.Id_Movement_Sub_Subtype = '26' THEN 10394
WHEN a.Id_Movement_Type = 'L' AND a.Id_Movement_SubType = '5' AND a.Id_Movement_Sub_Subtype = '27' THEN 8027
WHEN a.Id_Movement_Type = 'L' AND a.Id_Movement_SubType = '5' AND a.Id_Movement_Sub_Subtype = '29' THEN 8029 -- 8100
WHEN a.Id_Movement_Type = 'L' AND a.Id_Movement_SubType = '5' AND a.Id_Movement_Sub_Subtype = '28' THEN 8000
WHEN a.Id_Movement_Type = 'L' AND a.Id_Movement_SubType = '5' AND a.Id_Movement_Sub_Subtype = '60' THEN 6734
WHEN a.Id_Movement_Type = '0' AND a.Id_Movement_SubType = '233' AND a.Id_Movement_Sub_Subtype IS NULL THEN 8233
WHEN a.Id_Movement_Type = '0' AND a.Id_Movement_SubType = '104' AND a.Id_Movement_Sub_Subtype IS NULL THEN 8100
ELSE a.Destination_Id_Store END"
