USE [FastMoneyPro_Remit]
GO
/****** Object:  StoredProcedure [dbo].[DLL_PROC_RECEIVER_INFORMATION]    Script Date: 7/4/2019 11:35:48 AM ******/
DROP PROCEDURE [dbo].[DLL_PROC_RECEIVER_INFORMATION]
GO
/****** Object:  StoredProcedure [dbo].[DLL_PROC_RECEIVER_INFORMATION]    Script Date: 7/4/2019 11:35:48 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROC DLL_PROC_RECEIVER_INFORMATION(
	 @flag VARCHAR(30) = NULL
	,@receiverId	VARCHAR(30) =  NULL
	,@bankId		VARCHAR(30) =  NULL
)AS
BEGIN
	IF @flag='findById'
	BEGIN
		SELECT 
			 receiverId,customerId,membershipId,firstName,middleName,lastName1,lastName2,country
			,address,state,zipCode,city,email,homePhone,workPhone,mobile,relationship,district
			,purposeOfRemit,isActive,fullName
		FROM dbo.receiverInformation(NOLOCK) WHERE receiverId = @receiverId
	END
	IF @flag='findBankById'
	BEGIN
		SELECT 
			agentName AS BankName,agentCode AS BankCode,@bankId AS BankId
		FROM dbo.agentMaster(NOLOCK) WHERE agentId = @bankId
	END
END







