Project

General

Profile

Feature #2718 » PDSCMBSLOGDOCSTATUS.sql

Tri Rizqiaty, 10/23/2024 09:41 AM

 
1
??ALTER PROCEDURE [dbo].[PDSCMBSLOGDOCSTATUS]
2

3
(
4

5
	@DocType VARCHAR(20)
6

7
	,@MenuID VARCHAR(250)
8

9
)
10

11
AS
12

13

14

15
--DECLARE @DocType VARCHAR(20) = 'GICU'
16

17
--DECLARE @MenuID VARCHAR(250) = 'GICU2'
18

19

20

21
IF(@MenuID = 'GICU2')
22

23
BEGIN
24

25
	SELECT * 
26

27
	FROM dbo.PCMBSLOGDOCSTATUS
28

29
	WHERE DocStatus IN ('1','2') AND DocType = @DocType
30

31
END
32

33
ELSE IF(@MenuID = 'GICU')
34

35
BEGIN
36

37
	SELECT * 
38

39
	FROM dbo.PCMBSLOGDOCSTATUS
40

41
	where DocType = ''
42

43
END
44

45
ELSE
46

47
BEGIN
48

49
	SELECT * 
50

51
	FROM dbo.PCMBSLOGDOCSTATUS
52

53
	where DocType = ''
54

55
END
(1-1/4)