<% compCodes = session[:loggedUserCompCode] usersLoginId = session[:autherizedUserId] @alwcompcode = compCodes @MstXComp = MstCompany.select('cmp_logos,cmp_raw_material,cmp_multi_loc,cmp_godam_allowed,cmp_negative_stock').where("cmp_companycode = ? ",compCodes).first @xLogUser = User.where("usercompcode = ? AND id = ? ",compCodes,usersLoginId).first @mstcount = 0 @pdcount = 0 @trncount = 0 @confcount = 0 @rptcount = 0 if @xLogUser @xLogPermission = @xLogUser.userpermission @xRestrictLog = @xLogPermission.split(",") @usersType = @xLogUser.usertype.to_s end if @xLogUser if @xRestrictLog.length >0 @xRestrictLog.each do | chkp | if chkp =='USR' || chkp =='CST' || chkp =='GRP' || chkp =='SLS' || chkp =='LOC' @mstcount = 1 end if chkp =='PRD' || chkp =='BRD' || chkp =='CAT' || chkp =='UOM' || chkp =='PGP' @pdcount = 1 end if chkp =='INV' || chkp =='P' || chkp =='PR' || chkp =='SR' || chkp =='PMT' || chkp =='RCV' @trncount = 1 end if chkp =='RS' || chkp =='RP' || chkp =='RPR' || chkp =='RSR' || chkp =='RPMT' || chkp =='RRCV' || chkp =='RENP' || chkp =='RCHQ' || chkp =='RLG' || chkp =='RLGS' @rptcount = 1 end if chkp =='COP' @confcount = 1 end end end end %> <% @xA = 0 @xU = 0 @xP = 0 @xPR = 0 @xL = 0 @xLS = 0 @xGP = 0 @xSM = 0 @xM = 0 @xRV = 0 @xBL = 0 @xBR = 0 @xTL = 0 @xT1 = 0 @xPY = 0 @xRP = 0 @xPD = 0 @xPM = 0 @allModules = MstModule.where("mds_compcode = ?",compCodes).first if @allModules @gmodules = @allModules.mds_modules.to_s @getmodules = @gmodules.split(',') if @getmodules.include?('T') @xL = 1 @xGP = 1 @xSM = 1 @xTL = 1 @xM = 1 end if @getmodules.include?('B') @xU = 1 @xL = 1 @xLS = 1 @xGP = 1 @xSM = 1 @xM = 1 @xRV = 1 @xBL = 1 @xBR = 1 @xTL = 1 @xT1 = 1 @xRP = 1 @xPM = 1 end if @getmodules.include?('I') @xU = 1 @xP = 1 @xPR = 1 @xL = 1 @xLS = 1 @xGP = 1 @xSM = 1 @xM = 1 @xRV = 1 @xBL = 1 @xBR = 1 @xA = 1 @xTL = 1 @xT1 = 1 @xPY = 1 @xRP = 1 @xPD = 1 @xPM = 1 end if @getmodules.include?('RT') @xU = 1 @xP = 1 @xPR = 1 @xL = 1 @xLS = 1 @xGP = 1 @xSM = 1 @xM = 1 @xRV = 1 @xBL = 1 @xBR = 1 @xA = 1 @xTL = 1 @xT1 = 1 @xPY = 1 @xRP = 1 @xPD = 1 @xPM = 1 end end if session[:loggedUserCompCode].to_s!=nil && session[:loggedUserCompCode].to_s!='' && session[:loggedUserCompCode].to_s=='INQ12617' @xU = 1 @xP = 1 @xPR = 1 @xL = 1 @xLS = 1 @xGP = 1 @xSM = 1 @xM = 1 @xRV = 1 @xBL = 1 @xBR = 1 @xA = 1 @xTL = 1 @xT1 = 1 @xPY = 1 @xRP = 1 @xPD = 1 @xPM = 1 end @xRT = '' if session[:allowed_pages_retail]!=nil && session[:allowed_pages_retail]!='' && session[:allowed_pages_retail]=='RT' @xRT = 'RT' end @isRawMaterial = false @isMuliLoc = false @allowedgodam = false if @MstXComp $comp_logos = @MstXComp.cmp_logos @isProdductRaw = @MstXComp.cmp_raw_material @isMultilocation = @MstXComp.cmp_multi_loc @isGodamwise = @MstXComp.cmp_godam_allowed if @isGodamwise!=nil && @isGodamwise!='' && @isGodamwise =='Y' @allowedgodam = true end if @isProdductRaw!=nil && @isProdductRaw!='' && @isProdductRaw =='Y' @isRawMaterial = true end if @isMultilocation!=nil && @isMultilocation!='' && @isMultilocation =='Y' @isMuliLoc = true end end %>