Project

General

Profile

Bug #3181 » PDSCMBSLOGDOCSTATUS_Retail.sql

Tri Rizqiaty, 11/01/2024 04:48 PM

 
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) = 'RCSP'
16

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

19

20

21
IF(@MenuID = 'GICU2')
22

23
BEGIN
24

25
	SELECT * 
26

27
	FROM dbo.PCMBSLOGDOCSTATUS
28

29
	WHERE DocStatus IN ('1','4')
30

31
END
32

33
IF(@MenuID = 'GICU')
34

35
BEGIN
36

37
	SELECT * 
38

39
	FROM dbo.PCMBSLOGDOCSTATUS
40

41
	WHERE DocType = @DocType
42

43
END
44

45
IF(@MenuID = 'RCSP')
46

47
BEGIN
48

49
	SELECT * 
50

51
	FROM dbo.PCMBSLOGDOCSTATUS
52

53
	WHERE DocType = @DocType
54

55
END
56

57
IF(@DocType = 'MTPR')
58

59
BEGIN
60

61
	SELECT * 
62

63
	FROM dbo.PCMBSLOGDOCSTATUS
64

65
	WHERE DocType = @DocType
66

67
END
68

69
IF(@DocType = 'RTCU')
70

71
BEGIN
72

73
	SELECT * 
74

75
	FROM dbo.PCMBSLOGDOCSTATUS
76

77
	WHERE DocType = @DocType
78

79
END
80

81
IF(@DocType = 'RTSP')
82

83
BEGIN
84

85
	SELECT * 
86

87
	FROM dbo.PCMBSLOGDOCSTATUS
88

89
	WHERE DocType = @DocType
90

91
END
92

93
ELSE
94

95
BEGIN
96

97
	SELECT * 
98

99
	FROM dbo.PCMBSLOGDOCSTATUS
100

101
	--WHERE DocType = @DocType
102

103
END
(2-2/2)