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.

169 lines
4.6 KiB

  1. USE [OPMS_Online]
  2. GO
  3. /****** Object: View [dbo].[OVW_SAL_ProjectOrderList] Script Date: 2017/9/15 �U�� 03:01:27 ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. Drop VIEW [dbo].[OVW_SAL_ProjectOrderList]
  9. GO
  10. CREATE VIEW [dbo].[OVW_SAL_ProjectOrderList]
  11. AS
  12. SELECT P.OrganizationID AS AccountingBookID, ISNULL(C.CustomerID, '') AS CustomerID, ISNULL(C.CustomerName, '')
  13. AS CustomerName, ISNULL(P.ProjectNumber, '') AS ProjectNumber, ISNULL(P.ProjectCName, '') AS ProjectCName,
  14. ISNULL(O.SalesOrderNo, '') AS SalesOrderNo, ISNULL(O.PayType, '') AS PayType, ISNULL(O.OrderStatus,'' ) AS OrderStatus, O.ModifyDate, O.ModifyUser
  15. FROM dbo.OTB_PRJ_ProjectInfo AS P LEFT OUTER JOIN
  16. dbo.OTB_CRM_Customers AS C ON P.CustomerID = C.CustomerID LEFT OUTER JOIN
  17. dbo.OTB_SAL_OrderList AS O ON P.ProjectNumber = O.ProjectNumber
  18. GO
  19. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
  20. Begin DesignProperties =
  21. Begin PaneConfigurations =
  22. Begin PaneConfiguration = 0
  23. NumPanes = 4
  24. Configuration = "(H (1[40] 4[20] 2[20] 3) )"
  25. End
  26. Begin PaneConfiguration = 1
  27. NumPanes = 3
  28. Configuration = "(H (1 [50] 4 [25] 3))"
  29. End
  30. Begin PaneConfiguration = 2
  31. NumPanes = 3
  32. Configuration = "(H (1 [50] 2 [25] 3))"
  33. End
  34. Begin PaneConfiguration = 3
  35. NumPanes = 3
  36. Configuration = "(H (4 [30] 2 [40] 3))"
  37. End
  38. Begin PaneConfiguration = 4
  39. NumPanes = 2
  40. Configuration = "(H (1 [56] 3))"
  41. End
  42. Begin PaneConfiguration = 5
  43. NumPanes = 2
  44. Configuration = "(H (2 [66] 3))"
  45. End
  46. Begin PaneConfiguration = 6
  47. NumPanes = 2
  48. Configuration = "(H (4 [50] 3))"
  49. End
  50. Begin PaneConfiguration = 7
  51. NumPanes = 1
  52. Configuration = "(V (3))"
  53. End
  54. Begin PaneConfiguration = 8
  55. NumPanes = 3
  56. Configuration = "(H (1[56] 4[18] 2) )"
  57. End
  58. Begin PaneConfiguration = 9
  59. NumPanes = 2
  60. Configuration = "(H (1 [75] 4))"
  61. End
  62. Begin PaneConfiguration = 10
  63. NumPanes = 2
  64. Configuration = "(H (1[66] 2) )"
  65. End
  66. Begin PaneConfiguration = 11
  67. NumPanes = 2
  68. Configuration = "(H (4 [60] 2))"
  69. End
  70. Begin PaneConfiguration = 12
  71. NumPanes = 1
  72. Configuration = "(H (1) )"
  73. End
  74. Begin PaneConfiguration = 13
  75. NumPanes = 1
  76. Configuration = "(V (4))"
  77. End
  78. Begin PaneConfiguration = 14
  79. NumPanes = 1
  80. Configuration = "(V (2))"
  81. End
  82. ActivePaneConfig = 0
  83. End
  84. Begin DiagramPane =
  85. Begin Origin =
  86. Top = 0
  87. Left = 0
  88. End
  89. Begin Tables =
  90. Begin Table = "P"
  91. Begin Extent =
  92. Top = 6
  93. Left = 38
  94. Bottom = 136
  95. Right = 236
  96. End
  97. DisplayFlags = 280
  98. TopColumn = 0
  99. End
  100. Begin Table = "C"
  101. Begin Extent =
  102. Top = 6
  103. Left = 274
  104. Bottom = 136
  105. Right = 468
  106. End
  107. DisplayFlags = 280
  108. TopColumn = 0
  109. End
  110. Begin Table = "O"
  111. Begin Extent =
  112. Top = 6
  113. Left = 506
  114. Bottom = 136
  115. Right = 681
  116. End
  117. DisplayFlags = 280
  118. TopColumn = 0
  119. End
  120. End
  121. End
  122. Begin SQLPane =
  123. End
  124. Begin DataPane =
  125. Begin ParameterDefaults = ""
  126. End
  127. Begin ColumnWidths = 9
  128. Width = 284
  129. Width = 1500
  130. Width = 1500
  131. Width = 1500
  132. Width = 1500
  133. Width = 1500
  134. Width = 1500
  135. Width = 1500
  136. Width = 1500
  137. End
  138. End
  139. Begin CriteriaPane =
  140. Begin ColumnWidths = 11
  141. Column = 1965
  142. Alias = 2040
  143. Table = 1170
  144. Output = 720
  145. Append = 1400
  146. NewValue = 1170
  147. SortType = 1350
  148. SortOrder = 1410
  149. GroupBy = 1350
  150. Filter = 1350
  151. Or = 1350
  152. Or = 1350
  153. Or = 1350
  154. End
  155. End
  156. End
  157. ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'OVW_SAL_ProjectOrderList'
  158. GO
  159. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'OVW_SAL_ProjectOrderList'
  160. GO