8
0

Module: Reorg / Cleanup

This commit is contained in:
2024-11-08 15:39:19 +01:00
parent 36ef16eb34
commit 294debc67c
226 changed files with 436 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
' Version Date: 05.01.2021
Function GetWinLineOriginalLineNumber(OrderNumber, ArticleNumber, IsSerialNumberArticle)
Set Conn = CWLStart.CurrentCompany.Connection
If IsSerialNumberArticle = 1 Then
SQL = "SELECT TOP 1 c078 FROM t026 (NOLOCK) "
SQL = SQL & "WHERE c067 = '"& OrderNumber &"' AND c003 = '"& ArticleNumber &"' "
SQL = SQL & SQLQuery_OrderWhere
Set Result = Conn.Select(SQL)
If DEBUG_ON = True Then
AddDebugLine "Querying for Original Line Number.. " & vbNewline
AddDebugLine "Result Columns: " & Result
AddDebugLine "Result Rows: " & Result.RowCount
AddDebugLine "SQL: " & SQL
ShowDebugBox "GetWinLineOriginalLineNumber"
End If
If Result < 0 Then
If err <> 0 Then
Msgbox "Fehler bei Abfrage:" & vbNewline & err.description, vbExclamation, DEFAULT_TITLE & " - GetWinLineOriginalLineNumber"
Exit Function
Else
Msgbox "Abfrage lieferte keine Ergebnisse.", vbExclamation, DEFAULT_TITLE & " - GetWinLineOriginalLineNumber"
Exit Function
End If
End If
GetWinLineOriginalLineNumber = Result.Value("c078")
Else
If DEBUG_ON = True Then
AddDebugLine "Setting Original Line Number to 0.."
ShowDebugBox "GetWinLineOriginalLineNumber"
End If
GetWinLineOriginalLineNumber = "0"
End If
End Function