Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1. /* This script will copy transactions from the SV000815 table to the SV000810 for a given service call ID
  2. and then remove the transactions from SV000815. This is used if the customer manually closes a call which
  3. moves the costs to history but it does not bill them. Moving the transactions to SV000810 will allow billing
  4. of those transactions.
  5.  
  6. This was written with the table structure in 16.00b02g214.
  7.  
  8. */
  9.  
  10. INSERT INTO [dbo].[SV000810]
  11. SELECT
  12. [Service_Call_ID]
  13. ,'' --[Call_Invoice_Number]
  14. ,[JRNENTRY]
  15. ,[OH_ACTINDX_CR]
  16. ,[OH_ACTINDX_DR]
  17. ,[Divisions]
  18. ,[UNITCOST]
  19. ,[Wennsoft_Affiliate]
  20. ,[Wennsoft_Region]
  21. ,[Wennsoft_Branch]
  22. ,[USERID]
  23. ,[Technician_ID]
  24. ,[Technician_Team]
  25. ,[Reference_TRX_Number]
  26. ,[CUSTNMBR]
  27. ,[ADRSCODE]
  28. ,[SEQNUMBR]
  29. ,[WS_Job_Name]
  30. ,[Job_Type]
  31. ,[Appointment]
  32. ,[Sub_Task_Code]
  33. ,[Added_Rate]
  34. ,[Travel_Transaction]
  35. ,[WS_Cost_Code]
  36. ,[WS_Other_Cost_Sub_Code]
  37. ,[Cost_Code_Description]
  38. ,[Task_Code]
  39. ,[DOCTYPE]
  40. ,[DOCAMNT]
  41. ,[DOCDATE]
  42. ,[TRXDSCRN]
  43. ,[Billable_Check_Box]
  44. ,[TAXABLE]
  45. ,[TRXSOURC]
  46. ,[Billing_Amount]
  47. ,[VENDORID]
  48. ,[VENDNAME]
  49. ,[Equipment_ID]
  50. ,[Equipment_Type]
  51. ,[Dynamics_Status]
  52. ,'OPEN' --[Wennsoft_Status]
  53. ,[BACHNUMB]
  54. ,[BCHSOURC]
  55. ,[TRXHRUNT]
  56. ,[EMPLOYID]
  57. ,[EMPLNAME]
  58. ,[VCHNUMWK]
  59. ,[OH_Amount]
  60. ,[EXTDCOST]
  61. ,[WS_Extended_Cost]
  62. ,[TRXQTY]
  63. ,[UOFM]
  64. ,[ITEMNMBR]
  65. ,[ITEMDESC]
  66. ,[UNITPRCE]
  67. ,[JOBTITLE]
  68. ,[PAYRCORD]
  69. ,[PAYRATE]
  70. ,[Billing_Rate]
  71. ,[Add_New_Equipment_Record]
  72. ,[New_Equipment_ID]
  73. ,[Wennsoft_Model_Number]
  74. ,[Wennsoft_Serial_Number]
  75. ,[Manufacturer_ID]
  76. ,[Note_Checkbox]
  77. ,[TRXHRUNTBILL]
  78. ,[WS_Committed_Cost]
  79. ,[TRXQTYBILL]
  80. ,[WIP_ACTINDX_CR]
  81. ,[OH_WIP_ACTINDX_CR]
  82. ,[ACTINDX_CR]
  83. ,[ACTINDX_DR]
  84. ,[INV_ACTINDX_DR]
  85. ,[INV_ACTINDX_CR]
  86. ,[SHFTCODE]
  87. ,[SHFTPREM]
  88. ,[Labor_Group_Name]
  89. ,[Pricing_Matrix_Name]
  90. ,[Travel_Rate_Name]
  91. ,[Service_User_Define_1]
  92. ,[Service_User_Define_2]
  93. ,[Service_User_Define_5]
  94. ,[Service_User_Define_6]
  95. ,[Service_User_Define_7]
  96. ,[Service_User_Define_8]
  97. ,[Service_User_Define_9]
  98. ,[Service_User_Define_10]
  99. ,[Service_User_Define_11]
  100. ,[Service_User_Define_12]
  101. ,[Service_User_Define_18]
  102. ,[Service_User_Define_19]
  103. ,[Service_User_Define_20]
  104. ,[Service_User_Define_21]
  105. ,[Service_User_Define_22]
  106. ,[Service_User_Define_23]
  107. ,[Service_User_Define_24]
  108. ,[Service_User_Define_25]
  109. ,[MODIFDT]
  110. ,[Modified_Time]
  111. ,[MDFUSRID]
  112. ,[Time_Zone]
  113. ,[SV_Language_ID]
  114. ,[Base_Currency_ID]
  115. ,[Base_Curr_Conv_Factor]
  116. ,[Billing_Currency_ID]
  117. ,[Billing_Curr_Conv_Factor]
  118. ,[Local_Currency_ID]
  119. ,[WSReserved_CB1]
  120. ,[WSReserved_CB2]
  121. ,[WSReserved_CB3]
  122. ,[WSReserved_CB4]
  123. ,[WSReserved_CB5]
  124. ,[WSReserved_CB6]
  125. ,[WSReserved_CB7]
  126. ,[WSReserved_CB8]
  127. ,[WSReserved_CB9]
  128. ,[WSReserved_CB10]
  129. ,[WSReserved_STR1]
  130. ,[WSReserved_STR2]
  131. ,[WS_Created_Date]
  132. ,[WS_Created_Time]
  133. ,[GLPOSTDT]
  134. ,[BilledToJob]
  135. ,[WS_Grouped]
  136. ,[REVSETRX]
  137. ,[PYADNMBR]
  138. ,[VOIDPYADNMBR]
  139. ,[NonBillable]
  140. ,[Task_Account]
  141. ,[ORGSEQNUMBR]
  142. ,[WS_Transaction_Note]
  143. FROM SV000815 WHERE Service_Call_ID = '170815-0001'
  144.  
  145. DELETE SV000815 WHERE Service_Call_ID = '170815-0001'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement