Validation in goods issue - Warehouse according to Branch Code----
--IF @transaction_type IN ('A', 'U') AND @Object_type = '60'
--BEGIN
-- Declare @DocEn1 as int
-- Declare @line1 as int
-- Declare @BranchCode1 as varchar(max)
-- Declare @J as int
-- Declare @Wh1 as varchar(max)
-- set @J =0
-- set @BranchCode1=(select U_BranchCode from OIGE where DocEntry= @list_of_cols_val_tab_del)
-- set @DocEn1=(select DocEntry from OIGE where DocEntry=@list_of_cols_val_tab_del)
-- set @line1=(SELECT MAX(LINEnUM) FROM IGE1 WHERE DocEntry=@DocEn1)
-- while(@J<=@line1)
-- BEGIN
-- set @Wh1=(select WhsCode from IGE1 where DocEntry=@DocEn1 and LineNum=@J)
-- set @J=@J+1
-- if(@BranchCode1='DIV2' or @BranchCode1='UNIT -2' )
-- BEGIN
-- if(@Wh1 not like'%U2')
-- BEGIN
-- SELECT @Error = 1,
-- @error_message = 'Please selet warehouse according to BrachCode.'
-- END
-- END
-- if(@BranchCode1='DIV1' or @BranchCode1='UNIT - 1')
-- BEGIN
-- if(@Wh1 like'%U2')
-- BEGIN
-- SELECT @Error = 1,
-- @error_message = 'Please selet warehouse according to BrachCode.'
-- END
-- END
-- END
--END