You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.6 KiB

USE [FastMoneyPro_Remit]
GO
/****** Object: StoredProcedure [dbo].[proc_autoUnlok_domestic_txn] Script Date: 9/27/2019 1:30:14 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--Exec proc_autoUnlok_domestic_txn
CREATE proc [dbo].[proc_autoUnlok_domestic_txn]
as
begin
SET NOCOUNT ON;
--select lockedDate, lockedBy, * from remitTran where tranStatus ='Lock' and payStatus='unPaid'
--and datediff(MINUTE,lockedDate,GETDATE())>=7 -- 'Payment'
update remitTran
set tranStatus='Payment'
where
tranStatus='Lock'
and datediff(MINUTE,lockedDate,GETDATE())>=7
and payStatus='Unpaid'
update remitTran
set tranStatus = 'Paid'
where paidDate is not null
and payStatus = 'Paid' and tranStatus ='Payment'
end
GO