Anlage des Repos
@@ -0,0 +1,20 @@
|
||||
Version 3.1.0.0 - 09.10.2021
|
||||
NEW: - Added Additional Fields (Personenkonten Zusatzfelder)
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.0.0.0 - 16.07.2021 (30.08.2021, 09.10.2021) - Erste Version des Relaunchs
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------legend------------------------------------
|
||||
NEW: = Added a new functionality
|
||||
FIX: = Fixed a Issue with existing functionality
|
||||
CHG: = Changed a existing functionality
|
||||
REM: = Removed a functionality
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,115 @@
|
||||
' DeleteExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine löscht einen Datensatz anhand einer selktierten Gridzeile.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 3 (ROW) = Zu löschende Zeile im Grid (nur zwecks Anzeige).
|
||||
' Parameter 4 (GRID) = Eindeutige Nummer des zu löschenden Datensatzes (zwecks Löschung in der DB).
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 04.07.2021 / MD
|
||||
' Version Date / Editor: 04.07.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DeleteExportWinLineDoc_Record(LEVEL,GRID,ROW,GUID)
|
||||
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (ROW > 0) and (GUID > 0)) Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
MsgBoxQuestion = MsgBox ("Möchten Sie den ausgewählten Datensatz wirklich löschen? " & vbCrlf & vbCrlf & _
|
||||
"Beschreibung: " & LEVEL1_GRID_CURRENT_Beschreibung & vbCrlf & vbCrlf & _
|
||||
"Mandant: " & LEVEL1_GRID_CURRENT_Mandant & vbCrlf & vbCrlf & _
|
||||
"Achtung der Vorgang kann nicht Rückgängig gemacht werden!" & vbCrlf & _
|
||||
"", vbYesno+vbQuestion, DEFAULT_TITLE & " - Löschen bestätigen!")
|
||||
|
||||
If (MsgBoxQuestion = 6) Then
|
||||
|
||||
SQLDelete_Profile = REPLACE(SQLDelete_Profile_Template,"%GUID%",GUID)
|
||||
SQLResult_Profile = Conn.ExecuteSQL(SQLDelete_Profile)
|
||||
|
||||
If (SQLResult_Profile = "Wahr") Or (SQLResult_Profile = 1) Then
|
||||
|
||||
LEVEL1_Grid.RemoveLine ROW
|
||||
'LEVEL1_Grid.Refresh << Dont do this selected line will lose
|
||||
|
||||
If (LEVEL1_Grid.LineCount > 0) Then
|
||||
|
||||
'Show updated count down the table
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
Else
|
||||
|
||||
LEVEL1_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
|
||||
End If
|
||||
|
||||
MsgBox "Der Datensatz wurde erfolgreich gelöscht!",vbOkayonly+vbInformation,DEFAULT_TITLE & " - Erfolg!"
|
||||
|
||||
Else
|
||||
MsgBox "Der Datensatz konnte nicht gelöscht werden!",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
ElseIf (((LEVEL = 2) or (LEVEL = "2")) and (ROW > 0) and (GUID > 0)) Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
MsgBoxQuestion = MsgBox ("Möchten Sie den ausgewählten Datensatz wirklich löschen? " & vbCrlf & vbCrlf & _
|
||||
"Beschreibung: " & LEVEL2_GRID_CURRENT_Beschreibung & vbCrlf & vbCrlf & _
|
||||
"Mandant: " & LEVEL2_GRID_CURRENT_Mandant & vbCrlf & vbCrlf & _
|
||||
"Achtung der Vorgang kann nicht Rückgängig gemacht werden!" & vbCrlf & _
|
||||
"", vbYesno+vbQuestion, DEFAULT_TITLE & " - Löschen bestätigen!")
|
||||
|
||||
If (MsgBoxQuestion = 6) Then
|
||||
|
||||
SQLDelete_Config = REPLACE(SQLDelete_Config_Template,"%GUID%",GUID)
|
||||
SQLResult_Config = Conn.ExecuteSQL(SQLDelete_Config)
|
||||
|
||||
If (SQLResult_Config = "Wahr") Or (SQLResult_Config = 1) Then
|
||||
|
||||
LEVEL2_Grid.RemoveLine ROW
|
||||
'LEVEL2_Grid.Refresh << Dont do this selected line will lose
|
||||
|
||||
If (LEVEL2_Grid.LineCount > 0) Then
|
||||
|
||||
'Show updated count down the table
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
Else
|
||||
|
||||
LEVEL2_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
|
||||
End If
|
||||
|
||||
MsgBox "Der Datensatz wurde erfolgreich gelöscht!",vbOkayonly+vbInformation,DEFAULT_TITLE & " - Erfolg!"
|
||||
|
||||
Else
|
||||
MsgBox "Der Datensatz konnte nicht gelöscht werden!",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
Msgbox "Unzureichende Parameter!" & vbCrlf & _
|
||||
"LEVEL: " & LEVEL & vbCrlf & _
|
||||
"ROW: " & ROW & vbCrlf & _
|
||||
"GUID: " & GUID & vbCrlf & _
|
||||
"",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,91 @@
|
||||
' DD-INSERT_LANGBESCHINT_INTO_BELEGERFASSUNG
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine deaktiviert Knöpfe im Ribbon und in Fenster.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" deaktiviert pauschal, "dynamic" deaktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.07.2021 / MK
|
||||
' Version Date / Editor: 16.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DisableExportWinLineDoc_ButtonControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 0) or (LEVEL = "0")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_EXIT.Active = False
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_EXIT.Active = False
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW >= 0) and (LEVEL1_GRID_CURRENT_GUID >= 0) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW <= 0) and (LEVEL1_GRID_CURRENT_GUID <= 0) Then
|
||||
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW >= 0) and (LEVEL2_GRID_CURRENT_GUID >= 0) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW <= 0) and (LEVEL2_GRID_CURRENT_GUID <= 0) Then
|
||||
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 3) or (LEVEL = "3")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,141 @@
|
||||
' DisableExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine deaktiviert sämtliche Eingabefelder auf einem Level.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" deaktiviert pauschal, "dynamic" deaktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DisableExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL1_CHK_Aktiv.Active = False
|
||||
LEVEL1_TXT_Beschreibung.Active = False
|
||||
LEVEL1_TXT_Mandant.Active = False
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Active = False
|
||||
LEVEL1_TXT_WinLineVariable2.Active = False
|
||||
LEVEL1_TXT_WinLineVariable3.Active = False
|
||||
LEVEL1_TXT_WinLineVariable4.Active = False
|
||||
LEVEL1_TXT_WinLineVariable5.Active = False
|
||||
LEVEL1_TXT_WinLineVariable6.Active = False
|
||||
LEVEL1_TXT_WinLineVariable7.Active = False
|
||||
LEVEL1_TXT_WinLineVariable8.Active = False
|
||||
LEVEL1_TXT_WinLineVariable9.Active = False
|
||||
LEVEL1_TXT_WinLineVariable10.Active = False
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport2.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport3.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport4.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport5.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport6.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport7.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport8.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport9.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport10.Active = False
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Active = False
|
||||
LEVEL1_TXT_ExportDateiname.Active = False
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Active = False
|
||||
LEVEL1_TXT_ExportDateiendung.Active = False
|
||||
LEVEL1_TXT_ExportVersionierung.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen1.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen2.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Active = False
|
||||
LEVEL2_TXT_Beschreibung.Active = False
|
||||
LEVEL2_TXT_Mandant.Active = False
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Active = False
|
||||
LEVEL2_TXT_Platzhalter.Active = False
|
||||
LEVEL2_TXT_Datentyp.Active = False
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,85 @@
|
||||
' EnableExportWinLineDoc_ButtonControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert Knöpfe im Ribbon und in Fenster.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" aktiviert pauschal, "dynamic" aktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 29.06.2021 / MK
|
||||
' Version Date / Editor: 29.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub EnableExportWinLineDoc_ButtonControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 0) or (LEVEL = "0")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_EXIT.Active = True
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL3.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_EXIT.Active = True
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL3.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = TRUE
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW > 0) and (LEVEL1_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
LEVEL0_BTN_DELETE.Active = True
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW = 0) and (LEVEL1_GRID_CURRENT_GUID = 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = TRUE
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW > 0) and (LEVEL2_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
LEVEL0_BTN_DELETE.Active = True
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW = 0) and (LEVEL2_GRID_CURRENT_GUID = 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,105 @@
|
||||
' EnableExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert sämtliche Eingabefelder auf einem Level.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" aktiviert pauschal, "dynamic" aktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 17.06.2021 / MD
|
||||
' Version Date / Editor: 17.06.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub EnableExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and ((CTRLType = "dynamic") or (CTRLType = "static")) Then
|
||||
|
||||
LEVEL1_CHK_Aktiv.Active = true
|
||||
LEVEL1_TXT_Beschreibung.Active = true
|
||||
LEVEL1_TXT_Mandant.Active = true
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Active = true
|
||||
LEVEL1_TXT_WinLineVariable2.Active = true
|
||||
LEVEL1_TXT_WinLineVariable3.Active = true
|
||||
LEVEL1_TXT_WinLineVariable4.Active = true
|
||||
LEVEL1_TXT_WinLineVariable5.Active = true
|
||||
LEVEL1_TXT_WinLineVariable6.Active = true
|
||||
LEVEL1_TXT_WinLineVariable7.Active = true
|
||||
LEVEL1_TXT_WinLineVariable8.Active = true
|
||||
LEVEL1_TXT_WinLineVariable9.Active = true
|
||||
LEVEL1_TXT_WinLineVariable10.Active = true
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport2.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport3.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport4.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport5.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport6.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport7.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport8.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport9.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport10.Active = true
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Active = true
|
||||
LEVEL1_TXT_ExportDateiname.Active = true
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Active = true
|
||||
LEVEL1_TXT_ExportDateiendung.Active = true
|
||||
LEVEL1_TXT_ExportVersionierung.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen1.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen2.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen3.Active = true
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Active = True
|
||||
LEVEL2_TXT_Beschreibung.Active = True
|
||||
LEVEL2_TXT_Mandant.Active = True
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Active = True
|
||||
LEVEL2_TXT_Platzhalter.Active = True
|
||||
LEVEL2_TXT_Datentyp.Active = True
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,107 @@
|
||||
' GetExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten in Zwischenvariabelen.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 2 (CURRENT_GUID)= Anhand dieser eindeutgen Nummer wird der Datensatz in der DB identifiziert.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 14.06.2021 / MK
|
||||
' Version Date / Editor: 14.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub GetExportWinLineDoc_Record(LEVEL,GRID,CURRENT_GUID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
SQLQuery_Profile = SQLQuery_Profile_Template
|
||||
SQLQuery_Profile = Replace(SQLQuery_Profile,"%GUID%",LEVEL1_GRID_CURRENT_GUID)
|
||||
|
||||
Set SQLResult_Profile = Conn.Select(SQLQuery_Profile)
|
||||
If (SQLResult_Profile.RowCount = 1) Then
|
||||
|
||||
LEVEL1_TXT_GUID_DBValue = SQLResult_Profile.Value("u000")
|
||||
LEVEL1_CHK_Aktiv_DBValue = SQLResult_Profile.Value("u001")
|
||||
LEVEL1_TXT_Beschreibung_DBValue = SQLResult_Profile.Value("u002")
|
||||
LEVEL1_TXT_Mandant_DBValue = SQLResult_Profile.Value("u003")
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1_DBValue = SQLResult_Profile.Value("u004")
|
||||
LEVEL1_TXT_WinLineVariable2_DBValue = SQLResult_Profile.Value("u005")
|
||||
LEVEL1_TXT_WinLineVariable3_DBValue = SQLResult_Profile.Value("u006")
|
||||
LEVEL1_TXT_WinLineVariable4_DBValue = SQLResult_Profile.Value("u007")
|
||||
LEVEL1_TXT_WinLineVariable5_DBValue = SQLResult_Profile.Value("u008")
|
||||
LEVEL1_TXT_WinLineVariable6_DBValue = SQLResult_Profile.Value("u009")
|
||||
LEVEL1_TXT_WinLineVariable7_DBValue = SQLResult_Profile.Value("u010")
|
||||
LEVEL1_TXT_WinLineVariable8_DBValue = SQLResult_Profile.Value("u011")
|
||||
LEVEL1_TXT_WinLineVariable9_DBValue = SQLResult_Profile.Value("u012")
|
||||
LEVEL1_TXT_WinLineVariable10_DBValue = SQLResult_Profile.Value("u013")
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1_DBValue = SQLResult_Profile.Value("u014")
|
||||
LEVEL1_TXT_CallMakroPreExport2_DBValue = SQLResult_Profile.Value("u015")
|
||||
LEVEL1_TXT_CallMakroPreExport3_DBValue = SQLResult_Profile.Value("u016")
|
||||
LEVEL1_TXT_CallMakroPreExport4_DBValue = SQLResult_Profile.Value("u017")
|
||||
LEVEL1_TXT_CallMakroPreExport5_DBValue = SQLResult_Profile.Value("u018")
|
||||
LEVEL1_TXT_CallMakroPreExport6_DBValue = SQLResult_Profile.Value("u019")
|
||||
LEVEL1_TXT_CallMakroPreExport7_DBValue = SQLResult_Profile.Value("u020")
|
||||
LEVEL1_TXT_CallMakroPreExport8_DBValue = SQLResult_Profile.Value("u021")
|
||||
LEVEL1_TXT_CallMakroPreExport9_DBValue = SQLResult_Profile.Value("u022")
|
||||
LEVEL1_TXT_CallMakroPreExport10_DBValue = SQLResult_Profile.Value("u023")
|
||||
|
||||
LEVEL1_TXT_ExportPfad_DBValue = SQLResult_Profile.Value("u024")
|
||||
LEVEL1_TXT_ExportDateiname_DBValue = SQLResult_Profile.Value("u025")
|
||||
LEVEL1_TXT_ExportDateinameVorschau_DBValue = SQLResult_Profile.Value("u026")
|
||||
LEVEL1_TXT_ExportDateiendung_DBValue = SQLResult_Profile.Value("u027")
|
||||
LEVEL1_TXT_ExportVersionierung_DBValue = SQLResult_Profile.Value("u028")
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer_DBValue = SQLResult_Profile.Value("u029")
|
||||
LEVEL0_TXT_Erstellt_wann_DBValue = SQLResult_Profile.Value("u030")
|
||||
LEVEL0_TXT_Geaendert_wer_DBValue = SQLResult_Profile.Value("u031")
|
||||
LEVEL0_TXT_Geaendert_wann_DBValue = SQLResult_Profile.Value("u032")
|
||||
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
SQLQuery_Config = SQLQuery_Config_Template
|
||||
SQLQuery_Config = Replace(SQLQuery_Config,"%GUID%",LEVEL2_GRID_CURRENT_GUID)
|
||||
|
||||
Set SQLResult_Config = Conn.Select(SQLQuery_Config)
|
||||
If (SQLResult_Config.RowCount = 1) Then
|
||||
|
||||
LEVEL2_TXT_GUID_DBValue = SQLResult_Config.Value("u000")
|
||||
LEVEL2_CHK_Aktiv_DBValue = SQLResult_Config.Value("u001")
|
||||
LEVEL2_TXT_Beschreibung_DBValue = SQLResult_Config.Value("u002")
|
||||
LEVEL2_TXT_Mandant_DBValue = SQLResult_Config.Value("u003")
|
||||
|
||||
LEVEL2_TXT_Eintragstyp_DBValue = SQLResult_Config.Value("u004")
|
||||
LEVEL2_TXT_Platzhalter_DBValue = SQLResult_Config.Value("u005")
|
||||
LEVEL2_TXT_Datentyp_DBValue = SQLResult_Config.Value("u006")
|
||||
|
||||
LEVEL2_TXT_Text_Wert_DBValue = SQLResult_Config.Value("u007")
|
||||
LEVEL2_TXT_Integer_Wert_DBValue = SQLResult_Config.Value("u008")
|
||||
LEVEL2_TXT_Double_Wert_DBValue = SQLResult_Config.Value("u009")
|
||||
LEVEL2_TXT_Date_Wert_DBValue = SQLResult_Config.Value("u010")
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer_DBValue = SQLResult_Config.Value("u011")
|
||||
LEVEL0_TXT_Erstellt_wann_DBValue = SQLResult_Config.Value("u012")
|
||||
LEVEL0_TXT_Geaendert_wer_DBValue = SQLResult_Config.Value("u013")
|
||||
LEVEL0_TXT_Geaendert_wann_DBValue = SQLResult_Config.Value("u014")
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,98 @@
|
||||
' InitializeExportWinLineDoc_CreateVar
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine initialisiert die nötigen Variablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.06.2021 / MK
|
||||
' Version Date / Editor: 15.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub InitializeExportWinLineDoc_CreateVar()
|
||||
|
||||
|
||||
'Storage for custom fields on LEVEL 0
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 90, "1", 64 'Erstellt wer / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 91, "6", 16 'Erstellt wann / Datum mit Zeit
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 92, "1", 64 'Geändert wer / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 93, "6", 16 'Geändert wann / Datum mit Zeit
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 1
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 0, "2", 25 'GUID / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 1, "2", 3 'Aktiv / Integer (bool)
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 2, "1", 512 'Beschreibung / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 3, "31", 4 'Mandant / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 4, "1", 128 'WinLine Variable 1 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 5, "1", 128 'WinLine Variable 2 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 6, "1", 128 'WinLine Variable 3 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 7, "1", 128 'WinLine Variable 4 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 8, "1", 128 'WinLine Variable 5 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 9, "1", 128 'WinLine Variable 6 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 10,"1", 128 'WinLine Variable 7 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 11,"1", 128 'WinLine Variable 8 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 12,"1", 128 'WinLine Variable 9 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 13,"1", 128 'WinLine Variable 10 / String
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 14,"31", 50 'Call Makro pre Export 1 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 15,"31", 50 'Call Makro pre Export 2 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 16,"31", 50 'Call Makro pre Export 3 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 17,"31", 50 'Call Makro pre Export 4 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 18,"31", 50 'Call Makro pre Export 5 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 19,"31", 50 'Call Makro pre Export 6 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 20,"31", 50 'Call Makro pre Export 7 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 21,"31", 50 'Call Makro pre Export 8 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 22,"31", 50 'Call Makro pre Export 9 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 23,"31", 50 'Call Makro pre Export 10 / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 24,"1", 256 'Export Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 25,"1", 256 'Export Dateiname / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 26,"1", 256 'Export Dateiname Vorschau / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 27,"2", 3 'Export Dateiendung / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 28,"2", 3 'Export Versionierung / Integer
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 99,"1", 255 'GUID / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 98,"1", 255 'TabelCounter / String
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 2
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 50,"2", 25 'GUID / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 51,"2", 3 'Aktiv / Integer (bool)
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 52,"1", 512 'Beschreibung / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 53,"31", 4 'Mandant / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 54,"31", 16 'Eintragstyp / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 55, "1",512 'Platzhalter / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 56,"31", 16 'Datentyp / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 57, "1",512 'Text-Wert / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 58, "2", 64 'Integer-Wert / Zahl ohne Nachkommastellen
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 59, "4", 64 'Double-Wert / Zahl mit Nachkommastellen
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 60, "6", 64 'Date-Wert / Datum mit Zeit
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 97,"1", 255 'GUID / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 96,"1", 255 'TabelCounter / String
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 3
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 80,"1", 512 'Standard Modul Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 81,"1", 512 'Export-WinLineDoc Modul Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 82,"1", 50 'WebServiceUser / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 89,"1",4000 '<Blank> / String
|
||||
|
||||
End Sub
|
||||
|
||||
'Create Var
|
||||
'Type Bedeutung
|
||||
'1 Textvariable (Länge wählbar)
|
||||
'2 Zahl ohne Nachkommastellen (Integer)
|
||||
'4 Zahl mit Nachkommastellen (Double)
|
||||
'6 Datum mit Zeit
|
||||
@@ -0,0 +1,273 @@
|
||||
' NewExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Funktion startet die Neuanlage eines Datensatzes oder beendet diese vorzeitig (ohne zu speichern).
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (ABORT) = "True" übergeben, wenn die Neuanlage abgebrochen werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Function NewExportWinLineDoc_Record(LEVEL,ABORT)
|
||||
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (ABORT = False)) Then
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'Set Grid cols inactive
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_GUID, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_AKTIV, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_BESCHREIBUNG, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_MANDANT, true, true
|
||||
|
||||
'Disable all input controls..
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'And enable them again
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Set controls with default values, if there are no old values...
|
||||
'Old values (ScreenContents) is used for a profile copy
|
||||
|
||||
'Always set new profiles to inactive state
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = "0"
|
||||
|
||||
If (LEVEL1_TXT_Beschreibung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_Beschreibung.Contents = "Neues Profil"
|
||||
Else
|
||||
LEVEL1_TXT_Beschreibung.Contents = "Kopie von " & LEVEL1_TXT_Beschreibung.ScreenContents
|
||||
End if
|
||||
If (LEVEL1_TXT_Mandant.ScreenContents = "") Then
|
||||
LEVEL1_TXT_Mandant.Contents = "ALL"
|
||||
End if
|
||||
|
||||
If (LEVEL1_TXT_CallMakroPreExport1.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport1.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport2.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport2.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport3.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport3.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport4.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport4.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport5.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport5.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport6.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport6.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport7.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport7.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport8.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport8.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport9.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport9.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport10.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport10.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
|
||||
If (LEVEL1_TXT_ExportPfad.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportPfad.Contents = "%EXPORTPATH%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateiname.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateiname.Contents = "%MandantenNr%-%KontoNr%-%Belegnummer%-%Laufnummer%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateinameVorschau.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = "%MandantenNr%-%KontoNr%-%Belegnummer%-%Laufnummer%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateiendung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = "5"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportVersionierung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = "9"
|
||||
End if
|
||||
|
||||
'...and set focus to every field once
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
'Reset counter, to force SetFiledFocus on next switch
|
||||
LEVEL1_GRID_CALLCOUNT = 0
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Disable ribbon and menu buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
|
||||
'To let the save sub knwo, it a new line!
|
||||
NewExportWinLineDoc_Record = -1
|
||||
|
||||
'---------------------------------------------------------------------------------------
|
||||
'***************************************************************************************
|
||||
'---------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (((LEVEL = 2) or (LEVEL = "2")) and (ABORT = False)) Then
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'Set Grid cols inactive
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_GUID, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_AKTIV, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_BESCHREIBUNG, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_MANDANT, true, true
|
||||
|
||||
'Disable all input controls..
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'And enable them again
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Set controls with default values, if there are no old values...
|
||||
'Old values (ScreenContents) is used for a profile copy
|
||||
|
||||
'Always set new profiles to inactive state
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = "0"
|
||||
|
||||
If (LEVEL2_TXT_Beschreibung.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Beschreibung.Contents = "Neues Profil"
|
||||
Else
|
||||
LEVEL2_TXT_Beschreibung.Contents = "Kopie von " & LEVEL2_TXT_Beschreibung.ScreenContents
|
||||
End if
|
||||
If (LEVEL2_TXT_Mandant.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Mandant.Contents = "ALL"
|
||||
End if
|
||||
|
||||
If (LEVEL2_TXT_Eintragstyp.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Eintragstyp.Contents = "CUSTOM_VARIABLE"
|
||||
End if
|
||||
If (LEVEL2_TXT_Platzhalter.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Platzhalter.Contents = "%PLATZHALTER%"
|
||||
End if
|
||||
If (LEVEL2_TXT_Datentyp.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Datentyp.Contents = "TEXT"
|
||||
End if
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Text_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Text_Wert.Contents = "c:\WinLine\Dokumentablage"
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Integer_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Double_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Date_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
End if
|
||||
End if
|
||||
|
||||
'...and set focus to every field once
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
'SPECIAL: set data type fields depending on selcted type on/off
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Reset counter, to force SetFiledFocus on next switch
|
||||
LEVEL2_GRID_CALLCOUNT = 0
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Disable ribbon and menu buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
|
||||
'To let the save sub knwo, it a new line!
|
||||
NewExportWinLineDoc_Record = -1
|
||||
|
||||
'If new line was aborted on tab / level 1
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1") and (ABORT = True)) Then
|
||||
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_GUID, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_AKTIV, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_BESCHREIBUNG, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_MANDANT, False, False
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'And enable tabs again
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Focus Grid and line again, wil trigger to set LEVEL1_GRID_CURRENT_GUID again
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
'After reloading, go through all fields again
|
||||
If ((LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CURRENT_ROW > 0)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
'Return GUID from selected line
|
||||
NewExportWinLineDoc_Record = LEVEL1_GRID_CURRENT_GUID
|
||||
|
||||
'If new line was aborted on tab / level 2
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2") and (ABORT = True)) Then
|
||||
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_GUID, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_AKTIV, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_BESCHREIBUNG, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_MANDANT, False, False
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'And enable tabs again
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Focus Grid and line again, wil trigger to set LEVEL2_GRID_CURRENT_GUID again
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
'After reloading, go through all fields again
|
||||
If ((LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CURRENT_ROW > 0)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
'Return GUID from selected line
|
||||
NewExportWinLineDoc_Record = LEVEL2_GRID_CURRENT_GUID
|
||||
|
||||
End If
|
||||
|
||||
End Function
|
||||
@@ -0,0 +1,166 @@
|
||||
' SetExportWinLineDoc_ComboBoxControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Funktion liefert Werte, um Auswahlboxen zu füllen.
|
||||
' Parameter 1 (CTRLType)= Name oder Typ des Controls welches gefüllt werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.07.2021 / MK
|
||||
' Version Date / Editor: 16.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Function SetExportWinLineDoc_ComboBoxControls(CMBType)
|
||||
|
||||
if (CMBType = "Mandant") Then
|
||||
|
||||
Set SQLResult_Mandators = Conn.Select(SQLQuery_Mandators)
|
||||
If (SQLResult_Mandators.RowCount) > 0 Then
|
||||
|
||||
Mandators = 0
|
||||
Mandators = "ALL :Alle Mandanten;"
|
||||
|
||||
'----------------------------------------------------
|
||||
'Inital Value before "NextRecord"
|
||||
Mandators = Mandators & SQLResult_Mandators.value("c000")
|
||||
|
||||
For Loop1 = Len(SQLResult_Mandators.value("c000"))+1 To 3
|
||||
|
||||
Mandators = Mandators & " "
|
||||
|
||||
Next
|
||||
|
||||
Mandators = Mandators & ":" & SQLResult_Mandators.value("c003") & ";"
|
||||
'----------------------------------------------------
|
||||
|
||||
Do
|
||||
'Loop for every combobox value
|
||||
If (SQLResult_Mandators.NextRecord = True) Then
|
||||
Mandators = Mandators & SQLResult_Mandators.value("c000")
|
||||
|
||||
'Inital Value before "NextRecord"
|
||||
For Loop2 = Len(SQLResult_Mandators.value("c000"))+1 To 3
|
||||
Mandators = Mandators & " "
|
||||
|
||||
Next
|
||||
|
||||
Mandators = Mandators & ":" & SQLResult_Mandators.value("c003") & ";"
|
||||
Else
|
||||
'To remove last ";"
|
||||
Mandators = LEFT(Mandators, Len(Mandators)-1)
|
||||
Exit Do
|
||||
|
||||
End If
|
||||
Loop
|
||||
|
||||
Else
|
||||
Mandators = "ALL :Alle Mandanten"
|
||||
|
||||
End If
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Mandators
|
||||
|
||||
ElseIf (CMBType = "ProgramMakros") Then
|
||||
|
||||
Set SQLResult_ProgramMakros = Conn.Select(SQLQuery_ProgramMakros)
|
||||
If (SQLResult_ProgramMakros.RowCount) > 0 Then
|
||||
|
||||
ProgramMakros = ""
|
||||
|
||||
'----------------------------------------------------
|
||||
'Inital Value before "NextRecord"
|
||||
|
||||
ProgramMakro = ""
|
||||
ProgramMakro = SQLResult_ProgramMakros.value("c000")
|
||||
ProgramMakro = Split(ProgramMakro,"@")
|
||||
|
||||
ProgramMakros = ProgramMakros & ProgramMakro(0)
|
||||
|
||||
For Loop1 = Len(SQLResult_ProgramMakros.value("c000"))+1 To 3
|
||||
|
||||
ProgramMakros = ProgramMakros & " "
|
||||
|
||||
Next
|
||||
|
||||
ProgramMakros = ProgramMakros & ":;"
|
||||
'----------------------------------------------------
|
||||
|
||||
Do
|
||||
'Loop for every combobox value
|
||||
If (SQLResult_ProgramMakros.NextRecord = True) Then
|
||||
ProgramMakro = ""
|
||||
ProgramMakro = SQLResult_ProgramMakros.value("c000")
|
||||
ProgramMakro = Split(ProgramMakro,"@")
|
||||
|
||||
ProgramMakros = ProgramMakros & ProgramMakro(0)
|
||||
|
||||
'Inital Value before "NextRecord"
|
||||
For Loop2 = Len(SQLResult_ProgramMakros.value("c000"))+1 To 3
|
||||
ProgramMakros = ProgramMakros & " "
|
||||
|
||||
Next
|
||||
|
||||
ProgramMakros = ProgramMakros & ":;"
|
||||
Else
|
||||
'To remove last ";"
|
||||
ProgramMakros = LEFT(ProgramMakros, Len(ProgramMakros)-1)
|
||||
Exit Do
|
||||
|
||||
End If
|
||||
Loop
|
||||
|
||||
Else
|
||||
ProgramMakros = "<KEIN MAKRO>:"
|
||||
|
||||
End If
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = ProgramMakros
|
||||
|
||||
ElseIf (CMBType = "Dateiendung") Then
|
||||
|
||||
Dateiendungen = ""
|
||||
Dateiendungen = Dateiendungen & "0:Export als SPL - WinLine SPOOL-Format;"
|
||||
Dateiendungen = Dateiendungen & "1:Export als MHT - Multipurpose Internet Mail Extension HTML Datei;"
|
||||
Dateiendungen = Dateiendungen & "4:Export als SPL - WinLine SPOOL-Format Version 2.0 (altes Format);"
|
||||
Dateiendungen = Dateiendungen & "5:Export als PDF - Portable Document Format - Adobe PDF;"
|
||||
Dateiendungen = Dateiendungen & "6:Export als rtf/doc - WordRTF"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Dateiendungen
|
||||
|
||||
ElseIf (CMBType = "Versionierung") Then
|
||||
|
||||
Versionierung = ""
|
||||
Versionierung = Versionierung & "0:Abbruch, wenn Datei bereits vorhanden;"
|
||||
Versionierung = Versionierung & "1:Überschreibe, wenn Datei bereits vorhanden;"
|
||||
Versionierung = Versionierung & "2:Zusammenführen, wenn Datei bereits vorhanden (nur PDF);"
|
||||
Versionierung = Versionierung & "9:Versioniere, wenn Datei bereits vorhanden;"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Versionierung
|
||||
|
||||
ElseIf (CMBType = "Eintragstyp") Then
|
||||
|
||||
Eintragstyp = ""
|
||||
Eintragstyp = Eintragstyp & "CUSTOM_VARIABLE:"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Eintragstyp
|
||||
|
||||
ElseIf (CMBType = "Datentyp") Then
|
||||
|
||||
Datentyp = ""
|
||||
Datentyp = Datentyp & "TEXT:;"
|
||||
Datentyp = Datentyp & "INTEGER:;"
|
||||
Datentyp = Datentyp & "DOUBLE:;"
|
||||
Datentyp = Datentyp & "DATE:"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Datentyp
|
||||
|
||||
Else
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = "<ERROR>"
|
||||
|
||||
End if
|
||||
|
||||
End Function
|
||||
@@ -0,0 +1,60 @@
|
||||
' SetExportWinLineDoc_FocusToRequiredFields
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine geht einmal durch sämtliche MUSS-Felder durch, damit ein User nicht manuell durchklicken muss.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 30.06.2021 / MK
|
||||
' Version Date / Editor: 30.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_FocusToRequiredFields(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
'As long focusing fields, prevent someone interrups by switching tabs/levels
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = False
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_GRID_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportVersionierung_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateiendung_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateinameVorschau_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateiname_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportPfad_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_Mandant_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_Beschreibung_ID
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = True
|
||||
|
||||
'--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
'As long focusing fields, prevent someone interrups by switching tabs/levels
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = False
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_GRID_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Eintragstyp_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Platzhalter_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Datentyp_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Mandant_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Beschreibung_ID
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,166 @@
|
||||
' SetExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt Controls in der GUI (anhand zuvor gesetzter Zwischenvariablen):
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" setzt pauschal, "dynamic" setzt anhand anderer Laufzeitvariablen, oder "clear" leert die Felder.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.06.2021 / MK
|
||||
' Version Date / Editor: 16.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and ((CTRLType = "dynamic") or (CTRLType = "static")) Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = cstr(LEVEL1_CHK_Aktiv_DBValue)
|
||||
LEVEL1_TXT_Beschreibung.Contents = cstr(LEVEL1_TXT_Beschreibung_DBValue)
|
||||
LEVEL1_TXT_Mandant.Contents = cstr(LEVEL1_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Contents = cstr(LEVEL1_TXT_WinLineVariable1_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable2.Contents = cstr(LEVEL1_TXT_WinLineVariable2_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable3.Contents = cstr(LEVEL1_TXT_WinLineVariable3_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable4.Contents = cstr(LEVEL1_TXT_WinLineVariable4_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable5.Contents = cstr(LEVEL1_TXT_WinLineVariable5_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable6.Contents = cstr(LEVEL1_TXT_WinLineVariable6_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable7.Contents = cstr(LEVEL1_TXT_WinLineVariable7_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable8.Contents = cstr(LEVEL1_TXT_WinLineVariable8_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable9.Contents = cstr(LEVEL1_TXT_WinLineVariable9_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable10.Contents = cstr(LEVEL1_TXT_WinLineVariable10_DBValue)
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.contents = cstr(LEVEL1_TXT_CallMakroPreExport1_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport2.contents = cstr(LEVEL1_TXT_CallMakroPreExport2_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport3.contents = cstr(LEVEL1_TXT_CallMakroPreExport3_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport4.contents = cstr(LEVEL1_TXT_CallMakroPreExport4_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport5.contents = cstr(LEVEL1_TXT_CallMakroPreExport5_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport6.contents = cstr(LEVEL1_TXT_CallMakroPreExport6_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport7.contents = cstr(LEVEL1_TXT_CallMakroPreExport7_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport8.contents = cstr(LEVEL1_TXT_CallMakroPreExport8_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport9.contents = cstr(LEVEL1_TXT_CallMakroPreExport9_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport10.contents = cstr(LEVEL1_TXT_CallMakroPreExport10_DBValue)
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Contents = cstr(LEVEL1_TXT_ExportPfad_DBValue)
|
||||
LEVEL1_TXT_ExportDateiname.Contents = cstr(LEVEL1_TXT_ExportDateiname_DBValue)
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = cstr(LEVEL1_TXT_ExportDateinameVorschau_DBValue)
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = cstr(LEVEL1_TXT_ExportDateiendung_DBValue)
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = cstr(LEVEL1_TXT_ExportVersionierung_DBValue)
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "clear") Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = cstr(0)
|
||||
LEVEL1_TXT_Beschreibung.Contents = cstr("")
|
||||
LEVEL1_TXT_Mandant.Contents = cstr("ALL")
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable2.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable3.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable4.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable5.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable6.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable7.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable8.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable9.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable10.Contents = cstr("")
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport2.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport3.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport4.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport5.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport6.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport7.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport8.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport9.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport10.contents = cstr("<KEIN MAKRO>")
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateiname.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = cstr("5")
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = cstr("9")
|
||||
|
||||
'-------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(LEVEL2_CHK_Aktiv_DBValue)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr(LEVEL2_TXT_Beschreibung_DBValue)
|
||||
LEVEL2_TXT_Mandant.Contents = cstr(LEVEL2_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr(LEVEL2_TXT_Eintragstyp_DBValue)
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr(LEVEL2_TXT_Platzhalter_DBValue)
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr(LEVEL2_TXT_Datentyp_DBValue)
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr(LEVEL2_TXT_Text_Wert_DBValue)
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(LEVEL2_TXT_Integer_Wert_DBValue)
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(LEVEL2_TXT_Double_Wert_DBValue)
|
||||
|
||||
IF (LEVEL2_TXT_Date_Wert_DBValue <> "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate(LEVEL2_TXT_Date_Wert_DBValue)
|
||||
else
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
end if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "clear") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(0)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr("")
|
||||
LEVEL2_TXT_Mandant.Contents = cstr("ALL")
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr("CUSTOM_VARIABLE")
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr("")
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr("TEXT")
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr("")
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(0)
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(0.0)
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate("01.01.1970")
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(LEVEL2_CHK_Aktiv_DBValue)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr(LEVEL2_TXT_Beschreibung_DBValue)
|
||||
LEVEL2_TXT_Mandant.Contents = cstr(LEVEL2_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr(LEVEL2_TXT_Eintragstyp_DBValue)
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr(LEVEL2_TXT_Platzhalter_DBValue)
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr(LEVEL2_TXT_Datentyp_DBValue)
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr(LEVEL2_TXT_Text_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(LEVEL2_TXT_Integer_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(LEVEL2_TXT_Double_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
IF (LEVEL2_TXT_Date_Wert_DBValue <> "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate(LEVEL2_TXT_Date_Wert_DBValue)
|
||||
else
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
end if
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,101 @@
|
||||
' DD-INSERT_LANGBESCHINT_INTO_BELEGERFASSUNG
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten für reine Anzeigefelder.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 22.06.2021 / MD
|
||||
' Version Date / Editor: 22.06.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_ReadOnlyControls(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
'Current selected line in grid 1
|
||||
IF (cint(LEVEL1_TXT_GUID_DBValue) > 0) Then
|
||||
LEVEL1_TXT_GUID.Contents = "GUID: " & cstr(LEVEL1_TXT_GUID_DBValue)
|
||||
Else
|
||||
LEVEL1_TXT_GUID.Contents = "GUID: <0>"
|
||||
End if
|
||||
|
||||
'Line Counter in grid 1
|
||||
If (LEVEL1_Grid.LineCount > 0) Then
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
Else
|
||||
LEVEL1_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
End if
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
'Current selected line in grid 2
|
||||
IF (cint(LEVEL2_TXT_GUID_DBValue) > 0) Then
|
||||
LEVEL2_TXT_GUID.Contents = "GUID: " & cstr(LEVEL2_TXT_GUID_DBValue)
|
||||
Else
|
||||
LEVEL2_TXT_GUID.Contents = "GUID: <0>"
|
||||
End if
|
||||
|
||||
'Line Counter in grid 2
|
||||
If (LEVEL2_Grid.LineCount > 0) Then
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
Else
|
||||
LEVEL2_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
End if
|
||||
|
||||
ElseIf (LEVEL = 3) or (LEVEL = "3") Then
|
||||
|
||||
LEVEL3_TXT_Standard_Modul_Path.Contents = ModuleDefaultSourcePath
|
||||
LEVEL3_TXT_EWLD_Modul_Path.Contents = ModuleExportWinLineDocSourcePath
|
||||
LEVEL3_TXT_WebServiceUser.Contents = WebServiceUser
|
||||
LEVEL3_TXT_Blank.active = true
|
||||
LEVEL3_TXT_Blank.contents = " "
|
||||
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Definitely, does not matter tab / level 1 or 2 set these fields...
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (LEVEL1_GRID_CURRENT_GUID > 0)) or (((LEVEL = 2) or (LEVEL = "2")) and (LEVEL2_GRID_CURRENT_GUID > 0)) Then
|
||||
|
||||
IF ((LEVEL0_TXT_Erstellt_wer_DBValue > empty) and (LEVEL0_TXT_Erstellt_wer_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = cstr(LEVEL0_TXT_Erstellt_wer_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Erstellt_wann_DBValue > empty) and (LEVEL0_TXT_Erstellt_wann_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = cdate(LEVEL0_TXT_Erstellt_wann_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Geaendert_wer_DBValue > empty) and (LEVEL0_TXT_Geaendert_wer_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = cstr(LEVEL0_TXT_Geaendert_wer_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Geaendert_wann_DBValue > empty) and (LEVEL0_TXT_Geaendert_wann_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Geaendert_wann.Contents = cdate(LEVEL0_TXT_Geaendert_wann_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Geaendert_wann.contents = NULL
|
||||
End if
|
||||
|
||||
'But if no valid line was selected...
|
||||
Elseif (LEVEL <> 3) and (LEVEL <> "3") Then
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = NULL
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = NULL
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = NULL
|
||||
LEVEL0_TXT_Geaendert_wann.contents = NULL
|
||||
|
||||
End if
|
||||
|
||||
End sub
|
||||
@@ -0,0 +1,168 @@
|
||||
' SetExportWinLineDoc_SQLData
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt eine Tabelle (Grid) mit Daten
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (BUTTON) = Die ID des betätigten Knopfs.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_SQLData(LEVEL,BUTTON)
|
||||
|
||||
If (BUTTON = LEVEL3_BTN_Restore_Profiles_ID) Then
|
||||
|
||||
IF (FileSystemObject.FileExists(TemplateExportWinLineDoc_Profiles_File)) Then
|
||||
|
||||
Set SQLResult_Profiles = Conn.Select(SQLQuery_Profiles_Default)
|
||||
If (SQLResult_Profiles.RowCount) > 0 Then
|
||||
|
||||
MsgBoxResult = MsgBox ("Wenn Sie fortfahren, werden die Auslieferungsprofile gelöscht und neu angelegt!" & vbCrLf & vbCrLf & _
|
||||
"Änderungen an diesen gehen verloren!" & vbCrLf & vbCrLf & _
|
||||
"Der Vorgang kann NICHT Rückgängig gemacht werden!" & vbCrLf & vbCrLf & _
|
||||
"Möchten Sie fortfahren?",vbYesNo+vbCritical,DEFAULT_TITLE & " - ACHTUNG! ACHTUNG!")
|
||||
|
||||
If (MsgBoxResult = 6) Then
|
||||
|
||||
SQLResult_Profiles = Conn.ExecuteSQL(SQLDelete_Profiles)
|
||||
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
If (SQLResult_Profiles = true) Then
|
||||
|
||||
'After the delete insert
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Profiles_File
|
||||
|
||||
Else
|
||||
MsgBox "Der Löschvorgang ist fehlgeschlagen!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
SQLResult_Profiles = 0
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
MsgBox "Der Vorgang wurde abgebrochen!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Profiles_File
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgBox "Die Vorlagen-Datei wurde nicht gefunden!" & vbCrLf & vbCrLf &_
|
||||
TemplateExportWinLineDoc_Profiles_File & vbCrLf & _
|
||||
"",vbYesNo+vbCritical,DEFAULT_TITLE & " - Abbruch!"
|
||||
|
||||
End if
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (BUTTON = LEVEL3_BTN_Restore_Configs_ID) Then
|
||||
|
||||
Set SQLResult_Configs = Conn.Select(SQLQuery_Configs_Default)
|
||||
If (SQLResult_Configs.RowCount) > 0 Then
|
||||
|
||||
MsgBoxResult = MsgBox ("Wenn Sie fortfahren, werden die Auslieferungskonfigurationen gelöscht und neu angelegt!" & vbCrLf & vbCrLf & _
|
||||
"Änderungen an diesen gehen verloren!" & vbCrLf & vbCrLf & _
|
||||
"Der Vorgang kann NICHT Rückgängig gemacht werden!" & vbCrLf & vbCrLf & _
|
||||
"Möchten Sie fortfahren?",vbYesNo+vbCritical,DEFAULT_TITLE & " - ACHTUNG! ACHTUNG!")
|
||||
|
||||
If (MsgBoxResult = 6) Then
|
||||
|
||||
SQLResult_Configs = Conn.ExecuteSQL(SQLDelete_Configs)
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
If (SQLResult_Configs = true) Then
|
||||
|
||||
'After the delete insert
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Configs_File
|
||||
|
||||
Else
|
||||
MsgBox "Der Löschvorgang ist fehlgeschlagen!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
SQLResult_Configs = 0
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
MsgBox "Der Vorgang wurde abgebrochen!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Configs_File
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgBox "Die Vorlagen-Datei wurde nicht gefunden!" & vbCrLf & vbCrLf &_
|
||||
TemplateExportWinLineDoc_Configs_File & vbCrLf & _
|
||||
"",vbYesNo+vbCritical,DEFAULT_TITLE & " - Abbruch!"
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------
|
||||
Private Sub InsertExportWinLineDoc_SQLData(LEVEL,FILE)
|
||||
|
||||
'Get file content of the sql script
|
||||
FileToRead.CharSet = "utf-8"
|
||||
FileToRead.Open
|
||||
FileToRead.LoadFromFile(File)
|
||||
FileToReadContents = FileToRead.ReadText()
|
||||
FileToRead.Close
|
||||
|
||||
SQLInsert = FileToReadContents
|
||||
|
||||
'Replace the default TB names
|
||||
SQLInsert = Replace(SQLInsert,"[dbo].[t650]",TBDD_EXPORT_WINLINEDOC_CONFIG)
|
||||
SQLInsert = Replace(SQLInsert,"[dbo].[t651]",TBDD_EXPORT_WINLINEDOC_PROFILE)
|
||||
|
||||
'Some magic OTRS cannot do
|
||||
SQLInsert = Replace(SQLInsert,vbCr,"")
|
||||
SQLInsert = Replace(SQLInsert,vbLf,"")
|
||||
SQLInsert = TRIM(SQLInsert)
|
||||
|
||||
'Execute Insert - remember that no "GO" order is supported
|
||||
SQLResult = Conn.ExecuteSQL(SQLInsert)
|
||||
|
||||
IF (SQLResult = True) Then
|
||||
msgbox "Die Wiederherstellung war erfolgreich!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
ElseIf (SQLResult = False) Then
|
||||
msgbox "Achtung, es ist ein Fehler aufgetreten!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE
|
||||
End if
|
||||
|
||||
IF (LEVEL = 1) Then
|
||||
SetExportWinLineDoc_TableContent LEVEL,LEVEL1_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 2) Then
|
||||
SetExportWinLineDoc_TableContent LEVEL,LEVEL2_GRID_ID
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,107 @@
|
||||
' SetExportWinLineDoc_TableContent
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt eine Tabelle (Grid) mit Daten
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 07.07.2021 / MK
|
||||
' Version Date / Editor: 07.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_TableContent(LEVEL,GRID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
LEVEL1_Grid.Clear
|
||||
LEVEL1_Grid.InitUserGrid
|
||||
LEVEL1_Grid.Header
|
||||
|
||||
Set SQLResult_Profiles = Conn.Select(SQLQuery_Profiles)
|
||||
If (SQLResult_Profiles.RowCount) > 0 Then
|
||||
|
||||
LEVEL1_Grid.IsRedraw = False
|
||||
|
||||
'Fill left Frame / Table
|
||||
If (SQLResult_Profiles.RowCount > 0) Then
|
||||
Do
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,0) = cint(SQLResult_Profiles.value("u000"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,1) = cstr(SQLResult_Profiles.value("u001"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,2) = cstr(SQLResult_Profiles.value("u002"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,3) = cstr(SQLResult_Profiles.value("u003"))
|
||||
|
||||
LEVEL1_Grid.AddLine()
|
||||
|
||||
'Trick it, because rowcount wont work
|
||||
If (SQLResult_Profiles.NextRecord = False) Then
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
End If
|
||||
|
||||
LEVEL1_Grid.IsRedraw = True
|
||||
|
||||
'Show count down below the table
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
'Set focus for the fist call, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
LEVEL2_Grid.Clear
|
||||
LEVEL2_Grid.InitUserGrid
|
||||
LEVEL2_Grid.Header
|
||||
|
||||
Set SQLResult_Configs = Conn.Select(SQLQuery_Configs)
|
||||
If (SQLResult_Configs.RowCount) > 0 Then
|
||||
|
||||
LEVEL2_Grid.IsRedraw = False
|
||||
|
||||
'Fill left Frame / Table
|
||||
If (SQLResult_Configs.RowCount > 0) Then
|
||||
Do
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,50) = cint(SQLResult_Configs.value("u000"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,51) = cstr(SQLResult_Configs.value("u001"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,52) = cstr(SQLResult_Configs.value("u002"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,53) = cstr(SQLResult_Configs.value("u003"))
|
||||
|
||||
LEVEL2_Grid.AddLine()
|
||||
|
||||
'Trick it, because rowcount wont work
|
||||
If (SQLResult_Configs.NextRecord = False) Then
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
End If
|
||||
|
||||
LEVEL2_Grid.IsRedraw = True
|
||||
|
||||
'Show count down the table
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
'Set focus for the fist call, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,45 @@
|
||||
' SetExportWinLineDoc_TableLayout
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine bereitet das Layout / die Spalten einer Tabelle (Grid) vor.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 05.07.2021 / MK
|
||||
' Version Date / Editor: 05.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_TableLayout(LEVEL,GRID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
LEVEL1_GRID_COLUMN_GUID = LEVEL1_Grid.AddColumn("GUID", "T21,GUID", "1","V",0,495,0, 0,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_AKTIV = LEVEL1_Grid.AddColumn("Aktiv", "T17,Aktiv", "l","V",0,495,1, 5,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_BESCHREIBUNG = LEVEL1_Grid.AddColumn("Beschreibung", "T21,Beschreibung", "1","V",0,495,2,40,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_MANDANT = LEVEL1_Grid.AddColumn("Mandant", "T21,Mandant", "1","V",0,495,3, 8,scrtflag+sizeflag+hideflag)
|
||||
|
||||
End If
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
LEVEL2_GRID_COLUMN_GUID = LEVEL2_Grid.AddColumn("GUID", "T21,GUID", "1","V",0,495,50, 0,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_AKTIV = LEVEL2_Grid.AddColumn("Aktiv", "T17,Aktiv", "l","V",0,495,51, 5,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_BESCHREIBUNG = LEVEL2_Grid.AddColumn("Beschreibung", "T21,Beschreibung", "1","V",0,495,52,40,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_MANDANT = LEVEL2_Grid.AddColumn("Mandant", "T21,Mandant", "1","V",0,495,53, 8,scrtflag+sizeflag+hideflag)
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,53 @@
|
||||
' ShowExportWinLineDoc_Level
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert unterschiedliche Showlevel.
|
||||
' Parameter 1 (LEVEL) = Das zu setzende Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub ShowExportWinLineDoc_Level(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,False
|
||||
|
||||
CURRENT_LEVEL = 1
|
||||
|
||||
'Set focus, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,False
|
||||
|
||||
CURRENT_LEVEL = 2
|
||||
|
||||
'Set focus, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 3) or (LEVEL = "3") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 0,0,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,False
|
||||
|
||||
CURRENT_LEVEL = 3
|
||||
|
||||
'MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL3_TXT_Blank_ID
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,230 @@
|
||||
' SwitchExportWinLineDoc_TableContent
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten beim Zeilenwechel im Grid und zeigt diese ggf. an.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 3 (UPDATE) = Falls vor dem Wechsel eine Prüfung auf geänderte Daten durchgeführt werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SwitchExportWinLineDoc_TableContent(LEVEL,GRID,UPDATE)
|
||||
|
||||
'Set global var to prevent focus change -> "rumflackern"
|
||||
PREVENT_FOCUS_CHANGE = True
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
'Check if there are unsaved changes before switch line
|
||||
If (LEVEL1_GRID_CURRENT_ROW > 0) and ((LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CURRENT_GUID <> -1)) and (UPDATE = true) Then
|
||||
|
||||
SaveExportWinLineDoc_Record CURRENT_LEVEL,LEVEL1_GRID_CURRENT_GUID,False
|
||||
|
||||
End If
|
||||
|
||||
LEVEL1_GRID.GetCurrentCell CURRENT_ROW, CURRENT_COLUMN
|
||||
GRIDSelectedLines = LEVEL1_GRID.SelectedLines
|
||||
|
||||
If isarray (GRIDSelectedLines) Then
|
||||
|
||||
If Ubound(GRIDSelectedLines) = 0 Then
|
||||
|
||||
LEVEL1_GRID_CURRENT_ROW = GRIDSelectedLines(0)
|
||||
LEVEL1_GRID_CURRENT_GUID = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_GUID)
|
||||
LEVEL1_GRID_CURRENT_AKTIV = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_AKTIV)
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_BESCHREIBUNG)
|
||||
LEVEL1_GRID_CURRENT_Mandant = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_MANDANT)
|
||||
|
||||
If (DEBUG_ON = True) Or (DebugMode = "Enabled") Then
|
||||
msgbox "CURRENT_ROW: " & LEVEL1_GRID_CURRENT_ROW & vbCrlf & _
|
||||
"CURRENT_GUID: " & LEVEL1_GRID_CURRENT_GUID & vbCrlf & _
|
||||
"CURRENT_AKTIV: " & LEVEL1_GRID_CURRENT_AKTIV & vbCrlf & _
|
||||
"CURRENT_Beschreibung: " & LEVEL1_GRID_CURRENT_Beschreibung & vbCrlf & _
|
||||
"CURRENT_Mandant: " & LEVEL1_GRID_CURRENT_Mandant & vbCrlf & _
|
||||
"",vbOkayonly+vbInformation, DEBUG_TITLE & "SwitchExportWinLineDoc_TableContent"
|
||||
End If
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
'For the first call the value allocation (.contents) must run through all fields
|
||||
'Otherwise every "Must-Field" must be clicked manually!
|
||||
'This is corresponding with the "bResult.Value" in the OnCheckUserfield Event
|
||||
LEVEL1_GRID_CALLCOUNT = LEVEL1_GRID_CALLCOUNT + 1
|
||||
|
||||
'Set static fields to activ
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'get data for selected line
|
||||
GetExportWinLineDoc_Record CURRENT_LEVEL,LEVEL1_GRID_ID,CURRENT_GUID
|
||||
|
||||
'set data to the read only fields
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'set data to the writable fields
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'Enable / Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
'For the first call set focus once to the "Must-Fields"
|
||||
IF ((LEVEL1_GRID_CURRENT_ROW > 0) and (LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CALLCOUNT < 2)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
'Important in this case, to set these vars to 0 at first
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'If no valid line was selected, clear and disable input area
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"clear"
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
'Check if there are unsaved changes before switch line
|
||||
If (LEVEL2_GRID_CURRENT_ROW > 0) and ((LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CURRENT_GUID <> -1)) and (UPDATE = true) Then
|
||||
|
||||
SaveExportWinLineDoc_Record CURRENT_LEVEL,LEVEL2_GRID_CURRENT_GUID,False
|
||||
|
||||
End If
|
||||
|
||||
LEVEL2_GRID.GetCurrentCell CURRENT_ROW, CURRENT_COLUMN
|
||||
GRIDSelectedLines = LEVEL2_GRID.SelectedLines
|
||||
|
||||
If isarray (GRIDSelectedLines) Then
|
||||
|
||||
If Ubound(GRIDSelectedLines) = 0 Then
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = GRIDSelectedLines(0)
|
||||
LEVEL2_GRID_CURRENT_GUID = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_GUID)
|
||||
LEVEL2_GRID_CURRENT_AKTIV = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_AKTIV)
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_BESCHREIBUNG)
|
||||
LEVEL2_GRID_CURRENT_Mandant = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_MANDANT)
|
||||
|
||||
If (DEBUG_ON = True) Or (DebugMode = "Enabled") Then
|
||||
msgbox "CURRENT_ROW: " & LEVEL2_GRID_CURRENT_ROW & vbCrlf & _
|
||||
"CURRENT_GUID: " & LEVEL2_GRID_CURRENT_GUID & vbCrlf & _
|
||||
"CURRENT_AKTIV: " & LEVEL2_GRID_CURRENT_AKTIV & vbCrlf & _
|
||||
"CURRENT_Beschreibung: " & LEVEL2_GRID_CURRENT_Beschreibung & vbCrlf & _
|
||||
"CURRENT_Mandant: " & LEVEL2_GRID_CURRENT_Mandant & vbCrlf & _
|
||||
"",vbOkayonly+vbInformation, DEBUG_TITLE & "SwitchExportWinLineDoc_TableContent"
|
||||
End If
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
'For the first call the value allocation (.contents) must run through all fields
|
||||
'Otherwise every "Must-Field" must be clicked manually!
|
||||
'This is corresponding with the "bResult.Value" in the OnCheckUserfield Event
|
||||
LEVEL2_GRID_CALLCOUNT = LEVEL2_GRID_CALLCOUNT + 1
|
||||
|
||||
'Set static fields to activ
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'get data for selected line
|
||||
GetExportWinLineDoc_Record CURRENT_LEVEL,LEVEL2_GRID_ID,CURRENT_GUID
|
||||
|
||||
'set data to the read only fields
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'set data to the writable fields
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Enable / Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'SPECIAL: set data type fileds depending on selcted type on/off
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Check for duplicate on changing data, or new data, or changing someting else and pressing the save button
|
||||
SQLQuery_ConfigCount = SQLQuery_ConfigCount_Template
|
||||
SQLQuery_ConfigCount = Replace(SQLQuery_ConfigCount,"%LEVEL2_TXT_Platzhalter_Value%",LEVEL2_TXT_Platzhalter_DBValue)
|
||||
|
||||
Set SQLResult_ConfigCount = Conn.Select(SQLQuery_ConfigCount)
|
||||
IF ((SQLResult_ConfigCount.Rowcount > 1) and (LEVEL2_GRID_CALLCOUNT > 2)) Then
|
||||
Msgbox "Achtung: Der Platzerhalter " & LEVEL2_TXT_Platzhalter_DBValue & ", " & vbCrlf & _
|
||||
"wird bereits (" & SQLResult_ConfigCount.Rowcount & "x) verwendet!" & vbCrlf & vbCrlf & _
|
||||
"Bitte ändern Sie Ihre Eingabe, " & vbCrlf & _
|
||||
"ansonsten wird es zu Fehlern bei der Dateiablage kommen!" & vbCrlf & vbCrlf & _
|
||||
"Muster: %PLATZHALTER%" & vbCrlf & _
|
||||
"",vbInformation+vbOKOnly,DEFAULT_TITLE & " - Zeilenwechsel"
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_TXT_Platzhalter_ID
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
'For the first call set focus once to the "Must-Fields"
|
||||
IF ((LEVEL2_GRID_CURRENT_ROW > 0) and (LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CALLCOUNT < 2)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
'Important in this case, to set these vars to 0 at first
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'If no valid line was selected, clear and disable input area
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"clear"
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
PREVENT_FOCUS_CHANGE = False
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,23 @@
|
||||
/******
|
||||
-- Export-WinLineDoc (EWLD)
|
||||
-- =================================================================
|
||||
-- Dieses Skript legt vordefinierte Konfigurationen an.
|
||||
-- =================================================================
|
||||
-- Copyright (c) 2021 by Digital Data GmbH
|
||||
--
|
||||
-- Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
-- Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
-- =================================================================
|
||||
-- Creation Date / Author: 15.07.2021 / MK
|
||||
-- Version Date / Editor: 15.07.2021 / MK
|
||||
-- Version Number: 1.0.0.0
|
||||
-- =================================================================
|
||||
-- History:
|
||||
-- 15.07.2021 / MK - Erstellung
|
||||
--
|
||||
-- HINWEISE: Keine Go Befehle verwenden!
|
||||
******/
|
||||
|
||||
INSERT [dbo].[t650] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [U010], [U011], [U012], [U013], [U014]) VALUES (1, N'1', N'Mandant Kurzname', N'ALL', N'CUSTOM_VARIABLE', N'%KURZNAME_MANDANT%', N'TEXT', N'Toys&Bikes', 0, 0, CAST(N'1970-01-01T00:00:00.000' AS DateTime), N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t650] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [U010], [U011], [U012], [U013], [U014]) VALUES (2, N'1', N'Exportpfad', N'ALL', N'CUSTOM_VARIABLE', N'%EXPORTPATH%', N'TEXT', N'c:\WinLine\Dokumentablage', 0, 0, CAST(N'1970-01-01T00:00:00.000' AS DateTime), N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
@@ -0,0 +1,112 @@
|
||||
/******
|
||||
-- Export-WinLineDoc (EWLD)
|
||||
-- =================================================================
|
||||
-- Dieses Skript legt vordefinierte Profile an.
|
||||
-- =================================================================
|
||||
-- Copyright (c) 2021 by Digital Data GmbH
|
||||
--
|
||||
-- Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
-- Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
-- =================================================================
|
||||
-- Creation Date / Author: 15.07.2021 / MK
|
||||
-- Version Date / Editor: 15.07.2021 / MK
|
||||
-- Version Number: 1.0.0.0
|
||||
-- =================================================================
|
||||
-- History:
|
||||
-- 15.07.2021 / MK - Erstellung
|
||||
--
|
||||
-- HINWEISE: Keine Go Befehle verwenden!
|
||||
******/
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (1, 1, N'Angebot (debitorisch)', N'ALL', N'1', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Angebot\%YEAR%\%MONTH%', N'%MandantenNr%-AANG-%AngebotsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANG-%AngebotsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (2, 1, N'Angebot-Storno (debitorisch)', N'ALL', N'1', N'11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Angebot-Storno\%YEAR%\%MONTH%', N'%MandantenNr%-AANG-Storno-%AngebotsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANG-Storno-%AngebotsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (3, 1, N'Auftrag (debitorisch)', N'ALL', N'1', N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Auftrag\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AAB-%AuftragsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AAB-%AuftragsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (4, 1, N'Auftrag-Storno (debitorisch)', N'ALL', N'1', N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Auftrag-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AAB-Storno-%AuftragsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AAB-Storno-%AuftragsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (5, 1, N'Lieferschein (debitorisch)', N'ALL', N'1', N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Lieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ALS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ALS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (6, 1, N'Lieferschein-Storno (debitorisch)', N'ALL', N'1', N'13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Lieferschein-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ALS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ALS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (7, 1, N'Rechnung (debitorisch)', N'ALL', N'1', N'4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ARE-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ARE-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (8, 1, N'Rechnung-Storno (debitorisch)', N'ALL', N'1', N'14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ARE-Storno-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ARE-Storno-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (9, 1, N'Anfrage (kreditorisch)', N'ALL', N'2', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Anfrage\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AANF-%AnfragenNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANF-%AnfragenNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (10, 1, N'Anfrage-Storno (kreditorisch)', N'ALL', N'2', N'11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Anfrage-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AANF-Storno-%AnfragenNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANF-Storno-%AnfragenNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (11, 1, N'Bestellung (kreditorisch)', N'ALL', N'2', N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Bestellung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ABE-%BestellNr%-%KontoName%
|
||||
', N'%MandantenNr%-ABE-%BestellNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (12, 1, N'Bestellung-Storno (kreditorisch)', N'ALL', N'2', N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Bestellung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ABE-Storno-%BestellNr%-%KontoName%
|
||||
', N'%MandantenNr%-ABE-Storno-%BestellNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (13, 1, N'Lieferschein (kreditorisch)', N'ALL', N'2', N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Lieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ELS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ELS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (14, 1, N'Lieferschein-Storno (kreditorisch)', N'ALL', N'2', N'13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Lieferschein-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ELS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ELS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (15, 1, N'Rechnung (kreditorisch)', N'ALL', N'2', N'4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Rechnung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ERE-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ERE-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (16, 1, N'Rechnung-Storno (kreditorisch)', N'ALL', N'2', N'14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Rechnung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ERE-Storno-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ERE-Storno-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (17, 1, N'Teillieferschein (debitorisch)', N'ALL', N'1', N'-3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Teillieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ATLS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ATLS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (18, 1, N'Gutschrift (debitorisch)', N'ALL', N'1', N'4', NULL, N'NegativAmount', NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Gutschrift\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AGU-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AGU-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (19, 1, N'Rechnungskorrektur (debitorisch)', N'ALL', N'1', N'4', NULL, N'NegativAmount', N'Correction', NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnungskorrektur\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AREK-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AREK-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
@@ -0,0 +1,595 @@
|
||||
' Export-WinLineDoc (EWLD)
|
||||
' VB-Script for exporting printed docs to Filesystem.
|
||||
' ----------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow(at)digitaldata.works
|
||||
' ----------------------------------------------------------------
|
||||
' Creation Date / Author: 01.07.2021 / MK
|
||||
' Version Date / Editor: 09.10.2021 / MK
|
||||
' Version Number: 3.1.0.0
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
'#set variables#
|
||||
DocVersionSeparator = "~"
|
||||
ReplaceSpecialChar = ""
|
||||
DebugMode = "Disabled" 'Enabled
|
||||
|
||||
PROFILE_TB = "[T651]"
|
||||
CONFIG_TB = "[T650]"
|
||||
CONFIG_GUID = 0
|
||||
|
||||
WebServiceUser = "meso"
|
||||
WebServiceUser_MandantenstammID = 211
|
||||
|
||||
'#set constants#
|
||||
DEFAULT_TITLE ="Export-WinLineDoc"
|
||||
DEBUG_TITLE ="DEBUG - " & DEFAULT_TITLE
|
||||
|
||||
EWLD_GUID =0
|
||||
DocVersion =1
|
||||
WinLineCurrentUser =CWLStart.CurrentUser.Name
|
||||
MandatorNr =TRIM(CSTR(Value (0,11)))
|
||||
ProgramDocType =TRIM(CSTR(Value (0,20)))
|
||||
RunningNr =TRIM(CSTR(Value (0,31)))
|
||||
OfferNr =TRIM(CSTR(Value (0,34)))
|
||||
OrderNr =TRIM(CSTR(Value (0,35)))
|
||||
DeliveryNoteNr =TRIM(CSTR(Value (0,36)))
|
||||
InvoiceNr =TRIM(CSTR(Value (0,37)))
|
||||
InquireNr =TRIM(CSTR(Value (0,34)))
|
||||
PurchaseNr =TRIM(CSTR(Value (0,35)))
|
||||
DocNr =TRIM(CSTR(Value (0,39)))
|
||||
DocCreationDate =TRIM(CSTR(Value (0,54)))
|
||||
DocChangedDate =TRIM(CSTR(Value (0,55)))
|
||||
DocType =TRIM(CSTR(Value (0,113)))
|
||||
Text1 =TRIM(CSTR(Value (25,63)))
|
||||
Text2 =TRIM(CSTR(Value (25,64)))
|
||||
Text3 =TRIM(CSTR(Value (25,65)))
|
||||
Text4 =TRIM(CSTR(Value (25,66)))
|
||||
Text5 =TRIM(CSTR(Value (25,67)))
|
||||
Text6 =TRIM(CSTR(Value (25,68)))
|
||||
Text7 =TRIM(CSTR(Value (25,69)))
|
||||
Text8 =TRIM(CSTR(Value (25,70)))
|
||||
Text9 =TRIM(CSTR(Value (25,71)))
|
||||
Text10 =TRIM(CSTR(Value (25,72)))
|
||||
DocFinalAmount =TRIM(CSTR(Value (25,100)))
|
||||
ProjectNr =TRIM(CSTR(Value (25,136)))
|
||||
InvoiceForCorrection =TRIM(CSTR(Value (25,147)))
|
||||
DocComment =TRIM(CSTR(Value (25,165)))
|
||||
AccountNr =TRIM(CSTR(Value (50,2)))
|
||||
AccountName =TRIM(CSTR(Value (50,3)))
|
||||
AddText1 =TRIM(CSTR(Value (50,201)))
|
||||
AddText2 =TRIM(CSTR(Value (50,202)))
|
||||
AddText3 =TRIM(CSTR(Value (50,203)))
|
||||
AddText4 =TRIM(CSTR(Value (50,204)))
|
||||
AddText5 =TRIM(CSTR(Value (50,205)))
|
||||
AddText6 =TRIM(CSTR(Value (50,206)))
|
||||
AddText7 =TRIM(CSTR(Value (50,207)))
|
||||
AddText8 =TRIM(CSTR(Value (50,208)))
|
||||
AddText9 =TRIM(CSTR(Value (50,209)))
|
||||
AddText10 =TRIM(CSTR(Value (50,210)))
|
||||
AddText11 =TRIM(CSTR(Value (50,211)))
|
||||
AddText12 =TRIM(CSTR(Value (50,212)))
|
||||
AddText13 =TRIM(CSTR(Value (50,213)))
|
||||
AddText14 =TRIM(CSTR(Value (50,214)))
|
||||
AddText15 =TRIM(CSTR(Value (50,215)))
|
||||
AddText16 =TRIM(CSTR(Value (50,216)))
|
||||
AddText17 =TRIM(CSTR(Value (50,217)))
|
||||
AddText18 =TRIM(CSTR(Value (50,218)))
|
||||
AddText19 =TRIM(CSTR(Value (50,219)))
|
||||
AddText20 =TRIM(CSTR(Value (50,220)))
|
||||
AddText21 =TRIM(CSTR(Value (50,221)))
|
||||
AddText22 =TRIM(CSTR(Value (50,222)))
|
||||
AddText23 =TRIM(CSTR(Value (50,223)))
|
||||
AddText24 =TRIM(CSTR(Value (50,224)))
|
||||
AddText25 =TRIM(CSTR(Value (50,225)))
|
||||
AddText26 =TRIM(CSTR(Value (50,226)))
|
||||
AddText27 =TRIM(CSTR(Value (50,227)))
|
||||
AddText28 =TRIM(CSTR(Value (50,228)))
|
||||
AddText29 =TRIM(CSTR(Value (50,229)))
|
||||
AddText30 =TRIM(CSTR(Value (50,230)))
|
||||
PostingType =TRIM(CSTR(Value (357,6)))
|
||||
ExportType =OutputType
|
||||
ExportDone ="ERROR!"
|
||||
|
||||
PROFILE_SQL_MAN = "[u000] = '"& CONFIG_GUID &"' AND [u001] = 1"
|
||||
PROFILE_SQL_AUTO= "[u001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [u004] = '"& PostingType &"' AND [u005] = '"& ProgramDocType &"' AND ([u006] = '"& DocType &"' OR [u006] IS NULL)"
|
||||
CONFIG_SQL = "[u001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [u004] In ('CUSTOM_VARIABLE') AND [u005] IS NOT NULL AND [u006] IS NOT NULL AND ([u007] IS NOT NULL OR [u008] IS NOT NULL OR [u009] IS NOT NULL OR [u010] IS NOT NULL)"
|
||||
|
||||
RegExpValidFilename = "[^a-zA-Z0-9\"&chr(64)&"\ü\ö\ä\Ü\Ö\Ä\ß\{\[\]\}\ \!\§\$\%\&\(\)\=\+\#\,\.\-\;\_\']{1,}"
|
||||
RegExpValidFilepath = "[^a-zA-Z0-9\"&chr(64)&"\ü\ö\ä\Ü\Ö\Ä\ß\{\[\]\}\ \!\§\$\%\&\(\)\=\+\#\,\.\-\;\_\'\\]{1,}"
|
||||
|
||||
SET FileSystemObject= CreateObject("Scripting.FileSystemObject")
|
||||
SET RI = CreateObject("Scripting.Dictionary")
|
||||
RI.CompareMode = vbTextCompare
|
||||
SET RegExpObject = New RegExp
|
||||
RegExpObject.IgnoreCas = true
|
||||
RegExpObject.Global = true
|
||||
|
||||
'#preparing part#
|
||||
'Reset Error Var
|
||||
Err.Clear
|
||||
|
||||
'No msgbox!
|
||||
If (WinLineCurrentUser=WebServiceUser) Then
|
||||
DebugMode="Disabled"
|
||||
End if
|
||||
|
||||
'Use central
|
||||
If (WebServiceUser="") Then
|
||||
WebServiceUser=CWLStart.CurrentCompany.Value(WebServiceUser_MandantenstammID)
|
||||
End if
|
||||
|
||||
'Fallback "Ursp. Beleg"
|
||||
IF (DocNr=Empty) and (InvoiceNr<>Empty) Then
|
||||
DocNr=InvoiceNr
|
||||
ELSEIF (DocNr=Empty) and (DeliveryNoteNr<>Empty) Then
|
||||
DocNr=DeliveryNoteNr
|
||||
ELSEIF (DocNr=Empty) and (OrderNr<>Empty) Then
|
||||
DocNr=OrderNr
|
||||
ELSEIF (DocNr=Empty) and (PurchaseNr<>Empty) Then
|
||||
DocNr=PurchaseNr
|
||||
ELSEIF (DocNr=Empty) and (OfferNr<>Empty) Then
|
||||
DocNr=OfferNr
|
||||
ELSEIF (DocNr=Empty) and (InquireNr<>Empty) Then
|
||||
DocNr=InquireNr
|
||||
End if
|
||||
|
||||
'Fallback
|
||||
If (AccountNr="") Then
|
||||
AccountNr=TRIM(CSTR(Value (5,2)))
|
||||
If (AccountNr="") Then
|
||||
AccountNr=TRIM(CSTR(Value (0,30)))
|
||||
End if
|
||||
End if
|
||||
|
||||
If (AccountName="") Then
|
||||
AccountName=TRIM(CSTR(Value (5,3)))
|
||||
End if
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "MandatorNr: " &MandatorNr &vbCrLf&_
|
||||
"ProgramDocType: "&ProgramDocType &vbCrLf&_
|
||||
"RunningNr: " &RunningNr &vbCrLf&_
|
||||
"PostingType: " &PostingType,,DEBUG_TITLE&" - WinLine Runtime Variables"
|
||||
|
||||
MSGBOX "Profile SQL:"&vbCrLf& PROFILE_SQL_AUTO&vbCrLf&vbCrLf&_
|
||||
"Config SQL: "&vbCrLf& CONFIG_SQL,,DEBUG_TITLE&" - SQL Commands (not final!)"
|
||||
END IF
|
||||
|
||||
'RI = Replace Object, because functions are not available
|
||||
RI.ADD "%MandantenNr%",MandatorNr
|
||||
RI.ADD "%Laufnummer%",RunningNr
|
||||
|
||||
RI.ADD "%UserName%",WinLineCurrentUser
|
||||
RI.ADD "%KontoNr%",AccountNr
|
||||
RI.ADD "%KontoName%",AccountName
|
||||
RI.ADD "%ProjektNr%",ProjectNr
|
||||
RI.ADD "%AngebotsNr%",OfferNr
|
||||
RI.ADD "%AuftragsNr%",OrderNr
|
||||
RI.ADD "%LieferscheinNr%",DeliveryNoteNr
|
||||
RI.ADD "%RechnungsNr%",InvoiceNr
|
||||
RI.ADD "%AnfragenNr%",InquireNr
|
||||
RI.ADD "%BestellNr%",PurchaseNr
|
||||
RI.ADD "%Belegart%",DocType
|
||||
RI.ADD "%Belegnummer%",DocNr
|
||||
RI.ADD "%BelegKommentar%",DocComment
|
||||
RI.ADD "%Textzeile1%",Text1
|
||||
RI.ADD "%Textzeile2%",Text2
|
||||
RI.ADD "%Textzeile3%",Text3
|
||||
RI.ADD "%Textzeile4%",Text4
|
||||
RI.ADD "%Textzeile5%",Text5
|
||||
RI.ADD "%Textzeile6%",Text6
|
||||
RI.ADD "%Textzeile7%",Text7
|
||||
RI.ADD "%Textzeile8%",Text8
|
||||
RI.ADD "%Textzeile9%",Text9
|
||||
RI.ADD "%Textzeile10%",Text10
|
||||
|
||||
RI.ADD "%Zusatzfeld1%",AddText1
|
||||
RI.ADD "%Zusatzfeld2%",AddText2
|
||||
RI.ADD "%Zusatzfeld3%",AddText3
|
||||
RI.ADD "%Zusatzfeld4%",AddText4
|
||||
RI.ADD "%Zusatzfeld5%",AddText5
|
||||
RI.ADD "%Zusatzfeld6%",AddText6
|
||||
RI.ADD "%Zusatzfeld7%",AddText7
|
||||
RI.ADD "%Zusatzfeld8%",AddText8
|
||||
RI.ADD "%Zusatzfeld9%",AddText9
|
||||
RI.ADD "%Zusatzfeld10%",AddText10
|
||||
RI.ADD "%Zusatzfeld11%",AddText11
|
||||
RI.ADD "%Zusatzfeld12%",AddText12
|
||||
RI.ADD "%Zusatzfeld13%",AddText13
|
||||
RI.ADD "%Zusatzfeld14%",AddText14
|
||||
RI.ADD "%Zusatzfeld15%",AddText15
|
||||
RI.ADD "%Zusatzfeld16%",AddText16
|
||||
RI.ADD "%Zusatzfeld17%",AddText17
|
||||
RI.ADD "%Zusatzfeld18%",AddText18
|
||||
RI.ADD "%Zusatzfeld19%",AddText19
|
||||
RI.ADD "%Zusatzfeld20%",AddText20
|
||||
RI.ADD "%Zusatzfeld21%",AddText21
|
||||
RI.ADD "%Zusatzfeld22%",AddText22
|
||||
RI.ADD "%Zusatzfeld23%",AddText23
|
||||
RI.ADD "%Zusatzfeld24%",AddText24
|
||||
RI.ADD "%Zusatzfeld25%",AddText25
|
||||
RI.ADD "%Zusatzfeld26%",AddText26
|
||||
RI.ADD "%Zusatzfeld27%",AddText27
|
||||
RI.ADD "%Zusatzfeld28%",AddText28
|
||||
RI.ADD "%Zusatzfeld29%",AddText29
|
||||
RI.ADD "%Zusatzfeld30%",AddText30
|
||||
|
||||
RI.ADD "%DAY%",(day(date))
|
||||
RI.ADD "%DAYNAME%",(WeekdayName(weekday(now())))
|
||||
RI.ADD "%MONTH%",(month(date))
|
||||
RI.ADD "%MONTHNAME%",MonthName((month(date)))
|
||||
RI.ADD "%YEAR%",(Year(date))
|
||||
|
||||
'Get doc profile
|
||||
IF ((Mid(DocFinalAmount,1,1))="-") and (InvoiceForCorrection<>Empty) THEN
|
||||
PROFILE_SQL_AUTO = PROFILE_SQL_AUTO&" AND [u007] like '%NegativAmount%' AND [u008] like '%Correction%'"
|
||||
Elseif ((Mid(DocFinalAmount,1,1))="-") THEN
|
||||
PROFILE_SQL_AUTO = PROFILE_SQL_AUTO&" AND [u007] like '%NegativAmount%'"
|
||||
END IF
|
||||
|
||||
'Override the logic here, by setting the CONFIG_GUID Var with a value higher then 0 (for not FAKT docs).
|
||||
IF (CONFIG_GUID>0) Then
|
||||
SET PROFILE_RESULT=CWLStart.CurrentCompany.SearchRecord(PROFILE_TB,PROFILE_SQL_MAN)
|
||||
Else
|
||||
SET PROFILE_RESULT=CWLStart.CurrentCompany.SearchRecord(PROFILE_TB,PROFILE_SQL_AUTO)
|
||||
End IF
|
||||
|
||||
IF (Err.Number<>0) THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: Getting Variables from DB Table "&PROFILE
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF (PROFILE_RESULT=-1) Then
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "No Rows found, SQL: "&vbCrLf& PROFILE_SQL_AUTO,,DEBUG_TITLE&" Profiles from Database table "&PROFILE
|
||||
END IF
|
||||
|
||||
ELSEIF (PROFILE_RESULT.RowCount>1) Then
|
||||
IF (WinLineCurrentUser<>WebServiceUser) Then
|
||||
msgbox "Achtung, das Export-Profil konnte nicht eindeutig identifiziert werden!"&vbCrLf&_
|
||||
"Das erste passende wird nun verwendet!",,"Bitte den Administrator informieren!"
|
||||
End if
|
||||
Else
|
||||
|
||||
EWLD_GUID =cint(PROFILE_RESULT.Value(0))
|
||||
EWLD_DESCRIPTION =Trim(cstr(PROFILE_RESULT.Value(2)))
|
||||
'14 to 23 -> WILL BE USED LATER!
|
||||
EWLD_PATH =Trim(cstr(PROFILE_RESULT.Value(24)))
|
||||
EWLD_FILENAME =Trim(cstr(PROFILE_RESULT.Value(25)))
|
||||
EWLD_FILENAME_PREVIEW =Trim(cstr(PROFILE_RESULT.Value(26)))
|
||||
EWLD_FILEEXTENSION =cint(PROFILE_RESULT.Value(27))
|
||||
EWLD_VERSIONING =cint(PROFILE_RESULT.Value(28))
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "GUID: "&EWLD_GUID&vbCrLf&_
|
||||
"Description: "&EWLD_DESCRIPTION,,DEBUG_TITLE&" document profile from Database table "&PROFILE
|
||||
END IF
|
||||
|
||||
'Get variables from table
|
||||
SET CONFIG_RESULT=CWLStart.CurrentCompany.SearchRecord(CONFIG_TB,CONFIG_SQL)
|
||||
|
||||
IF (Err.Number<>0) THEN
|
||||
MSGBOX "Error Code: "&Err.Number&vbCrLf&_
|
||||
"Error Description: "&Err.Description,,"ERROR: Variables from Database table "&CONFIG_SQL&" !"
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF (CONFIG_RESULT=-1) Then
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "No Rows found, SQL: "&CONFIG_SQL,,DEBUG_TITLE&" Variables from Database table "&CONFIG_TB
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
FOR LoopCounter=1 TO CONFIG_RESULT.RowCount
|
||||
|
||||
EWLD_CONFIG_NAME=CONFIG_RESULT.Value(5)
|
||||
EWLD_CONFIG_TYPE=CONFIG_RESULT.Value(6)
|
||||
EWLD_CONFIG_TEXT=CONFIG_RESULT.Value(7)
|
||||
EWLD_CONFIG_INT =CONFIG_RESULT.Value(8)
|
||||
EWLD_CONFIG_DBL =CONFIG_RESULT.Value(9)
|
||||
EWLD_CONFIG_DATE=CONFIG_RESULT.Value(10)
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "Name: " & EWLD_CONFIG_NAME &vbCrLf&_
|
||||
"Type: " & EWLD_CONFIG_TYPE &vbCrLf&vbCrLf&_
|
||||
"Text Value: " & EWLD_CONFIG_TEXT &vbCrLf&_
|
||||
"Integer Value: " & EWLD_CONFIG_INT &vbCrLf&_
|
||||
"Double Value: " & EWLD_CONFIG_DBL &vbCrLf&_
|
||||
"Date Value: " & EWLD_CONFIG_DATE,,DEBUG_TITLE&" - "& LoopCounter &" of "& CONFIG_RESULT.RowCount &" Variables from DB table "& CONFIG_TB
|
||||
END IF
|
||||
|
||||
IF TRIM(((EWLD_CONFIG_TYPE))="TEXT") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_TEXT
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="INTEGER") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_INT
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="DOUBLE") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_DBL
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="DATE") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_DATE
|
||||
End if
|
||||
|
||||
CONFIG_RESULT.NextRecord
|
||||
|
||||
NEXT
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_PATH<>"") THEN
|
||||
|
||||
RIKeys = RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_PATH,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_PATH=Replace(EWLD_PATH,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_PATH_TEMP1=Mid(EWLD_PATH,1,2)
|
||||
EWLD_PATH_TEMP2=Mid(EWLD_PATH,3)
|
||||
EWLD_PATH_TEMP2=Replace(EWLD_PATH_TEMP2,"\\","\")
|
||||
RegExpObject.Pattern=RegExpValidFilepath
|
||||
EWLD_PATH=EWLD_PATH_TEMP1&RegExpObject.Replace(EWLD_PATH_TEMP2,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_PATH%",EWLD_PATH
|
||||
|
||||
EWLD_PATH=Replace(EWLD_PATH,vbCr,"")
|
||||
EWLD_PATH=Replace(EWLD_PATH,vbLf,"")
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "EWLD_PATH: "&vbCrLf& EWLD_PATH&vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_PATH AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_FILENAME<>"") THEN
|
||||
|
||||
RIKeys=RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_FILENAME,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_FILENAME_TEMP=EWLD_FILENAME
|
||||
RegExpObject.Pattern=RegExpValidFilename
|
||||
EWLD_FILENAME=RegExpObject.Replace(EWLD_FILENAME_TEMP,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_FILENAME%",EWLD_FILENAME
|
||||
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbCr,"")
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbLf,"")
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "EWLD_FILENAME: "&vbCrLf& EWLD_FILENAME&vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_FILENAME AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
|
||||
RIKeys=RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_FILENAME_PREVIEW,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_FILENAME_PREVIEW_TEMP=EWLD_FILENAME_PREVIEW
|
||||
RegExpObject.Pattern=RegExpValidFilename
|
||||
EWLD_FILENAME_PREVIEW=RegExpObject.Replace(EWLD_FILENAME_PREVIEW_TEMP,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_FILENAME_PREVIEW%",EWLD_FILENAME_PREVIEW
|
||||
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,vbCr,"")
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,vbLf,"")
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX "EWLD_FILENAME_PREVIEW: "&vbCrLf& EWLD_FILENAME_PREVIEW &vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_FILENAME_PREVIEW Variable AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'#main part#
|
||||
IF ((EWLD_PATH<>"") AND (EWLD_FILENAME<>"") AND (EWLD_FILEEXTENSION<>"") and ((ExportType=2) or (ExportType=4) or (ExportType=5))) THEN
|
||||
|
||||
'Check if destination structure exists. If not, try to create.
|
||||
IF NOT FileSystemObject.FolderExists(EWLD_PATH) THEN
|
||||
|
||||
strDir=FileSystemObject.GetAbsolutePathName(EWLD_PATH)
|
||||
arrDirs=Split( strDir, "\" )
|
||||
|
||||
If Left( strDir, 2 ) = "\\" THEN
|
||||
strDirBuild = "\\" & arrDirs(2) & "\" & arrDirs(3) & "\"
|
||||
idxFirst = 4
|
||||
Else
|
||||
strDirBuild = arrDirs(0) & "\"
|
||||
idxFirst = 1
|
||||
End If
|
||||
|
||||
For idx = idxFirst to Ubound( arrDirs )
|
||||
|
||||
strDirBuild = FileSystemObject.BuildPath( strDirBuild, arrDirs(idx) )
|
||||
If Not FileSystemObject.FolderExists( strDirBuild ) THEN
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX strDirBuild,,DEBUG_TITLE&" CreateFolder: Level " & idx & " of " & Ubound( arrDirs )
|
||||
END IF
|
||||
|
||||
FileSystemObject.CreateFolder strDirBuild
|
||||
|
||||
End if
|
||||
Next
|
||||
|
||||
END IF
|
||||
|
||||
'Code block to resolve the file extension, fallback is pdf
|
||||
IF (EWLD_FILEEXTENSION<7) Then
|
||||
Select Case EWLD_FILEEXTENSION
|
||||
Case 0
|
||||
EWLD_FILEEXTENSION_NAME="spl"
|
||||
Case 1
|
||||
EWLD_FILEEXTENSION_NAME="mht"
|
||||
Case 4
|
||||
EWLD_FILEEXTENSION_NAME="spl"
|
||||
Case 5
|
||||
EWLD_FILEEXTENSION_NAME="pdf"
|
||||
Case 6
|
||||
EWLD_FILEEXTENSION_NAME="rtf"
|
||||
Case ELSE
|
||||
EWLD_FILEEXTENSION= 5
|
||||
EWLD_FILEEXTENSION_NAME="pdf"
|
||||
End Select
|
||||
Else
|
||||
EWLD_FILEEXTENSION=5
|
||||
EWLD_FILEEXTENSION_NAME="pdf"
|
||||
End if
|
||||
|
||||
'If EWLD_PATH exists, export file - including version tagging.
|
||||
IF ((FileSystemObject.FolderExists(EWLD_PATH)) AND (EWLD_FILENAME<>"") AND (EWLD_FILEEXTENSION<>"")) THEN
|
||||
EWLD_PATH_AND_FILENAME=EWLD_PATH&"\"&EWLD_FILENAME&"."&EWLD_FILEEXTENSION_NAME
|
||||
|
||||
EWLD_PATH_AND_FILENAME=Replace(EWLD_PATH_AND_FILENAME,vbCr,"")
|
||||
EWLD_PATH_AND_FILENAME=Replace(EWLD_PATH_AND_FILENAME,vbLf,"")
|
||||
|
||||
IF (EWLD_VERSIONING= 9) or ((EWLD_VERSIONING<>0) and (EWLD_VERSIONING<>1) and (EWLD_VERSIONING<>2) and (EWLD_VERSIONING<>9)) THEN
|
||||
|
||||
'Reset Var to WinLine known value
|
||||
EWLD_VERSIONING=1
|
||||
|
||||
IF (FileSystemObject.FileExists(EWLD_PATH_AND_FILENAME)) THEN
|
||||
|
||||
EWLD_FILENAME_ORIGINAL=EWLD_FILENAME
|
||||
|
||||
DO
|
||||
DocVersion=DocVersion+1
|
||||
|
||||
EWLD_FILENAME=EWLD_FILENAME_ORIGINAL
|
||||
EWLD_FILENAME=EWLD_FILENAME & DocVersionSeparator & DocVersion
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbCr,"")
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbLf,"")
|
||||
|
||||
EWLD_PATH_AND_FILENAME=EWLD_PATH & "\" & EWLD_FILENAME & "." & EWLD_FILEEXTENSION_NAME
|
||||
EWLD_PATH_AND_FILENAME=Replace(EWLD_PATH_AND_FILENAME,vbCr,"")
|
||||
EWLD_PATH_AND_FILENAME=Replace(EWLD_PATH_AND_FILENAME,vbLf,"")
|
||||
|
||||
LOOP UNTIL (FileSystemObject.FileExists(EWLD_PATH_AND_FILENAME) = False)
|
||||
|
||||
RI.Remove("%EWLD_FILENAME%")
|
||||
RI.ADD "%EWLD_FILENAME%",EWLD_FILENAME& "." &EWLD_FILEEXTENSION_NAME
|
||||
RI.ADD "%EWLD_PATH_AND_FILENAME%",EWLD_PATH_AND_FILENAME
|
||||
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX "FINAL EWLD_PATH_AND_FILENAME: "&vbCrLf&EWLD_PATH_AND_FILENAME&vbCrLf&vbCrLf&_
|
||||
"FINAL EWLD_FILEEXTENSION: "&vbCrLf&EWLD_FILEEXTENSION&vbCrLf&vbCrLf&_
|
||||
"FINAL EWLD_VERSIONING: "&vbCrLf&EWLD_VERSIONING&vbCrLf&vbCrLf&_
|
||||
"RI includes "&RI.count&" Items.",,DEBUG_TITLE&" Final document settings"
|
||||
END IF
|
||||
|
||||
IF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
Formtitle=EWLD_FILENAME_PREVIEW
|
||||
|
||||
END IF
|
||||
|
||||
'In preview, ExportOutput will not be executed!
|
||||
ExportOutput EWLD_PATH_AND_FILENAME, EWLD_FILEEXTENSION, EWLD_VERSIONING
|
||||
ExportDone="export_ready"
|
||||
|
||||
END IF
|
||||
|
||||
ELSEIF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MsgBox "Only Preview Filename has been set!"&EWLD_FILENAME_PREVIEW,,DEBUG_TITLE
|
||||
End if
|
||||
|
||||
Formtitle=EWLD_FILENAME_PREVIEW
|
||||
ExportDone="export_ready"
|
||||
|
||||
END IF
|
||||
|
||||
'Call Macros
|
||||
IF ((ExportType=2) or (ExportType=4) or (ExportType=5)) Then
|
||||
|
||||
For LoopCounter = 14 To 23
|
||||
|
||||
CALL_MAKRO_PRE_EXPORT=PROFILE_RESULT.Value(LoopCounter)
|
||||
|
||||
IF (CALL_MAKRO_PRE_EXPORT<>"") and (CALL_MAKRO_PRE_EXPORT<>LTRIM(RTRIM("<KEIN MAKRO>"))) Then
|
||||
|
||||
DIM MPs(32)
|
||||
|
||||
MPs(0) =DebugMode
|
||||
MPs(1) =ExportDone
|
||||
MPs(2) =MandatorNr
|
||||
MPs(3) =EWLD_GUID
|
||||
MPs(4) =EWLD_DESCRIPTION
|
||||
MPs(5) =EWLD_PATH
|
||||
MPs(6) =EWLD_FILENAME
|
||||
MPs(7) =EWLD_FILEEXTENSION_NAME
|
||||
MPs(8) =EWLD_PATH_AND_FILENAME
|
||||
MPs(9) =AccountNr
|
||||
MPs(10)=AccountName
|
||||
MPs(11)=RunningNr
|
||||
MPs(12)=DocNr
|
||||
MPs(13)=ProjectNr
|
||||
MPs(14)=ProgramDocType
|
||||
MPs(15)=PostingType
|
||||
MPs(16)=DocType
|
||||
MPs(17)=WinLineCurrentUser
|
||||
MPs(18)=DocVersion
|
||||
MPs(19)=DocComment
|
||||
MPs(20)=DocCreationDate
|
||||
MPs(21)=DocChangedDate
|
||||
MPs(22)=Addition1
|
||||
MPs(23)=Addition2
|
||||
MPs(24)=Addition3
|
||||
MPs(25)=Addition4
|
||||
MPs(26)=Addition5
|
||||
MPs(27)=Addition6
|
||||
MPs(28)=Addition7
|
||||
MPs(29)=Addition8
|
||||
MPs(30)=Addition9
|
||||
MPs(31)=Addition10
|
||||
|
||||
pParams = MPs
|
||||
CWLStart.MacroCommands.MRunMacro CALL_MAKRO_PRE_EXPORT, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
End if
|
||||
Next
|
||||
End if
|
||||
|
||||
'Show Error
|
||||
IF ((ExportDone<>"export_ready") and ((ExportType=2) or (ExportType=4) or (ExportType=5)) and (WinLineCurrentUser<>WebServiceUser) and (EWLD_GUID>0)) Then
|
||||
msgbox "Es ist ein Fehler aufgetreten!"&vbCrLf&vbCrLf&_
|
||||
EWLD_PATH&"\"&EWLD_FILENAME&vbCrLf&_
|
||||
EWLD_FILEEXTENSION&" | "&EWLD_VERSIONING,vbInformation,"ACHTUNG: Export wird abgebrochen!"
|
||||
End if
|
||||
|
||||
ResultValue = ""
|
||||
@@ -0,0 +1,526 @@
|
||||
' VB Script Document
|
||||
'
|
||||
' Export Script for WinLine documents.
|
||||
' Configuration has to be done in SQL Tables TBDD_DOCEXPORT_CONFIG and TBDD_DOCEXPORT_PROFILE
|
||||
'
|
||||
' Digital Data
|
||||
' Ludwig-Rinn-Straße 16
|
||||
' 35452 Heuchelheim
|
||||
' Tel.: 0641 / 202360
|
||||
' E-Mail: info-flow(at)digitaldata.works
|
||||
'
|
||||
' Version Number: 2.0.0.0
|
||||
' Version Date: 09.02.2020
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
'########## set variables ##########
|
||||
|
||||
DIM MacroParameter(11), RUN_MACRO_GUID, RUN_APP_GUID, ReplaceItems, ReplaceKeys, LoopCounter, LoopCounter2
|
||||
|
||||
DocVersion = 1
|
||||
DocVersionSeparator = "~"
|
||||
ReplaceSpecialChar = ""
|
||||
DebugMode = "Enabled"
|
||||
MandatorNr = Value (0,11)
|
||||
RecordNumber = Value (25,22)
|
||||
HeadDocType = Value (25,139)
|
||||
ProgramDocType = Value (0,20)
|
||||
PostingType = Value (357,6)
|
||||
DocFinalAmount = Value (25,100)
|
||||
|
||||
DOCEXPORT_MACRO = "DD_DOCEXPORT_WINLINE_PROGRAM_MACRO"
|
||||
DOCEXPORT_MACROTRYS = 5
|
||||
DOCEXPORT_PATH_AND_FILENAME = Value (500,354) ' <-- MOST Important Var in Script, depends on the output var of the DOCEXPORT Head-Formel
|
||||
|
||||
TBDD_DOCEXPORT_PROFILE = "T651"
|
||||
TBDD_DOCEXPORT_PROFILE_SQL = "[U001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [U004] = '"& ProgramDocType &"' AND [U005] = '"& HeadDocType &"' AND [U006] = '"& PostingType &"' AND [U011] IS NOT NULL AND [U012] IS NOT NULL"
|
||||
TBDD_DOCEXPORT_CONFIG = "T650"
|
||||
TBDD_DOCEXPORT_CONFIG_VARSQL = "[U001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [U004] LIKE '%Variable%' AND [U005] IS NOT NULL AND [U006] IS NOT NULL AND [U007] IS NOT NULL AND [U008] IS NULL AND [U012] IS NULL"
|
||||
TBDD_DOCEXPORT_CONFIG_MACROSQL = "[U001] = 1 AND [U004] LIKE '%Macro%' AND [U005] IS NULL AND [U006] IS NULL AND [U007] IS NULL AND [U008] IS NOT NULL AND [U012] IS NULL"
|
||||
TBDD_DOCEXPORT_CONFIG_APPSQL = "[U001] = 1 AND [U004] LIKE '%APP%' AND [U005] IS NULL AND [U006] IS NULL AND [U007] IS NULL AND [U008] IS NULL AND [U012] IS NOT NULL"
|
||||
TBDD_DOCEXPORT_HISTORY = "T652"
|
||||
TBDD_DOCEXPORT_HISTORY_SQL = "INSERT INTO " & TBDD_DOCEXPORT_HISTORY & "(c000,c001,c002,c003,c004,c005,c006) Values ('%SQLCounter%','%DOCEXPORT_PATH%','%DOCEXPORT_FILENAME%','" & DOCEXPORT_PATH_AND_FILENAME & "','%Result%','%Username%','"& (Cstr(Now()) & "," & Right(Cstr(Timer() * 100),2)) &"')"
|
||||
|
||||
SET FileSystemObject = CreateObject("Scripting.FileSystemObject")
|
||||
SET TBDD_DOCEXPORT_CONFIG_MACRO = CreateObject("Scripting.Dictionary")
|
||||
SET TBDD_DOCEXPORT_CONFIG_APP = CreateObject("Scripting.Dictionary")
|
||||
SET ReplaceItems = CreateObject("Scripting.Dictionary")
|
||||
ReplaceItems.CompareMode = vbTextCompare
|
||||
|
||||
'########## preparing part ##########
|
||||
|
||||
'Reset Error Var
|
||||
Err.Clear
|
||||
|
||||
'Display debug infos, if enabled
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "ProgramDocType: "& ProgramDocType & vbCrLf & _
|
||||
"HeadDocType: " & HeadDocType & vbCrLf & _
|
||||
"RecordNumber: " & RecordNumber & vbCrLf & _
|
||||
"PostingType: " & PostingType & vbCrLf & vbCrLf & _
|
||||
"DOCEXPORT_MACRO: " & DOCEXPORT_MACRO & vbCrLf & _
|
||||
"DOCEXPORT_PATH_AND_FILENAME: " & DOCEXPORT_PATH_AND_FILENAME,,"DEBUG - Info: WinLine Runtime Variables"
|
||||
|
||||
MSGBOX "Profile SQL:" & vbCrLf & TBDD_DOCEXPORT_PROFILE_SQL & vbCrLf & vbCrLf & _
|
||||
"Var SQL: " & vbCrLf & TBDD_DOCEXPORT_CONFIG_VARSQL & vbCrLf & vbCrLf & _
|
||||
"Macro SQL: " & vbCrLf & TBDD_DOCEXPORT_CONFIG_MACROSQL & vbCrLf & vbCrLf & _
|
||||
"App SQL: " & vbCrLf & TBDD_DOCEXPORT_CONFIG_APPSQL & vbCrLf & vbCrLf & _
|
||||
"History SQL: "& vbCrLf & TBDD_DOCEXPORT_HISTORY_SQL,,"DEBUG - Info: SQL Commands (not final!)"
|
||||
END IF
|
||||
|
||||
IF (DOCEXPORT_PATH_AND_FILENAME <> "") Then
|
||||
|
||||
'Replace Object, because functions are not available
|
||||
ReplaceItems.ADD "%MandantenNr%",MandatorNr
|
||||
ReplaceItems.ADD "%Laufnummer%",RecordNumber
|
||||
|
||||
ReplaceItems.ADD "%UserName%",TRIM(CSTR(Value (0,14)))
|
||||
ReplaceItems.ADD "%KontoNr%",TRIM(CSTR(Value (0,30)))
|
||||
ReplaceItems.ADD "%KontoName%",TRIM(CSTR(Value (50,3)))
|
||||
ReplaceItems.ADD "%ProjektNr%",TRIM(CSTR(Value (25,136)))
|
||||
ReplaceItems.ADD "%AngebotsNr%",TRIM(CSTR(Value (0,34)))
|
||||
ReplaceItems.ADD "%AuftragsNr%",TRIM(CSTR(Value (0,35)))
|
||||
ReplaceItems.ADD "%LieferscheinNr%",TRIM(CSTR(Value (0,36)))
|
||||
ReplaceItems.ADD "%RechnungsNr%",TRIM(CSTR(Value (0,37)))
|
||||
ReplaceItems.ADD "%AnfragenNr%",TRIM(CSTR(Value (0,34)))
|
||||
ReplaceItems.ADD "%BestellNr%",TRIM(CSTR(Value (0,35)))
|
||||
ReplaceItems.ADD "%Textzeile1%",TRIM(CSTR(Value (25,63)))
|
||||
ReplaceItems.ADD "%Textzeile2%",TRIM(CSTR(Value (25,64)))
|
||||
ReplaceItems.ADD "%Textzeile3%",TRIM(CSTR(Value (25,65)))
|
||||
ReplaceItems.ADD "%Textzeile4%",TRIM(CSTR(Value (25,66)))
|
||||
ReplaceItems.ADD "%Textzeile5%",TRIM(CSTR(Value (25,67)))
|
||||
ReplaceItems.ADD "%Textzeile6%",TRIM(CSTR(Value (25,68)))
|
||||
ReplaceItems.ADD "%Textzeile7%",TRIM(CSTR(Value (25,69)))
|
||||
ReplaceItems.ADD "%Textzeile8%",TRIM(CSTR(Value (25,70)))
|
||||
ReplaceItems.ADD "%Textzeile9%",TRIM(CSTR(Value (25,71)))
|
||||
ReplaceItems.ADD "%Textzeile10%",TRIM(CSTR(Value (25,72)))
|
||||
|
||||
ReplaceItems.ADD "%Tag%",(day(date))
|
||||
ReplaceItems.ADD "%Monat%",(month(date))
|
||||
ReplaceItems.ADD "%Monatsname%",MonthName((month(date)))
|
||||
ReplaceItems.ADD "%Jahr%",(Year(date))
|
||||
|
||||
'Code block to get document profile from table
|
||||
IF (Mid(DocFinalAmount,1,1)) = "-" THEN
|
||||
TBDD_DOCEXPORT_PROFILE_SQL = TBDD_DOCEXPORT_PROFILE_SQL & " AND [U007] = 'NegativAmount'"
|
||||
END IF
|
||||
|
||||
SET TBDD_DOCEXPORT_PROFILE_RESULT = CWLStart.CurrentCompany.SearchRecord(TBDD_DOCEXPORT_PROFILE, TBDD_DOCEXPORT_PROFILE_SQL)
|
||||
|
||||
IF Err.Number <> 0 THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: Getting Variables from DB Table "& TBDD_DOCEXPORT_PROFILE
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF TBDD_DOCEXPORT_PROFILE_RESULT = -1 Then
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "No Rows found, SQL: "& vbCrLf & TBDD_DOCEXPORT_PROFILE_SQL,,"DEBUG - Info: Profiles from Database table "& TBDD_DOCEXPORT_PROFILE
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "RUN_MACRO_GUID: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(16) & vbCrLf & _
|
||||
"RUN_MACRO: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(17) & vbCrLf & _
|
||||
"RUN_MACRO_PARAMETER1: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(18) & vbCrLf & _
|
||||
"RUN_MACRO_PARAMETER2: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(19) & vbCrLf & _
|
||||
"RUN_MACRO_PARAMETER3: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(20) & vbCrLf & vbCrLf & _
|
||||
"RUN_APP_GUID: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(21) & vbCrLf & _
|
||||
"RUN_APP: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(22) & vbCrLf & _
|
||||
"RUN_APP_PARAMETER1: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(23) & vbCrLf & _
|
||||
"RUN_APP_PARAMETER2: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(24) & vbCrLf & _
|
||||
"RUN_APP_PARAMETER3: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(25) & vbCrLf & vbCrLf & _
|
||||
"OPEN_FILE_AFTER_EXPORT: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(26) & vbCrLf & _
|
||||
"VERIFY_EXPORT_AND_LOG2DB: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(27) & vbCrLf & _
|
||||
"VERIFY_EXPORT_AND_LOG2FILE: "& TBDD_DOCEXPORT_PROFILE_RESULT.Value(28) & vbCrLf & _
|
||||
"VERIFY_EXPORT_AND_MSGBOX: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(29),,"DEBUG - Info: document profile from Database table "& TBDD_DOCEXPORT_PROFILE
|
||||
END IF
|
||||
|
||||
RUN_MACRO_GUID = TBDD_DOCEXPORT_PROFILE_RESULT.Value(16)
|
||||
RUN_MACRO = TBDD_DOCEXPORT_PROFILE_RESULT.Value(17)
|
||||
RUN_MACRO_PARAMETER1 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(18)
|
||||
RUN_MACRO_PARAMETER2 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(19)
|
||||
RUN_MACRO_PARAMETER3 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(20)
|
||||
|
||||
RUN_APP_GUID = TBDD_DOCEXPORT_PROFILE_RESULT.Value(21)
|
||||
RUN_APP = TBDD_DOCEXPORT_PROFILE_RESULT.Value(22)
|
||||
RUN_APP_PARAMETER1 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(23)
|
||||
RUN_APP_PARAMETER2 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(24)
|
||||
RUN_APP_PARAMETER3 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(25)
|
||||
|
||||
OPEN_FILE_AFTER_EXPORT = TBDD_DOCEXPORT_PROFILE_RESULT.Value(26)
|
||||
VERIFY_EXPORT_AND_LOG2DB = TBDD_DOCEXPORT_PROFILE_RESULT.Value(27)
|
||||
VERIFY_EXPORT_AND_LOG2FILE = TBDD_DOCEXPORT_PROFILE_RESULT.Value(28)
|
||||
VERIFY_EXPORT_AND_MSGBOX = TBDD_DOCEXPORT_PROFILE_RESULT.Value(29)
|
||||
|
||||
'Code block to get variables from table
|
||||
SET TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT = CWLStart.CurrentCompany.SearchRecord(TBDD_DOCEXPORT_CONFIG, TBDD_DOCEXPORT_CONFIG_VARSQL)
|
||||
|
||||
IF Err.Number <> 0 THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: Variables from Database table "& TBDD_DOCEXPORT_CONFIG &" !"
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT = -1 Then
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "No Rows found, SQL: "& TBDD_DOCEXPORT_CONFIG_VARSQL,,"DEBUG - Info: Variables from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
FOR LoopCounter = 1 TO TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.RowCount
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "Name: " & TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(5) & vbCrLf & _
|
||||
"Type: " & TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(6) & vbCrLf & _
|
||||
"Value: "& TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(7),,"DEBUG - Info: "& LoopCounter &" of "& TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.RowCount &" Variables from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
END IF
|
||||
|
||||
ReplaceItems.ADD TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(5),TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(7)
|
||||
TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.NextRecord
|
||||
|
||||
NEXT
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'Code 4 getting macros
|
||||
IF RUN_MACRO_GUID <> "" THEN
|
||||
TBDD_DOCEXPORT_CONFIG_MACROSQL = TBDD_DOCEXPORT_CONFIG_MACROSQL & " AND [u000] IN (" & RUN_MACRO_GUID & ")"
|
||||
END IF
|
||||
|
||||
SET TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT = CWLStart.CurrentCompany.SearchRecord(TBDD_DOCEXPORT_CONFIG, TBDD_DOCEXPORT_CONFIG_MACROSQL)
|
||||
|
||||
IF Err.Number <> 0 THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: Macro(s) from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
Err.Clear
|
||||
|
||||
ELSE
|
||||
IF TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT = -1 Then
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "No Rows found, SQL: "& TBDD_DOCEXPORT_CONFIG_MACROSQL,,"DEBUG - Info: Macros(s) from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
FOR LoopCounter = 1 To TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.RowCount
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "Macro: " & TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.Value(8) & vbCrLf & _
|
||||
"Parameter1: "& TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.Value(9) & vbCrLf & _
|
||||
"Parameter2: "& TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.Value(10) & vbCrLf & _
|
||||
"Parameter3: "& TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.Value(11),,"DEBUG - Info: "& LoopCounter &" of "& TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.RowCount &" Functions from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
END IF
|
||||
|
||||
TBDD_DOCEXPORT_CONFIG_MACRO(LoopCounter) = Array(TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.Value(8),TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.Value(9),TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.Value(10),TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.Value(11))
|
||||
TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.NextRecord
|
||||
|
||||
NEXT
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'Code 4 getting Apps
|
||||
IF RUN_APP_GUID <> "" THEN
|
||||
TBDD_DOCEXPORT_CONFIG_APPSQL = TBDD_DOCEXPORT_CONFIG_APPSQL & " AND [u000] IN (" & RUN_APP_GUID & ")"
|
||||
END IF
|
||||
|
||||
SET TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT = CWLStart.CurrentCompany.SearchRecord(TBDD_DOCEXPORT_CONFIG, TBDD_DOCEXPORT_CONFIG_APPSQL)
|
||||
|
||||
IF Err.Number <> 0 THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: App(s) from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
Err.Clear
|
||||
|
||||
ELSE
|
||||
|
||||
IF TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT = -1 Then
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "No Rows found, SQL: "& TBDD_DOCEXPORT_CONFIG_APPSQL,,"DEBUG - Info: App(s) from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
FOR LoopCounter = 1 To TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.RowCount
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "App: " & TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.Value(12) & vbCrLf & _
|
||||
"Parameter1: "& TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.Value(13) & vbCrLf & _
|
||||
"Parameter2: "& TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.Value(14) & vbCrLf & _
|
||||
"Parameter3: "& TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.Value(15),,"DEBUG - Info: "& LoopCounter &" of "& TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.RowCount &" App(s) from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
END IF
|
||||
|
||||
TBDD_DOCEXPORT_CONFIG_APP(LoopCounter) = Array(TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.Value(12),TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.Value(13),TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.Value(14),TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.Value(15))
|
||||
TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.NextRecord
|
||||
NEXT
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'########## main part ##########
|
||||
IF (TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT > 0) OR (TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT > 0) OR (RUN_MACRO <> "") OR (RUN_APP <> "") OR (OPEN_FILE_AFTER_EXPORT = 1) OR (VERIFY_EXPORT_AND_LOG2DB > 0) OR (VERIFY_EXPORT_AND_LOG2FILE > 0) OR (VERIFY_EXPORT_AND_MSGBOX > 0) THEN
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "Calling Macro: "& DocExport_Macro,,"DEBUG - Info: Post processing..."
|
||||
END IF
|
||||
|
||||
'= MParameter 20...
|
||||
MacroParameter(0) = DebugMode
|
||||
MacroParameter(1) = TBDD_DOCEXPORT_PROFILE
|
||||
MacroParameter(2) = TBDD_DOCEXPORT_PROFILE_SQL
|
||||
MacroParameter(3) = "SET-LATER"
|
||||
MacroParameter(4) = DOCEXPORT_PATH_AND_FILENAME
|
||||
MacroParameter(5) = DOCEXPORT_MACROTRYS
|
||||
MacroParameter(6) = ""
|
||||
|
||||
'Multiple macros from config SQLTB
|
||||
IF TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT > 0 Then
|
||||
|
||||
FOR LoopCounter = 1 To TBDD_DOCEXPORT_CONFIG_MACROSQL_RESULT.RowCount
|
||||
|
||||
RUN_MACROS = TBDD_DOCEXPORT_CONFIG_MACRO(LoopCounter)(0)
|
||||
RUN_MACROS_PARAMETER1 = TBDD_DOCEXPORT_CONFIG_MACRO(LoopCounter)(1)
|
||||
RUN_MACROS_PARAMETER2 = TBDD_DOCEXPORT_CONFIG_MACRO(LoopCounter)(2)
|
||||
RUN_MACROS_PARAMETER3 = TBDD_DOCEXPORT_CONFIG_MACRO(LoopCounter)(3)
|
||||
|
||||
ReplaceKeys = ReplaceItems.keys
|
||||
For LoopCounter2 = 0 To ReplaceItems.Count -1
|
||||
|
||||
IF InStr(RUN_MACROS,ReplaceKeys(LoopCounter2)) > 0 Then
|
||||
RUN_MACROS = Replace(RUN_MACROS,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter2)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_MACROS_PARAMETER1,ReplaceKeys(LoopCounter2)) > 0 Then
|
||||
RUN_MACROS_PARAMETER1 = Replace(RUN_MACROS_PARAMETER1,ReplaceKeys(LoopCounter2),ReplaceItems(ReplaceKeys(LoopCounter2)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_MACROS_PARAMETER2,ReplaceKeys(LoopCounter2)) > 0 Then
|
||||
RUN_MACROS_PARAMETER2 = Replace(RUN_MACROS_PARAMETER2,ReplaceKeys(LoopCounter2),ReplaceItems(ReplaceKeys(LoopCounter2)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_MACROS_PARAMETER3,ReplaceKeys(LoopCounter2)) > 0 Then
|
||||
RUN_MACROS_PARAMETER3 = Replace(RUN_MACROS_PARAMETER3,ReplaceKeys(LoopCounter2),ReplaceItems(ReplaceKeys(LoopCounter2)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "RUN_MACROS: "& RUN_MACROS & vbCrLf & _
|
||||
"RUN_MACROS_PARAMETER1: "& RUN_MACROS_PARAMETER1 & vbCrLf & _
|
||||
"RUN_MACROS_PARAMETER2: "& RUN_MACROS_PARAMETER2 & vbCrLf & _
|
||||
"RUN_MACROS_PARAMETER3: "& RUN_MACROS_PARAMETER3 & vbCrLf & vbCrLf & _
|
||||
"ReplaceItems includes "& ReplaceItems.count &" Items.",,"DEBUG - Info: RUN_MACROS Call AFTER replace routine"
|
||||
END IF
|
||||
|
||||
MacroParameter(3) ="RUN_MACRO"
|
||||
MacroParameter(7) = RUN_MACROS
|
||||
MacroParameter(8) = RUN_MACROS_PARAMETER1
|
||||
MacroParameter(9) = RUN_MACROS_PARAMETER2
|
||||
MacroParameter(10)= RUN_MACROS_PARAMETER3
|
||||
|
||||
pParams = MacroParameter
|
||||
CWLStart.MacroCommands.MRunMacroSuspended RUN_MACROS, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
NEXT
|
||||
|
||||
END IF
|
||||
|
||||
'Multiple apps from config SQLTB
|
||||
IF TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT > 0 Then
|
||||
|
||||
FOR LoopCounter = 1 To TBDD_DOCEXPORT_CONFIG_APPSQL_RESULT.RowCount
|
||||
|
||||
RUN_APPS = TBDD_DOCEXPORT_CONFIG_APP(LoopCounter)(0)
|
||||
RUN_APPS_PARAMETER1 = TBDD_DOCEXPORT_CONFIG_APP(LoopCounter)(1)
|
||||
RUN_APPS_PARAMETER2 = TBDD_DOCEXPORT_CONFIG_APP(LoopCounter)(2)
|
||||
RUN_APPS_PARAMETER3 = TBDD_DOCEXPORT_CONFIG_APP(LoopCounter)(3)
|
||||
|
||||
ReplaceKeys = ReplaceItems.keys
|
||||
For LoopCounter2 = 0 To ReplaceItems.Count -1
|
||||
|
||||
IF InStr(RUN_APPS,ReplaceKeys(LoopCounter2)) > 0 Then
|
||||
RUN_APPS = Replace(RUN_APPS,ReplaceKeys(LoopCounter2),ReplaceItems(ReplaceKeys(LoopCounter2)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_APPS_PARAMETER1,ReplaceKeys(LoopCounter2)) > 0 Then
|
||||
RUN_APPS_PARAMETER1 = Replace(RUN_APPS_PARAMETER1,ReplaceKeys(LoopCounter2),ReplaceItems(ReplaceKeys(LoopCounter2)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_APPS_PARAMETER2,ReplaceKeys(LoopCounter2)) > 0 Then
|
||||
RUN_APPS_PARAMETER2 = Replace(RUN_APPS_PARAMETER2,ReplaceKeys(LoopCounter2),ReplaceItems(ReplaceKeys(LoopCounter2)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_APPS_PARAMETER3,ReplaceKeys(LoopCounter2)) > 0 Then
|
||||
RUN_APPS_PARAMETER3 = Replace(RUN_APPS_PARAMETER3,ReplaceKeys(LoopCounter2),ReplaceItems(ReplaceKeys(LoopCounter2)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "RUN_APPS: "& RUN_APPS & vbCrLf & _
|
||||
"RUN_APPS_PARAMETER1: "& RUN_APPS_PARAMETER1 & vbCrLf & _
|
||||
"RUN_APPS_PARAMETER2: "& RUN_APPS_PARAMETER2 & vbCrLf & _
|
||||
"RUN_APPS_PARAMETER3: "& RUN_APPS_PARAMETER3 & vbCrLf & vbCrLf & _
|
||||
"ReplaceItems includes "& ReplaceItems.count &" Items.",,"DEBUG - Info: RUN_APPS Call AFTER replace routine"
|
||||
END IF
|
||||
|
||||
MacroParameter(3) ="RUN_APP"
|
||||
MacroParameter(7) = RUN_APPS
|
||||
MacroParameter(8) = RUN_APPS_PARAMETER1
|
||||
MacroParameter(9) = RUN_APPS_PARAMETER2
|
||||
MacroParameter(10)= RUN_APPS_PARAMETER3
|
||||
|
||||
pParams = MacroParameter
|
||||
CWLStart.MacroCommands.MRunMacroSuspended RUN_APP, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
NEXT
|
||||
|
||||
END IF
|
||||
|
||||
'ONE macro from profile SQLTB
|
||||
IF RUN_MACRO <> "" THEN
|
||||
|
||||
ReplaceKeys = ReplaceItems.keys
|
||||
For LoopCounter = 0 To ReplaceItems.Count -1
|
||||
|
||||
IF InStr(RUN_MACRO,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
RUN_MACRO = Replace(RUN_MACRO,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_MACRO_PARAMETER1,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
RUN_MACRO_PARAMETER1 = Replace(RUN_MACRO_PARAMETER1,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_MACRO_PARAMETER2,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
RUN_MACRO_PARAMETER2 = Replace(RUN_MACRO_PARAMETER2,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_MACRO_PARAMETER3,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
RUN_MACRO_PARAMETER3 = Replace(RUN_MACRO_PARAMETER3,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "RUN_MACRO: "& RUN_MACRO & vbCrLf & _
|
||||
"RUN_MACRO_PARAMETER1: "& RUN_MACRO_PARAMETER1 & vbCrLf & _
|
||||
"RUN_MACRO_PARAMETER2: "& RUN_MACRO_PARAMETER2 & vbCrLf & _
|
||||
"RUN_MACRO_PARAMETER3: "& RUN_MACRO_PARAMETER3 & vbCrLf & vbCrLf & _
|
||||
"ReplaceItems includes "& ReplaceItems.count &" Items.",,"DEBUG - Info: RUN_MACRO Call AFTER replace routine"
|
||||
END IF
|
||||
|
||||
MacroParameter(3) ="RUN_MACRO"
|
||||
MacroParameter(7) = RUN_MACRO
|
||||
MacroParameter(8) = RUN_MACRO_PARAMETER1
|
||||
MacroParameter(9) = RUN_MACRO_PARAMETER2
|
||||
MacroParameter(10)= RUN_MACRO_PARAMETER3
|
||||
|
||||
pParams = MacroParameter
|
||||
CWLStart.MacroCommands.MRunMacroSuspended RUN_MACRO, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
END IF
|
||||
|
||||
'ONE app from profile SQLTB
|
||||
IF RUN_APP <> "" Then
|
||||
|
||||
ReplaceKeys = ReplaceItems.keys
|
||||
For LoopCounter = 0 To ReplaceItems.Count -1
|
||||
|
||||
IF InStr(RUN_APP,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
RUN_APP = Replace(RUN_APP,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_APP_PARAMETER1,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
RUN_APP_PARAMETER1 = Replace(RUN_APP_PARAMETER1,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_APP_PARAMETER2,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
RUN_APP_PARAMETER2 = Replace(RUN_APP_PARAMETER2,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
IF InStr(RUN_APP_PARAMETER3,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
RUN_APP_PARAMETER3 = Replace(RUN_APP_PARAMETER3,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "RUN_APP: "& RUN_APP & vbCrLf & _
|
||||
"RUN_APP_PARAMETER1: "& RUN_APP_PARAMETER1 & vbCrLf & _
|
||||
"RUN_APP_PARAMETER2: "& RUN_APP_PARAMETER2 & vbCrLf & _
|
||||
"RUN_APP_PARAMETER3: "& RUN_APP_PARAMETER3 & vbCrLf & vbCrLf & _
|
||||
"ReplaceItems includes "& ReplaceItems.count &" Items.",,"DEBUG - Info: RUN_APP Call AFTER replace routine"
|
||||
END IF
|
||||
|
||||
MacroParameter(3) ="RUN_APP"
|
||||
MacroParameter(7) = RUN_APP
|
||||
MacroParameter(8) = RUN_APP_PARAMETER1
|
||||
MacroParameter(9) = RUN_APP_PARAMETER2
|
||||
MacroParameter(10)= RUN_APP_PARAMETER3
|
||||
|
||||
pParams = MacroParameter
|
||||
CWLStart.MacroCommands.MRunMacroSuspended DocExport_Macro, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
END IF
|
||||
|
||||
IF OPEN_FILE_AFTER_EXPORT = 1 Then
|
||||
|
||||
MacroParameter(3) = "OPEN_FILE_AFTER_EXPORT"
|
||||
|
||||
pParams = MacroParameter
|
||||
Cwlstart.MacroCommands.MRunMacroSuspended DocExport_Macro, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
End IF
|
||||
|
||||
IF VERIFY_EXPORT_AND_LOG2DB = 1 Then
|
||||
|
||||
MacroParameter(3) = "VERIFY_EXPORT_AND_LOG2DB"
|
||||
MacroParameter(7) = TBDD_DOCEXPORT_HISTORY
|
||||
MacroParameter(8) = TBDD_DOCEXPORT_HISTORY_SQL
|
||||
|
||||
pParams = MacroParameter
|
||||
Cwlstart.MacroCommands.MRunMacroSuspended DocExport_Macro, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
End IF
|
||||
|
||||
IF VERIFY_EXPORT_AND_LOG2FILE = 1 Then
|
||||
|
||||
MacroParameter(3) = "VERIFY_EXPORT_AND_LOG2FILE"
|
||||
|
||||
pParams = MacroParameter
|
||||
Cwlstart.MacroCommands.MRunMacroSuspended DocExport_Macro, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
End IF
|
||||
|
||||
IF VERIFY_EXPORT_AND_MSGBOX = 1 Then
|
||||
|
||||
MacroParameter(3) = "VERIFY_EXPORT_AND_MSGBOX"
|
||||
|
||||
pParams = MacroParameter
|
||||
Cwlstart.MacroCommands.MRunMacroSuspended DocExport_Macro, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
End IF
|
||||
|
||||
End IF
|
||||
|
||||
Else
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "No post processing, DOCEXPORT_PATH_AND_FILENAME ist empty",,"DEBUG - Info: DOCEXPORT PDFE Footer Formel"
|
||||
End IF
|
||||
|
||||
END IF
|
||||
|
||||
ResultValue = ""
|
||||
310
archive/Export-WinLineDoc/Archiv/DOCEXPORT_PDFE_Head-Formel.txt
Normal file
@@ -0,0 +1,310 @@
|
||||
' VB Script Document
|
||||
'
|
||||
' Export Script for WinLine documents.
|
||||
' Configuration has to be done in SQL Tables TBDD_DOCEXPORT_CONFIG and TBDD_DOCEXPORT_PROFILE
|
||||
'
|
||||
' Digital Data
|
||||
' Ludwig-Rinn-Straße 16
|
||||
' 35452 Heuchelheim
|
||||
' Tel.: 0641 / 202360
|
||||
' E-Mail: info-flow(at)digitaldata.works
|
||||
'
|
||||
' Version Number: 2.0.0.0
|
||||
' Version Date: 09.02.2020
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
'########## set variables ##########
|
||||
|
||||
DIM MacroParameter(11), RUN_MACRO_GUID, RUN_APP_GUID, ReplaceItems, ReplaceKeys, LoopCounter, LoopCounter2
|
||||
|
||||
DocVersion = 1
|
||||
DocVersionSeparator = "~"
|
||||
ReplaceSpecialChar = ""
|
||||
DebugMode = "Enabled"
|
||||
MandatorNr = Value (0,11)
|
||||
RecordNumber = Value (25,22)
|
||||
HeadDocType = Value (25,139)
|
||||
ProgramDocType = Value (0,20)
|
||||
PostingType = Value (357,6)
|
||||
DocFinalAmount = Value (25,100)
|
||||
|
||||
TBDD_DOCEXPORT_PROFILE = "T651"
|
||||
TBDD_DOCEXPORT_PROFILE_SQL = "[U001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [U004] = '"& ProgramDocType &"' AND [U005] = '"& HeadDocType &"' AND [U006] = '"& PostingType &"' AND [U011] IS NOT NULL AND [U012] IS NOT NULL"
|
||||
TBDD_DOCEXPORT_CONFIG = "T650"
|
||||
TBDD_DOCEXPORT_CONFIG_VARSQL = "[U001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [U004] LIKE '%Variable%' AND [U005] IS NOT NULL AND [U006] IS NOT NULL AND [U007] IS NOT NULL AND [U008] IS NULL AND [U012] IS NULL"
|
||||
|
||||
SET FileSystemObject = CreateObject("Scripting.FileSystemObject")
|
||||
SET ReplaceItems = CreateObject("Scripting.Dictionary")
|
||||
ReplaceItems.CompareMode = vbTextCompare
|
||||
|
||||
'########## preparing part ##########
|
||||
|
||||
'Reset Error Var
|
||||
Err.Clear
|
||||
|
||||
'Display debug infos, if enabled
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "ProgramDocType: "& ProgramDocType & vbCrLf & _
|
||||
"HeadDocType: " & HeadDocType & vbCrLf & _
|
||||
"RecordNumber: " & RecordNumber & vbCrLf & _
|
||||
"PostingType: " & PostingType,,"DEBUG - Info: WinLine Runtime Variables"
|
||||
|
||||
MSGBOX "Profile SQL:"& vbCrLf & TBDD_DOCEXPORT_PROFILE_SQL & vbCrLf & vbCrLf & _
|
||||
"Var SQL: " & vbCrLf & TBDD_DOCEXPORT_CONFIG_VARSQL,,"DEBUG - Info: SQL Commands (not final!)"
|
||||
END IF
|
||||
|
||||
'Replace Object, because functions are not available
|
||||
ReplaceItems.ADD "%MandantenNr%",MandatorNr
|
||||
ReplaceItems.ADD "%Laufnummer%",RecordNumber
|
||||
|
||||
ReplaceItems.ADD "%UserName%",TRIM(CSTR(Value (0,14)))
|
||||
ReplaceItems.ADD "%KontoNr%",TRIM(CSTR(Value (0,30)))
|
||||
ReplaceItems.ADD "%KontoName%",TRIM(CSTR(Value (50,3)))
|
||||
ReplaceItems.ADD "%ProjektNr%",TRIM(CSTR(Value (25,136)))
|
||||
ReplaceItems.ADD "%AngebotsNr%",TRIM(CSTR(Value (0,34)))
|
||||
ReplaceItems.ADD "%AuftragsNr%",TRIM(CSTR(Value (0,35)))
|
||||
ReplaceItems.ADD "%LieferscheinNr%",TRIM(CSTR(Value (0,36)))
|
||||
ReplaceItems.ADD "%RechnungsNr%",TRIM(CSTR(Value (0,37)))
|
||||
ReplaceItems.ADD "%AnfragenNr%",TRIM(CSTR(Value (0,34)))
|
||||
ReplaceItems.ADD "%BestellNr%",TRIM(CSTR(Value (0,35)))
|
||||
ReplaceItems.ADD "%Textzeile1%",TRIM(CSTR(Value (25,63)))
|
||||
ReplaceItems.ADD "%Textzeile2%",TRIM(CSTR(Value (25,64)))
|
||||
ReplaceItems.ADD "%Textzeile3%",TRIM(CSTR(Value (25,65)))
|
||||
ReplaceItems.ADD "%Textzeile4%",TRIM(CSTR(Value (25,66)))
|
||||
ReplaceItems.ADD "%Textzeile5%",TRIM(CSTR(Value (25,67)))
|
||||
ReplaceItems.ADD "%Textzeile6%",TRIM(CSTR(Value (25,68)))
|
||||
ReplaceItems.ADD "%Textzeile7%",TRIM(CSTR(Value (25,69)))
|
||||
ReplaceItems.ADD "%Textzeile8%",TRIM(CSTR(Value (25,70)))
|
||||
ReplaceItems.ADD "%Textzeile9%",TRIM(CSTR(Value (25,71)))
|
||||
ReplaceItems.ADD "%Textzeile10%",TRIM(CSTR(Value (25,72)))
|
||||
|
||||
ReplaceItems.ADD "%Tag%",(day(date))
|
||||
ReplaceItems.ADD "%Monat%",(month(date))
|
||||
ReplaceItems.ADD "%Monatsname%",MonthName((month(date)))
|
||||
ReplaceItems.ADD "%Jahr%",(Year(date))
|
||||
|
||||
'Code block to get document profile from table
|
||||
IF (Mid(DocFinalAmount,1,1)) = "-" THEN
|
||||
TBDD_DOCEXPORT_PROFILE_SQL = TBDD_DOCEXPORT_PROFILE_SQL & " AND [U007] = 'NegativAmount'"
|
||||
END IF
|
||||
|
||||
SET TBDD_DOCEXPORT_PROFILE_RESULT = CWLStart.CurrentCompany.SearchRecord(TBDD_DOCEXPORT_PROFILE, TBDD_DOCEXPORT_PROFILE_SQL)
|
||||
|
||||
IF Err.Number <> 0 THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: Getting Variables from DB Table "& TBDD_DOCEXPORT_PROFILE
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF TBDD_DOCEXPORT_PROFILE_RESULT = -1 Then
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "No Rows found, SQL: "& vbCrLf & TBDD_DOCEXPORT_PROFILE_SQL,,"DEBUG - Info: Profiles from Database table "& TBDD_DOCEXPORT_PROFILE
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "WINLINE_ProgramDocType: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(4) & vbCrLf & _
|
||||
"WINLINE_HeadDocType: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(5) & vbCrLf & _
|
||||
"WINLINE_PostingType: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(6) & vbCrLf & _
|
||||
"WINLINE_VARIABLE4: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(7) & vbCrLf & _
|
||||
"WINLINE_VARIABLE5: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(8) & vbCrLf & _
|
||||
"WINLINE_VARIABLE6: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(9) & vbCrLf & _
|
||||
"WINLINE_VARIABLE7: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(10) & vbCrLf & vbCrLf & _
|
||||
"DOCEXPORT_PATH: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(11) & vbCrLf & _
|
||||
"DOCEXPORT_FILENAME: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(12) & vbCrLf & _
|
||||
"DOCEXPORT_FILENAME_PREVIEW: "& TBDD_DOCEXPORT_PROFILE_RESULT.Value(13) & vbCrLf & _
|
||||
"DOCEXPORT_FILEEXTENSION: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(14) & vbCrLf & _
|
||||
"DOCEXPORT_VERSIONING: " & TBDD_DOCEXPORT_PROFILE_RESULT.Value(15),,"DEBUG - Info: document profile from Database table "& TBDD_DOCEXPORT_PROFILE
|
||||
END IF
|
||||
|
||||
WINLINE_ProgramDocType = TBDD_DOCEXPORT_PROFILE_RESULT.Value(4)
|
||||
WINLINE_HeadDocType = TBDD_DOCEXPORT_PROFILE_RESULT.Value(5)
|
||||
WINLINE_PostingType = TBDD_DOCEXPORT_PROFILE_RESULT.Value(6)
|
||||
WINLINE_VARIABLE4 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(7)
|
||||
WINLINE_VARIABLE5 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(8)
|
||||
WINLINE_VARIABLE6 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(9)
|
||||
WINLINE_VARIABLE7 = TBDD_DOCEXPORT_PROFILE_RESULT.Value(10)
|
||||
|
||||
DOCEXPORT_PATH = TBDD_DOCEXPORT_PROFILE_RESULT.Value(11)
|
||||
DOCEXPORT_FILENAME = TBDD_DOCEXPORT_PROFILE_RESULT.Value(12)
|
||||
DOCEXPORT_FILENAME_PREVIEW = TBDD_DOCEXPORT_PROFILE_RESULT.Value(13)
|
||||
DOCEXPORT_FILEEXTENSION = TBDD_DOCEXPORT_PROFILE_RESULT.Value(14)
|
||||
DOCEXPORT_VERSIONING = TBDD_DOCEXPORT_PROFILE_RESULT.Value(15)
|
||||
|
||||
'Code block to get variables from table
|
||||
SET TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT = CWLStart.CurrentCompany.SearchRecord(TBDD_DOCEXPORT_CONFIG, TBDD_DOCEXPORT_CONFIG_VARSQL)
|
||||
|
||||
IF Err.Number <> 0 THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: Variables from Database table "& TBDD_DOCEXPORT_CONFIG &" !"
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT = -1 Then
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "No Rows found, SQL: "& TBDD_DOCEXPORT_CONFIG_VARSQL,,"DEBUG - Info: Variables from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
FOR LoopCounter = 1 TO TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.RowCount
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "Name: " & TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(5) & vbCrLf & _
|
||||
"Type: " & TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(6) & vbCrLf & _
|
||||
"Value: "& TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(7),,"DEBUG - Info: "& LoopCounter &" of "& TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.RowCount &" Variables from Database table "& TBDD_DOCEXPORT_CONFIG
|
||||
END IF
|
||||
|
||||
ReplaceItems.ADD TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(5),TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.Value(7)
|
||||
TBDD_DOCEXPORT_CONFIG_VARSQL_RESULT.NextRecord
|
||||
|
||||
NEXT
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and invalid Characters
|
||||
IF (DOCEXPORT_PATH <> "") THEN
|
||||
|
||||
ReplaceKeys = ReplaceItems.keys
|
||||
For LoopCounter = 0 To ReplaceItems.Count -1
|
||||
|
||||
IF InStr(DOCEXPORT_PATH,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
DOCEXPORT_PATH = Replace(DOCEXPORT_PATH,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
DOCEXPORT_PATH = Replace(Replace(Replace(Replace(Replace(Replace(DOCEXPORT_PATH,"/",ReplaceSpecialChar),"*",ReplaceSpecialChar),"?",ReplaceSpecialChar),"<",ReplaceSpecialChar),">",ReplaceSpecialChar),"|",ReplaceSpecialChar)
|
||||
ReplaceItems.ADD "%DOCEXPORT_PATH%",DOCEXPORT_PATH
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "DOCEXPORT_PATH: "& vbCrLf & DOCEXPORT_PATH & vbCrLf & vbCrLf & _
|
||||
"ReplaceItems includes "& ReplaceItems.count &" Items.",,"DEBUG - Info: DOCEXPORT_PATH Variable AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and invalid Characters
|
||||
IF (DOCEXPORT_FILENAME <> "") THEN
|
||||
|
||||
ReplaceKeys = ReplaceItems.keys
|
||||
For LoopCounter = 0 To ReplaceItems.Count -1
|
||||
|
||||
IF InStr(DOCEXPORT_FILENAME,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
DOCEXPORT_FILENAME = Replace(DOCEXPORT_FILENAME,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
DOCEXPORT_FILENAME = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(DOCEXPORT_FILENAME,"\",ReplaceSpecialChar),"/",ReplaceSpecialChar),":",ReplaceSpecialChar),"*",ReplaceSpecialChar),"?",ReplaceSpecialChar),"<",ReplaceSpecialChar),">",ReplaceSpecialChar),"|",ReplaceSpecialChar)
|
||||
ReplaceItems.ADD "%DOCEXPORT_FILENAME%",DOCEXPORT_FILENAME
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "DOCEXPORT_FILENAME: "& vbCrLf & DOCEXPORT_FILENAME & vbCrLf & vbCrLf & _
|
||||
"ReplaceItems includes "& ReplaceItems.count &" Items.",,"DEBUG - Info: DOCEXPORT_FILENAME Variable AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and invalid Characters
|
||||
IF (DOCEXPORT_FILENAME_PREVIEW <> "") THEN
|
||||
|
||||
ReplaceKeys = ReplaceItems.keys
|
||||
For LoopCounter = 0 To ReplaceItems.Count -1
|
||||
|
||||
IF InStr(DOCEXPORT_FILENAME_PREVIEW,ReplaceKeys(LoopCounter)) > 0 Then
|
||||
DOCEXPORT_FILENAME_PREVIEW = Replace(DOCEXPORT_FILENAME_PREVIEW,ReplaceKeys(LoopCounter),ReplaceItems(ReplaceKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
DOCEXPORT_FILENAME_PREVIEW = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(DOCEXPORT_FILENAME_PREVIEW,"\",ReplaceSpecialChar),"/",ReplaceSpecialChar),":",ReplaceSpecialChar),"*",ReplaceSpecialChar),"?",ReplaceSpecialChar),"<",ReplaceSpecialChar),">",ReplaceSpecialChar),"|",ReplaceSpecialChar)
|
||||
ReplaceItems.ADD "%DOCEXPORT_FILENAME_PREVIEW%",DOCEXPORT_FILENAME_PREVIEW
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "DOCEXPORT_FILENAME_PREVIEW: "& vbCrLf & DOCEXPORT_FILENAME_PREVIEW & vbCrLf & vbCrLf & _
|
||||
"ReplaceItems includes "& ReplaceItems.count &" Items.",,"DEBUG - Info: DOCEXPORT_FILENAME_PREVIEW Variable AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'########## main part ##########
|
||||
|
||||
'Check if all necessary export parameters are set.
|
||||
IF ((DOCEXPORT_PATH <> "") AND (DOCEXPORT_FILENAME <> "") AND (DOCEXPORT_FILEEXTENSION <> "")) THEN
|
||||
|
||||
'Check if destination folder / folder strukture exists. If not, try to create.
|
||||
IF NOT FileSystemObject.FolderExists(DOCEXPORT_PATH) THEN
|
||||
|
||||
strDir = FileSystemObject.GetAbsolutePathName(DOCEXPORT_PATH)
|
||||
arrDirs = Split( strDir, "\" )
|
||||
|
||||
If Left( strDir, 2 ) = "\\" THEN
|
||||
strDirBuild = "\\" & arrDirs(2) & "\" & arrDirs(3) & "\"
|
||||
idxFirst = 4
|
||||
Else
|
||||
strDirBuild = arrDirs(0) & "\"
|
||||
idxFirst = 1
|
||||
End If
|
||||
|
||||
For idx = idxFirst to Ubound( arrDirs )
|
||||
strDirBuild = FileSystemObject.BuildPath( strDirBuild, arrDirs(idx) )
|
||||
If Not FileSystemObject.FolderExists( strDirBuild ) THEN
|
||||
FileSystemObject.CreateFolder strDirBuild
|
||||
End if
|
||||
Next
|
||||
|
||||
END IF
|
||||
|
||||
'If DOCEXPORT_PATH exists, export file - including version tagging.
|
||||
IF (FileSystemObject.FolderExists(DOCEXPORT_PATH)) THEN
|
||||
DOCEXPORT_PATH_AND_FILENAME = DOCEXPORT_PATH & "\" & DOCEXPORT_FILENAME & "." &DOCEXPORT_FILEEXTENSION
|
||||
|
||||
IF (DOCEXPORT_VERSIONING = 1) THEN
|
||||
|
||||
IF (FileSystemObject.FileExists(DOCEXPORT_PATH_AND_FILENAME)) THEN
|
||||
DO
|
||||
DocVersion = DocVersion + 1
|
||||
DOCEXPORT_PATH_AND_FILENAME = DOCEXPORT_PATH & "\" & DOCEXPORT_FILENAME & DocVersionSeparator & DocVersion & "." & DOCEXPORT_FILEEXTENSION
|
||||
|
||||
ReplaceItems.Remove("%DOCEXPORT_FILENAME%")
|
||||
ReplaceItems.ADD "%DOCEXPORT_FILENAME%",DOCEXPORT_FILENAME & DocVersionSeparator & DocVersion & "." & DOCEXPORT_FILEEXTENSION
|
||||
ReplaceItems.ADD "%DOCEXPORT_PATH_AND_FILENAME%",DOCEXPORT_PATH_AND_FILENAME
|
||||
|
||||
LOOP UNTIL (FileSystemObject.FileExists(DOCEXPORT_PATH_AND_FILENAME) = False)
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
IF DebugMode = "Enabled" THEN
|
||||
MSGBOX "FINAL DOCEXPORT_PATH_AND_FILENAME: "& vbCrLf & DOCEXPORT_PATH_AND_FILENAME & vbCrLf & vbCrLf & _
|
||||
"ReplaceItems includes "& ReplaceItems.count &" Items.",,"DEBUG - Info: Final document settings"
|
||||
END IF
|
||||
|
||||
IF (DOCEXPORT_FILENAME_PREVIEW <> "") THEN
|
||||
Formtitle = DOCEXPORT_FILENAME_PREVIEW
|
||||
END IF
|
||||
|
||||
'In doc preview mode, there will be no export
|
||||
ExportOutput DOCEXPORT_PATH_AND_FILENAME, 5, 1
|
||||
|
||||
ELSE
|
||||
MSGBOX("ACHTUNG: Zielpfad für Export konnte nicht erstellt werden! Export wird abgebrochen.")
|
||||
|
||||
END IF
|
||||
|
||||
ELSEIF (DOCEXPORT_FILENAME_PREVIEW <> "") THEN
|
||||
Formtitle = DOCEXPORT_FILENAME_PREVIEW
|
||||
|
||||
ELSE
|
||||
'Missing Value in DOCEXPORT_PATH, DocTargetFileName or DOCEXPORT_FILEEXTENSION
|
||||
WScript.Quit(1)
|
||||
|
||||
END IF
|
||||
|
||||
ResultValue = DOCEXPORT_PATH_AND_FILENAME
|
||||
@@ -0,0 +1,137 @@
|
||||
-- Export-WinLineDoc - Standard-Profile
|
||||
-- =================================================================
|
||||
-- Dieses Skript legt vordefnierte Profile und Konfigurationen an.
|
||||
--
|
||||
-- ToDos:
|
||||
-- 1. DB kontrollieren
|
||||
-- 2. Tabellen kontrollieren
|
||||
-- 3. Mehrere DBs = mehrere Importe
|
||||
--
|
||||
-- =================================================================
|
||||
-- Copyright (c) 2021 by Digital Data GmbH
|
||||
--
|
||||
-- Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
-- Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
-- =================================================================
|
||||
-- Creation Date / Author: 04.07.2021 / MD
|
||||
-- Version Date / Editor: 04.07.2021 / MD
|
||||
-- Version Number: 1.0.0.0
|
||||
-- =================================================================
|
||||
-- History:
|
||||
-- 04.07.2021 / MK - Erstellung
|
||||
|
||||
--USE [CWLDATEN]
|
||||
--GO
|
||||
|
||||
delete FROM [t650]
|
||||
delete FROM [t651]
|
||||
delete FROM [t652]
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
INSERT [dbo].[t650] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [U010], [U011], [U012], [U013], [U014]) VALUES (1, N'1', N'Mandant Kurzname', N'ALL', N'CUSTOM_VARIABLE', N'%KURZNAME_MANDANT%', N'TEXT', N'Toys&Bikes', 0, 0, CAST(N'1970-01-01T00:00:00.000' AS DateTime), N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t650] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [U010], [U011], [U012], [U013], [U014]) VALUES (2, N'1', N'Exportpfad', N'ALL', N'CUSTOM_VARIABLE', N'%EXPORTPATH%', N'TEXT', N'c:\WinLine\Dokumentablage', 0, 0, CAST(N'1970-01-01T00:00:00.000' AS DateTime), N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (1, 1, N'Angebot (debitorisch)', N'ALL', N'1', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Angebot\%YEAR%\%MONTH%', N'%MandantenNr%-AANG-%AngebotsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANG-%AngebotsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (2, 1, N'Angebot-Storno (debitorisch)', N'ALL', N'1', N'11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Angebot-Storno\%YEAR%\%MONTH%', N'%MandantenNr%-AANG-Storno-%AngebotsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANG-Storno-%AngebotsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (3, 1, N'Auftrag (debitorisch)', N'ALL', N'1', N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Auftrag\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AAB-%AuftragsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AAB-%AuftragsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (4, 1, N'Auftrag-Storno (debitorisch)', N'ALL', N'1', N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Auftrag-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AAB-Storno-%AuftragsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AAB-Storno-%AuftragsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (5, 1, N'Lieferschein (debitorisch)', N'ALL', N'1', N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Lieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ALS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ALS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (6, 1, N'Lieferschein-Storno (debitorisch)', N'ALL', N'1', N'13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Lieferschein-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ALS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ALS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (7, 1, N'Rechnung (debitorisch)', N'ALL', N'1', N'4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ARE-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ARE-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (8, 1, N'Rechnung-Storno (debitorisch)', N'ALL', N'1', N'14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ARE-Storno-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ARE-Storno-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (9, 1, N'Anfrage (kreditorisch)', N'ALL', N'2', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Anfrage\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AANF-%AnfragenNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANF-%AnfragenNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (10, 1, N'Anfrage-Storno (kreditorisch)', N'ALL', N'2', N'11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Anfrage-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AANF-Storno-%AnfragenNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANF-Storno-%AnfragenNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (11, 1, N'Bestellung (kreditorisch)', N'ALL', N'2', N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Bestellung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ABE-%BestellNr%-%KontoName%
|
||||
', N'%MandantenNr%-ABE-%BestellNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (12, 1, N'Bestellung-Storno (kreditorisch)', N'ALL', N'2', N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Bestellung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ABE-Storno-%BestellNr%-%KontoName%
|
||||
', N'%MandantenNr%-ABE-Storno-%BestellNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (13, 1, N'Lieferschein (kreditorisch)', N'ALL', N'2', N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Lieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ELS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ELS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (14, 1, N'Lieferschein-Storno (kreditorisch)', N'ALL', N'2', N'13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Lieferschein-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ELS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ELS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (15, 1, N'Rechnung (kreditorisch)', N'ALL', N'2', N'4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Rechnung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ERE-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ERE-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (16, 1, N'Rechnung-Storno (kreditorisch)', N'ALL', N'2', N'14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Rechnung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ERE-Storno-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ERE-Storno-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (17, 1, N'Teillieferschein (debitorisch)', N'ALL', N'1', N'-3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Teillieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ATLS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ATLS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (18, 1, N'Gutschrift (debitorisch)', N'ALL', N'1', N'4', NULL, N'NegativAmount', NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Gutschrift\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AGU-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AGU-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (19, 1, N'Rechnungskorrektur (debitorisch)', N'ALL', N'1', N'4', NULL, N'NegativAmount', N'Correction', NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnungskorrektur\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AREK-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AREK-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
GO
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
SELECT * FROM [t650]
|
||||
SELECT * FROM [t651]
|
||||
SELECT * FROM [t652]
|
||||
666
archive/Export-WinLineDoc/Archiv/Export-WinLineDocument.vbs
Normal file
@@ -0,0 +1,666 @@
|
||||
' VB Script Document
|
||||
'
|
||||
' Export Script for WinLine documents.
|
||||
' Configuration has to be done in the additional fields in the "WinLine Mandantenstamm"
|
||||
'
|
||||
' Digital Data
|
||||
' Ludwig-Rinn-Straße 16
|
||||
' 35452 Heuchelheim
|
||||
' Tel.: 0641 / 202360
|
||||
' E-Mail: info(at)didalog.de
|
||||
'
|
||||
' Version Number: 1.0.1.0
|
||||
' Version Date: 15.07.2019
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
'############################################ set variables ############################################
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
|
||||
DIM DateTime, SplitChar, ReplaceSpecialChar, DocExtension, DocVersion, DocVersionSeparator, DocType, MandatorShortName, DocAccountNumber, DocAANGExportPath, DocAABExportPath, DocALSExportPath, DocAREExportPath
|
||||
DIM FileSystemObject, Shell, DocAANGConvention, DocAABConvention, DocALSConvention, DocAREConvention, DocAANGNumber, DocAABNumber, DocALSNumber, DocARENumber, DocTargetPath, DocTargetFileName, FullPath
|
||||
SET FileSystemObject = CreateObject("Scripting.FileSystemObject")
|
||||
SET Shell = CreateObject("WScript.Shell")
|
||||
|
||||
'Standard / default variables.
|
||||
DateTime = now
|
||||
SplitChar = "|"
|
||||
ReplaceSpecialChar = " "
|
||||
DocExtension = ".pdf"
|
||||
DocExportCheck = "true"
|
||||
DocExportCheckTry = 0
|
||||
DocExportCheckMaxTrys = 10
|
||||
DocVersion = 1
|
||||
DocVersionSeparator = "~"
|
||||
Timestamp = ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime)
|
||||
DocType = Value (25,139) 'WinLine Belegstufe
|
||||
RecordNumber = Value (25,22) 'WinLine Laufnummer
|
||||
PostingType = Value (357,6) 'WinLine Buchungsart (Debitorisch = 1 / Kreditorisch = 2)
|
||||
Amount = Value (0,201) 'WinLine Betrag (Artikel, Gutschrift)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,200))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
DocAccountNumber = TRIM(CSTR(Value (0,30))) 'WinLine Kontonummer (Debitor / Kreditor)
|
||||
DocAANGNumber = TRIM(CSTR(Value (0,34))) 'WinLine Angebotsnummer
|
||||
DocAABNumber = TRIM(CSTR(Value (0,35))) 'WinLine Auftragsnummer
|
||||
DocALSNumber = TRIM(CSTR(Value (0,36))) 'WinLine Lieferscheinnummer
|
||||
DocARENumber = TRIM(CSTR(Value (0,37))) 'WinLine Rechnungsnummer
|
||||
DocAANFNumber = TRIM(CSTR(Value (0,34))) 'WinLine Anfragennummer
|
||||
DocABENumber = TRIM(CSTR(Value (0,35))) 'WinLine Bestellnummer
|
||||
DocAANGExportPath = TRIM(CSTR(Split(Value (1,201),SplitChar)(0))) 'WinLine Exportpfad für Angebote (individual Feld)
|
||||
DocAABExportPath = TRIM(CSTR(Split(Value (1,202),SplitChar)(0))) 'WinLine Exportpfad für Aufträge (individual Feld)
|
||||
DocALSExportPath = TRIM(CSTR(Split(Value (1,203),SplitChar)(0))) 'WinLine Exportpfad für Lieferscheine (individual Feld)
|
||||
DocAREExportPath = TRIM(CSTR(Split(Value (1,204),SplitChar)(0))) 'WinLine Exportpfad für Rechnungen (individual Feld)
|
||||
DocAGUExportPath = TRIM(CSTR(Split(Value (1,205),SplitChar)(0))) 'WinLine Exportpfad für Gutschriften (individual Feld)
|
||||
DocAANFExportPath = TRIM(CSTR(Split(Value (1,206),SplitChar)(0))) 'WinLine Exportpfad für Anfragen (individual Feld)
|
||||
DocABEExportPath = TRIM(CSTR(Split(Value (1,207),SplitChar)(0))) 'WinLine Exportpfad für Bestellungen (individual Feld)
|
||||
DocAANGConvention = TRIM(CSTR(Split(Value (1,201),SplitChar)(1))) 'WinLine Benennungsschema für Angebote (individual Feld)
|
||||
DocAABConvention = TRIM(CSTR(Split(Value (1,202),SplitChar)(1))) 'WinLine Benennungsschema für Aufträge (individual Feld)
|
||||
DocALSConvention = TRIM(CSTR(Split(Value (1,203),SplitChar)(1))) 'WinLine Benennungsschema für Lieferscheine (individual Feld)
|
||||
DocAREConvention = TRIM(CSTR(Split(Value (1,204),SplitChar)(1))) 'WinLine Benennungsschema für Rechnungen (individual Feld)
|
||||
DocAGUConvention = TRIM(CSTR(Split(Value (1,205),SplitChar)(1))) 'WinLine Benennungsschema für Gutschriften (individual Feld)
|
||||
DocAANFConvention = TRIM(CSTR(Split(Value (1,206),SplitChar)(1))) 'WinLine Benennungsschema für Anfragen (individual Feld)
|
||||
DocABEConvention = TRIM(CSTR(Split(Value (1,207),SplitChar)(1))) 'WinLine Benennungsschema für Bestellungen (individual Feld)
|
||||
|
||||
MandatorSpecificVarCount = 50
|
||||
MandatorSpecificVarCounter = 0
|
||||
|
||||
i = 1 : s = ""
|
||||
'Loop for mass declaration of Mandator specific Variables
|
||||
DO
|
||||
s = s & i '& ", "
|
||||
MandatorSpecificVarCounter = MandatorSpecificVarCounter+1
|
||||
|
||||
msgbox i
|
||||
LOOP WHILE MandatorSpecificVarCounter < MandatorSpecificVarCount
|
||||
|
||||
|
||||
MandatorShortName = TRIM(CSTR(Value (1,200))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,201))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,202))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,203))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,204))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,205))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,206))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,207))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,208))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,209))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,210))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,211))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,212))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,213))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,214))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,215))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,216))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,217))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,218))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,219))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,220))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,221))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,222))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,223))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,224))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,225))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,226))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,227))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,228))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,229))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,230))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,231))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,232))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,233))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,234))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,235))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,236))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,237))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,238))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,239))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,240))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
|
||||
'Costumer variables - dont forget to add the replace function in the lower preparing part.
|
||||
'VarName = mesoField 'Description
|
||||
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
'########################################### preparing part ############################################
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
|
||||
'Retrive Document Type (0 = Vorschau).
|
||||
IF (DocType = 0) THEN
|
||||
|
||||
'Nothing will happen, its just a Preview ;-)
|
||||
|
||||
'Retrive Document Type (1 = Angebot/Anfrage). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 1) THEN)
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAANGExportPath) Or IsNull(DocAANGExportPath) Or DocAANGExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAANGExportPath
|
||||
|
||||
'If ExportPath has no content, fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAANGConvention) Or IsNull(DocAANGConvention) Or DocAANGConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAANGConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsangebote. FailSafe ist AANG_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "AANG_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAANFExportPath) Or IsNull(DocAANFExportPath) Or DocAANFExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAANFExportPath
|
||||
|
||||
'If ExportPath has no content, fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAANFConvention) Or IsNull(DocAANFConvention) Or DocAANFConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAANFConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsanfragen. FailSafe ist AANF_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "AANF_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'########## working on it'#########
|
||||
'Retrive Document Type (10 = StornoAngebot/Anfrage). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 1) THEN)
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAANGExportPath) Or IsNull(DocAANGExportPath) Or DocAANGExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAANGExportPath
|
||||
|
||||
'If ExportPath has no content, fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAANGConvention) Or IsNull(DocAANGConvention) Or DocAANGConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAANGConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsangebote. FailSafe ist AANG_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "AANG_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAANFExportPath) Or IsNull(DocAANFExportPath) Or DocAANFExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAANFExportPath
|
||||
|
||||
'If ExportPath has no content, fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAANFConvention) Or IsNull(DocAANFConvention) Or DocAANFConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAANFConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsanfragen. FailSafe ist AANF_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "AANF_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
|
||||
'########## working on it
|
||||
|
||||
|
||||
'Retrive Document Type (2 = Auftrag/Bestellung). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 2) THEN
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAABExportPath) Or IsNull(DocAABExportPath) Or DocAABExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAABExportPath
|
||||
|
||||
'If ExportPath has no content, try to exit. But exit wont work, so fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAABConvention) Or IsNull(DocAABConvention) Or DocAABConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAABConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsauftragsbestätgrechnungen. FailSafe ist AAB_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "AAB_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocABEExportPath) Or IsNull(DocABEExportPath) Or DocABEExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocABEExportPath
|
||||
|
||||
'If ExportPath has no content, fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocABEConvention) Or IsNull(DocABEConvention) Or DocABEConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocABEConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsbestellungen. FailSafe ist ABE_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "ABE_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'Retrive Document Type (3 = Lieferschein / -3 = Teillieferschein). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 3 OR DocType = -3) THEN
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocALSExportPath) Or IsNull(DocALSExportPath) Or DocALSExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocALSExportPath
|
||||
|
||||
'If ExportPath has no content, try to exit. But exit wont work, so fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocALSConvention) Or IsNull(DocALSConvention) Or DocALSConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocALSConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangslieferscheine. FailSafe ist ALS_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "ALS_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'########################################### Currently not implemented ###########################################
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'Retrive Document Type (4 = Rechnung). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 4) THEN
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
IF (LEFT(Amount,1) = "-") THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAGUExportPath) Or IsNull(DocAGUExportPath) Or DocAGUExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAGUExportPath
|
||||
|
||||
'If ExportPath has no content, try to exit. But exit wont work, so fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAGUConvention) Or IsNull(DocAGUConvention) Or DocAGUConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAGUConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsgutschriften. FailSafe ist AGU_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "AGU_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAREExportPath) Or IsNull(DocAREExportPath) Or DocAREExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAREExportPath
|
||||
|
||||
'If ExportPath has no content, try to exit. But exit wont work, so fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAREConvention) Or IsNull(DocAREConvention) Or DocAREConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAREConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsrechnungen. FailSafe ist ARE_" & DocAccountNumber & "_" & Timestamp & ".pdf" & "!")
|
||||
DocTargetFileName = "ARE_" & DocAccountNumber & Timestamp
|
||||
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'########################################### Currently not implemented ###########################################
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'Retrive Document Type (14 = StornoRechnung). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 14) THEN
|
||||
|
||||
|
||||
'If DocType was unknown.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Belegstufe (" & DocType & ")! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder in DocTargetPath from Configuration, including invalid Characters.
|
||||
IF (DocTargetPath <> "") THEN
|
||||
|
||||
DocTargetPath = Replace(DocTargetPath,"%Mandantenkürzel%",MandatorShortName)
|
||||
DocTargetPath = Replace(DocTargetPath,"%Jahr%",(Year(date)))
|
||||
DocTargetPath = Replace(DocTargetPath,"%Monat%",(month(date)))
|
||||
DocTargetPath = Replace(DocTargetPath,"%Monatsname%",MonthName((month(date))))
|
||||
DocTargetPath = Replace(DocTargetPath,"%Tag%",(day(date)))
|
||||
DocTargetPath = Replace(DocTargetPath,"%KontoNr%",DocAccountNumber)
|
||||
DocTargetPath = Replace(DocTargetPath,"%Laufnummer%",RecordNumber)
|
||||
DocTargetPath = Replace(Replace(Replace(Replace(Replace(Replace(DocTargetPath,"/",ReplaceSpecialChar),"*",ReplaceSpecialChar),"?",ReplaceSpecialChar),"<",ReplaceSpecialChar),">",ReplaceSpecialChar),"|",ReplaceSpecialChar)
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder in DocTargetFileName from Configuration, including invalid Characters.
|
||||
IF (DocTargetFileName <> "") THEN
|
||||
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Mandantenkürzel%",MandatorShortName)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%AngebotsNr%",DocAANGNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%AuftragsNr%",DocAABNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%LieferscheinNr%",DocALSNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%RechnungsNr%",DocARENumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%AnfragenNr%",DocAANFNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%BestellNr%",DocABENumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Jahr%",(Year(date)))
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Monat%",(month(date)))
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Monatsname%",MonthName((month(date))))
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Tag%",(day(date)))
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%KontoNr%",DocAccountNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Laufnummer%",RecordNumber)
|
||||
DocTargetFileName = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(DocTargetFileName,"\",ReplaceSpecialChar),"/",ReplaceSpecialChar),":",ReplaceSpecialChar),"*",ReplaceSpecialChar),"?",ReplaceSpecialChar),"<",ReplaceSpecialChar),">",ReplaceSpecialChar),"|",ReplaceSpecialChar)
|
||||
|
||||
END IF
|
||||
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
'############################################# main part ###############################################
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
|
||||
'Check if all necessary export parameters are set.
|
||||
IF ((DocTargetPath <> "") AND (DocTargetFileName <> "") AND (DocExtension <> "")) THEN
|
||||
|
||||
'Check if destination folder / folder strukture exists. If not, try to create.
|
||||
IF NOT FileSystemObject.FolderExists(DocTargetPath) THEN
|
||||
|
||||
strDir = FileSystemObject.GetAbsolutePathName(DocTargetPath)
|
||||
arrDirs = Split( strDir, "\" )
|
||||
|
||||
If Left( strDir, 2 ) = "\\" THEN
|
||||
strDirBuild = "\\" & arrDirs(2) & "\" & arrDirs(3) & "\"
|
||||
idxFirst = 4
|
||||
Else
|
||||
strDirBuild = arrDirs(0) & "\"
|
||||
idxFirst = 1
|
||||
End If
|
||||
|
||||
For idx = idxFirst to Ubound( arrDirs )
|
||||
strDirBuild = FileSystemObject.BuildPath( strDirBuild, arrDirs(idx) )
|
||||
If Not FileSystemObject.FolderExists( strDirBuild ) THEN
|
||||
FileSystemObject.CreateFolder strDirBuild
|
||||
End if
|
||||
Next
|
||||
|
||||
END IF
|
||||
|
||||
'If DocTargetPath exists, export file - including version tagging.
|
||||
IF (FileSystemObject.FolderExists(DocTargetPath)) THEN
|
||||
|
||||
FullPath = DocTargetPath & "\" & DocTargetFileName & DocExtension
|
||||
|
||||
IF (FileSystemObject.FileExists(FullPath)) THEN
|
||||
|
||||
DO
|
||||
|
||||
DocVersion = DocVersion + 1
|
||||
FullPath = DocTargetPath & "\" & DocTargetFileName & DocVersionSeparator & DocVersion & DocExtension
|
||||
|
||||
LOOP UNTIL (FileSystemObject.FileExists(FullPath) = False)
|
||||
|
||||
END IF
|
||||
|
||||
ExportOutput FullPath, 5, 0
|
||||
|
||||
'Optional check if file was exported successfully.
|
||||
IF (DocExportCheck = "true") THEN
|
||||
|
||||
CheckExportScriptPath = FileSystemObject.FolderExists(Shell.ExpandEnvironmentStrings("%TEMP%") & "\" & "Digital_Data")
|
||||
CheckExportScript = "CheckExport-" & DocTargetFileName & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime) & ".vbs"
|
||||
|
||||
IF NOT (CheckExportScriptPath) THEN
|
||||
|
||||
FileSystemObject.CreateFolder(CheckExportScriptPath)
|
||||
|
||||
END IF
|
||||
|
||||
IF (FileSystemObject.FolderExists(CheckExportScriptPath)) THEN
|
||||
|
||||
|
||||
|
||||
ELSE
|
||||
|
||||
|
||||
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
MSGBOX("ACHTUNG: Zielpfad für Export konnte nicht erstellt werden! Export wird abgebrochen.")
|
||||
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
'Missing Value in DocTargetPath, DocTargetFileName or DocExtension
|
||||
WScript.Quit(1)
|
||||
|
||||
END IF
|
||||
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
'########################################### finishing part ############################################
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
|
||||
FileSystemObject = Nothing
|
||||
Shell = Nothing
|
||||
DateTime = Nothing
|
||||
SplitChar = Nothing
|
||||
ReplaceSpecialChar = Nothing
|
||||
DocExtension = Nothing
|
||||
DocExportCheck = Nothing
|
||||
DocExportCheckTry = Nothing
|
||||
DocExportCheckMaxTrys = Nothing
|
||||
DocType = Nothing
|
||||
DocVersion = Nothing
|
||||
DocVersionSeparator = Nothing
|
||||
MandatorShortName = Nothing
|
||||
DocAccountNumber = Nothing
|
||||
DocAANGExportPath = Nothing
|
||||
DocAABExportPath = Nothing
|
||||
DocALSExportPath = Nothing
|
||||
DocAREExportPath = Nothing
|
||||
DocAANFExportPath = Nothing
|
||||
DocABExportPath = Nothing
|
||||
DocAANGConvention = Nothing
|
||||
DocAABConvention = Nothing
|
||||
DocALSConvention = Nothing
|
||||
DocAREConvention = Nothing
|
||||
DocAANFConvention = Nothing
|
||||
DocABEConvention = Nothing
|
||||
DocAANGNumber = Nothing
|
||||
DocAABNumber = Nothing
|
||||
DocALSNumber = Nothing
|
||||
DocARENumber = Nothing
|
||||
DocAANFNumber = Nothing
|
||||
DocABENumber = Nothing
|
||||
DocTargetPath = Nothing
|
||||
DocTargetFileName = Nothing
|
||||
FullPath = Nothing
|
||||
|
||||
Result = ""
|
||||
@@ -0,0 +1,509 @@
|
||||
' VB Script Document
|
||||
'
|
||||
' Export Script for WinLine documents.
|
||||
' Configuration has to be done in the additional fields in the "WinLine Mandantenstamm"
|
||||
'
|
||||
' Digital Data
|
||||
' Ludwig-Rinn-Straße 16
|
||||
' 35452 Heuchelheim
|
||||
' Tel.: 0641 / 202360
|
||||
' E-Mail: info(at)didalog.de
|
||||
'
|
||||
' Version Number: 1.0.0.0
|
||||
' Version Date: 23.04.2019
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
'############################################ set variables ############################################
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
|
||||
DIM DateTime, SplitChar, ReplaceSpecialChar, DocExtension, DocVersion, DocVersionSeparator, DocType, MandatorShortName, DocAccountNumber, DocAANGExportPath, DocAABExportPath, DocALSExportPath, DocAREExportPath
|
||||
DIM FileSystemObject, Shell, DocAANGConvention, DocAABConvention, DocALSConvention, DocAREConvention, DocAANGNumber, DocAABNumber, DocALSNumber, DocARENumber, DocTargetPath, DocTargetFileName, FullPath
|
||||
SET FileSystemObject = CreateObject("Scripting.FileSystemObject")
|
||||
SET Shell = CreateObject("WScript.Shell")
|
||||
|
||||
'Standard / default variables.
|
||||
DateTime = now
|
||||
SplitChar = "|"
|
||||
ReplaceSpecialChar = " "
|
||||
DocExtension = ".pdf"
|
||||
DocExportCheck = "true"
|
||||
DocExportCheckTry = 0
|
||||
DocExportCheckMaxTrys = 10
|
||||
DocVersion = 1
|
||||
DocVersionSeparator = "~"
|
||||
DocType = Value (25,139) 'WinLine Belegstufe
|
||||
RecordNumber = Value (25,22) 'WinLine Laufnummer
|
||||
PostingType = Value (357,6) 'WinLine Buchungsart (Debitorisch = 1 / Kreditorisch = 2)
|
||||
MandatorShortName = TRIM(CSTR(Value (1,200))) 'WinLine Mandantenkürzel (individual Feld)
|
||||
DocAccountNumber = TRIM(CSTR(Value (0,30))) 'WinLine Kontonummer (Debitor / Kreditor)
|
||||
DocAANGNumber = TRIM(CSTR(Value (0,34))) 'WinLine Angebotsnummer
|
||||
DocAABNumber = TRIM(CSTR(Value (0,35))) 'WinLine Auftragsnummer
|
||||
DocALSNumber = TRIM(CSTR(Value (0,36))) 'WinLine Lieferscheinnummer
|
||||
DocARENumber = TRIM(CSTR(Value (0,37))) 'WinLine Rechnungsnummer
|
||||
DocAANFNumber = TRIM(CSTR(Value (0,34))) 'WinLine Anfragennummer
|
||||
DocABENumber = TRIM(CSTR(Value (0,35))) 'WinLine Bestellnummer
|
||||
DocAANGExportPath = TRIM(CSTR(Split(Value (1,201),SplitChar)(0))) 'WinLine Exportpfad für Angebote (individual Feld)
|
||||
DocAABExportPath = TRIM(CSTR(Split(Value (1,202),SplitChar)(0))) 'WinLine Exportpfad für Aufträge (individual Feld)
|
||||
DocALSExportPath = TRIM(CSTR(Split(Value (1,203),SplitChar)(0))) 'WinLine Exportpfad für Lieferscheine (individual Feld)
|
||||
DocAREExportPath = TRIM(CSTR(Split(Value (1,204),SplitChar)(0))) 'WinLine Exportpfad für Rechnungen (individual Feld)
|
||||
DocAANFExportPath = TRIM(CSTR(Split(Value (1,205),SplitChar)(0))) 'WinLine Exportpfad für Anfragen (individual Feld)
|
||||
DocABEExportPath = TRIM(CSTR(Split(Value (1,206),SplitChar)(0))) 'WinLine Exportpfad für Bestellungen (individual Feld)
|
||||
DocAANGConvention = TRIM(CSTR(Split(Value (1,201),SplitChar)(1))) 'WinLine Benennungsschema für Angebote (individual Feld)
|
||||
DocAABConvention = TRIM(CSTR(Split(Value (1,202),SplitChar)(1))) 'WinLine Benennungsschema für Aufträge (individual Feld)
|
||||
DocALSConvention = TRIM(CSTR(Split(Value (1,203),SplitChar)(1))) 'WinLine Benennungsschema für Lieferscheine (individual Feld)
|
||||
DocAREConvention = TRIM(CSTR(Split(Value (1,204),SplitChar)(1))) 'WinLine Benennungsschema für Rechnungen (individual Feld)
|
||||
DocAANFConvention = TRIM(CSTR(Split(Value (1,205),SplitChar)(1))) 'WinLine Benennungsschema für Anfragen (individual Feld)
|
||||
DocABEConvention = TRIM(CSTR(Split(Value (1,206),SplitChar)(1))) 'WinLine Benennungsschema für Bestellungen (individual Feld)
|
||||
|
||||
'Costumer variables - dont forget to add the replace function in the lower preparing part.
|
||||
'VarName = mesoField 'Description
|
||||
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
'########################################### preparing part ############################################
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
|
||||
'Retrive Document Type (1 = Angebot/Anfrage). Depending on it, the Targetpath and Targetfilename.
|
||||
IF (DocType = 1) THEN
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAANGExportPath) Or IsNull(DocAANGExportPath) Or DocAANGExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAANGExportPath
|
||||
|
||||
'If ExportPath has no content, fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAANGConvention) Or IsNull(DocAANGConvention) Or DocAANGConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAANGConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsangebote. FailSafe ist AANG_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime) & ".pdf" & "!")
|
||||
DocTargetFileName = "AANG_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime)
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAANFExportPath) Or IsNull(DocAANFExportPath) Or DocAANFExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAANFExportPath
|
||||
|
||||
'If ExportPath has no content, fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAANFConvention) Or IsNull(DocAANFConvention) Or DocAANFConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAANFConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsanfragen. FailSafe ist AANF_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime) & ".pdf" & "!")
|
||||
DocTargetFileName = "AANF_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime)
|
||||
|
||||
END IF
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'Retrive Document Type (2 = Auftrag/Bestellung). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 2) THEN
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAABExportPath) Or IsNull(DocAABExportPath) Or DocAABExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAABExportPath
|
||||
|
||||
'If ExportPath has no content, try to exit. But exit wont work, so fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAABConvention) Or IsNull(DocAABConvention) Or DocAABConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAABConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsauftragsbestätgrechnungen. FailSafe ist AAB_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime) & ".pdf" & "!")
|
||||
DocTargetFileName = "AAB_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime)
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocABEExportPath) Or IsNull(DocABEExportPath) Or DocABEExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocABEExportPath
|
||||
|
||||
'If ExportPath has no content, fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocABEConvention) Or IsNull(DocABEConvention) Or DocABEConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocABEConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsbestellungen. FailSafe ist ABE_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime) & ".pdf" & "!")
|
||||
DocTargetFileName = "ABE_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime)
|
||||
|
||||
END IF
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'Retrive Document Type (3 = Lieferschein). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 3) THEN
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocALSExportPath) Or IsNull(DocALSExportPath) Or DocALSExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocALSExportPath
|
||||
|
||||
'If ExportPath has no content, try to exit. But exit wont work, so fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocALSConvention) Or IsNull(DocALSConvention) Or DocALSConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocALSConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangslieferscheine. FailSafe ist ALS_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime) & ".pdf" & "!")
|
||||
DocTargetFileName = "ALS_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime)
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'########################################### Currently not implemented ###########################################
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'Retrive Document Type (4 = Rechnung). Depending on it, the Targetpath and Targetfilename.
|
||||
ELSEIF (DocType = 4) THEN
|
||||
|
||||
'If document is for a debtor.
|
||||
IF (PostingType = 1) THEN
|
||||
|
||||
'If ExportPath has content
|
||||
IF NOT (IsEmpty(DocAREExportPath) Or IsNull(DocAREExportPath) Or DocAREExportPath = "") THEN
|
||||
|
||||
DocTargetPath = DocAREExportPath
|
||||
|
||||
'If ExportPath has no content, try to exit. But exit wont work, so fallback on the general WinLine network path.
|
||||
ELSE
|
||||
|
||||
DocTargetPath = "%NETWORK%"
|
||||
|
||||
END IF
|
||||
|
||||
'If Convention has content.
|
||||
IF NOT (IsEmpty(DocAREConvention) Or IsNull(DocAREConvention) Or DocAREConvention = "") THEN
|
||||
|
||||
DocTargetFileName = DocAREConvention
|
||||
|
||||
'If Convention AND ExportPath had both no content.
|
||||
ELSEIF (DocTargetPath = "%NETWORK%") THEN
|
||||
|
||||
DocTargetFileName = Nothing
|
||||
|
||||
'If ExportPath has content, but Convention hasnt.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Ungültige Export Dateinamens Einstellung für Ausgangsrechnungen. FailSafe ist ARE_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime) & ".pdf" & "!")
|
||||
DocTargetFileName = "ARE_" & DocAccountNumber & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime)
|
||||
|
||||
END IF
|
||||
|
||||
'If document is for a creditor.
|
||||
ELSEIF (PostingType = 2) THEN
|
||||
|
||||
'########################################### Currently not implemented ###########################################
|
||||
|
||||
'If document is not for a debtor or creditor.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Export Einstellung! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'If DocType was unknown.
|
||||
ELSE
|
||||
|
||||
MSGBOX("Undefinierte Belegstufe! Abbruch des Exports.")
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder in DocTargetPath from Configuration, including invalid Characters.
|
||||
IF (DocTargetPath <> "") THEN
|
||||
|
||||
DocTargetPath = Replace(DocTargetPath,"%Mandantenkürzel%",MandatorShortName)
|
||||
DocTargetPath = Replace(DocTargetPath,"%Jahr%",(Year(date)))
|
||||
DocTargetPath = Replace(DocTargetPath,"%Monat%",(month(date)))
|
||||
DocTargetPath = Replace(DocTargetPath,"%Monatsname%",MonthName((month(date))))
|
||||
DocTargetPath = Replace(DocTargetPath,"%Tag%",(day(date)))
|
||||
DocTargetPath = Replace(DocTargetPath,"%KontoNr%",DocAccountNumber)
|
||||
DocTargetPath = Replace(DocTargetPath,"%Laufnummer%",RecordNumber)
|
||||
DocTargetPath = Replace(Replace(Replace(Replace(Replace(Replace(DocTargetPath,"/",ReplaceSpecialChar),"*",ReplaceSpecialChar),"?",ReplaceSpecialChar),"<",ReplaceSpecialChar),">",ReplaceSpecialChar),"|",ReplaceSpecialChar)
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder in DocTargetFileName from Configuration, including invalid Characters.
|
||||
IF (DocTargetFileName <> "") THEN
|
||||
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Mandantenkürzel%",MandatorShortName)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%AngebotsNr%",DocAANGNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%AuftragsNr%",DocAABNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%LieferscheinNr%",DocALSNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%RechnungsNr%",DocARENumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%AnfragenNr%",DocAANFNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%BestellNr%",DocABENumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Jahr%",(Year(date)))
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Monat%",(month(date)))
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Monatsname%",MonthName((month(date))))
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Tag%",(day(date)))
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%KontoNr%",DocAccountNumber)
|
||||
DocTargetFileName = Replace(DocTargetFileName,"%Laufnummer%",RecordNumber)
|
||||
DocTargetFileName = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(DocTargetFileName,"\",ReplaceSpecialChar),"/",ReplaceSpecialChar),":",ReplaceSpecialChar),"*",ReplaceSpecialChar),"?",ReplaceSpecialChar),"<",ReplaceSpecialChar),">",ReplaceSpecialChar),"|",ReplaceSpecialChar)
|
||||
|
||||
END IF
|
||||
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
'############################################# main part ###############################################
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
|
||||
'Check if all necessary export parameters are set.
|
||||
IF ((DocTargetPath <> "") AND (DocTargetFileName <> "") AND (DocExtension <> "")) THEN
|
||||
|
||||
'Check if destination folder / folder strukture exists. If not, try to create.
|
||||
IF NOT FileSystemObject.FolderExists(DocTargetPath) THEN
|
||||
|
||||
strDir = FileSystemObject.GetAbsolutePathName(DocTargetPath)
|
||||
arrDirs = Split( strDir, "\" )
|
||||
|
||||
If Left( strDir, 2 ) = "\\" THEN
|
||||
strDirBuild = "\\" & arrDirs(2) & "\" & arrDirs(3) & "\"
|
||||
idxFirst = 4
|
||||
Else
|
||||
strDirBuild = arrDirs(0) & "\"
|
||||
idxFirst = 1
|
||||
End If
|
||||
|
||||
For idx = idxFirst to Ubound( arrDirs )
|
||||
strDirBuild = FileSystemObject.BuildPath( strDirBuild, arrDirs(idx) )
|
||||
If Not FileSystemObject.FolderExists( strDirBuild ) THEN
|
||||
FileSystemObject.CreateFolder strDirBuild
|
||||
End if
|
||||
Next
|
||||
|
||||
END IF
|
||||
|
||||
'If DocTargetPath exists, export file - including version tagging.
|
||||
IF (FileSystemObject.FolderExists(DocTargetPath)) THEN
|
||||
|
||||
FullPath = DocTargetPath & "\" & DocTargetFileName & DocExtension
|
||||
|
||||
IF (FileSystemObject.FileExists(FullPath)) THEN
|
||||
|
||||
DO
|
||||
|
||||
DocVersion = DocVersion + 1
|
||||
FullPath = DocTargetPath & "\" & DocTargetFileName & DocVersionSeparator & DocVersion & DocExtension
|
||||
|
||||
LOOP UNTIL (FileSystemObject.FileExists(FullPath) = False)
|
||||
|
||||
END IF
|
||||
|
||||
ExportOutput FullPath, 5, 0
|
||||
|
||||
'Optional check if file was exported successfully.
|
||||
IF (DocExportCheck = "true") THEN
|
||||
|
||||
CheckExportScriptPath = FileSystemObject.FolderExists(Shell.ExpandEnvironmentStrings("%TEMP%") & "\" & "Digital_Data")
|
||||
CheckExportScript = "CheckExport-" & DocTargetFileName & ((year(DateTime)*100 + month(DateTime))*100 + day(DateTime))*10000 + hour(DateTime)*100 + minute(DateTime) & ".vbs"
|
||||
|
||||
IF NOT (CheckExportScriptPath) THEN
|
||||
|
||||
FileSystemObject.CreateFolder(CheckExportScriptPath)
|
||||
|
||||
END IF
|
||||
|
||||
IF (FileSystemObject.FolderExists(CheckExportScriptPath)) THEN
|
||||
|
||||
CheckExportFile = CheckExportScriptPath & "\" & CheckExportScript
|
||||
Set CheckExportObject = FileSystemObject.CreateTextFile(CheckExportFile,True)
|
||||
|
||||
CheckExportObject.Write "DIM FileSystemObject, Fullpath, DocExportCheckTry, DocExportCheckMaxTrys" & vbCrLf
|
||||
CheckExportObject.Write "SET FileSystemObject = CreateObject(\"Scripting.FileSystemObject\")" & vbCrLf
|
||||
CheckExportObject.Write "" & vbCrLf
|
||||
CheckExportObject.Write "FullPath = Wscript.Arguments(0)" & vbCrLf
|
||||
CheckExportObject.Write "DocExportCheckTry = Wscript.Arguments(1)" & vbCrLf
|
||||
CheckExportObject.Write "DocExportCheckMaxTrys = Wscript.Arguments(2)" & vbCrLf
|
||||
CheckExportObject.Write "" & vbCrLf
|
||||
CheckExportObject.Write "DO" & vbCrLf
|
||||
CheckExportObject.Write "" & vbCrLf
|
||||
CheckExportObject.Write "DocExportCheckTry = DocExportCheckTry + 1" & vbCrLf
|
||||
CheckExportObject.Write "WScript.Sleep 3000 'Wait 3 Seconds" & vbCrLf
|
||||
CheckExportObject.Write "" & vbCrLf
|
||||
CheckExportObject.Write "LOOP UNTIL ((FileSystemObject.FileExists(FullPath) = True) OR ((DocExportCheckTry >= DocExportCheckMaxTrys) = True))" & vbCrLf
|
||||
CheckExportObject.Write "" & vbCrLf
|
||||
CheckExportObject.Write "IF NOT (FileSystemObject.FileExists(FullPath)) THEN" & vbCrLf
|
||||
CheckExportObject.Write "" & vbCrLf
|
||||
CheckExportObject.Write 'MSGBOX("ACHTUNG: Der Export ist fehlgeschlagen! Bitte wenden Sie sich an Ihren Administrator!")' & vbCrLf
|
||||
CheckExportObject.Write "" & vbCrLf
|
||||
CheckExportObject.Write "END IF" & vbCrLf
|
||||
CheckExportObject.Write "" & vbCrLf
|
||||
CheckExportObject.Write "FileSystemObject = Nothing" & vbCrLf
|
||||
CheckExportObject.Write "Fullpath = Nothing" & vbCrLf
|
||||
CheckExportObject.Write "DocExportCheckTry = Nothing" & vbCrLf
|
||||
CheckExportObject.Write "DocExportCheckMaxTrys = Nothing" & vbCrLf
|
||||
|
||||
CheckExportObject.Close
|
||||
|
||||
ELSE
|
||||
|
||||
MSGBOX("ACHTUNG: Das CheckExportScript konnte nicht erstellt werden!")
|
||||
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
MSGBOX("ACHTUNG: Zielpfad für Export konnte nicht erstellt werden! Export wird abgebrochen.")
|
||||
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
'Missing Value in DocTargetPath, DocTargetFileName or DocExtension
|
||||
WScript.Quit(1)
|
||||
|
||||
END IF
|
||||
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
'########################################### finishing part ############################################
|
||||
'#-----------------------------------------------------------------------------------------------------#
|
||||
|
||||
FileSystemObject = Nothing
|
||||
Shell = Nothing
|
||||
DateTime = Nothing
|
||||
SplitChar = Nothing
|
||||
ReplaceSpecialChar = Nothing
|
||||
DocExtension = Nothing
|
||||
DocExportCheck = Nothing
|
||||
DocExportCheckTry = Nothing
|
||||
DocExportCheckMaxTrys = Nothing
|
||||
DocType = Nothing
|
||||
DocVersion = Nothing
|
||||
DocVersionSeparator = Nothing
|
||||
MandatorShortName = Nothing
|
||||
DocAccountNumber = Nothing
|
||||
DocAANGExportPath = Nothing
|
||||
DocAABExportPath = Nothing
|
||||
DocALSExportPath = Nothing
|
||||
DocAREExportPath = Nothing
|
||||
DocAANFExportPath = Nothing
|
||||
DocABExportPath = Nothing
|
||||
DocAANGConvention = Nothing
|
||||
DocAABConvention = Nothing
|
||||
DocALSConvention = Nothing
|
||||
DocAREConvention = Nothing
|
||||
DocAANFConvention = Nothing
|
||||
DocABEConvention = Nothing
|
||||
DocAANGNumber = Nothing
|
||||
DocAABNumber = Nothing
|
||||
DocALSNumber = Nothing
|
||||
DocARENumber = Nothing
|
||||
DocAANFNumber = Nothing
|
||||
DocABENumber = Nothing
|
||||
DocTargetPath = Nothing
|
||||
DocTargetFileName = Nothing
|
||||
FullPath = Nothing
|
||||
|
||||
Result = ""
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 1.0.0.0 - 23.04.2019
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------legend------------------------------------
|
||||
NEW: = Added a new functionality
|
||||
FIX: = Fixed a Issue with existing functionality
|
||||
CHG: = Changed a existing functionality
|
||||
REM: = Removed a functionality
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 1.0.1.0 - 15.07.2019
|
||||
NEW: - Added Support for "DocType -3" (Teillieferschein)
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 1.0.0.0 - 23.04.2019
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------legend------------------------------------
|
||||
NEW: = Added a new functionality
|
||||
FIX: = Fixed a Issue with existing functionality
|
||||
CHG: = Changed a existing functionality
|
||||
REM: = Removed a functionality
|
||||
-------------------------------------------------------------------------------
|
||||
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_Abbruch.JPG
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_DBUpdate.JPG
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_Ende.JPG
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_GUI1.JPG
Normal file
|
After Width: | Height: | Size: 176 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_GUI1_1.JPG
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_GUI2.JPG
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_GUI3.JPG
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_Löschen.JPG
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_Neu.JPG
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_Ok.JPG
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
archive/Export-WinLineDoc/Bilder/Export-WinLineDoc_Speichern.JPG
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
archive/Export-WinLineDoc/CTK-Fenster/FAKTWindow950.SDF
Normal file
BIN
archive/Export-WinLineDoc/CTK-Fenster/FAKTWindow951.SDF
Normal file
BIN
archive/Export-WinLineDoc/Fenster-Skripte/FAKT950.MMR
Normal file
BIN
archive/Export-WinLineDoc/Fenster-Skripte/FAKT951.MMR
Normal file
@@ -0,0 +1,28 @@
|
||||
Version 3.1.0.4 - 14.10.2021
|
||||
NEW: -
|
||||
FIX: - Fix Error in path creation function (PDFE)
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.1.0.0 - 09.10.2021
|
||||
NEW: - Added Additional Fields (Personenkonten Zusatzfelder)
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.0.0.0 - 16.07.2021 (30.08.2021, 09.10.2021) - Erste Version des Relaunchs
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------legend------------------------------------
|
||||
NEW: = Added a new functionality
|
||||
FIX: = Fixed a Issue with existing functionality
|
||||
CHG: = Changed a existing functionality
|
||||
REM: = Removed a functionality
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,115 @@
|
||||
' DeleteExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine löscht einen Datensatz anhand einer selktierten Gridzeile.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 3 (ROW) = Zu löschende Zeile im Grid (nur zwecks Anzeige).
|
||||
' Parameter 4 (GRID) = Eindeutige Nummer des zu löschenden Datensatzes (zwecks Löschung in der DB).
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 04.07.2021 / MD
|
||||
' Version Date / Editor: 04.07.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DeleteExportWinLineDoc_Record(LEVEL,GRID,ROW,GUID)
|
||||
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (ROW > 0) and (GUID > 0)) Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
MsgBoxQuestion = MsgBox ("Möchten Sie den ausgewählten Datensatz wirklich löschen? " & vbCrlf & vbCrlf & _
|
||||
"Beschreibung: " & LEVEL1_GRID_CURRENT_Beschreibung & vbCrlf & vbCrlf & _
|
||||
"Mandant: " & LEVEL1_GRID_CURRENT_Mandant & vbCrlf & vbCrlf & _
|
||||
"Achtung der Vorgang kann nicht Rückgängig gemacht werden!" & vbCrlf & _
|
||||
"", vbYesno+vbQuestion, DEFAULT_TITLE & " - Löschen bestätigen!")
|
||||
|
||||
If (MsgBoxQuestion = 6) Then
|
||||
|
||||
SQLDelete_Profile = REPLACE(SQLDelete_Profile_Template,"%GUID%",GUID)
|
||||
SQLResult_Profile = Conn.ExecuteSQL(SQLDelete_Profile)
|
||||
|
||||
If (SQLResult_Profile = "Wahr") Or (SQLResult_Profile = 1) Then
|
||||
|
||||
LEVEL1_Grid.RemoveLine ROW
|
||||
'LEVEL1_Grid.Refresh << Dont do this selected line will lose
|
||||
|
||||
If (LEVEL1_Grid.LineCount > 0) Then
|
||||
|
||||
'Show updated count down the table
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
Else
|
||||
|
||||
LEVEL1_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
|
||||
End If
|
||||
|
||||
MsgBox "Der Datensatz wurde erfolgreich gelöscht!",vbOkayonly+vbInformation,DEFAULT_TITLE & " - Erfolg!"
|
||||
|
||||
Else
|
||||
MsgBox "Der Datensatz konnte nicht gelöscht werden!",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
ElseIf (((LEVEL = 2) or (LEVEL = "2")) and (ROW > 0) and (GUID > 0)) Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
MsgBoxQuestion = MsgBox ("Möchten Sie den ausgewählten Datensatz wirklich löschen? " & vbCrlf & vbCrlf & _
|
||||
"Beschreibung: " & LEVEL2_GRID_CURRENT_Beschreibung & vbCrlf & vbCrlf & _
|
||||
"Mandant: " & LEVEL2_GRID_CURRENT_Mandant & vbCrlf & vbCrlf & _
|
||||
"Achtung der Vorgang kann nicht Rückgängig gemacht werden!" & vbCrlf & _
|
||||
"", vbYesno+vbQuestion, DEFAULT_TITLE & " - Löschen bestätigen!")
|
||||
|
||||
If (MsgBoxQuestion = 6) Then
|
||||
|
||||
SQLDelete_Config = REPLACE(SQLDelete_Config_Template,"%GUID%",GUID)
|
||||
SQLResult_Config = Conn.ExecuteSQL(SQLDelete_Config)
|
||||
|
||||
If (SQLResult_Config = "Wahr") Or (SQLResult_Config = 1) Then
|
||||
|
||||
LEVEL2_Grid.RemoveLine ROW
|
||||
'LEVEL2_Grid.Refresh << Dont do this selected line will lose
|
||||
|
||||
If (LEVEL2_Grid.LineCount > 0) Then
|
||||
|
||||
'Show updated count down the table
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
Else
|
||||
|
||||
LEVEL2_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
|
||||
End If
|
||||
|
||||
MsgBox "Der Datensatz wurde erfolgreich gelöscht!",vbOkayonly+vbInformation,DEFAULT_TITLE & " - Erfolg!"
|
||||
|
||||
Else
|
||||
MsgBox "Der Datensatz konnte nicht gelöscht werden!",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
Msgbox "Unzureichende Parameter!" & vbCrlf & _
|
||||
"LEVEL: " & LEVEL & vbCrlf & _
|
||||
"ROW: " & ROW & vbCrlf & _
|
||||
"GUID: " & GUID & vbCrlf & _
|
||||
"",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,91 @@
|
||||
' DD-INSERT_LANGBESCHINT_INTO_BELEGERFASSUNG
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine deaktiviert Knöpfe im Ribbon und in Fenster.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" deaktiviert pauschal, "dynamic" deaktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.07.2021 / MK
|
||||
' Version Date / Editor: 16.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DisableExportWinLineDoc_ButtonControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 0) or (LEVEL = "0")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_EXIT.Active = False
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_EXIT.Active = False
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW >= 0) and (LEVEL1_GRID_CURRENT_GUID >= 0) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW <= 0) and (LEVEL1_GRID_CURRENT_GUID <= 0) Then
|
||||
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW >= 0) and (LEVEL2_GRID_CURRENT_GUID >= 0) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW <= 0) and (LEVEL2_GRID_CURRENT_GUID <= 0) Then
|
||||
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 3) or (LEVEL = "3")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,141 @@
|
||||
' DisableExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine deaktiviert sämtliche Eingabefelder auf einem Level.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" deaktiviert pauschal, "dynamic" deaktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DisableExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL1_CHK_Aktiv.Active = False
|
||||
LEVEL1_TXT_Beschreibung.Active = False
|
||||
LEVEL1_TXT_Mandant.Active = False
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Active = False
|
||||
LEVEL1_TXT_WinLineVariable2.Active = False
|
||||
LEVEL1_TXT_WinLineVariable3.Active = False
|
||||
LEVEL1_TXT_WinLineVariable4.Active = False
|
||||
LEVEL1_TXT_WinLineVariable5.Active = False
|
||||
LEVEL1_TXT_WinLineVariable6.Active = False
|
||||
LEVEL1_TXT_WinLineVariable7.Active = False
|
||||
LEVEL1_TXT_WinLineVariable8.Active = False
|
||||
LEVEL1_TXT_WinLineVariable9.Active = False
|
||||
LEVEL1_TXT_WinLineVariable10.Active = False
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport2.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport3.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport4.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport5.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport6.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport7.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport8.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport9.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport10.Active = False
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Active = False
|
||||
LEVEL1_TXT_ExportDateiname.Active = False
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Active = False
|
||||
LEVEL1_TXT_ExportDateiendung.Active = False
|
||||
LEVEL1_TXT_ExportVersionierung.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen1.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen2.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Active = False
|
||||
LEVEL2_TXT_Beschreibung.Active = False
|
||||
LEVEL2_TXT_Mandant.Active = False
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Active = False
|
||||
LEVEL2_TXT_Platzhalter.Active = False
|
||||
LEVEL2_TXT_Datentyp.Active = False
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,85 @@
|
||||
' EnableExportWinLineDoc_ButtonControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert Knöpfe im Ribbon und in Fenster.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" aktiviert pauschal, "dynamic" aktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 29.06.2021 / MK
|
||||
' Version Date / Editor: 29.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub EnableExportWinLineDoc_ButtonControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 0) or (LEVEL = "0")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_EXIT.Active = True
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL3.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_EXIT.Active = True
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL3.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = TRUE
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW > 0) and (LEVEL1_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
LEVEL0_BTN_DELETE.Active = True
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW = 0) and (LEVEL1_GRID_CURRENT_GUID = 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = TRUE
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW > 0) and (LEVEL2_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
LEVEL0_BTN_DELETE.Active = True
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW = 0) and (LEVEL2_GRID_CURRENT_GUID = 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,105 @@
|
||||
' EnableExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert sämtliche Eingabefelder auf einem Level.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" aktiviert pauschal, "dynamic" aktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 17.06.2021 / MD
|
||||
' Version Date / Editor: 17.06.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub EnableExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and ((CTRLType = "dynamic") or (CTRLType = "static")) Then
|
||||
|
||||
LEVEL1_CHK_Aktiv.Active = true
|
||||
LEVEL1_TXT_Beschreibung.Active = true
|
||||
LEVEL1_TXT_Mandant.Active = true
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Active = true
|
||||
LEVEL1_TXT_WinLineVariable2.Active = true
|
||||
LEVEL1_TXT_WinLineVariable3.Active = true
|
||||
LEVEL1_TXT_WinLineVariable4.Active = true
|
||||
LEVEL1_TXT_WinLineVariable5.Active = true
|
||||
LEVEL1_TXT_WinLineVariable6.Active = true
|
||||
LEVEL1_TXT_WinLineVariable7.Active = true
|
||||
LEVEL1_TXT_WinLineVariable8.Active = true
|
||||
LEVEL1_TXT_WinLineVariable9.Active = true
|
||||
LEVEL1_TXT_WinLineVariable10.Active = true
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport2.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport3.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport4.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport5.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport6.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport7.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport8.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport9.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport10.Active = true
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Active = true
|
||||
LEVEL1_TXT_ExportDateiname.Active = true
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Active = true
|
||||
LEVEL1_TXT_ExportDateiendung.Active = true
|
||||
LEVEL1_TXT_ExportVersionierung.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen1.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen2.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen3.Active = true
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Active = True
|
||||
LEVEL2_TXT_Beschreibung.Active = True
|
||||
LEVEL2_TXT_Mandant.Active = True
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Active = True
|
||||
LEVEL2_TXT_Platzhalter.Active = True
|
||||
LEVEL2_TXT_Datentyp.Active = True
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,107 @@
|
||||
' GetExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten in Zwischenvariabelen.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 2 (CURRENT_GUID)= Anhand dieser eindeutgen Nummer wird der Datensatz in der DB identifiziert.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 14.06.2021 / MK
|
||||
' Version Date / Editor: 14.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub GetExportWinLineDoc_Record(LEVEL,GRID,CURRENT_GUID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
SQLQuery_Profile = SQLQuery_Profile_Template
|
||||
SQLQuery_Profile = Replace(SQLQuery_Profile,"%GUID%",LEVEL1_GRID_CURRENT_GUID)
|
||||
|
||||
Set SQLResult_Profile = Conn.Select(SQLQuery_Profile)
|
||||
If (SQLResult_Profile.RowCount = 1) Then
|
||||
|
||||
LEVEL1_TXT_GUID_DBValue = SQLResult_Profile.Value("u000")
|
||||
LEVEL1_CHK_Aktiv_DBValue = SQLResult_Profile.Value("u001")
|
||||
LEVEL1_TXT_Beschreibung_DBValue = SQLResult_Profile.Value("u002")
|
||||
LEVEL1_TXT_Mandant_DBValue = SQLResult_Profile.Value("u003")
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1_DBValue = SQLResult_Profile.Value("u004")
|
||||
LEVEL1_TXT_WinLineVariable2_DBValue = SQLResult_Profile.Value("u005")
|
||||
LEVEL1_TXT_WinLineVariable3_DBValue = SQLResult_Profile.Value("u006")
|
||||
LEVEL1_TXT_WinLineVariable4_DBValue = SQLResult_Profile.Value("u007")
|
||||
LEVEL1_TXT_WinLineVariable5_DBValue = SQLResult_Profile.Value("u008")
|
||||
LEVEL1_TXT_WinLineVariable6_DBValue = SQLResult_Profile.Value("u009")
|
||||
LEVEL1_TXT_WinLineVariable7_DBValue = SQLResult_Profile.Value("u010")
|
||||
LEVEL1_TXT_WinLineVariable8_DBValue = SQLResult_Profile.Value("u011")
|
||||
LEVEL1_TXT_WinLineVariable9_DBValue = SQLResult_Profile.Value("u012")
|
||||
LEVEL1_TXT_WinLineVariable10_DBValue = SQLResult_Profile.Value("u013")
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1_DBValue = SQLResult_Profile.Value("u014")
|
||||
LEVEL1_TXT_CallMakroPreExport2_DBValue = SQLResult_Profile.Value("u015")
|
||||
LEVEL1_TXT_CallMakroPreExport3_DBValue = SQLResult_Profile.Value("u016")
|
||||
LEVEL1_TXT_CallMakroPreExport4_DBValue = SQLResult_Profile.Value("u017")
|
||||
LEVEL1_TXT_CallMakroPreExport5_DBValue = SQLResult_Profile.Value("u018")
|
||||
LEVEL1_TXT_CallMakroPreExport6_DBValue = SQLResult_Profile.Value("u019")
|
||||
LEVEL1_TXT_CallMakroPreExport7_DBValue = SQLResult_Profile.Value("u020")
|
||||
LEVEL1_TXT_CallMakroPreExport8_DBValue = SQLResult_Profile.Value("u021")
|
||||
LEVEL1_TXT_CallMakroPreExport9_DBValue = SQLResult_Profile.Value("u022")
|
||||
LEVEL1_TXT_CallMakroPreExport10_DBValue = SQLResult_Profile.Value("u023")
|
||||
|
||||
LEVEL1_TXT_ExportPfad_DBValue = SQLResult_Profile.Value("u024")
|
||||
LEVEL1_TXT_ExportDateiname_DBValue = SQLResult_Profile.Value("u025")
|
||||
LEVEL1_TXT_ExportDateinameVorschau_DBValue = SQLResult_Profile.Value("u026")
|
||||
LEVEL1_TXT_ExportDateiendung_DBValue = SQLResult_Profile.Value("u027")
|
||||
LEVEL1_TXT_ExportVersionierung_DBValue = SQLResult_Profile.Value("u028")
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer_DBValue = SQLResult_Profile.Value("u029")
|
||||
LEVEL0_TXT_Erstellt_wann_DBValue = SQLResult_Profile.Value("u030")
|
||||
LEVEL0_TXT_Geaendert_wer_DBValue = SQLResult_Profile.Value("u031")
|
||||
LEVEL0_TXT_Geaendert_wann_DBValue = SQLResult_Profile.Value("u032")
|
||||
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
SQLQuery_Config = SQLQuery_Config_Template
|
||||
SQLQuery_Config = Replace(SQLQuery_Config,"%GUID%",LEVEL2_GRID_CURRENT_GUID)
|
||||
|
||||
Set SQLResult_Config = Conn.Select(SQLQuery_Config)
|
||||
If (SQLResult_Config.RowCount = 1) Then
|
||||
|
||||
LEVEL2_TXT_GUID_DBValue = SQLResult_Config.Value("u000")
|
||||
LEVEL2_CHK_Aktiv_DBValue = SQLResult_Config.Value("u001")
|
||||
LEVEL2_TXT_Beschreibung_DBValue = SQLResult_Config.Value("u002")
|
||||
LEVEL2_TXT_Mandant_DBValue = SQLResult_Config.Value("u003")
|
||||
|
||||
LEVEL2_TXT_Eintragstyp_DBValue = SQLResult_Config.Value("u004")
|
||||
LEVEL2_TXT_Platzhalter_DBValue = SQLResult_Config.Value("u005")
|
||||
LEVEL2_TXT_Datentyp_DBValue = SQLResult_Config.Value("u006")
|
||||
|
||||
LEVEL2_TXT_Text_Wert_DBValue = SQLResult_Config.Value("u007")
|
||||
LEVEL2_TXT_Integer_Wert_DBValue = SQLResult_Config.Value("u008")
|
||||
LEVEL2_TXT_Double_Wert_DBValue = SQLResult_Config.Value("u009")
|
||||
LEVEL2_TXT_Date_Wert_DBValue = SQLResult_Config.Value("u010")
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer_DBValue = SQLResult_Config.Value("u011")
|
||||
LEVEL0_TXT_Erstellt_wann_DBValue = SQLResult_Config.Value("u012")
|
||||
LEVEL0_TXT_Geaendert_wer_DBValue = SQLResult_Config.Value("u013")
|
||||
LEVEL0_TXT_Geaendert_wann_DBValue = SQLResult_Config.Value("u014")
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,98 @@
|
||||
' InitializeExportWinLineDoc_CreateVar
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine initialisiert die nötigen Variablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.06.2021 / MK
|
||||
' Version Date / Editor: 15.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub InitializeExportWinLineDoc_CreateVar()
|
||||
|
||||
|
||||
'Storage for custom fields on LEVEL 0
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 90, "1", 64 'Erstellt wer / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 91, "6", 16 'Erstellt wann / Datum mit Zeit
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 92, "1", 64 'Geändert wer / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 93, "6", 16 'Geändert wann / Datum mit Zeit
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 1
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 0, "2", 25 'GUID / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 1, "2", 3 'Aktiv / Integer (bool)
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 2, "1", 512 'Beschreibung / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 3, "31", 4 'Mandant / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 4, "1", 128 'WinLine Variable 1 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 5, "1", 128 'WinLine Variable 2 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 6, "1", 128 'WinLine Variable 3 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 7, "1", 128 'WinLine Variable 4 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 8, "1", 128 'WinLine Variable 5 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 9, "1", 128 'WinLine Variable 6 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 10,"1", 128 'WinLine Variable 7 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 11,"1", 128 'WinLine Variable 8 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 12,"1", 128 'WinLine Variable 9 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 13,"1", 128 'WinLine Variable 10 / String
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 14,"31", 50 'Call Makro pre Export 1 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 15,"31", 50 'Call Makro pre Export 2 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 16,"31", 50 'Call Makro pre Export 3 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 17,"31", 50 'Call Makro pre Export 4 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 18,"31", 50 'Call Makro pre Export 5 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 19,"31", 50 'Call Makro pre Export 6 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 20,"31", 50 'Call Makro pre Export 7 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 21,"31", 50 'Call Makro pre Export 8 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 22,"31", 50 'Call Makro pre Export 9 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 23,"31", 50 'Call Makro pre Export 10 / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 24,"1", 256 'Export Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 25,"1", 256 'Export Dateiname / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 26,"1", 256 'Export Dateiname Vorschau / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 27,"2", 3 'Export Dateiendung / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 28,"2", 3 'Export Versionierung / Integer
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 99,"1", 255 'GUID / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 98,"1", 255 'TabelCounter / String
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 2
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 50,"2", 25 'GUID / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 51,"2", 3 'Aktiv / Integer (bool)
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 52,"1", 512 'Beschreibung / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 53,"31", 4 'Mandant / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 54,"31", 16 'Eintragstyp / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 55, "1",512 'Platzhalter / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 56,"31", 16 'Datentyp / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 57, "1",512 'Text-Wert / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 58, "2", 64 'Integer-Wert / Zahl ohne Nachkommastellen
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 59, "4", 64 'Double-Wert / Zahl mit Nachkommastellen
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 60, "6", 64 'Date-Wert / Datum mit Zeit
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 97,"1", 255 'GUID / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 96,"1", 255 'TabelCounter / String
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 3
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 80,"1", 512 'Standard Modul Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 81,"1", 512 'Export-WinLineDoc Modul Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 82,"1", 50 'WebServiceUser / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 89,"1",4000 '<Blank> / String
|
||||
|
||||
End Sub
|
||||
|
||||
'Create Var
|
||||
'Type Bedeutung
|
||||
'1 Textvariable (Länge wählbar)
|
||||
'2 Zahl ohne Nachkommastellen (Integer)
|
||||
'4 Zahl mit Nachkommastellen (Double)
|
||||
'6 Datum mit Zeit
|
||||
@@ -0,0 +1,273 @@
|
||||
' NewExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Funktion startet die Neuanlage eines Datensatzes oder beendet diese vorzeitig (ohne zu speichern).
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (ABORT) = "True" übergeben, wenn die Neuanlage abgebrochen werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Function NewExportWinLineDoc_Record(LEVEL,ABORT)
|
||||
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (ABORT = False)) Then
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'Set Grid cols inactive
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_GUID, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_AKTIV, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_BESCHREIBUNG, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_MANDANT, true, true
|
||||
|
||||
'Disable all input controls..
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'And enable them again
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Set controls with default values, if there are no old values...
|
||||
'Old values (ScreenContents) is used for a profile copy
|
||||
|
||||
'Always set new profiles to inactive state
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = "0"
|
||||
|
||||
If (LEVEL1_TXT_Beschreibung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_Beschreibung.Contents = "Neues Profil"
|
||||
Else
|
||||
LEVEL1_TXT_Beschreibung.Contents = "Kopie von " & LEVEL1_TXT_Beschreibung.ScreenContents
|
||||
End if
|
||||
If (LEVEL1_TXT_Mandant.ScreenContents = "") Then
|
||||
LEVEL1_TXT_Mandant.Contents = "ALL"
|
||||
End if
|
||||
|
||||
If (LEVEL1_TXT_CallMakroPreExport1.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport1.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport2.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport2.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport3.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport3.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport4.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport4.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport5.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport5.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport6.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport6.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport7.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport7.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport8.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport8.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport9.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport9.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport10.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport10.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
|
||||
If (LEVEL1_TXT_ExportPfad.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportPfad.Contents = "%EXPORTPATH%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateiname.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateiname.Contents = "%MandantenNr%-%KontoNr%-%Belegnummer%-%Laufnummer%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateinameVorschau.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = "%MandantenNr%-%KontoNr%-%Belegnummer%-%Laufnummer%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateiendung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = "5"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportVersionierung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = "9"
|
||||
End if
|
||||
|
||||
'...and set focus to every field once
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
'Reset counter, to force SetFiledFocus on next switch
|
||||
LEVEL1_GRID_CALLCOUNT = 0
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Disable ribbon and menu buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
|
||||
'To let the save sub knwo, it a new line!
|
||||
NewExportWinLineDoc_Record = -1
|
||||
|
||||
'---------------------------------------------------------------------------------------
|
||||
'***************************************************************************************
|
||||
'---------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (((LEVEL = 2) or (LEVEL = "2")) and (ABORT = False)) Then
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'Set Grid cols inactive
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_GUID, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_AKTIV, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_BESCHREIBUNG, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_MANDANT, true, true
|
||||
|
||||
'Disable all input controls..
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'And enable them again
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Set controls with default values, if there are no old values...
|
||||
'Old values (ScreenContents) is used for a profile copy
|
||||
|
||||
'Always set new profiles to inactive state
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = "0"
|
||||
|
||||
If (LEVEL2_TXT_Beschreibung.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Beschreibung.Contents = "Neues Profil"
|
||||
Else
|
||||
LEVEL2_TXT_Beschreibung.Contents = "Kopie von " & LEVEL2_TXT_Beschreibung.ScreenContents
|
||||
End if
|
||||
If (LEVEL2_TXT_Mandant.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Mandant.Contents = "ALL"
|
||||
End if
|
||||
|
||||
If (LEVEL2_TXT_Eintragstyp.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Eintragstyp.Contents = "CUSTOM_VARIABLE"
|
||||
End if
|
||||
If (LEVEL2_TXT_Platzhalter.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Platzhalter.Contents = "%PLATZHALTER%"
|
||||
End if
|
||||
If (LEVEL2_TXT_Datentyp.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Datentyp.Contents = "TEXT"
|
||||
End if
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Text_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Text_Wert.Contents = "c:\WinLine\Dokumentablage"
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Integer_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Double_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Date_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
End if
|
||||
End if
|
||||
|
||||
'...and set focus to every field once
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
'SPECIAL: set data type fields depending on selcted type on/off
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Reset counter, to force SetFiledFocus on next switch
|
||||
LEVEL2_GRID_CALLCOUNT = 0
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Disable ribbon and menu buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
|
||||
'To let the save sub knwo, it a new line!
|
||||
NewExportWinLineDoc_Record = -1
|
||||
|
||||
'If new line was aborted on tab / level 1
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1") and (ABORT = True)) Then
|
||||
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_GUID, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_AKTIV, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_BESCHREIBUNG, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_MANDANT, False, False
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'And enable tabs again
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Focus Grid and line again, wil trigger to set LEVEL1_GRID_CURRENT_GUID again
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
'After reloading, go through all fields again
|
||||
If ((LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CURRENT_ROW > 0)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
'Return GUID from selected line
|
||||
NewExportWinLineDoc_Record = LEVEL1_GRID_CURRENT_GUID
|
||||
|
||||
'If new line was aborted on tab / level 2
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2") and (ABORT = True)) Then
|
||||
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_GUID, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_AKTIV, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_BESCHREIBUNG, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_MANDANT, False, False
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'And enable tabs again
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Focus Grid and line again, wil trigger to set LEVEL2_GRID_CURRENT_GUID again
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
'After reloading, go through all fields again
|
||||
If ((LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CURRENT_ROW > 0)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
'Return GUID from selected line
|
||||
NewExportWinLineDoc_Record = LEVEL2_GRID_CURRENT_GUID
|
||||
|
||||
End If
|
||||
|
||||
End Function
|
||||
@@ -0,0 +1,166 @@
|
||||
' SetExportWinLineDoc_ComboBoxControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Funktion liefert Werte, um Auswahlboxen zu füllen.
|
||||
' Parameter 1 (CTRLType)= Name oder Typ des Controls welches gefüllt werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.07.2021 / MK
|
||||
' Version Date / Editor: 16.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Function SetExportWinLineDoc_ComboBoxControls(CMBType)
|
||||
|
||||
if (CMBType = "Mandant") Then
|
||||
|
||||
Set SQLResult_Mandators = Conn.Select(SQLQuery_Mandators)
|
||||
If (SQLResult_Mandators.RowCount) > 0 Then
|
||||
|
||||
Mandators = 0
|
||||
Mandators = "ALL :Alle Mandanten;"
|
||||
|
||||
'----------------------------------------------------
|
||||
'Inital Value before "NextRecord"
|
||||
Mandators = Mandators & SQLResult_Mandators.value("c000")
|
||||
|
||||
For Loop1 = Len(SQLResult_Mandators.value("c000"))+1 To 3
|
||||
|
||||
Mandators = Mandators & " "
|
||||
|
||||
Next
|
||||
|
||||
Mandators = Mandators & ":" & SQLResult_Mandators.value("c003") & ";"
|
||||
'----------------------------------------------------
|
||||
|
||||
Do
|
||||
'Loop for every combobox value
|
||||
If (SQLResult_Mandators.NextRecord = True) Then
|
||||
Mandators = Mandators & SQLResult_Mandators.value("c000")
|
||||
|
||||
'Inital Value before "NextRecord"
|
||||
For Loop2 = Len(SQLResult_Mandators.value("c000"))+1 To 3
|
||||
Mandators = Mandators & " "
|
||||
|
||||
Next
|
||||
|
||||
Mandators = Mandators & ":" & SQLResult_Mandators.value("c003") & ";"
|
||||
Else
|
||||
'To remove last ";"
|
||||
Mandators = LEFT(Mandators, Len(Mandators)-1)
|
||||
Exit Do
|
||||
|
||||
End If
|
||||
Loop
|
||||
|
||||
Else
|
||||
Mandators = "ALL :Alle Mandanten"
|
||||
|
||||
End If
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Mandators
|
||||
|
||||
ElseIf (CMBType = "ProgramMakros") Then
|
||||
|
||||
Set SQLResult_ProgramMakros = Conn.Select(SQLQuery_ProgramMakros)
|
||||
If (SQLResult_ProgramMakros.RowCount) > 0 Then
|
||||
|
||||
ProgramMakros = ""
|
||||
|
||||
'----------------------------------------------------
|
||||
'Inital Value before "NextRecord"
|
||||
|
||||
ProgramMakro = ""
|
||||
ProgramMakro = SQLResult_ProgramMakros.value("c000")
|
||||
ProgramMakro = Split(ProgramMakro,"@")
|
||||
|
||||
ProgramMakros = ProgramMakros & ProgramMakro(0)
|
||||
|
||||
For Loop1 = Len(SQLResult_ProgramMakros.value("c000"))+1 To 3
|
||||
|
||||
ProgramMakros = ProgramMakros & " "
|
||||
|
||||
Next
|
||||
|
||||
ProgramMakros = ProgramMakros & ":;"
|
||||
'----------------------------------------------------
|
||||
|
||||
Do
|
||||
'Loop for every combobox value
|
||||
If (SQLResult_ProgramMakros.NextRecord = True) Then
|
||||
ProgramMakro = ""
|
||||
ProgramMakro = SQLResult_ProgramMakros.value("c000")
|
||||
ProgramMakro = Split(ProgramMakro,"@")
|
||||
|
||||
ProgramMakros = ProgramMakros & ProgramMakro(0)
|
||||
|
||||
'Inital Value before "NextRecord"
|
||||
For Loop2 = Len(SQLResult_ProgramMakros.value("c000"))+1 To 3
|
||||
ProgramMakros = ProgramMakros & " "
|
||||
|
||||
Next
|
||||
|
||||
ProgramMakros = ProgramMakros & ":;"
|
||||
Else
|
||||
'To remove last ";"
|
||||
ProgramMakros = LEFT(ProgramMakros, Len(ProgramMakros)-1)
|
||||
Exit Do
|
||||
|
||||
End If
|
||||
Loop
|
||||
|
||||
Else
|
||||
ProgramMakros = "<KEIN MAKRO>:"
|
||||
|
||||
End If
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = ProgramMakros
|
||||
|
||||
ElseIf (CMBType = "Dateiendung") Then
|
||||
|
||||
Dateiendungen = ""
|
||||
Dateiendungen = Dateiendungen & "0:Export als SPL - WinLine SPOOL-Format;"
|
||||
Dateiendungen = Dateiendungen & "1:Export als MHT - Multipurpose Internet Mail Extension HTML Datei;"
|
||||
Dateiendungen = Dateiendungen & "4:Export als SPL - WinLine SPOOL-Format Version 2.0 (altes Format);"
|
||||
Dateiendungen = Dateiendungen & "5:Export als PDF - Portable Document Format - Adobe PDF;"
|
||||
Dateiendungen = Dateiendungen & "6:Export als rtf/doc - WordRTF"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Dateiendungen
|
||||
|
||||
ElseIf (CMBType = "Versionierung") Then
|
||||
|
||||
Versionierung = ""
|
||||
Versionierung = Versionierung & "0:Abbruch, wenn Datei bereits vorhanden;"
|
||||
Versionierung = Versionierung & "1:Überschreibe, wenn Datei bereits vorhanden;"
|
||||
Versionierung = Versionierung & "2:Zusammenführen, wenn Datei bereits vorhanden (nur PDF);"
|
||||
Versionierung = Versionierung & "9:Versioniere, wenn Datei bereits vorhanden;"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Versionierung
|
||||
|
||||
ElseIf (CMBType = "Eintragstyp") Then
|
||||
|
||||
Eintragstyp = ""
|
||||
Eintragstyp = Eintragstyp & "CUSTOM_VARIABLE:"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Eintragstyp
|
||||
|
||||
ElseIf (CMBType = "Datentyp") Then
|
||||
|
||||
Datentyp = ""
|
||||
Datentyp = Datentyp & "TEXT:;"
|
||||
Datentyp = Datentyp & "INTEGER:;"
|
||||
Datentyp = Datentyp & "DOUBLE:;"
|
||||
Datentyp = Datentyp & "DATE:"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Datentyp
|
||||
|
||||
Else
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = "<ERROR>"
|
||||
|
||||
End if
|
||||
|
||||
End Function
|
||||
@@ -0,0 +1,60 @@
|
||||
' SetExportWinLineDoc_FocusToRequiredFields
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine geht einmal durch sämtliche MUSS-Felder durch, damit ein User nicht manuell durchklicken muss.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 30.06.2021 / MK
|
||||
' Version Date / Editor: 30.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_FocusToRequiredFields(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
'As long focusing fields, prevent someone interrups by switching tabs/levels
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = False
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_GRID_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportVersionierung_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateiendung_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateinameVorschau_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateiname_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportPfad_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_Mandant_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_Beschreibung_ID
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = True
|
||||
|
||||
'--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
'As long focusing fields, prevent someone interrups by switching tabs/levels
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = False
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_GRID_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Eintragstyp_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Platzhalter_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Datentyp_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Mandant_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Beschreibung_ID
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,166 @@
|
||||
' SetExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt Controls in der GUI (anhand zuvor gesetzter Zwischenvariablen):
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" setzt pauschal, "dynamic" setzt anhand anderer Laufzeitvariablen, oder "clear" leert die Felder.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.06.2021 / MK
|
||||
' Version Date / Editor: 16.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and ((CTRLType = "dynamic") or (CTRLType = "static")) Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = cstr(LEVEL1_CHK_Aktiv_DBValue)
|
||||
LEVEL1_TXT_Beschreibung.Contents = cstr(LEVEL1_TXT_Beschreibung_DBValue)
|
||||
LEVEL1_TXT_Mandant.Contents = cstr(LEVEL1_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Contents = cstr(LEVEL1_TXT_WinLineVariable1_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable2.Contents = cstr(LEVEL1_TXT_WinLineVariable2_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable3.Contents = cstr(LEVEL1_TXT_WinLineVariable3_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable4.Contents = cstr(LEVEL1_TXT_WinLineVariable4_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable5.Contents = cstr(LEVEL1_TXT_WinLineVariable5_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable6.Contents = cstr(LEVEL1_TXT_WinLineVariable6_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable7.Contents = cstr(LEVEL1_TXT_WinLineVariable7_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable8.Contents = cstr(LEVEL1_TXT_WinLineVariable8_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable9.Contents = cstr(LEVEL1_TXT_WinLineVariable9_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable10.Contents = cstr(LEVEL1_TXT_WinLineVariable10_DBValue)
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.contents = cstr(LEVEL1_TXT_CallMakroPreExport1_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport2.contents = cstr(LEVEL1_TXT_CallMakroPreExport2_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport3.contents = cstr(LEVEL1_TXT_CallMakroPreExport3_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport4.contents = cstr(LEVEL1_TXT_CallMakroPreExport4_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport5.contents = cstr(LEVEL1_TXT_CallMakroPreExport5_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport6.contents = cstr(LEVEL1_TXT_CallMakroPreExport6_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport7.contents = cstr(LEVEL1_TXT_CallMakroPreExport7_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport8.contents = cstr(LEVEL1_TXT_CallMakroPreExport8_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport9.contents = cstr(LEVEL1_TXT_CallMakroPreExport9_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport10.contents = cstr(LEVEL1_TXT_CallMakroPreExport10_DBValue)
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Contents = cstr(LEVEL1_TXT_ExportPfad_DBValue)
|
||||
LEVEL1_TXT_ExportDateiname.Contents = cstr(LEVEL1_TXT_ExportDateiname_DBValue)
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = cstr(LEVEL1_TXT_ExportDateinameVorschau_DBValue)
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = cstr(LEVEL1_TXT_ExportDateiendung_DBValue)
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = cstr(LEVEL1_TXT_ExportVersionierung_DBValue)
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "clear") Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = cstr(0)
|
||||
LEVEL1_TXT_Beschreibung.Contents = cstr("")
|
||||
LEVEL1_TXT_Mandant.Contents = cstr("ALL")
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable2.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable3.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable4.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable5.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable6.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable7.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable8.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable9.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable10.Contents = cstr("")
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport2.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport3.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport4.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport5.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport6.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport7.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport8.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport9.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport10.contents = cstr("<KEIN MAKRO>")
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateiname.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = cstr("5")
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = cstr("9")
|
||||
|
||||
'-------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(LEVEL2_CHK_Aktiv_DBValue)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr(LEVEL2_TXT_Beschreibung_DBValue)
|
||||
LEVEL2_TXT_Mandant.Contents = cstr(LEVEL2_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr(LEVEL2_TXT_Eintragstyp_DBValue)
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr(LEVEL2_TXT_Platzhalter_DBValue)
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr(LEVEL2_TXT_Datentyp_DBValue)
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr(LEVEL2_TXT_Text_Wert_DBValue)
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(LEVEL2_TXT_Integer_Wert_DBValue)
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(LEVEL2_TXT_Double_Wert_DBValue)
|
||||
|
||||
IF (LEVEL2_TXT_Date_Wert_DBValue <> "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate(LEVEL2_TXT_Date_Wert_DBValue)
|
||||
else
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
end if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "clear") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(0)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr("")
|
||||
LEVEL2_TXT_Mandant.Contents = cstr("ALL")
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr("CUSTOM_VARIABLE")
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr("")
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr("TEXT")
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr("")
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(0)
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(0.0)
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate("01.01.1970")
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(LEVEL2_CHK_Aktiv_DBValue)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr(LEVEL2_TXT_Beschreibung_DBValue)
|
||||
LEVEL2_TXT_Mandant.Contents = cstr(LEVEL2_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr(LEVEL2_TXT_Eintragstyp_DBValue)
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr(LEVEL2_TXT_Platzhalter_DBValue)
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr(LEVEL2_TXT_Datentyp_DBValue)
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr(LEVEL2_TXT_Text_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(LEVEL2_TXT_Integer_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(LEVEL2_TXT_Double_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
IF (LEVEL2_TXT_Date_Wert_DBValue <> "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate(LEVEL2_TXT_Date_Wert_DBValue)
|
||||
else
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
end if
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,101 @@
|
||||
' DD-INSERT_LANGBESCHINT_INTO_BELEGERFASSUNG
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten für reine Anzeigefelder.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 22.06.2021 / MD
|
||||
' Version Date / Editor: 22.06.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_ReadOnlyControls(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
'Current selected line in grid 1
|
||||
IF (cint(LEVEL1_TXT_GUID_DBValue) > 0) Then
|
||||
LEVEL1_TXT_GUID.Contents = "GUID: " & cstr(LEVEL1_TXT_GUID_DBValue)
|
||||
Else
|
||||
LEVEL1_TXT_GUID.Contents = "GUID: <0>"
|
||||
End if
|
||||
|
||||
'Line Counter in grid 1
|
||||
If (LEVEL1_Grid.LineCount > 0) Then
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
Else
|
||||
LEVEL1_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
End if
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
'Current selected line in grid 2
|
||||
IF (cint(LEVEL2_TXT_GUID_DBValue) > 0) Then
|
||||
LEVEL2_TXT_GUID.Contents = "GUID: " & cstr(LEVEL2_TXT_GUID_DBValue)
|
||||
Else
|
||||
LEVEL2_TXT_GUID.Contents = "GUID: <0>"
|
||||
End if
|
||||
|
||||
'Line Counter in grid 2
|
||||
If (LEVEL2_Grid.LineCount > 0) Then
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
Else
|
||||
LEVEL2_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
End if
|
||||
|
||||
ElseIf (LEVEL = 3) or (LEVEL = "3") Then
|
||||
|
||||
LEVEL3_TXT_Standard_Modul_Path.Contents = ModuleDefaultSourcePath
|
||||
LEVEL3_TXT_EWLD_Modul_Path.Contents = ModuleExportWinLineDocSourcePath
|
||||
LEVEL3_TXT_WebServiceUser.Contents = WebServiceUser
|
||||
LEVEL3_TXT_Blank.active = true
|
||||
LEVEL3_TXT_Blank.contents = " "
|
||||
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Definitely, does not matter tab / level 1 or 2 set these fields...
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (LEVEL1_GRID_CURRENT_GUID > 0)) or (((LEVEL = 2) or (LEVEL = "2")) and (LEVEL2_GRID_CURRENT_GUID > 0)) Then
|
||||
|
||||
IF ((LEVEL0_TXT_Erstellt_wer_DBValue > empty) and (LEVEL0_TXT_Erstellt_wer_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = cstr(LEVEL0_TXT_Erstellt_wer_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Erstellt_wann_DBValue > empty) and (LEVEL0_TXT_Erstellt_wann_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = cdate(LEVEL0_TXT_Erstellt_wann_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Geaendert_wer_DBValue > empty) and (LEVEL0_TXT_Geaendert_wer_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = cstr(LEVEL0_TXT_Geaendert_wer_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Geaendert_wann_DBValue > empty) and (LEVEL0_TXT_Geaendert_wann_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Geaendert_wann.Contents = cdate(LEVEL0_TXT_Geaendert_wann_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Geaendert_wann.contents = NULL
|
||||
End if
|
||||
|
||||
'But if no valid line was selected...
|
||||
Elseif (LEVEL <> 3) and (LEVEL <> "3") Then
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = NULL
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = NULL
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = NULL
|
||||
LEVEL0_TXT_Geaendert_wann.contents = NULL
|
||||
|
||||
End if
|
||||
|
||||
End sub
|
||||
@@ -0,0 +1,168 @@
|
||||
' SetExportWinLineDoc_SQLData
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt eine Tabelle (Grid) mit Daten
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (BUTTON) = Die ID des betätigten Knopfs.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_SQLData(LEVEL,BUTTON)
|
||||
|
||||
If (BUTTON = LEVEL3_BTN_Restore_Profiles_ID) Then
|
||||
|
||||
IF (FileSystemObject.FileExists(TemplateExportWinLineDoc_Profiles_File)) Then
|
||||
|
||||
Set SQLResult_Profiles = Conn.Select(SQLQuery_Profiles_Default)
|
||||
If (SQLResult_Profiles.RowCount) > 0 Then
|
||||
|
||||
MsgBoxResult = MsgBox ("Wenn Sie fortfahren, werden die Auslieferungsprofile gelöscht und neu angelegt!" & vbCrLf & vbCrLf & _
|
||||
"Änderungen an diesen gehen verloren!" & vbCrLf & vbCrLf & _
|
||||
"Der Vorgang kann NICHT Rückgängig gemacht werden!" & vbCrLf & vbCrLf & _
|
||||
"Möchten Sie fortfahren?",vbYesNo+vbCritical,DEFAULT_TITLE & " - ACHTUNG! ACHTUNG!")
|
||||
|
||||
If (MsgBoxResult = 6) Then
|
||||
|
||||
SQLResult_Profiles = Conn.ExecuteSQL(SQLDelete_Profiles)
|
||||
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
If (SQLResult_Profiles = true) Then
|
||||
|
||||
'After the delete insert
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Profiles_File
|
||||
|
||||
Else
|
||||
MsgBox "Der Löschvorgang ist fehlgeschlagen!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
SQLResult_Profiles = 0
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
MsgBox "Der Vorgang wurde abgebrochen!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Profiles_File
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgBox "Die Vorlagen-Datei wurde nicht gefunden!" & vbCrLf & vbCrLf &_
|
||||
TemplateExportWinLineDoc_Profiles_File & vbCrLf & _
|
||||
"",vbYesNo+vbCritical,DEFAULT_TITLE & " - Abbruch!"
|
||||
|
||||
End if
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (BUTTON = LEVEL3_BTN_Restore_Configs_ID) Then
|
||||
|
||||
Set SQLResult_Configs = Conn.Select(SQLQuery_Configs_Default)
|
||||
If (SQLResult_Configs.RowCount) > 0 Then
|
||||
|
||||
MsgBoxResult = MsgBox ("Wenn Sie fortfahren, werden die Auslieferungskonfigurationen gelöscht und neu angelegt!" & vbCrLf & vbCrLf & _
|
||||
"Änderungen an diesen gehen verloren!" & vbCrLf & vbCrLf & _
|
||||
"Der Vorgang kann NICHT Rückgängig gemacht werden!" & vbCrLf & vbCrLf & _
|
||||
"Möchten Sie fortfahren?",vbYesNo+vbCritical,DEFAULT_TITLE & " - ACHTUNG! ACHTUNG!")
|
||||
|
||||
If (MsgBoxResult = 6) Then
|
||||
|
||||
SQLResult_Configs = Conn.ExecuteSQL(SQLDelete_Configs)
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
If (SQLResult_Configs = true) Then
|
||||
|
||||
'After the delete insert
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Configs_File
|
||||
|
||||
Else
|
||||
MsgBox "Der Löschvorgang ist fehlgeschlagen!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
SQLResult_Configs = 0
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
MsgBox "Der Vorgang wurde abgebrochen!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Configs_File
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgBox "Die Vorlagen-Datei wurde nicht gefunden!" & vbCrLf & vbCrLf &_
|
||||
TemplateExportWinLineDoc_Configs_File & vbCrLf & _
|
||||
"",vbYesNo+vbCritical,DEFAULT_TITLE & " - Abbruch!"
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------
|
||||
Private Sub InsertExportWinLineDoc_SQLData(LEVEL,FILE)
|
||||
|
||||
'Get file content of the sql script
|
||||
FileToRead.CharSet = "utf-8"
|
||||
FileToRead.Open
|
||||
FileToRead.LoadFromFile(File)
|
||||
FileToReadContents = FileToRead.ReadText()
|
||||
FileToRead.Close
|
||||
|
||||
SQLInsert = FileToReadContents
|
||||
|
||||
'Replace the default TB names
|
||||
SQLInsert = Replace(SQLInsert,"[dbo].[t650]",TBDD_EXPORT_WINLINEDOC_CONFIG)
|
||||
SQLInsert = Replace(SQLInsert,"[dbo].[t651]",TBDD_EXPORT_WINLINEDOC_PROFILE)
|
||||
|
||||
'Some magic OTRS cannot do
|
||||
SQLInsert = Replace(SQLInsert,vbCr,"")
|
||||
SQLInsert = Replace(SQLInsert,vbLf,"")
|
||||
SQLInsert = TRIM(SQLInsert)
|
||||
|
||||
'Execute Insert - remember that no "GO" order is supported
|
||||
SQLResult = Conn.ExecuteSQL(SQLInsert)
|
||||
|
||||
IF (SQLResult = True) Then
|
||||
msgbox "Die Wiederherstellung war erfolgreich!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
ElseIf (SQLResult = False) Then
|
||||
msgbox "Achtung, es ist ein Fehler aufgetreten!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE
|
||||
End if
|
||||
|
||||
IF (LEVEL = 1) Then
|
||||
SetExportWinLineDoc_TableContent LEVEL,LEVEL1_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 2) Then
|
||||
SetExportWinLineDoc_TableContent LEVEL,LEVEL2_GRID_ID
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,107 @@
|
||||
' SetExportWinLineDoc_TableContent
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt eine Tabelle (Grid) mit Daten
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 07.07.2021 / MK
|
||||
' Version Date / Editor: 07.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_TableContent(LEVEL,GRID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
LEVEL1_Grid.Clear
|
||||
LEVEL1_Grid.InitUserGrid
|
||||
LEVEL1_Grid.Header
|
||||
|
||||
Set SQLResult_Profiles = Conn.Select(SQLQuery_Profiles)
|
||||
If (SQLResult_Profiles.RowCount) > 0 Then
|
||||
|
||||
LEVEL1_Grid.IsRedraw = False
|
||||
|
||||
'Fill left Frame / Table
|
||||
If (SQLResult_Profiles.RowCount > 0) Then
|
||||
Do
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,0) = cint(SQLResult_Profiles.value("u000"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,1) = cstr(SQLResult_Profiles.value("u001"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,2) = cstr(SQLResult_Profiles.value("u002"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,3) = cstr(SQLResult_Profiles.value("u003"))
|
||||
|
||||
LEVEL1_Grid.AddLine()
|
||||
|
||||
'Trick it, because rowcount wont work
|
||||
If (SQLResult_Profiles.NextRecord = False) Then
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
End If
|
||||
|
||||
LEVEL1_Grid.IsRedraw = True
|
||||
|
||||
'Show count down below the table
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
'Set focus for the fist call, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
LEVEL2_Grid.Clear
|
||||
LEVEL2_Grid.InitUserGrid
|
||||
LEVEL2_Grid.Header
|
||||
|
||||
Set SQLResult_Configs = Conn.Select(SQLQuery_Configs)
|
||||
If (SQLResult_Configs.RowCount) > 0 Then
|
||||
|
||||
LEVEL2_Grid.IsRedraw = False
|
||||
|
||||
'Fill left Frame / Table
|
||||
If (SQLResult_Configs.RowCount > 0) Then
|
||||
Do
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,50) = cint(SQLResult_Configs.value("u000"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,51) = cstr(SQLResult_Configs.value("u001"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,52) = cstr(SQLResult_Configs.value("u002"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,53) = cstr(SQLResult_Configs.value("u003"))
|
||||
|
||||
LEVEL2_Grid.AddLine()
|
||||
|
||||
'Trick it, because rowcount wont work
|
||||
If (SQLResult_Configs.NextRecord = False) Then
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
End If
|
||||
|
||||
LEVEL2_Grid.IsRedraw = True
|
||||
|
||||
'Show count down the table
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
'Set focus for the fist call, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,45 @@
|
||||
' SetExportWinLineDoc_TableLayout
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine bereitet das Layout / die Spalten einer Tabelle (Grid) vor.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 05.07.2021 / MK
|
||||
' Version Date / Editor: 05.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_TableLayout(LEVEL,GRID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
LEVEL1_GRID_COLUMN_GUID = LEVEL1_Grid.AddColumn("GUID", "T21,GUID", "1","V",0,495,0, 0,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_AKTIV = LEVEL1_Grid.AddColumn("Aktiv", "T17,Aktiv", "l","V",0,495,1, 5,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_BESCHREIBUNG = LEVEL1_Grid.AddColumn("Beschreibung", "T21,Beschreibung", "1","V",0,495,2,40,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_MANDANT = LEVEL1_Grid.AddColumn("Mandant", "T21,Mandant", "1","V",0,495,3, 8,scrtflag+sizeflag+hideflag)
|
||||
|
||||
End If
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
LEVEL2_GRID_COLUMN_GUID = LEVEL2_Grid.AddColumn("GUID", "T21,GUID", "1","V",0,495,50, 0,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_AKTIV = LEVEL2_Grid.AddColumn("Aktiv", "T17,Aktiv", "l","V",0,495,51, 5,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_BESCHREIBUNG = LEVEL2_Grid.AddColumn("Beschreibung", "T21,Beschreibung", "1","V",0,495,52,40,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_MANDANT = LEVEL2_Grid.AddColumn("Mandant", "T21,Mandant", "1","V",0,495,53, 8,scrtflag+sizeflag+hideflag)
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,53 @@
|
||||
' ShowExportWinLineDoc_Level
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert unterschiedliche Showlevel.
|
||||
' Parameter 1 (LEVEL) = Das zu setzende Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub ShowExportWinLineDoc_Level(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,False
|
||||
|
||||
CURRENT_LEVEL = 1
|
||||
|
||||
'Set focus, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,False
|
||||
|
||||
CURRENT_LEVEL = 2
|
||||
|
||||
'Set focus, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 3) or (LEVEL = "3") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 0,0,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,False
|
||||
|
||||
CURRENT_LEVEL = 3
|
||||
|
||||
'MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL3_TXT_Blank_ID
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,230 @@
|
||||
' SwitchExportWinLineDoc_TableContent
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten beim Zeilenwechel im Grid und zeigt diese ggf. an.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 3 (UPDATE) = Falls vor dem Wechsel eine Prüfung auf geänderte Daten durchgeführt werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SwitchExportWinLineDoc_TableContent(LEVEL,GRID,UPDATE)
|
||||
|
||||
'Set global var to prevent focus change -> "rumflackern"
|
||||
PREVENT_FOCUS_CHANGE = True
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
'Check if there are unsaved changes before switch line
|
||||
If (LEVEL1_GRID_CURRENT_ROW > 0) and ((LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CURRENT_GUID <> -1)) and (UPDATE = true) Then
|
||||
|
||||
SaveExportWinLineDoc_Record CURRENT_LEVEL,LEVEL1_GRID_CURRENT_GUID,False
|
||||
|
||||
End If
|
||||
|
||||
LEVEL1_GRID.GetCurrentCell CURRENT_ROW, CURRENT_COLUMN
|
||||
GRIDSelectedLines = LEVEL1_GRID.SelectedLines
|
||||
|
||||
If isarray (GRIDSelectedLines) Then
|
||||
|
||||
If Ubound(GRIDSelectedLines) = 0 Then
|
||||
|
||||
LEVEL1_GRID_CURRENT_ROW = GRIDSelectedLines(0)
|
||||
LEVEL1_GRID_CURRENT_GUID = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_GUID)
|
||||
LEVEL1_GRID_CURRENT_AKTIV = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_AKTIV)
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_BESCHREIBUNG)
|
||||
LEVEL1_GRID_CURRENT_Mandant = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_MANDANT)
|
||||
|
||||
If (DEBUG_ON = True) Or (DebugMode = "Enabled") Then
|
||||
msgbox "CURRENT_ROW: " & LEVEL1_GRID_CURRENT_ROW & vbCrlf & _
|
||||
"CURRENT_GUID: " & LEVEL1_GRID_CURRENT_GUID & vbCrlf & _
|
||||
"CURRENT_AKTIV: " & LEVEL1_GRID_CURRENT_AKTIV & vbCrlf & _
|
||||
"CURRENT_Beschreibung: " & LEVEL1_GRID_CURRENT_Beschreibung & vbCrlf & _
|
||||
"CURRENT_Mandant: " & LEVEL1_GRID_CURRENT_Mandant & vbCrlf & _
|
||||
"",vbOkayonly+vbInformation, DEBUG_TITLE & "SwitchExportWinLineDoc_TableContent"
|
||||
End If
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
'For the first call the value allocation (.contents) must run through all fields
|
||||
'Otherwise every "Must-Field" must be clicked manually!
|
||||
'This is corresponding with the "bResult.Value" in the OnCheckUserfield Event
|
||||
LEVEL1_GRID_CALLCOUNT = LEVEL1_GRID_CALLCOUNT + 1
|
||||
|
||||
'Set static fields to activ
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'get data for selected line
|
||||
GetExportWinLineDoc_Record CURRENT_LEVEL,LEVEL1_GRID_ID,CURRENT_GUID
|
||||
|
||||
'set data to the read only fields
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'set data to the writable fields
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'Enable / Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
'For the first call set focus once to the "Must-Fields"
|
||||
IF ((LEVEL1_GRID_CURRENT_ROW > 0) and (LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CALLCOUNT < 2)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
'Important in this case, to set these vars to 0 at first
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'If no valid line was selected, clear and disable input area
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"clear"
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
'Check if there are unsaved changes before switch line
|
||||
If (LEVEL2_GRID_CURRENT_ROW > 0) and ((LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CURRENT_GUID <> -1)) and (UPDATE = true) Then
|
||||
|
||||
SaveExportWinLineDoc_Record CURRENT_LEVEL,LEVEL2_GRID_CURRENT_GUID,False
|
||||
|
||||
End If
|
||||
|
||||
LEVEL2_GRID.GetCurrentCell CURRENT_ROW, CURRENT_COLUMN
|
||||
GRIDSelectedLines = LEVEL2_GRID.SelectedLines
|
||||
|
||||
If isarray (GRIDSelectedLines) Then
|
||||
|
||||
If Ubound(GRIDSelectedLines) = 0 Then
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = GRIDSelectedLines(0)
|
||||
LEVEL2_GRID_CURRENT_GUID = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_GUID)
|
||||
LEVEL2_GRID_CURRENT_AKTIV = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_AKTIV)
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_BESCHREIBUNG)
|
||||
LEVEL2_GRID_CURRENT_Mandant = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_MANDANT)
|
||||
|
||||
If (DEBUG_ON = True) Or (DebugMode = "Enabled") Then
|
||||
msgbox "CURRENT_ROW: " & LEVEL2_GRID_CURRENT_ROW & vbCrlf & _
|
||||
"CURRENT_GUID: " & LEVEL2_GRID_CURRENT_GUID & vbCrlf & _
|
||||
"CURRENT_AKTIV: " & LEVEL2_GRID_CURRENT_AKTIV & vbCrlf & _
|
||||
"CURRENT_Beschreibung: " & LEVEL2_GRID_CURRENT_Beschreibung & vbCrlf & _
|
||||
"CURRENT_Mandant: " & LEVEL2_GRID_CURRENT_Mandant & vbCrlf & _
|
||||
"",vbOkayonly+vbInformation, DEBUG_TITLE & "SwitchExportWinLineDoc_TableContent"
|
||||
End If
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
'For the first call the value allocation (.contents) must run through all fields
|
||||
'Otherwise every "Must-Field" must be clicked manually!
|
||||
'This is corresponding with the "bResult.Value" in the OnCheckUserfield Event
|
||||
LEVEL2_GRID_CALLCOUNT = LEVEL2_GRID_CALLCOUNT + 1
|
||||
|
||||
'Set static fields to activ
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'get data for selected line
|
||||
GetExportWinLineDoc_Record CURRENT_LEVEL,LEVEL2_GRID_ID,CURRENT_GUID
|
||||
|
||||
'set data to the read only fields
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'set data to the writable fields
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Enable / Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'SPECIAL: set data type fileds depending on selcted type on/off
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Check for duplicate on changing data, or new data, or changing someting else and pressing the save button
|
||||
SQLQuery_ConfigCount = SQLQuery_ConfigCount_Template
|
||||
SQLQuery_ConfigCount = Replace(SQLQuery_ConfigCount,"%LEVEL2_TXT_Platzhalter_Value%",LEVEL2_TXT_Platzhalter_DBValue)
|
||||
|
||||
Set SQLResult_ConfigCount = Conn.Select(SQLQuery_ConfigCount)
|
||||
IF ((SQLResult_ConfigCount.Rowcount > 1) and (LEVEL2_GRID_CALLCOUNT > 2)) Then
|
||||
Msgbox "Achtung: Der Platzerhalter " & LEVEL2_TXT_Platzhalter_DBValue & ", " & vbCrlf & _
|
||||
"wird bereits (" & SQLResult_ConfigCount.Rowcount & "x) verwendet!" & vbCrlf & vbCrlf & _
|
||||
"Bitte ändern Sie Ihre Eingabe, " & vbCrlf & _
|
||||
"ansonsten wird es zu Fehlern bei der Dateiablage kommen!" & vbCrlf & vbCrlf & _
|
||||
"Muster: %PLATZHALTER%" & vbCrlf & _
|
||||
"",vbInformation+vbOKOnly,DEFAULT_TITLE & " - Zeilenwechsel"
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_TXT_Platzhalter_ID
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
'For the first call set focus once to the "Must-Fields"
|
||||
IF ((LEVEL2_GRID_CURRENT_ROW > 0) and (LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CALLCOUNT < 2)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
'Important in this case, to set these vars to 0 at first
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'If no valid line was selected, clear and disable input area
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"clear"
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
PREVENT_FOCUS_CHANGE = False
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,23 @@
|
||||
/******
|
||||
-- Export-WinLineDoc (EWLD)
|
||||
-- =================================================================
|
||||
-- Dieses Skript legt vordefinierte Konfigurationen an.
|
||||
-- =================================================================
|
||||
-- Copyright (c) 2021 by Digital Data GmbH
|
||||
--
|
||||
-- Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
-- Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
-- =================================================================
|
||||
-- Creation Date / Author: 15.07.2021 / MK
|
||||
-- Version Date / Editor: 15.07.2021 / MK
|
||||
-- Version Number: 1.0.0.0
|
||||
-- =================================================================
|
||||
-- History:
|
||||
-- 15.07.2021 / MK - Erstellung
|
||||
--
|
||||
-- HINWEISE: Keine Go Befehle verwenden!
|
||||
******/
|
||||
|
||||
INSERT [dbo].[t650] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [U010], [U011], [U012], [U013], [U014]) VALUES (1, N'1', N'Mandant Kurzname', N'ALL', N'CUSTOM_VARIABLE', N'%KURZNAME_MANDANT%', N'TEXT', N'Toys&Bikes', 0, 0, CAST(N'1970-01-01T00:00:00.000' AS DateTime), N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t650] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [U010], [U011], [U012], [U013], [U014]) VALUES (2, N'1', N'Exportpfad', N'ALL', N'CUSTOM_VARIABLE', N'%EXPORTPATH%', N'TEXT', N'c:\WinLine\Dokumentablage', 0, 0, CAST(N'1970-01-01T00:00:00.000' AS DateTime), N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
@@ -0,0 +1,112 @@
|
||||
/******
|
||||
-- Export-WinLineDoc (EWLD)
|
||||
-- =================================================================
|
||||
-- Dieses Skript legt vordefinierte Profile an.
|
||||
-- =================================================================
|
||||
-- Copyright (c) 2021 by Digital Data GmbH
|
||||
--
|
||||
-- Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
-- Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
-- =================================================================
|
||||
-- Creation Date / Author: 15.07.2021 / MK
|
||||
-- Version Date / Editor: 15.07.2021 / MK
|
||||
-- Version Number: 1.0.0.0
|
||||
-- =================================================================
|
||||
-- History:
|
||||
-- 15.07.2021 / MK - Erstellung
|
||||
--
|
||||
-- HINWEISE: Keine Go Befehle verwenden!
|
||||
******/
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (1, 1, N'Angebot (debitorisch)', N'ALL', N'1', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Angebot\%YEAR%\%MONTH%', N'%MandantenNr%-AANG-%AngebotsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANG-%AngebotsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (2, 1, N'Angebot-Storno (debitorisch)', N'ALL', N'1', N'11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Angebot-Storno\%YEAR%\%MONTH%', N'%MandantenNr%-AANG-Storno-%AngebotsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANG-Storno-%AngebotsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (3, 1, N'Auftrag (debitorisch)', N'ALL', N'1', N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Auftrag\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AAB-%AuftragsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AAB-%AuftragsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (4, 1, N'Auftrag-Storno (debitorisch)', N'ALL', N'1', N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Auftrag-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AAB-Storno-%AuftragsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AAB-Storno-%AuftragsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (5, 1, N'Lieferschein (debitorisch)', N'ALL', N'1', N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Lieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ALS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ALS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (6, 1, N'Lieferschein-Storno (debitorisch)', N'ALL', N'1', N'13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Lieferschein-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ALS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ALS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (7, 1, N'Rechnung (debitorisch)', N'ALL', N'1', N'4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ARE-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ARE-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (8, 1, N'Rechnung-Storno (debitorisch)', N'ALL', N'1', N'14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ARE-Storno-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ARE-Storno-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (9, 1, N'Anfrage (kreditorisch)', N'ALL', N'2', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Anfrage\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AANF-%AnfragenNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANF-%AnfragenNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (10, 1, N'Anfrage-Storno (kreditorisch)', N'ALL', N'2', N'11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Anfrage-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AANF-Storno-%AnfragenNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANF-Storno-%AnfragenNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (11, 1, N'Bestellung (kreditorisch)', N'ALL', N'2', N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Bestellung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ABE-%BestellNr%-%KontoName%
|
||||
', N'%MandantenNr%-ABE-%BestellNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (12, 1, N'Bestellung-Storno (kreditorisch)', N'ALL', N'2', N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Bestellung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ABE-Storno-%BestellNr%-%KontoName%
|
||||
', N'%MandantenNr%-ABE-Storno-%BestellNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (13, 1, N'Lieferschein (kreditorisch)', N'ALL', N'2', N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Lieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ELS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ELS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (14, 1, N'Lieferschein-Storno (kreditorisch)', N'ALL', N'2', N'13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Lieferschein-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ELS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ELS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (15, 1, N'Rechnung (kreditorisch)', N'ALL', N'2', N'4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Rechnung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ERE-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ERE-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (16, 1, N'Rechnung-Storno (kreditorisch)', N'ALL', N'2', N'14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Rechnung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ERE-Storno-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ERE-Storno-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (17, 1, N'Teillieferschein (debitorisch)', N'ALL', N'1', N'-3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Teillieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ATLS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ATLS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (18, 1, N'Gutschrift (debitorisch)', N'ALL', N'1', N'4', NULL, N'NegativAmount', NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Gutschrift\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AGU-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AGU-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (19, 1, N'Rechnungskorrektur (debitorisch)', N'ALL', N'1', N'4', NULL, N'NegativAmount', N'Correction', NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnungskorrektur\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AREK-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AREK-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
@@ -0,0 +1,604 @@
|
||||
' Export-WinLineDoc (EWLD)
|
||||
' VB-Script for exporting printed docs to Filesystem.
|
||||
' ----------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow(at)digitaldata.works
|
||||
' ----------------------------------------------------------------
|
||||
' Creation Date / Author: 01.07.2021 / MK
|
||||
' Version Date / Editor: 14.10.2021 / MK
|
||||
' Version Number: 3.1.0.4
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
'#set variables#
|
||||
DocVersionSeparator ="~"
|
||||
ReplaceSpecialChar =""
|
||||
DebugMode ="Disabled" 'Enabled
|
||||
|
||||
PROFILE_TB ="[T651]"
|
||||
CONFIG_TB ="[T650]"
|
||||
CONFIG_GUID =0
|
||||
|
||||
WebServiceUser ="meso"
|
||||
WebServiceUser_MandantenstammID =211
|
||||
|
||||
'#set constants#
|
||||
DEFAULT_TITLE ="Export-WinLineDoc"
|
||||
DEBUG_TITLE ="DEBUG - " & DEFAULT_TITLE
|
||||
|
||||
EWLD_GUID =0
|
||||
DocVersion =1
|
||||
WinLineCurrentUser =CWLStart.CurrentUser.Name
|
||||
MandatorNr =TRIM(CSTR(Value (0,11)))
|
||||
ProgramDocType =TRIM(CSTR(Value (0,20)))
|
||||
RunningNr =TRIM(CSTR(Value (0,31)))
|
||||
OfferNr =TRIM(CSTR(Value (0,34)))
|
||||
OrderNr =TRIM(CSTR(Value (0,35)))
|
||||
DeliveryNoteNr =TRIM(CSTR(Value (0,36)))
|
||||
InvoiceNr =TRIM(CSTR(Value (0,37)))
|
||||
InquireNr =TRIM(CSTR(Value (0,34)))
|
||||
PurchaseNr =TRIM(CSTR(Value (0,35)))
|
||||
DocNr =TRIM(CSTR(Value (0,39)))
|
||||
DocCreationDate =TRIM(CSTR(Value (0,54)))
|
||||
DocChangedDate =TRIM(CSTR(Value (0,55)))
|
||||
DocType =TRIM(CSTR(Value (0,113)))
|
||||
Text1 =TRIM(CSTR(Value (25,63)))
|
||||
Text2 =TRIM(CSTR(Value (25,64)))
|
||||
Text3 =TRIM(CSTR(Value (25,65)))
|
||||
Text4 =TRIM(CSTR(Value (25,66)))
|
||||
Text5 =TRIM(CSTR(Value (25,67)))
|
||||
Text6 =TRIM(CSTR(Value (25,68)))
|
||||
Text7 =TRIM(CSTR(Value (25,69)))
|
||||
Text8 =TRIM(CSTR(Value (25,70)))
|
||||
Text9 =TRIM(CSTR(Value (25,71)))
|
||||
Text10 =TRIM(CSTR(Value (25,72)))
|
||||
DocFinalAmount =TRIM(CSTR(Value (25,100)))
|
||||
ProjectNr =TRIM(CSTR(Value (25,136)))
|
||||
InvoiceForCorrection=TRIM(CSTR(Value (25,147)))
|
||||
DocComment =TRIM(CSTR(Value (25,165)))
|
||||
AccountNr =TRIM(CSTR(Value (50,2)))
|
||||
AccountName =TRIM(CSTR(Value (50,3)))
|
||||
PAT1 =TRIM(CSTR(Value (50,201)))
|
||||
PAT2 =TRIM(CSTR(Value (50,202)))
|
||||
PAT3 =TRIM(CSTR(Value (50,203)))
|
||||
PAT4 =TRIM(CSTR(Value (50,204)))
|
||||
PAT5 =TRIM(CSTR(Value (50,205)))
|
||||
PAT6 =TRIM(CSTR(Value (50,206)))
|
||||
PAT7 =TRIM(CSTR(Value (50,207)))
|
||||
PAT8 =TRIM(CSTR(Value (50,208)))
|
||||
PAT9 =TRIM(CSTR(Value (50,209)))
|
||||
PAT10 =TRIM(CSTR(Value (50,210)))
|
||||
PAT11 =TRIM(CSTR(Value (50,211)))
|
||||
PAT12 =TRIM(CSTR(Value (50,212)))
|
||||
PAT13 =TRIM(CSTR(Value (50,213)))
|
||||
PAT14 =TRIM(CSTR(Value (50,214)))
|
||||
PAT15 =TRIM(CSTR(Value (50,215)))
|
||||
PAT16 =TRIM(CSTR(Value (50,216)))
|
||||
PAT17 =TRIM(CSTR(Value (50,217)))
|
||||
PAT18 =TRIM(CSTR(Value (50,218)))
|
||||
PAT19 =TRIM(CSTR(Value (50,219)))
|
||||
PAT20 =TRIM(CSTR(Value (50,220)))
|
||||
PAT21 =TRIM(CSTR(Value (50,221)))
|
||||
PAT22 =TRIM(CSTR(Value (50,222)))
|
||||
PAT23 =TRIM(CSTR(Value (50,223)))
|
||||
PAT24 =TRIM(CSTR(Value (50,224)))
|
||||
PAT25 =TRIM(CSTR(Value (50,225)))
|
||||
PAT26 =TRIM(CSTR(Value (50,226)))
|
||||
PAT27 =TRIM(CSTR(Value (50,227)))
|
||||
PAT28 =TRIM(CSTR(Value (50,228)))
|
||||
PAT29 =TRIM(CSTR(Value (50,229)))
|
||||
PAT30 =TRIM(CSTR(Value (50,230)))
|
||||
PostingType =TRIM(CSTR(Value (357,6)))
|
||||
ExportType =OutputType
|
||||
ExportDone ="ERROR!"
|
||||
|
||||
PROFILE_SQL_MAN = "[u000] = '"& CONFIG_GUID &"' AND [u001] = 1"
|
||||
PROFILE_SQL_AUTO= "[u001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [u004] = '"& PostingType &"' AND [u005] = '"& ProgramDocType &"' AND ([u006] = '"& DocType &"' OR [u006] IS NULL)"
|
||||
CONFIG_SQL = "[u001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [u004] In ('CUSTOM_VARIABLE') AND [u005] IS NOT NULL AND [u006] IS NOT NULL AND ([u007] IS NOT NULL OR [u008] IS NOT NULL OR [u009] IS NOT NULL OR [u010] IS NOT NULL)"
|
||||
|
||||
RegExpValidFilename = "[^a-zA-Z0-9\"&chr(64)&"\ü\ö\ä\Ü\Ö\Ä\ß\{\[\]\}\ \!\§\$\%\&\(\)\=\+\#\,\.\-\;\_\']{1,}"
|
||||
RegExpValidFilepath = "[^a-zA-Z0-9\"&chr(64)&"\ü\ö\ä\Ü\Ö\Ä\ß\{\[\]\}\ \!\§\$\%\&\(\)\=\+\#\,\.\-\;\_\'\\]{1,}"
|
||||
|
||||
SET FileSystemObject= CreateObject("Scripting.FileSystemObject")
|
||||
SET RI = CreateObject("Scripting.Dictionary")
|
||||
RI.CompareMode = vbTextCompare
|
||||
SET RegExpObject = New RegExp
|
||||
RegExpObject.IgnoreCas = true
|
||||
RegExpObject.Global = true
|
||||
|
||||
'#preparing part#
|
||||
'Reset Error Var
|
||||
Err.Clear
|
||||
|
||||
'No msgbox!
|
||||
If (WinLineCurrentUser=WebServiceUser) Then
|
||||
DebugMode="Disabled"
|
||||
End if
|
||||
|
||||
'Use central
|
||||
If (WebServiceUser="") Then
|
||||
WebServiceUser=CWLStart.CurrentCompany.Value(WebServiceUser_MandantenstammID)
|
||||
End if
|
||||
|
||||
'Fallback "Ursp. Beleg"
|
||||
IF (DocNr=Empty) and (InvoiceNr<>Empty) Then
|
||||
DocNr=InvoiceNr
|
||||
ELSEIF (DocNr=Empty) and (DeliveryNoteNr<>Empty) Then
|
||||
DocNr=DeliveryNoteNr
|
||||
ELSEIF (DocNr=Empty) and (OrderNr<>Empty) Then
|
||||
DocNr=OrderNr
|
||||
ELSEIF (DocNr=Empty) and (PurchaseNr<>Empty) Then
|
||||
DocNr=PurchaseNr
|
||||
ELSEIF (DocNr=Empty) and (OfferNr<>Empty) Then
|
||||
DocNr=OfferNr
|
||||
ELSEIF (DocNr=Empty) and (InquireNr<>Empty) Then
|
||||
DocNr=InquireNr
|
||||
End if
|
||||
|
||||
'Fallback
|
||||
If (AccountNr="") Then
|
||||
AccountNr=TRIM(CSTR(Value (5,2)))
|
||||
If (AccountNr="") Then
|
||||
AccountNr=TRIM(CSTR(Value (0,30)))
|
||||
End if
|
||||
End if
|
||||
|
||||
If (AccountName="") Then
|
||||
AccountName=TRIM(CSTR(Value (5,3)))
|
||||
End if
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "MandatorNr: " &MandatorNr &vbCrLf&_
|
||||
"ProgramDocType: "&ProgramDocType &vbCrLf&_
|
||||
"RunningNr: " &RunningNr &vbCrLf&_
|
||||
"PostingType: " &PostingType,,DEBUG_TITLE&" - WinLine Runtime Variables"
|
||||
|
||||
MSGBOX "Profile SQL:"&vbCrLf& PROFILE_SQL_AUTO&vbCrLf&vbCrLf&_
|
||||
"Config SQL: "&vbCrLf& CONFIG_SQL,,DEBUG_TITLE&" - SQL Commands (not final!)"
|
||||
END IF
|
||||
|
||||
'RI = Replace Object, because functions are not available
|
||||
RI.ADD "%MandantenNr%",MandatorNr
|
||||
RI.ADD "%Laufnummer%",RunningNr
|
||||
|
||||
RI.ADD "%UserName%",WinLineCurrentUser
|
||||
RI.ADD "%KontoNr%",AccountNr
|
||||
RI.ADD "%KontoName%",AccountName
|
||||
RI.ADD "%ProjektNr%",ProjectNr
|
||||
RI.ADD "%AngebotsNr%",OfferNr
|
||||
RI.ADD "%AuftragsNr%",OrderNr
|
||||
RI.ADD "%LieferscheinNr%",DeliveryNoteNr
|
||||
RI.ADD "%RechnungsNr%",InvoiceNr
|
||||
RI.ADD "%AnfragenNr%",InquireNr
|
||||
RI.ADD "%BestellNr%",PurchaseNr
|
||||
RI.ADD "%Belegart%",DocType
|
||||
RI.ADD "%Belegnummer%",DocNr
|
||||
RI.ADD "%BelegKommentar%",DocComment
|
||||
RI.ADD "%Textzeile1%",Text1
|
||||
RI.ADD "%Textzeile2%",Text2
|
||||
RI.ADD "%Textzeile3%",Text3
|
||||
RI.ADD "%Textzeile4%",Text4
|
||||
RI.ADD "%Textzeile5%",Text5
|
||||
RI.ADD "%Textzeile6%",Text6
|
||||
RI.ADD "%Textzeile7%",Text7
|
||||
RI.ADD "%Textzeile8%",Text8
|
||||
RI.ADD "%Textzeile9%",Text9
|
||||
RI.ADD "%Textzeile10%",Text10
|
||||
|
||||
RI.ADD "%Zusatzfeld1%",PAT1
|
||||
RI.ADD "%Zusatzfeld2%",PAT2
|
||||
RI.ADD "%Zusatzfeld3%",PAT3
|
||||
RI.ADD "%Zusatzfeld4%",PAT4
|
||||
RI.ADD "%Zusatzfeld5%",PAT5
|
||||
RI.ADD "%Zusatzfeld6%",PAT6
|
||||
RI.ADD "%Zusatzfeld7%",PAT7
|
||||
RI.ADD "%Zusatzfeld8%",PAT8
|
||||
RI.ADD "%Zusatzfeld9%",PAT9
|
||||
RI.ADD "%Zusatzfeld10%",PAT10
|
||||
RI.ADD "%Zusatzfeld11%",PAT11
|
||||
RI.ADD "%Zusatzfeld12%",PAT12
|
||||
RI.ADD "%Zusatzfeld13%",PAT13
|
||||
RI.ADD "%Zusatzfeld14%",PAT14
|
||||
RI.ADD "%Zusatzfeld15%",PAT15
|
||||
RI.ADD "%Zusatzfeld16%",PAT16
|
||||
RI.ADD "%Zusatzfeld17%",PAT17
|
||||
RI.ADD "%Zusatzfeld18%",PAT18
|
||||
RI.ADD "%Zusatzfeld19%",PAT19
|
||||
RI.ADD "%Zusatzfeld20%",PAT20
|
||||
RI.ADD "%Zusatzfeld21%",PAT21
|
||||
RI.ADD "%Zusatzfeld22%",PAT22
|
||||
RI.ADD "%Zusatzfeld23%",PAT23
|
||||
RI.ADD "%Zusatzfeld24%",PAT24
|
||||
RI.ADD "%Zusatzfeld25%",PAT25
|
||||
RI.ADD "%Zusatzfeld26%",PAT26
|
||||
RI.ADD "%Zusatzfeld27%",PAT27
|
||||
RI.ADD "%Zusatzfeld28%",PAT28
|
||||
RI.ADD "%Zusatzfeld29%",PAT29
|
||||
RI.ADD "%Zusatzfeld30%",PAT30
|
||||
|
||||
RI.ADD "%DAY%",(day(date))
|
||||
RI.ADD "%DAYNAME%",(WeekdayName(weekday(now())))
|
||||
RI.ADD "%MONTH%",(month(date))
|
||||
RI.ADD "%MONTHNAME%",MonthName((month(date)))
|
||||
RI.ADD "%YEAR%",(Year(date))
|
||||
|
||||
'Get doc profile
|
||||
IF ((Mid(DocFinalAmount,1,1))="-") and (InvoiceForCorrection<>Empty) THEN
|
||||
PROFILE_SQL_AUTO = PROFILE_SQL_AUTO&" AND [u007] like '%NegativAmount%' AND [u008] like '%Correction%'"
|
||||
Elseif ((Mid(DocFinalAmount,1,1))="-") THEN
|
||||
PROFILE_SQL_AUTO = PROFILE_SQL_AUTO&" AND [u007] like '%NegativAmount%'"
|
||||
Else
|
||||
PROFILE_SQL_AUTO = PROFILE_SQL_AUTO&" AND [u007] IS NULL AND [u008] IS NULL"
|
||||
END IF
|
||||
|
||||
'Override the logic here, by setting the CONFIG_GUID Var with a value higher then 0 (for not FAKT docs).
|
||||
IF (CONFIG_GUID>0) Then
|
||||
SET PROFILE_RESULT=CWLStart.CurrentCompany.SearchRecord(PROFILE_TB,PROFILE_SQL_MAN)
|
||||
Else
|
||||
SET PROFILE_RESULT=CWLStart.CurrentCompany.SearchRecord(PROFILE_TB,PROFILE_SQL_AUTO)
|
||||
End IF
|
||||
|
||||
IF (Err.Number<>0) THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: Getting Variables from DB Table "&PROFILE
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF (PROFILE_RESULT=-1) Then
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "No Rows found, SQL: "&vbCrLf& PROFILE_SQL_AUTO,,DEBUG_TITLE&" Profiles from Database table "&PROFILE
|
||||
END IF
|
||||
|
||||
ELSEIF (PROFILE_RESULT.RowCount>1) Then
|
||||
IF (WinLineCurrentUser<>WebServiceUser) Then
|
||||
msgbox "Achtung, das Export-Profil konnte nicht eindeutig identifiziert werden!"&vbCrLf&_
|
||||
"Das erste passende wird nun verwendet!",,"Bitte den Administrator informieren!"
|
||||
End if
|
||||
Else
|
||||
|
||||
EWLD_GUID =cint(PROFILE_RESULT.Value(0))
|
||||
EWLD_DESCRIPTION =Trim(cstr(PROFILE_RESULT.Value(2)))
|
||||
'14 to 23 -> WILL BE USED LATER!
|
||||
EWLD_PATH =Trim(cstr(PROFILE_RESULT.Value(24)))
|
||||
EWLD_FILENAME =Trim(cstr(PROFILE_RESULT.Value(25)))
|
||||
EWLD_FILENAME_PREVIEW =Trim(cstr(PROFILE_RESULT.Value(26)))
|
||||
EWLD_FILEEXT =cint(PROFILE_RESULT.Value(27))
|
||||
EWLD_VERSIONING =cint(PROFILE_RESULT.Value(28))
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "GUID: "&EWLD_GUID&vbCrLf&_
|
||||
"Description: "&EWLD_DESCRIPTION,,DEBUG_TITLE&" document profile from Database table "&PROFILE
|
||||
END IF
|
||||
|
||||
'Get variables from table
|
||||
SET CONFIG_RESULT=CWLStart.CurrentCompany.SearchRecord(CONFIG_TB,CONFIG_SQL)
|
||||
|
||||
IF (Err.Number<>0) THEN
|
||||
MSGBOX "Error Code: "&Err.Number&vbCrLf&_
|
||||
"Error Description: "&Err.Description,,"ERROR: Variables from Database table "&CONFIG_SQL&" !"
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF (CONFIG_RESULT=-1) Then
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "No Rows found, SQL: "&CONFIG_SQL,,DEBUG_TITLE&" Variables from Database table "&CONFIG_TB
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
FOR LoopCounter=1 TO CONFIG_RESULT.RowCount
|
||||
|
||||
EWLD_CONFIG_NAME=CONFIG_RESULT.Value(5)
|
||||
EWLD_CONFIG_TYPE=CONFIG_RESULT.Value(6)
|
||||
EWLD_CONFIG_TEXT=CONFIG_RESULT.Value(7)
|
||||
EWLD_CONFIG_INT =CONFIG_RESULT.Value(8)
|
||||
EWLD_CONFIG_DBL =CONFIG_RESULT.Value(9)
|
||||
EWLD_CONFIG_DATE=CONFIG_RESULT.Value(10)
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "Name: " & EWLD_CONFIG_NAME &vbCrLf&_
|
||||
"Type: " & EWLD_CONFIG_TYPE &vbCrLf&vbCrLf&_
|
||||
"Text Value: " & EWLD_CONFIG_TEXT &vbCrLf&_
|
||||
"Integer Value: " & EWLD_CONFIG_INT &vbCrLf&_
|
||||
"Double Value: " & EWLD_CONFIG_DBL &vbCrLf&_
|
||||
"Date Value: " & EWLD_CONFIG_DATE,,DEBUG_TITLE&" - "& LoopCounter &" of "& CONFIG_RESULT.RowCount &" Variables from DB table "& CONFIG_TB
|
||||
END IF
|
||||
|
||||
IF TRIM(((EWLD_CONFIG_TYPE))="TEXT") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_TEXT
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="INTEGER") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_INT
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="DOUBLE") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_DBL
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="DATE") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_DATE
|
||||
End if
|
||||
|
||||
CONFIG_RESULT.NextRecord
|
||||
|
||||
NEXT
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_PATH<>"") THEN
|
||||
|
||||
RIKeys = RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_PATH,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_PATH=Replace(EWLD_PATH,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_PATH_TEMP1=Mid(EWLD_PATH,1,2)
|
||||
EWLD_PATH_TEMP2=Mid(EWLD_PATH,3)
|
||||
EWLD_PATH_TEMP2=Replace(EWLD_PATH_TEMP2,"\\","\")
|
||||
RegExpObject.Pattern=RegExpValidFilepath
|
||||
EWLD_PATH=EWLD_PATH_TEMP1&RegExpObject.Replace(EWLD_PATH_TEMP2,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_PATH%",EWLD_PATH
|
||||
|
||||
EWLD_PATH=Replace(EWLD_PATH,vbCr,"")
|
||||
EWLD_PATH=Replace(EWLD_PATH,vbLf,"")
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "EWLD_PATH: "&vbCrLf& EWLD_PATH&vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_PATH AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_FILENAME<>"") THEN
|
||||
|
||||
RIKeys=RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_FILENAME,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_FILENAME_TEMP=EWLD_FILENAME
|
||||
RegExpObject.Pattern=RegExpValidFilename
|
||||
EWLD_FILENAME=RegExpObject.Replace(EWLD_FILENAME_TEMP,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_FILENAME%",EWLD_FILENAME
|
||||
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbCr,"")
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbLf,"")
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "EWLD_FILENAME: "&vbCrLf& EWLD_FILENAME&vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_FILENAME AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
|
||||
RIKeys=RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_FILENAME_PREVIEW,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_FILENAME_PREVIEW_TEMP=EWLD_FILENAME_PREVIEW
|
||||
RegExpObject.Pattern=RegExpValidFilename
|
||||
EWLD_FILENAME_PREVIEW=RegExpObject.Replace(EWLD_FILENAME_PREVIEW_TEMP,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_FILENAME_PREVIEW%",EWLD_FILENAME_PREVIEW
|
||||
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,vbCr,"")
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,vbLf,"")
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX "EWLD_FILENAME_PREVIEW: "&vbCrLf& EWLD_FILENAME_PREVIEW &vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_FILENAME_PREVIEW Variable AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'#main part#
|
||||
IF ((EWLD_PATH<>"") AND (EWLD_FILENAME<>"") AND (EWLD_FILEEXT<>"") and ((ExportType=2) or (ExportType=3) or(ExportType=4) or (ExportType=5))) THEN
|
||||
|
||||
'Check if destination structure exists. If not, try to create.
|
||||
IF NOT FileSystemObject.FolderExists(EWLD_PATH) THEN
|
||||
|
||||
strDir=FileSystemObject.GetAbsolutePathName(EWLD_PATH)
|
||||
arrDirs=Split( strDir, "\" )
|
||||
|
||||
If Left( strDir, 2 ) = "\\" THEN
|
||||
strDirBuild = "\\" & arrDirs(2) & "\" & arrDirs(3) & "\"
|
||||
idxFirst = 4
|
||||
Else
|
||||
strDirBuild = arrDirs(0) & "\"
|
||||
idxFirst = 1
|
||||
End If
|
||||
|
||||
For idx = idxFirst to Ubound( arrDirs )
|
||||
|
||||
strDirBuild = FileSystemObject.BuildPath( strDirBuild, arrDirs(idx) )
|
||||
If Not FileSystemObject.FolderExists( strDirBuild ) THEN
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX strDirBuild,,DEBUG_TITLE&" CreateFolder: Level " & idx & " of " & Ubound( arrDirs )
|
||||
END IF
|
||||
|
||||
FileSystemObject.CreateFolder strDirBuild
|
||||
|
||||
End if
|
||||
Next
|
||||
|
||||
END IF
|
||||
|
||||
'Code block to resolve the file extension, fallback is pdf
|
||||
IF (EWLD_FILEEXT<7) Then
|
||||
Select Case EWLD_FILEEXT
|
||||
Case 0
|
||||
EWLD_FILEEXT_NAME="spl"
|
||||
Case 1
|
||||
EWLD_FILEEXT_NAME="mht"
|
||||
Case 4
|
||||
EWLD_FILEEXT_NAME="spl"
|
||||
Case 5
|
||||
EWLD_FILEEXT_NAME="pdf"
|
||||
Case 6
|
||||
EWLD_FILEEXT_NAME="rtf"
|
||||
Case ELSE
|
||||
EWLD_FILEEXT= 5
|
||||
EWLD_FILEEXT_NAME="pdf"
|
||||
End Select
|
||||
Else
|
||||
EWLD_FILEEXT=5
|
||||
EWLD_FILEEXT_NAME="pdf"
|
||||
End if
|
||||
|
||||
'If EWLD_PATH exists, export file - including version tagging.
|
||||
IF ((FileSystemObject.FolderExists(EWLD_PATH)) AND (EWLD_FILENAME<>"") AND (EWLD_FILEEXT<>"")) THEN
|
||||
EWLD_FULLFILENAME=EWLD_PATH&"\"&EWLD_FILENAME&"."&EWLD_FILEEXT_NAME
|
||||
|
||||
EWLD_FULLFILENAME=Replace(EWLD_FULLFILENAME,vbCr,"")
|
||||
EWLD_FULLFILENAME=Replace(EWLD_FULLFILENAME,vbLf,"")
|
||||
|
||||
IF (EWLD_VERSIONING= 9) or ((EWLD_VERSIONING<>0) and (EWLD_VERSIONING<>1) and (EWLD_VERSIONING<>2) and (EWLD_VERSIONING<>9)) THEN
|
||||
|
||||
'Reset Var to WinLine known value
|
||||
EWLD_VERSIONING=1
|
||||
|
||||
IF (FileSystemObject.FileExists(EWLD_FULLFILENAME)) THEN
|
||||
|
||||
EWLD_FILENAME_ORIGINAL=EWLD_FILENAME
|
||||
|
||||
DO
|
||||
DocVersion=DocVersion+1
|
||||
|
||||
EWLD_FILENAME=EWLD_FILENAME_ORIGINAL
|
||||
EWLD_FILENAME=EWLD_FILENAME & DocVersionSeparator & DocVersion
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbCr,"")
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbLf,"")
|
||||
|
||||
EWLD_FULLFILENAME=EWLD_PATH & EWLD_FILENAME & "." & EWLD_FILEEXT_NAME
|
||||
|
||||
EWLD_FULLFILENAME_TEMP1=Mid(EWLD_FULLFILENAME,1,2)
|
||||
EWLD_FULLFILENAME_TEMP2=Mid(EWLD_FULLFILENAME,3)
|
||||
EWLD_FULLFILENAME_TEMP2=Replace(EWLD_FULLFILENAME_TEMP2,"\\","\")
|
||||
EWLD_FULLFILENAME=EWLD_FULLFILENAME_TEMP1 & EWLD_FULLFILENAME_TEMP2
|
||||
|
||||
EWLD_FULLFILENAME=Replace(EWLD_FULLFILENAME,vbCr,"")
|
||||
EWLD_FULLFILENAME=Replace(EWLD_FULLFILENAME,vbLf,"")
|
||||
|
||||
LOOP UNTIL (FileSystemObject.FileExists(EWLD_FULLFILENAME) = False)
|
||||
|
||||
RI.Remove("%EWLD_FILENAME%")
|
||||
RI.ADD "%EWLD_FILENAME%",EWLD_FILENAME& "." &EWLD_FILEEXT_NAME
|
||||
RI.ADD "%EWLD_FULLFILENAME%",EWLD_FULLFILENAME
|
||||
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX "FINAL EWLD_FULLFILENAME: "&vbCrLf&EWLD_FULLFILENAME&vbCrLf&vbCrLf&_
|
||||
"FINAL EWLD_FILEEXT: "&vbCrLf&EWLD_FILEEXT&vbCrLf&vbCrLf&_
|
||||
"FINAL EWLD_VERSIONING: "&vbCrLf&EWLD_VERSIONING&vbCrLf&vbCrLf&_
|
||||
"RI includes "&RI.count&" Items.",,DEBUG_TITLE&" Final document settings"
|
||||
END IF
|
||||
|
||||
IF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
Formtitle=EWLD_FILENAME_PREVIEW
|
||||
|
||||
END IF
|
||||
|
||||
'In preview, ExportOutput will not be executed!
|
||||
ExportOutput EWLD_FULLFILENAME, EWLD_FILEEXT, EWLD_VERSIONING
|
||||
ExportDone="export_ready"
|
||||
|
||||
END IF
|
||||
|
||||
ELSEIF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MsgBox "Only Preview Filename has been set!"&vbCrLf&vbCrLf&_
|
||||
EWLD_FILENAME_PREVIEW,,DEBUG_TITLE
|
||||
End if
|
||||
|
||||
Formtitle=EWLD_FILENAME_PREVIEW
|
||||
ExportDone="export_ready"
|
||||
|
||||
END IF
|
||||
|
||||
'Call Macros
|
||||
IF ((ExportType=2) or (ExportType=3) or (ExportType=4) or (ExportType=5)) Then
|
||||
|
||||
For LoopCounter = 14 To 23
|
||||
|
||||
CALL_MAKRO_PRE_EXPORT=PROFILE_RESULT.Value(LoopCounter)
|
||||
|
||||
IF (CALL_MAKRO_PRE_EXPORT<>"") and (CALL_MAKRO_PRE_EXPORT<>LTRIM(RTRIM("<KEIN MAKRO>"))) Then
|
||||
|
||||
DIM MPs(32)
|
||||
|
||||
MPs(0)=DebugMode
|
||||
MPs(1)=ExportDone
|
||||
MPs(2)=MandatorNr
|
||||
MPs(3)=EWLD_GUID
|
||||
MPs(4)=EWLD_DESCRIPTION
|
||||
MPs(5)=EWLD_PATH
|
||||
MPs(6)=EWLD_FILENAME
|
||||
MPs(7)=EWLD_FILEEXT_NAME
|
||||
MPs(8)=EWLD_FULLFILENAME
|
||||
MPs(9)=AccountNr
|
||||
MPs(10)=AccountName
|
||||
MPs(11)=RunningNr
|
||||
MPs(12)=DocNr
|
||||
MPs(13)=ProjectNr
|
||||
MPs(14)=ProgramDocType
|
||||
MPs(15)=PostingType
|
||||
MPs(16)=DocType
|
||||
MPs(17)=WinLineCurrentUser
|
||||
MPs(18)=DocVersion
|
||||
MPs(19)=DocComment
|
||||
MPs(20)=DocCreationDate
|
||||
MPs(21)=DocChangedDate
|
||||
MPs(22)=Addition1
|
||||
MPs(23)=Addition2
|
||||
MPs(24)=Addition3
|
||||
MPs(25)=Addition4
|
||||
MPs(26)=Addition5
|
||||
MPs(27)=Addition6
|
||||
MPs(28)=Addition7
|
||||
MPs(29)=Addition8
|
||||
MPs(30)=Addition9
|
||||
MPs(31)=Addition10
|
||||
|
||||
pParams = MPs
|
||||
CWLStart.MacroCommands.MRunMacro CALL_MAKRO_PRE_EXPORT, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
End if
|
||||
Next
|
||||
End if
|
||||
|
||||
'Show Error
|
||||
IF ((ExportDone<>"export_ready") and ((ExportType=2) or (ExportType=3) or(ExportType=4) or (ExportType=5)) and (WinLineCurrentUser<>WebServiceUser) and (EWLD_GUID>0)) Then
|
||||
msgbox "Es ist ein Fehler aufgetreten!"&vbCrLf&vbCrLf&_
|
||||
EWLD_PATH&"\"&EWLD_FILENAME&vbCrLf&_
|
||||
EWLD_FILEEXT&" | "&EWLD_VERSIONING,vbInformation,"ACHTUNG: Export wird abgebrochen!"
|
||||
End if
|
||||
|
||||
ResultValue = ""
|
||||
@@ -0,0 +1 @@
|
||||
msgbox chr(92)
|
||||
@@ -0,0 +1,36 @@
|
||||
Version 3.1.1.0 - 13.07.2022
|
||||
NEW: - Add %BELEGDATUM% Placeholder, only for WRITE-EXPORT_DOC_DATA_TO_DB
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.1.0.4 - 14.10.2021
|
||||
NEW: -
|
||||
FIX: - Fix Error in path creation function (PDFE)
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.1.0.0 - 09.10.2021
|
||||
NEW: - Added Additional Fields (Personenkonten Zusatzfelder)
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.0.0.0 - 16.07.2021 (30.08.2021, 09.10.2021) - Erste Version des Relaunchs
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------legend------------------------------------
|
||||
NEW: = Added a new functionality
|
||||
FIX: = Fixed a Issue with existing functionality
|
||||
CHG: = Changed a existing functionality
|
||||
REM: = Removed a functionality
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,115 @@
|
||||
' DeleteExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine löscht einen Datensatz anhand einer selktierten Gridzeile.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 3 (ROW) = Zu löschende Zeile im Grid (nur zwecks Anzeige).
|
||||
' Parameter 4 (GRID) = Eindeutige Nummer des zu löschenden Datensatzes (zwecks Löschung in der DB).
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 04.07.2021 / MD
|
||||
' Version Date / Editor: 04.07.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DeleteExportWinLineDoc_Record(LEVEL,GRID,ROW,GUID)
|
||||
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (ROW > 0) and (GUID > 0)) Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
MsgBoxQuestion = MsgBox ("Möchten Sie den ausgewählten Datensatz wirklich löschen? " & vbCrlf & vbCrlf & _
|
||||
"Beschreibung: " & LEVEL1_GRID_CURRENT_Beschreibung & vbCrlf & vbCrlf & _
|
||||
"Mandant: " & LEVEL1_GRID_CURRENT_Mandant & vbCrlf & vbCrlf & _
|
||||
"Achtung der Vorgang kann nicht Rückgängig gemacht werden!" & vbCrlf & _
|
||||
"", vbYesno+vbQuestion, DEFAULT_TITLE & " - Löschen bestätigen!")
|
||||
|
||||
If (MsgBoxQuestion = 6) Then
|
||||
|
||||
SQLDelete_Profile = REPLACE(SQLDelete_Profile_Template,"%GUID%",GUID)
|
||||
SQLResult_Profile = Conn.ExecuteSQL(SQLDelete_Profile)
|
||||
|
||||
If (SQLResult_Profile = "Wahr") Or (SQLResult_Profile = 1) Then
|
||||
|
||||
LEVEL1_Grid.RemoveLine ROW
|
||||
'LEVEL1_Grid.Refresh << Dont do this selected line will lose
|
||||
|
||||
If (LEVEL1_Grid.LineCount > 0) Then
|
||||
|
||||
'Show updated count down the table
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
Else
|
||||
|
||||
LEVEL1_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
|
||||
End If
|
||||
|
||||
MsgBox "Der Datensatz wurde erfolgreich gelöscht!",vbOkayonly+vbInformation,DEFAULT_TITLE & " - Erfolg!"
|
||||
|
||||
Else
|
||||
MsgBox "Der Datensatz konnte nicht gelöscht werden!",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
ElseIf (((LEVEL = 2) or (LEVEL = "2")) and (ROW > 0) and (GUID > 0)) Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
MsgBoxQuestion = MsgBox ("Möchten Sie den ausgewählten Datensatz wirklich löschen? " & vbCrlf & vbCrlf & _
|
||||
"Beschreibung: " & LEVEL2_GRID_CURRENT_Beschreibung & vbCrlf & vbCrlf & _
|
||||
"Mandant: " & LEVEL2_GRID_CURRENT_Mandant & vbCrlf & vbCrlf & _
|
||||
"Achtung der Vorgang kann nicht Rückgängig gemacht werden!" & vbCrlf & _
|
||||
"", vbYesno+vbQuestion, DEFAULT_TITLE & " - Löschen bestätigen!")
|
||||
|
||||
If (MsgBoxQuestion = 6) Then
|
||||
|
||||
SQLDelete_Config = REPLACE(SQLDelete_Config_Template,"%GUID%",GUID)
|
||||
SQLResult_Config = Conn.ExecuteSQL(SQLDelete_Config)
|
||||
|
||||
If (SQLResult_Config = "Wahr") Or (SQLResult_Config = 1) Then
|
||||
|
||||
LEVEL2_Grid.RemoveLine ROW
|
||||
'LEVEL2_Grid.Refresh << Dont do this selected line will lose
|
||||
|
||||
If (LEVEL2_Grid.LineCount > 0) Then
|
||||
|
||||
'Show updated count down the table
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
Else
|
||||
|
||||
LEVEL2_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
|
||||
End If
|
||||
|
||||
MsgBox "Der Datensatz wurde erfolgreich gelöscht!",vbOkayonly+vbInformation,DEFAULT_TITLE & " - Erfolg!"
|
||||
|
||||
Else
|
||||
MsgBox "Der Datensatz konnte nicht gelöscht werden!",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
Msgbox "Unzureichende Parameter!" & vbCrlf & _
|
||||
"LEVEL: " & LEVEL & vbCrlf & _
|
||||
"ROW: " & ROW & vbCrlf & _
|
||||
"GUID: " & GUID & vbCrlf & _
|
||||
"",vbOkayonly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,91 @@
|
||||
' DD-INSERT_LANGBESCHINT_INTO_BELEGERFASSUNG
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine deaktiviert Knöpfe im Ribbon und in Fenster.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" deaktiviert pauschal, "dynamic" deaktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.07.2021 / MK
|
||||
' Version Date / Editor: 16.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DisableExportWinLineDoc_ButtonControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 0) or (LEVEL = "0")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_EXIT.Active = False
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_EXIT.Active = False
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW >= 0) and (LEVEL1_GRID_CURRENT_GUID >= 0) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW <= 0) and (LEVEL1_GRID_CURRENT_GUID <= 0) Then
|
||||
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW >= 0) and (LEVEL2_GRID_CURRENT_GUID >= 0) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW <= 0) and (LEVEL2_GRID_CURRENT_GUID <= 0) Then
|
||||
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 3) or (LEVEL = "3")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = False
|
||||
LEVEL0_BTN_NEW.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
LEVEL0_BTN_SAVE.Active = False
|
||||
LEVEL0_BTN_DELETE.Active = False
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,141 @@
|
||||
' DisableExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine deaktiviert sämtliche Eingabefelder auf einem Level.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" deaktiviert pauschal, "dynamic" deaktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub DisableExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL1_CHK_Aktiv.Active = False
|
||||
LEVEL1_TXT_Beschreibung.Active = False
|
||||
LEVEL1_TXT_Mandant.Active = False
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Active = False
|
||||
LEVEL1_TXT_WinLineVariable2.Active = False
|
||||
LEVEL1_TXT_WinLineVariable3.Active = False
|
||||
LEVEL1_TXT_WinLineVariable4.Active = False
|
||||
LEVEL1_TXT_WinLineVariable5.Active = False
|
||||
LEVEL1_TXT_WinLineVariable6.Active = False
|
||||
LEVEL1_TXT_WinLineVariable7.Active = False
|
||||
LEVEL1_TXT_WinLineVariable8.Active = False
|
||||
LEVEL1_TXT_WinLineVariable9.Active = False
|
||||
LEVEL1_TXT_WinLineVariable10.Active = False
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport2.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport3.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport4.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport5.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport6.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport7.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport8.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport9.Active = False
|
||||
LEVEL1_TXT_CallMakroPreExport10.Active = False
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Active = False
|
||||
LEVEL1_TXT_ExportDateiname.Active = False
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Active = False
|
||||
LEVEL1_TXT_ExportDateiendung.Active = False
|
||||
LEVEL1_TXT_ExportVersionierung.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen1.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen2.Active = False
|
||||
LEVEL1_BTN_VariableEinfuegen3.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Active = False
|
||||
LEVEL2_TXT_Beschreibung.Active = False
|
||||
LEVEL2_TXT_Mandant.Active = False
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Active = False
|
||||
LEVEL2_TXT_Platzhalter.Active = False
|
||||
LEVEL2_TXT_Datentyp.Active = False
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Text_Wert.Contents = ""
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,85 @@
|
||||
' EnableExportWinLineDoc_ButtonControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert Knöpfe im Ribbon und in Fenster.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" aktiviert pauschal, "dynamic" aktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 29.06.2021 / MK
|
||||
' Version Date / Editor: 29.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub EnableExportWinLineDoc_ButtonControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 0) or (LEVEL = "0")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_EXIT.Active = True
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL3.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_EXIT.Active = True
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL3.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = TRUE
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW > 0) and (LEVEL1_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
LEVEL0_BTN_DELETE.Active = True
|
||||
|
||||
ElseIf (LEVEL1_GRID_CURRENT_ROW = 0) and (LEVEL1_GRID_CURRENT_GUID = 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
|
||||
End if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID = -1) Then
|
||||
|
||||
LEVEL0_BTN_ABORT.Active = TRUE
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW > 0) and (LEVEL2_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
LEVEL0_BTN_SAVE.Active = True
|
||||
LEVEL0_BTN_DELETE.Active = True
|
||||
|
||||
ElseIf (LEVEL2_GRID_CURRENT_ROW = 0) and (LEVEL2_GRID_CURRENT_GUID = 0) Then
|
||||
|
||||
LEVEL0_BTN_OK.Active = True
|
||||
LEVEL0_BTN_NEW.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,105 @@
|
||||
' EnableExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert sämtliche Eingabefelder auf einem Level.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" aktiviert pauschal, "dynamic" aktiviert anhand anderer Laufzeitvariablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 17.06.2021 / MD
|
||||
' Version Date / Editor: 17.06.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub EnableExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and ((CTRLType = "dynamic") or (CTRLType = "static")) Then
|
||||
|
||||
LEVEL1_CHK_Aktiv.Active = true
|
||||
LEVEL1_TXT_Beschreibung.Active = true
|
||||
LEVEL1_TXT_Mandant.Active = true
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Active = true
|
||||
LEVEL1_TXT_WinLineVariable2.Active = true
|
||||
LEVEL1_TXT_WinLineVariable3.Active = true
|
||||
LEVEL1_TXT_WinLineVariable4.Active = true
|
||||
LEVEL1_TXT_WinLineVariable5.Active = true
|
||||
LEVEL1_TXT_WinLineVariable6.Active = true
|
||||
LEVEL1_TXT_WinLineVariable7.Active = true
|
||||
LEVEL1_TXT_WinLineVariable8.Active = true
|
||||
LEVEL1_TXT_WinLineVariable9.Active = true
|
||||
LEVEL1_TXT_WinLineVariable10.Active = true
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport2.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport3.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport4.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport5.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport6.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport7.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport8.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport9.Active = true
|
||||
LEVEL1_TXT_CallMakroPreExport10.Active = true
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Active = true
|
||||
LEVEL1_TXT_ExportDateiname.Active = true
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Active = true
|
||||
LEVEL1_TXT_ExportDateiendung.Active = true
|
||||
LEVEL1_TXT_ExportVersionierung.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen1.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen2.Active = true
|
||||
LEVEL1_BTN_VariableEinfuegen3.Active = true
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Active = True
|
||||
LEVEL2_TXT_Beschreibung.Active = True
|
||||
LEVEL2_TXT_Mandant.Active = True
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Active = True
|
||||
LEVEL2_TXT_Platzhalter.Active = True
|
||||
LEVEL2_TXT_Datentyp.Active = True
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = True
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = True
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = True
|
||||
LEVEL2_TXT_Date_Wert.Active = False
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Active = False
|
||||
LEVEL2_TXT_Integer_Wert.Active = False
|
||||
LEVEL2_TXT_Double_Wert.Active = False
|
||||
LEVEL2_TXT_Date_Wert.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,107 @@
|
||||
' GetExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten in Zwischenvariabelen.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 2 (CURRENT_GUID)= Anhand dieser eindeutgen Nummer wird der Datensatz in der DB identifiziert.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 14.06.2021 / MK
|
||||
' Version Date / Editor: 14.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub GetExportWinLineDoc_Record(LEVEL,GRID,CURRENT_GUID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
SQLQuery_Profile = SQLQuery_Profile_Template
|
||||
SQLQuery_Profile = Replace(SQLQuery_Profile,"%GUID%",LEVEL1_GRID_CURRENT_GUID)
|
||||
|
||||
Set SQLResult_Profile = Conn.Select(SQLQuery_Profile)
|
||||
If (SQLResult_Profile.RowCount = 1) Then
|
||||
|
||||
LEVEL1_TXT_GUID_DBValue = SQLResult_Profile.Value("u000")
|
||||
LEVEL1_CHK_Aktiv_DBValue = SQLResult_Profile.Value("u001")
|
||||
LEVEL1_TXT_Beschreibung_DBValue = SQLResult_Profile.Value("u002")
|
||||
LEVEL1_TXT_Mandant_DBValue = SQLResult_Profile.Value("u003")
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1_DBValue = SQLResult_Profile.Value("u004")
|
||||
LEVEL1_TXT_WinLineVariable2_DBValue = SQLResult_Profile.Value("u005")
|
||||
LEVEL1_TXT_WinLineVariable3_DBValue = SQLResult_Profile.Value("u006")
|
||||
LEVEL1_TXT_WinLineVariable4_DBValue = SQLResult_Profile.Value("u007")
|
||||
LEVEL1_TXT_WinLineVariable5_DBValue = SQLResult_Profile.Value("u008")
|
||||
LEVEL1_TXT_WinLineVariable6_DBValue = SQLResult_Profile.Value("u009")
|
||||
LEVEL1_TXT_WinLineVariable7_DBValue = SQLResult_Profile.Value("u010")
|
||||
LEVEL1_TXT_WinLineVariable8_DBValue = SQLResult_Profile.Value("u011")
|
||||
LEVEL1_TXT_WinLineVariable9_DBValue = SQLResult_Profile.Value("u012")
|
||||
LEVEL1_TXT_WinLineVariable10_DBValue = SQLResult_Profile.Value("u013")
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1_DBValue = SQLResult_Profile.Value("u014")
|
||||
LEVEL1_TXT_CallMakroPreExport2_DBValue = SQLResult_Profile.Value("u015")
|
||||
LEVEL1_TXT_CallMakroPreExport3_DBValue = SQLResult_Profile.Value("u016")
|
||||
LEVEL1_TXT_CallMakroPreExport4_DBValue = SQLResult_Profile.Value("u017")
|
||||
LEVEL1_TXT_CallMakroPreExport5_DBValue = SQLResult_Profile.Value("u018")
|
||||
LEVEL1_TXT_CallMakroPreExport6_DBValue = SQLResult_Profile.Value("u019")
|
||||
LEVEL1_TXT_CallMakroPreExport7_DBValue = SQLResult_Profile.Value("u020")
|
||||
LEVEL1_TXT_CallMakroPreExport8_DBValue = SQLResult_Profile.Value("u021")
|
||||
LEVEL1_TXT_CallMakroPreExport9_DBValue = SQLResult_Profile.Value("u022")
|
||||
LEVEL1_TXT_CallMakroPreExport10_DBValue = SQLResult_Profile.Value("u023")
|
||||
|
||||
LEVEL1_TXT_ExportPfad_DBValue = SQLResult_Profile.Value("u024")
|
||||
LEVEL1_TXT_ExportDateiname_DBValue = SQLResult_Profile.Value("u025")
|
||||
LEVEL1_TXT_ExportDateinameVorschau_DBValue = SQLResult_Profile.Value("u026")
|
||||
LEVEL1_TXT_ExportDateiendung_DBValue = SQLResult_Profile.Value("u027")
|
||||
LEVEL1_TXT_ExportVersionierung_DBValue = SQLResult_Profile.Value("u028")
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer_DBValue = SQLResult_Profile.Value("u029")
|
||||
LEVEL0_TXT_Erstellt_wann_DBValue = SQLResult_Profile.Value("u030")
|
||||
LEVEL0_TXT_Geaendert_wer_DBValue = SQLResult_Profile.Value("u031")
|
||||
LEVEL0_TXT_Geaendert_wann_DBValue = SQLResult_Profile.Value("u032")
|
||||
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
SQLQuery_Config = SQLQuery_Config_Template
|
||||
SQLQuery_Config = Replace(SQLQuery_Config,"%GUID%",LEVEL2_GRID_CURRENT_GUID)
|
||||
|
||||
Set SQLResult_Config = Conn.Select(SQLQuery_Config)
|
||||
If (SQLResult_Config.RowCount = 1) Then
|
||||
|
||||
LEVEL2_TXT_GUID_DBValue = SQLResult_Config.Value("u000")
|
||||
LEVEL2_CHK_Aktiv_DBValue = SQLResult_Config.Value("u001")
|
||||
LEVEL2_TXT_Beschreibung_DBValue = SQLResult_Config.Value("u002")
|
||||
LEVEL2_TXT_Mandant_DBValue = SQLResult_Config.Value("u003")
|
||||
|
||||
LEVEL2_TXT_Eintragstyp_DBValue = SQLResult_Config.Value("u004")
|
||||
LEVEL2_TXT_Platzhalter_DBValue = SQLResult_Config.Value("u005")
|
||||
LEVEL2_TXT_Datentyp_DBValue = SQLResult_Config.Value("u006")
|
||||
|
||||
LEVEL2_TXT_Text_Wert_DBValue = SQLResult_Config.Value("u007")
|
||||
LEVEL2_TXT_Integer_Wert_DBValue = SQLResult_Config.Value("u008")
|
||||
LEVEL2_TXT_Double_Wert_DBValue = SQLResult_Config.Value("u009")
|
||||
LEVEL2_TXT_Date_Wert_DBValue = SQLResult_Config.Value("u010")
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer_DBValue = SQLResult_Config.Value("u011")
|
||||
LEVEL0_TXT_Erstellt_wann_DBValue = SQLResult_Config.Value("u012")
|
||||
LEVEL0_TXT_Geaendert_wer_DBValue = SQLResult_Config.Value("u013")
|
||||
LEVEL0_TXT_Geaendert_wann_DBValue = SQLResult_Config.Value("u014")
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,98 @@
|
||||
' InitializeExportWinLineDoc_CreateVar
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine initialisiert die nötigen Variablen.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.06.2021 / MK
|
||||
' Version Date / Editor: 15.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub InitializeExportWinLineDoc_CreateVar()
|
||||
|
||||
|
||||
'Storage for custom fields on LEVEL 0
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 90, "1", 64 'Erstellt wer / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 91, "6", 16 'Erstellt wann / Datum mit Zeit
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 92, "1", 64 'Geändert wer / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 93, "6", 16 'Geändert wann / Datum mit Zeit
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 1
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 0, "2", 25 'GUID / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 1, "2", 3 'Aktiv / Integer (bool)
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 2, "1", 512 'Beschreibung / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 3, "31", 4 'Mandant / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 4, "1", 128 'WinLine Variable 1 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 5, "1", 128 'WinLine Variable 2 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 6, "1", 128 'WinLine Variable 3 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 7, "1", 128 'WinLine Variable 4 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 8, "1", 128 'WinLine Variable 5 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 9, "1", 128 'WinLine Variable 6 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 10,"1", 128 'WinLine Variable 7 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 11,"1", 128 'WinLine Variable 8 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 12,"1", 128 'WinLine Variable 9 / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 13,"1", 128 'WinLine Variable 10 / String
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 14,"31", 50 'Call Makro pre Export 1 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 15,"31", 50 'Call Makro pre Export 2 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 16,"31", 50 'Call Makro pre Export 3 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 17,"31", 50 'Call Makro pre Export 4 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 18,"31", 50 'Call Makro pre Export 5 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 19,"31", 50 'Call Makro pre Export 6 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 20,"31", 50 'Call Makro pre Export 7 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 21,"31", 50 'Call Makro pre Export 8 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 22,"31", 50 'Call Makro pre Export 9 / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 23,"31", 50 'Call Makro pre Export 10 / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 24,"1", 256 'Export Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 25,"1", 256 'Export Dateiname / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 26,"1", 256 'Export Dateiname Vorschau / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 27,"2", 3 'Export Dateiendung / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 28,"2", 3 'Export Versionierung / Integer
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 99,"1", 255 'GUID / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 98,"1", 255 'TabelCounter / String
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 2
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 50,"2", 25 'GUID / Integer
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 51,"2", 3 'Aktiv / Integer (bool)
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 52,"1", 512 'Beschreibung / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 53,"31", 4 'Mandant / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 54,"31", 16 'Eintragstyp / ComboBox
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 55, "1",512 'Platzhalter / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 56,"31", 16 'Datentyp / ComboBox
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 57, "1",512 'Text-Wert / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 58, "2", 64 'Integer-Wert / Zahl ohne Nachkommastellen
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 59, "4", 64 'Double-Wert / Zahl mit Nachkommastellen
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 60, "6", 64 'Date-Wert / Datum mit Zeit
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 97,"1", 255 'GUID / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 96,"1", 255 'TabelCounter / String
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Storage for custom fields on LEVEL 3
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 80,"1", 512 'Standard Modul Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 81,"1", 512 'Export-WinLineDoc Modul Pfad / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 82,"1", 50 'WebServiceUser / String
|
||||
CWLCurrentWindow.ActiveWindow.Vars.CreateVar 495, 89,"1",4000 '<Blank> / String
|
||||
|
||||
End Sub
|
||||
|
||||
'Create Var
|
||||
'Type Bedeutung
|
||||
'1 Textvariable (Länge wählbar)
|
||||
'2 Zahl ohne Nachkommastellen (Integer)
|
||||
'4 Zahl mit Nachkommastellen (Double)
|
||||
'6 Datum mit Zeit
|
||||
@@ -0,0 +1,273 @@
|
||||
' NewExportWinLineDoc_Record
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Funktion startet die Neuanlage eines Datensatzes oder beendet diese vorzeitig (ohne zu speichern).
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (ABORT) = "True" übergeben, wenn die Neuanlage abgebrochen werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Function NewExportWinLineDoc_Record(LEVEL,ABORT)
|
||||
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (ABORT = False)) Then
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'Set Grid cols inactive
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_GUID, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_AKTIV, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_BESCHREIBUNG, true, true
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_MANDANT, true, true
|
||||
|
||||
'Disable all input controls..
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'And enable them again
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Set controls with default values, if there are no old values...
|
||||
'Old values (ScreenContents) is used for a profile copy
|
||||
|
||||
'Always set new profiles to inactive state
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = "0"
|
||||
|
||||
If (LEVEL1_TXT_Beschreibung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_Beschreibung.Contents = "Neues Profil"
|
||||
Else
|
||||
LEVEL1_TXT_Beschreibung.Contents = "Kopie von " & LEVEL1_TXT_Beschreibung.ScreenContents
|
||||
End if
|
||||
If (LEVEL1_TXT_Mandant.ScreenContents = "") Then
|
||||
LEVEL1_TXT_Mandant.Contents = "ALL"
|
||||
End if
|
||||
|
||||
If (LEVEL1_TXT_CallMakroPreExport1.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport1.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport2.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport2.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport3.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport3.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport4.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport4.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport5.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport5.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport6.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport6.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport7.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport7.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport8.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport8.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport9.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport9.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
If (LEVEL1_TXT_CallMakroPreExport10.ScreenContents = "") Then
|
||||
LEVEL1_TXT_CallMakroPreExport10.Contents = "<KEIN MAKRO>"
|
||||
End if
|
||||
|
||||
If (LEVEL1_TXT_ExportPfad.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportPfad.Contents = "%EXPORTPATH%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateiname.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateiname.Contents = "%MandantenNr%-%KontoNr%-%Belegnummer%-%Laufnummer%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateinameVorschau.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = "%MandantenNr%-%KontoNr%-%Belegnummer%-%Laufnummer%"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportDateiendung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = "5"
|
||||
End if
|
||||
If (LEVEL1_TXT_ExportVersionierung.ScreenContents = "") Then
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = "9"
|
||||
End if
|
||||
|
||||
'...and set focus to every field once
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
'Reset counter, to force SetFiledFocus on next switch
|
||||
LEVEL1_GRID_CALLCOUNT = 0
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Disable ribbon and menu buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
|
||||
'To let the save sub knwo, it a new line!
|
||||
NewExportWinLineDoc_Record = -1
|
||||
|
||||
'---------------------------------------------------------------------------------------
|
||||
'***************************************************************************************
|
||||
'---------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (((LEVEL = 2) or (LEVEL = "2")) and (ABORT = False)) Then
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'Set Grid cols inactive
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_GUID, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_AKTIV, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_BESCHREIBUNG, true, true
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_MANDANT, true, true
|
||||
|
||||
'Disable all input controls..
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'And enable them again
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Set controls with default values, if there are no old values...
|
||||
'Old values (ScreenContents) is used for a profile copy
|
||||
|
||||
'Always set new profiles to inactive state
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = "0"
|
||||
|
||||
If (LEVEL2_TXT_Beschreibung.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Beschreibung.Contents = "Neues Profil"
|
||||
Else
|
||||
LEVEL2_TXT_Beschreibung.Contents = "Kopie von " & LEVEL2_TXT_Beschreibung.ScreenContents
|
||||
End if
|
||||
If (LEVEL2_TXT_Mandant.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Mandant.Contents = "ALL"
|
||||
End if
|
||||
|
||||
If (LEVEL2_TXT_Eintragstyp.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Eintragstyp.Contents = "CUSTOM_VARIABLE"
|
||||
End if
|
||||
If (LEVEL2_TXT_Platzhalter.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Platzhalter.Contents = "%PLATZHALTER%"
|
||||
End if
|
||||
If (LEVEL2_TXT_Datentyp.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Datentyp.Contents = "TEXT"
|
||||
End if
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Text_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Text_Wert.Contents = "c:\WinLine\Dokumentablage"
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Integer_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Integer_Wert.Contents = 0
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Double_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Double_Wert.Contents = 0.0
|
||||
End if
|
||||
End if
|
||||
If (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
If (LEVEL2_TXT_Date_Wert.ScreenContents = "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
End if
|
||||
End if
|
||||
|
||||
'...and set focus to every field once
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
'SPECIAL: set data type fields depending on selcted type on/off
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Reset counter, to force SetFiledFocus on next switch
|
||||
LEVEL2_GRID_CALLCOUNT = 0
|
||||
'-------------------------------------------------------
|
||||
|
||||
'Disable ribbon and menu buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
|
||||
'To let the save sub knwo, it a new line!
|
||||
NewExportWinLineDoc_Record = -1
|
||||
|
||||
'If new line was aborted on tab / level 1
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1") and (ABORT = True)) Then
|
||||
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_GUID, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_AKTIV, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_BESCHREIBUNG, False, False
|
||||
LEVEL1_Grid.SetColumnReadOnly LEVEL1_GRID_COLUMN_MANDANT, False, False
|
||||
|
||||
'Set Grid vars to empty
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'And enable tabs again
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Focus Grid and line again, wil trigger to set LEVEL1_GRID_CURRENT_GUID again
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
'After reloading, go through all fields again
|
||||
If ((LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CURRENT_ROW > 0)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
'Return GUID from selected line
|
||||
NewExportWinLineDoc_Record = LEVEL1_GRID_CURRENT_GUID
|
||||
|
||||
'If new line was aborted on tab / level 2
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2") and (ABORT = True)) Then
|
||||
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_GUID, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_AKTIV, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_BESCHREIBUNG, False, False
|
||||
LEVEL2_Grid.SetColumnReadOnly LEVEL2_GRID_COLUMN_MANDANT, False, False
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'And enable tabs again
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"static"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Focus Grid and line again, wil trigger to set LEVEL2_GRID_CURRENT_GUID again
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
'After reloading, go through all fields again
|
||||
If ((LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CURRENT_ROW > 0)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
'Return GUID from selected line
|
||||
NewExportWinLineDoc_Record = LEVEL2_GRID_CURRENT_GUID
|
||||
|
||||
End If
|
||||
|
||||
End Function
|
||||
@@ -0,0 +1,166 @@
|
||||
' SetExportWinLineDoc_ComboBoxControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Funktion liefert Werte, um Auswahlboxen zu füllen.
|
||||
' Parameter 1 (CTRLType)= Name oder Typ des Controls welches gefüllt werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.07.2021 / MK
|
||||
' Version Date / Editor: 16.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Function SetExportWinLineDoc_ComboBoxControls(CMBType)
|
||||
|
||||
if (CMBType = "Mandant") Then
|
||||
|
||||
Set SQLResult_Mandators = Conn.Select(SQLQuery_Mandators)
|
||||
If (SQLResult_Mandators.RowCount) > 0 Then
|
||||
|
||||
Mandators = 0
|
||||
Mandators = "ALL :Alle Mandanten;"
|
||||
|
||||
'----------------------------------------------------
|
||||
'Inital Value before "NextRecord"
|
||||
Mandators = Mandators & SQLResult_Mandators.value("c000")
|
||||
|
||||
For Loop1 = Len(SQLResult_Mandators.value("c000"))+1 To 3
|
||||
|
||||
Mandators = Mandators & " "
|
||||
|
||||
Next
|
||||
|
||||
Mandators = Mandators & ":" & SQLResult_Mandators.value("c003") & ";"
|
||||
'----------------------------------------------------
|
||||
|
||||
Do
|
||||
'Loop for every combobox value
|
||||
If (SQLResult_Mandators.NextRecord = True) Then
|
||||
Mandators = Mandators & SQLResult_Mandators.value("c000")
|
||||
|
||||
'Inital Value before "NextRecord"
|
||||
For Loop2 = Len(SQLResult_Mandators.value("c000"))+1 To 3
|
||||
Mandators = Mandators & " "
|
||||
|
||||
Next
|
||||
|
||||
Mandators = Mandators & ":" & SQLResult_Mandators.value("c003") & ";"
|
||||
Else
|
||||
'To remove last ";"
|
||||
Mandators = LEFT(Mandators, Len(Mandators)-1)
|
||||
Exit Do
|
||||
|
||||
End If
|
||||
Loop
|
||||
|
||||
Else
|
||||
Mandators = "ALL :Alle Mandanten"
|
||||
|
||||
End If
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Mandators
|
||||
|
||||
ElseIf (CMBType = "ProgramMakros") Then
|
||||
|
||||
Set SQLResult_ProgramMakros = Conn.Select(SQLQuery_ProgramMakros)
|
||||
If (SQLResult_ProgramMakros.RowCount) > 0 Then
|
||||
|
||||
ProgramMakros = ""
|
||||
|
||||
'----------------------------------------------------
|
||||
'Inital Value before "NextRecord"
|
||||
|
||||
ProgramMakro = ""
|
||||
ProgramMakro = SQLResult_ProgramMakros.value("c000")
|
||||
ProgramMakro = Split(ProgramMakro,"@")
|
||||
|
||||
ProgramMakros = ProgramMakros & ProgramMakro(0)
|
||||
|
||||
For Loop1 = Len(SQLResult_ProgramMakros.value("c000"))+1 To 3
|
||||
|
||||
ProgramMakros = ProgramMakros & " "
|
||||
|
||||
Next
|
||||
|
||||
ProgramMakros = ProgramMakros & ":;"
|
||||
'----------------------------------------------------
|
||||
|
||||
Do
|
||||
'Loop for every combobox value
|
||||
If (SQLResult_ProgramMakros.NextRecord = True) Then
|
||||
ProgramMakro = ""
|
||||
ProgramMakro = SQLResult_ProgramMakros.value("c000")
|
||||
ProgramMakro = Split(ProgramMakro,"@")
|
||||
|
||||
ProgramMakros = ProgramMakros & ProgramMakro(0)
|
||||
|
||||
'Inital Value before "NextRecord"
|
||||
For Loop2 = Len(SQLResult_ProgramMakros.value("c000"))+1 To 3
|
||||
ProgramMakros = ProgramMakros & " "
|
||||
|
||||
Next
|
||||
|
||||
ProgramMakros = ProgramMakros & ":;"
|
||||
Else
|
||||
'To remove last ";"
|
||||
ProgramMakros = LEFT(ProgramMakros, Len(ProgramMakros)-1)
|
||||
Exit Do
|
||||
|
||||
End If
|
||||
Loop
|
||||
|
||||
Else
|
||||
ProgramMakros = "<KEIN MAKRO>:"
|
||||
|
||||
End If
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = ProgramMakros
|
||||
|
||||
ElseIf (CMBType = "Dateiendung") Then
|
||||
|
||||
Dateiendungen = ""
|
||||
Dateiendungen = Dateiendungen & "0:Export als SPL - WinLine SPOOL-Format;"
|
||||
Dateiendungen = Dateiendungen & "1:Export als MHT - Multipurpose Internet Mail Extension HTML Datei;"
|
||||
Dateiendungen = Dateiendungen & "4:Export als SPL - WinLine SPOOL-Format Version 2.0 (altes Format);"
|
||||
Dateiendungen = Dateiendungen & "5:Export als PDF - Portable Document Format - Adobe PDF;"
|
||||
Dateiendungen = Dateiendungen & "6:Export als rtf/doc - WordRTF"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Dateiendungen
|
||||
|
||||
ElseIf (CMBType = "Versionierung") Then
|
||||
|
||||
Versionierung = ""
|
||||
Versionierung = Versionierung & "0:Abbruch, wenn Datei bereits vorhanden;"
|
||||
Versionierung = Versionierung & "1:Überschreibe, wenn Datei bereits vorhanden;"
|
||||
Versionierung = Versionierung & "2:Zusammenführen, wenn Datei bereits vorhanden (nur PDF);"
|
||||
Versionierung = Versionierung & "9:Versioniere, wenn Datei bereits vorhanden;"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Versionierung
|
||||
|
||||
ElseIf (CMBType = "Eintragstyp") Then
|
||||
|
||||
Eintragstyp = ""
|
||||
Eintragstyp = Eintragstyp & "CUSTOM_VARIABLE:"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Eintragstyp
|
||||
|
||||
ElseIf (CMBType = "Datentyp") Then
|
||||
|
||||
Datentyp = ""
|
||||
Datentyp = Datentyp & "TEXT:;"
|
||||
Datentyp = Datentyp & "INTEGER:;"
|
||||
Datentyp = Datentyp & "DOUBLE:;"
|
||||
Datentyp = Datentyp & "DATE:"
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = Datentyp
|
||||
|
||||
Else
|
||||
|
||||
SetExportWinLineDoc_ComboBoxControls = "<ERROR>"
|
||||
|
||||
End if
|
||||
|
||||
End Function
|
||||
@@ -0,0 +1,60 @@
|
||||
' SetExportWinLineDoc_FocusToRequiredFields
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine geht einmal durch sämtliche MUSS-Felder durch, damit ein User nicht manuell durchklicken muss.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 30.06.2021 / MK
|
||||
' Version Date / Editor: 30.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_FocusToRequiredFields(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
'As long focusing fields, prevent someone interrups by switching tabs/levels
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = False
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = False
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_GRID_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportVersionierung_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateiendung_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateinameVorschau_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportDateiname_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_ExportPfad_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_Mandant_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL1_TXT_Beschreibung_ID
|
||||
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL1.Active = True
|
||||
LEVEL1_TAB_LEVEL1_TO_LEVEL2.Active = True
|
||||
|
||||
'--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
'As long focusing fields, prevent someone interrups by switching tabs/levels
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = False
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = False
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_GRID_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Eintragstyp_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Platzhalter_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Datentyp_ID
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Mandant_ID
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID, LEVEL2_TXT_Beschreibung_ID
|
||||
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL1.Active = True
|
||||
LEVEL2_TAB_LEVEL2_TO_LEVEL2.Active = True
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,166 @@
|
||||
' SetExportWinLineDoc_InputControls
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt Controls in der GUI (anhand zuvor gesetzter Zwischenvariablen):
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (CTRLType)= "Static" setzt pauschal, "dynamic" setzt anhand anderer Laufzeitvariablen, oder "clear" leert die Felder.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 16.06.2021 / MK
|
||||
' Version Date / Editor: 16.06.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_InputControls(LEVEL,CTRLType)
|
||||
|
||||
If ((LEVEL = 1) or (LEVEL = "1")) and ((CTRLType = "dynamic") or (CTRLType = "static")) Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = cstr(LEVEL1_CHK_Aktiv_DBValue)
|
||||
LEVEL1_TXT_Beschreibung.Contents = cstr(LEVEL1_TXT_Beschreibung_DBValue)
|
||||
LEVEL1_TXT_Mandant.Contents = cstr(LEVEL1_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Contents = cstr(LEVEL1_TXT_WinLineVariable1_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable2.Contents = cstr(LEVEL1_TXT_WinLineVariable2_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable3.Contents = cstr(LEVEL1_TXT_WinLineVariable3_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable4.Contents = cstr(LEVEL1_TXT_WinLineVariable4_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable5.Contents = cstr(LEVEL1_TXT_WinLineVariable5_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable6.Contents = cstr(LEVEL1_TXT_WinLineVariable6_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable7.Contents = cstr(LEVEL1_TXT_WinLineVariable7_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable8.Contents = cstr(LEVEL1_TXT_WinLineVariable8_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable9.Contents = cstr(LEVEL1_TXT_WinLineVariable9_DBValue)
|
||||
LEVEL1_TXT_WinLineVariable10.Contents = cstr(LEVEL1_TXT_WinLineVariable10_DBValue)
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.contents = cstr(LEVEL1_TXT_CallMakroPreExport1_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport2.contents = cstr(LEVEL1_TXT_CallMakroPreExport2_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport3.contents = cstr(LEVEL1_TXT_CallMakroPreExport3_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport4.contents = cstr(LEVEL1_TXT_CallMakroPreExport4_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport5.contents = cstr(LEVEL1_TXT_CallMakroPreExport5_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport6.contents = cstr(LEVEL1_TXT_CallMakroPreExport6_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport7.contents = cstr(LEVEL1_TXT_CallMakroPreExport7_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport8.contents = cstr(LEVEL1_TXT_CallMakroPreExport8_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport9.contents = cstr(LEVEL1_TXT_CallMakroPreExport9_DBValue)
|
||||
LEVEL1_TXT_CallMakroPreExport10.contents = cstr(LEVEL1_TXT_CallMakroPreExport10_DBValue)
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Contents = cstr(LEVEL1_TXT_ExportPfad_DBValue)
|
||||
LEVEL1_TXT_ExportDateiname.Contents = cstr(LEVEL1_TXT_ExportDateiname_DBValue)
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = cstr(LEVEL1_TXT_ExportDateinameVorschau_DBValue)
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = cstr(LEVEL1_TXT_ExportDateiendung_DBValue)
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = cstr(LEVEL1_TXT_ExportVersionierung_DBValue)
|
||||
|
||||
ElseIf ((LEVEL = 1) or (LEVEL = "1")) and (CTRLType = "clear") Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL1_CHK_Aktiv.Contents = ""
|
||||
LEVEL1_CHK_Aktiv.Contents = cstr(0)
|
||||
LEVEL1_TXT_Beschreibung.Contents = cstr("")
|
||||
LEVEL1_TXT_Mandant.Contents = cstr("ALL")
|
||||
|
||||
LEVEL1_TXT_WinLineVariable1.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable2.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable3.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable4.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable5.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable6.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable7.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable8.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable9.Contents = cstr("")
|
||||
LEVEL1_TXT_WinLineVariable10.Contents = cstr("")
|
||||
|
||||
LEVEL1_TXT_CallMakroPreExport1.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport2.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport3.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport4.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport5.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport6.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport7.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport8.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport9.contents = cstr("<KEIN MAKRO>")
|
||||
LEVEL1_TXT_CallMakroPreExport10.contents = cstr("<KEIN MAKRO>")
|
||||
|
||||
LEVEL1_TXT_ExportPfad.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateiname.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateinameVorschau.Contents = cstr("")
|
||||
LEVEL1_TXT_ExportDateiendung.Contents = cstr("5")
|
||||
LEVEL1_TXT_ExportVersionierung.Contents = cstr("9")
|
||||
|
||||
'-------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "static") Then
|
||||
|
||||
'Very important to set a checkbox by "" at first
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(LEVEL2_CHK_Aktiv_DBValue)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr(LEVEL2_TXT_Beschreibung_DBValue)
|
||||
LEVEL2_TXT_Mandant.Contents = cstr(LEVEL2_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr(LEVEL2_TXT_Eintragstyp_DBValue)
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr(LEVEL2_TXT_Platzhalter_DBValue)
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr(LEVEL2_TXT_Datentyp_DBValue)
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr(LEVEL2_TXT_Text_Wert_DBValue)
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(LEVEL2_TXT_Integer_Wert_DBValue)
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(LEVEL2_TXT_Double_Wert_DBValue)
|
||||
|
||||
IF (LEVEL2_TXT_Date_Wert_DBValue <> "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate(LEVEL2_TXT_Date_Wert_DBValue)
|
||||
else
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
end if
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "clear") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(0)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr("")
|
||||
LEVEL2_TXT_Mandant.Contents = cstr("ALL")
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr("CUSTOM_VARIABLE")
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr("")
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr("TEXT")
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr("")
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(0)
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(0.0)
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate("01.01.1970")
|
||||
|
||||
ElseIf ((LEVEL = 2) or (LEVEL = "2")) and (CTRLType = "dynamic") Then
|
||||
|
||||
LEVEL2_CHK_Aktiv.Contents = ""
|
||||
LEVEL2_CHK_Aktiv.Contents = cstr(LEVEL2_CHK_Aktiv_DBValue)
|
||||
LEVEL2_TXT_Beschreibung.Contents = cstr(LEVEL2_TXT_Beschreibung_DBValue)
|
||||
LEVEL2_TXT_Mandant.Contents = cstr(LEVEL2_TXT_Mandant_DBValue)
|
||||
|
||||
LEVEL2_TXT_Eintragstyp.Contents = cstr(LEVEL2_TXT_Eintragstyp_DBValue)
|
||||
LEVEL2_TXT_Platzhalter.Contents = cstr(LEVEL2_TXT_Platzhalter_DBValue)
|
||||
LEVEL2_TXT_Datentyp.Contents = cstr(LEVEL2_TXT_Datentyp_DBValue)
|
||||
|
||||
IF (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Text", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Text_Wert.Contents = cstr(LEVEL2_TXT_Text_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Integer", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Integer_Wert.Contents = CLng(LEVEL2_TXT_Integer_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Double", vbTextCompare ) > 0) Then
|
||||
|
||||
LEVEL2_TXT_Double_Wert.Contents = cdbl(LEVEL2_TXT_Double_Wert_DBValue)
|
||||
|
||||
ElseIf (Instr( 1, LEVEL2_TXT_Datentyp.screencontents, "Date", vbTextCompare ) > 0) Then
|
||||
|
||||
IF (LEVEL2_TXT_Date_Wert_DBValue <> "") Then
|
||||
LEVEL2_TXT_Date_Wert.Contents = cdate(LEVEL2_TXT_Date_Wert_DBValue)
|
||||
else
|
||||
LEVEL2_TXT_Date_Wert.Contents = "01.01.1970"
|
||||
end if
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,101 @@
|
||||
' DD-INSERT_LANGBESCHINT_INTO_BELEGERFASSUNG
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten für reine Anzeigefelder.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 22.06.2021 / MD
|
||||
' Version Date / Editor: 22.06.2021 / MD
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_ReadOnlyControls(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
'Current selected line in grid 1
|
||||
IF (cint(LEVEL1_TXT_GUID_DBValue) > 0) Then
|
||||
LEVEL1_TXT_GUID.Contents = "GUID: " & cstr(LEVEL1_TXT_GUID_DBValue)
|
||||
Else
|
||||
LEVEL1_TXT_GUID.Contents = "GUID: <0>"
|
||||
End if
|
||||
|
||||
'Line Counter in grid 1
|
||||
If (LEVEL1_Grid.LineCount > 0) Then
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
Else
|
||||
LEVEL1_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
End if
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
'Current selected line in grid 2
|
||||
IF (cint(LEVEL2_TXT_GUID_DBValue) > 0) Then
|
||||
LEVEL2_TXT_GUID.Contents = "GUID: " & cstr(LEVEL2_TXT_GUID_DBValue)
|
||||
Else
|
||||
LEVEL2_TXT_GUID.Contents = "GUID: <0>"
|
||||
End if
|
||||
|
||||
'Line Counter in grid 2
|
||||
If (LEVEL2_Grid.LineCount > 0) Then
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
Else
|
||||
LEVEL2_TXT_TabelCounter.Contents = "Keine Zuordnungen gefunden"
|
||||
End if
|
||||
|
||||
ElseIf (LEVEL = 3) or (LEVEL = "3") Then
|
||||
|
||||
LEVEL3_TXT_Standard_Modul_Path.Contents = ModuleDefaultSourcePath
|
||||
LEVEL3_TXT_EWLD_Modul_Path.Contents = ModuleExportWinLineDocSourcePath
|
||||
LEVEL3_TXT_WebServiceUser.Contents = WebServiceUser
|
||||
LEVEL3_TXT_Blank.active = true
|
||||
LEVEL3_TXT_Blank.contents = " "
|
||||
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
'Definitely, does not matter tab / level 1 or 2 set these fields...
|
||||
If (((LEVEL = 1) or (LEVEL = "1")) and (LEVEL1_GRID_CURRENT_GUID > 0)) or (((LEVEL = 2) or (LEVEL = "2")) and (LEVEL2_GRID_CURRENT_GUID > 0)) Then
|
||||
|
||||
IF ((LEVEL0_TXT_Erstellt_wer_DBValue > empty) and (LEVEL0_TXT_Erstellt_wer_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = cstr(LEVEL0_TXT_Erstellt_wer_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Erstellt_wann_DBValue > empty) and (LEVEL0_TXT_Erstellt_wann_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = cdate(LEVEL0_TXT_Erstellt_wann_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Geaendert_wer_DBValue > empty) and (LEVEL0_TXT_Geaendert_wer_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = cstr(LEVEL0_TXT_Geaendert_wer_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = NULL
|
||||
End if
|
||||
'------------------------------------------------------------------------------------------------------
|
||||
|
||||
IF ((LEVEL0_TXT_Geaendert_wann_DBValue > empty) and (LEVEL0_TXT_Geaendert_wann_DBValue <> "")) Then
|
||||
LEVEL0_TXT_Geaendert_wann.Contents = cdate(LEVEL0_TXT_Geaendert_wann_DBValue)
|
||||
Else
|
||||
LEVEL0_TXT_Geaendert_wann.contents = NULL
|
||||
End if
|
||||
|
||||
'But if no valid line was selected...
|
||||
Elseif (LEVEL <> 3) and (LEVEL <> "3") Then
|
||||
|
||||
LEVEL0_TXT_Erstellt_wer.Contents = NULL
|
||||
LEVEL0_TXT_Erstellt_wann.Contents = NULL
|
||||
LEVEL0_TXT_Geaendert_wer.Contents = NULL
|
||||
LEVEL0_TXT_Geaendert_wann.contents = NULL
|
||||
|
||||
End if
|
||||
|
||||
End sub
|
||||
@@ -0,0 +1,168 @@
|
||||
' SetExportWinLineDoc_SQLData
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt eine Tabelle (Grid) mit Daten
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (BUTTON) = Die ID des betätigten Knopfs.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_SQLData(LEVEL,BUTTON)
|
||||
|
||||
If (BUTTON = LEVEL3_BTN_Restore_Profiles_ID) Then
|
||||
|
||||
IF (FileSystemObject.FileExists(TemplateExportWinLineDoc_Profiles_File)) Then
|
||||
|
||||
Set SQLResult_Profiles = Conn.Select(SQLQuery_Profiles_Default)
|
||||
If (SQLResult_Profiles.RowCount) > 0 Then
|
||||
|
||||
MsgBoxResult = MsgBox ("Wenn Sie fortfahren, werden die Auslieferungsprofile gelöscht und neu angelegt!" & vbCrLf & vbCrLf & _
|
||||
"Änderungen an diesen gehen verloren!" & vbCrLf & vbCrLf & _
|
||||
"Der Vorgang kann NICHT Rückgängig gemacht werden!" & vbCrLf & vbCrLf & _
|
||||
"Möchten Sie fortfahren?",vbYesNo+vbCritical,DEFAULT_TITLE & " - ACHTUNG! ACHTUNG!")
|
||||
|
||||
If (MsgBoxResult = 6) Then
|
||||
|
||||
SQLResult_Profiles = Conn.ExecuteSQL(SQLDelete_Profiles)
|
||||
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
If (SQLResult_Profiles = true) Then
|
||||
|
||||
'After the delete insert
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Profiles_File
|
||||
|
||||
Else
|
||||
MsgBox "Der Löschvorgang ist fehlgeschlagen!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
SQLResult_Profiles = 0
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
MsgBox "Der Vorgang wurde abgebrochen!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Profiles_File
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgBox "Die Vorlagen-Datei wurde nicht gefunden!" & vbCrLf & vbCrLf &_
|
||||
TemplateExportWinLineDoc_Profiles_File & vbCrLf & _
|
||||
"",vbYesNo+vbCritical,DEFAULT_TITLE & " - Abbruch!"
|
||||
|
||||
End if
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (BUTTON = LEVEL3_BTN_Restore_Configs_ID) Then
|
||||
|
||||
Set SQLResult_Configs = Conn.Select(SQLQuery_Configs_Default)
|
||||
If (SQLResult_Configs.RowCount) > 0 Then
|
||||
|
||||
MsgBoxResult = MsgBox ("Wenn Sie fortfahren, werden die Auslieferungskonfigurationen gelöscht und neu angelegt!" & vbCrLf & vbCrLf & _
|
||||
"Änderungen an diesen gehen verloren!" & vbCrLf & vbCrLf & _
|
||||
"Der Vorgang kann NICHT Rückgängig gemacht werden!" & vbCrLf & vbCrLf & _
|
||||
"Möchten Sie fortfahren?",vbYesNo+vbCritical,DEFAULT_TITLE & " - ACHTUNG! ACHTUNG!")
|
||||
|
||||
If (MsgBoxResult = 6) Then
|
||||
|
||||
SQLResult_Configs = Conn.ExecuteSQL(SQLDelete_Configs)
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
If (SQLResult_Configs = true) Then
|
||||
|
||||
'After the delete insert
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Configs_File
|
||||
|
||||
Else
|
||||
MsgBox "Der Löschvorgang ist fehlgeschlagen!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE & " - Fehler!"
|
||||
|
||||
SQLResult_Configs = 0
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
MsgBox "Der Vorgang wurde abgebrochen!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
InsertExportWinLineDoc_SQLData LEVEL,TemplateExportWinLineDoc_Configs_File
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgBox "Die Vorlagen-Datei wurde nicht gefunden!" & vbCrLf & vbCrLf &_
|
||||
TemplateExportWinLineDoc_Configs_File & vbCrLf & _
|
||||
"",vbYesNo+vbCritical,DEFAULT_TITLE & " - Abbruch!"
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------
|
||||
Private Sub InsertExportWinLineDoc_SQLData(LEVEL,FILE)
|
||||
|
||||
'Get file content of the sql script
|
||||
FileToRead.CharSet = "utf-8"
|
||||
FileToRead.Open
|
||||
FileToRead.LoadFromFile(File)
|
||||
FileToReadContents = FileToRead.ReadText()
|
||||
FileToRead.Close
|
||||
|
||||
SQLInsert = FileToReadContents
|
||||
|
||||
'Replace the default TB names
|
||||
SQLInsert = Replace(SQLInsert,"[dbo].[t650]",TBDD_EXPORT_WINLINEDOC_CONFIG)
|
||||
SQLInsert = Replace(SQLInsert,"[dbo].[t651]",TBDD_EXPORT_WINLINEDOC_PROFILE)
|
||||
|
||||
'Some magic OTRS cannot do
|
||||
SQLInsert = Replace(SQLInsert,vbCr,"")
|
||||
SQLInsert = Replace(SQLInsert,vbLf,"")
|
||||
SQLInsert = TRIM(SQLInsert)
|
||||
|
||||
'Execute Insert - remember that no "GO" order is supported
|
||||
SQLResult = Conn.ExecuteSQL(SQLInsert)
|
||||
|
||||
IF (SQLResult = True) Then
|
||||
msgbox "Die Wiederherstellung war erfolgreich!",vbOkayOnly+vbInformation,DEFAULT_TITLE
|
||||
|
||||
ElseIf (SQLResult = False) Then
|
||||
msgbox "Achtung, es ist ein Fehler aufgetreten!" & vbCrLf & _
|
||||
"Bitte informieren Sie Ihren Administrator!" & vbCrLf & _
|
||||
"",vbOkayOnly+vbCritical,DEFAULT_TITLE
|
||||
End if
|
||||
|
||||
IF (LEVEL = 1) Then
|
||||
SetExportWinLineDoc_TableContent LEVEL,LEVEL1_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 2) Then
|
||||
SetExportWinLineDoc_TableContent LEVEL,LEVEL2_GRID_ID
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,107 @@
|
||||
' SetExportWinLineDoc_TableContent
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine füllt eine Tabelle (Grid) mit Daten
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 07.07.2021 / MK
|
||||
' Version Date / Editor: 07.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_TableContent(LEVEL,GRID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
LEVEL1_Grid.Clear
|
||||
LEVEL1_Grid.InitUserGrid
|
||||
LEVEL1_Grid.Header
|
||||
|
||||
Set SQLResult_Profiles = Conn.Select(SQLQuery_Profiles)
|
||||
If (SQLResult_Profiles.RowCount) > 0 Then
|
||||
|
||||
LEVEL1_Grid.IsRedraw = False
|
||||
|
||||
'Fill left Frame / Table
|
||||
If (SQLResult_Profiles.RowCount > 0) Then
|
||||
Do
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,0) = cint(SQLResult_Profiles.value("u000"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,1) = cstr(SQLResult_Profiles.value("u001"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,2) = cstr(SQLResult_Profiles.value("u002"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,3) = cstr(SQLResult_Profiles.value("u003"))
|
||||
|
||||
LEVEL1_Grid.AddLine()
|
||||
|
||||
'Trick it, because rowcount wont work
|
||||
If (SQLResult_Profiles.NextRecord = False) Then
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
End If
|
||||
|
||||
LEVEL1_Grid.IsRedraw = True
|
||||
|
||||
'Show count down below the table
|
||||
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
'Set focus for the fist call, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
LEVEL2_Grid.Clear
|
||||
LEVEL2_Grid.InitUserGrid
|
||||
LEVEL2_Grid.Header
|
||||
|
||||
Set SQLResult_Configs = Conn.Select(SQLQuery_Configs)
|
||||
If (SQLResult_Configs.RowCount) > 0 Then
|
||||
|
||||
LEVEL2_Grid.IsRedraw = False
|
||||
|
||||
'Fill left Frame / Table
|
||||
If (SQLResult_Configs.RowCount > 0) Then
|
||||
Do
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,50) = cint(SQLResult_Configs.value("u000"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,51) = cstr(SQLResult_Configs.value("u001"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,52) = cstr(SQLResult_Configs.value("u002"))
|
||||
CWLCurrentWindow.ActiveWindow.Vars.Value(495,53) = cstr(SQLResult_Configs.value("u003"))
|
||||
|
||||
LEVEL2_Grid.AddLine()
|
||||
|
||||
'Trick it, because rowcount wont work
|
||||
If (SQLResult_Configs.NextRecord = False) Then
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
End If
|
||||
|
||||
LEVEL2_Grid.IsRedraw = True
|
||||
|
||||
'Show count down the table
|
||||
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
||||
|
||||
'Set focus for the fist call, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,45 @@
|
||||
' SetExportWinLineDoc_TableLayout
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine bereitet das Layout / die Spalten einer Tabelle (Grid) vor.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 05.07.2021 / MK
|
||||
' Version Date / Editor: 05.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SetExportWinLineDoc_TableLayout(LEVEL,GRID)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
LEVEL1_GRID_COLUMN_GUID = LEVEL1_Grid.AddColumn("GUID", "T21,GUID", "1","V",0,495,0, 0,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_AKTIV = LEVEL1_Grid.AddColumn("Aktiv", "T17,Aktiv", "l","V",0,495,1, 5,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_BESCHREIBUNG = LEVEL1_Grid.AddColumn("Beschreibung", "T21,Beschreibung", "1","V",0,495,2,40,scrtflag+sizeflag+hideflag)
|
||||
LEVEL1_GRID_COLUMN_MANDANT = LEVEL1_Grid.AddColumn("Mandant", "T21,Mandant", "1","V",0,495,3, 8,scrtflag+sizeflag+hideflag)
|
||||
|
||||
End If
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
LEVEL2_GRID_COLUMN_GUID = LEVEL2_Grid.AddColumn("GUID", "T21,GUID", "1","V",0,495,50, 0,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_AKTIV = LEVEL2_Grid.AddColumn("Aktiv", "T17,Aktiv", "l","V",0,495,51, 5,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_BESCHREIBUNG = LEVEL2_Grid.AddColumn("Beschreibung", "T21,Beschreibung", "1","V",0,495,52,40,scrtflag+sizeflag+hideflag)
|
||||
LEVEL2_GRID_COLUMN_MANDANT = LEVEL2_Grid.AddColumn("Mandant", "T21,Mandant", "1","V",0,495,53, 8,scrtflag+sizeflag+hideflag)
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,53 @@
|
||||
' ShowExportWinLineDoc_Level
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine aktiviert unterschiedliche Showlevel.
|
||||
' Parameter 1 (LEVEL) = Das zu setzende Showlevel übergeben.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub ShowExportWinLineDoc_Level(LEVEL)
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,False
|
||||
|
||||
CURRENT_LEVEL = 1
|
||||
|
||||
'Set focus, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,False
|
||||
|
||||
CURRENT_LEVEL = 2
|
||||
|
||||
'Set focus, so ribbon buttons will work well (eg. NEW)
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
||||
|
||||
ElseIf (LEVEL = 3) or (LEVEL = "3") Then
|
||||
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 3,3,True
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 0,0,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 1,1,False
|
||||
CWLCurrentWindow.ActiveWindow.SetShowLevel 2,2,False
|
||||
|
||||
CURRENT_LEVEL = 3
|
||||
|
||||
'MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL3_TXT_Blank_ID
|
||||
|
||||
End if
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,230 @@
|
||||
' SwitchExportWinLineDoc_TableContent
|
||||
' ----------------------------------------------------------------------------
|
||||
' Diese Subroutine läd Daten beim Zeilenwechel im Grid und zeigt diese ggf. an.
|
||||
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
||||
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
||||
' Parameter 3 (UPDATE) = Falls vor dem Wechsel eine Prüfung auf geänderte Daten durchgeführt werden soll.
|
||||
'
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 15.07.2021 / MK
|
||||
' Version Date / Editor: 15.07.2021 / MK
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Sub SwitchExportWinLineDoc_TableContent(LEVEL,GRID,UPDATE)
|
||||
|
||||
'Set global var to prevent focus change -> "rumflackern"
|
||||
PREVENT_FOCUS_CHANGE = True
|
||||
|
||||
If (LEVEL = 1) or (LEVEL = "1") Then
|
||||
|
||||
If (GRID = LEVEL1_GRID_ID) Then
|
||||
|
||||
'Check if there are unsaved changes before switch line
|
||||
If (LEVEL1_GRID_CURRENT_ROW > 0) and ((LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CURRENT_GUID <> -1)) and (UPDATE = true) Then
|
||||
|
||||
SaveExportWinLineDoc_Record CURRENT_LEVEL,LEVEL1_GRID_CURRENT_GUID,False
|
||||
|
||||
End If
|
||||
|
||||
LEVEL1_GRID.GetCurrentCell CURRENT_ROW, CURRENT_COLUMN
|
||||
GRIDSelectedLines = LEVEL1_GRID.SelectedLines
|
||||
|
||||
If isarray (GRIDSelectedLines) Then
|
||||
|
||||
If Ubound(GRIDSelectedLines) = 0 Then
|
||||
|
||||
LEVEL1_GRID_CURRENT_ROW = GRIDSelectedLines(0)
|
||||
LEVEL1_GRID_CURRENT_GUID = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_GUID)
|
||||
LEVEL1_GRID_CURRENT_AKTIV = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_AKTIV)
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_BESCHREIBUNG)
|
||||
LEVEL1_GRID_CURRENT_Mandant = LEVEL1_GRID.GetCellValue(CURRENT_ROW,LEVEL1_GRID_COLUMN_MANDANT)
|
||||
|
||||
If (DEBUG_ON = True) Or (DebugMode = "Enabled") Then
|
||||
msgbox "CURRENT_ROW: " & LEVEL1_GRID_CURRENT_ROW & vbCrlf & _
|
||||
"CURRENT_GUID: " & LEVEL1_GRID_CURRENT_GUID & vbCrlf & _
|
||||
"CURRENT_AKTIV: " & LEVEL1_GRID_CURRENT_AKTIV & vbCrlf & _
|
||||
"CURRENT_Beschreibung: " & LEVEL1_GRID_CURRENT_Beschreibung & vbCrlf & _
|
||||
"CURRENT_Mandant: " & LEVEL1_GRID_CURRENT_Mandant & vbCrlf & _
|
||||
"",vbOkayonly+vbInformation, DEBUG_TITLE & "SwitchExportWinLineDoc_TableContent"
|
||||
End If
|
||||
|
||||
If (LEVEL1_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
'For the first call the value allocation (.contents) must run through all fields
|
||||
'Otherwise every "Must-Field" must be clicked manually!
|
||||
'This is corresponding with the "bResult.Value" in the OnCheckUserfield Event
|
||||
LEVEL1_GRID_CALLCOUNT = LEVEL1_GRID_CALLCOUNT + 1
|
||||
|
||||
'Set static fields to activ
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'get data for selected line
|
||||
GetExportWinLineDoc_Record CURRENT_LEVEL,LEVEL1_GRID_ID,CURRENT_GUID
|
||||
|
||||
'set data to the read only fields
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'set data to the writable fields
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'Enable / Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
'For the first call set focus once to the "Must-Fields"
|
||||
IF ((LEVEL1_GRID_CURRENT_ROW > 0) and (LEVEL1_GRID_CURRENT_GUID > 0) and (LEVEL1_GRID_CALLCOUNT < 2)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
'Important in this case, to set these vars to 0 at first
|
||||
LEVEL1_GRID_CURRENT_ROW = 0
|
||||
LEVEL1_GRID_CURRENT_GUID = 0
|
||||
LEVEL1_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL1_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL1_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'If no valid line was selected, clear and disable input area
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"clear"
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
||||
|
||||
If (GRID = LEVEL2_GRID_ID) Then
|
||||
|
||||
'Check if there are unsaved changes before switch line
|
||||
If (LEVEL2_GRID_CURRENT_ROW > 0) and ((LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CURRENT_GUID <> -1)) and (UPDATE = true) Then
|
||||
|
||||
SaveExportWinLineDoc_Record CURRENT_LEVEL,LEVEL2_GRID_CURRENT_GUID,False
|
||||
|
||||
End If
|
||||
|
||||
LEVEL2_GRID.GetCurrentCell CURRENT_ROW, CURRENT_COLUMN
|
||||
GRIDSelectedLines = LEVEL2_GRID.SelectedLines
|
||||
|
||||
If isarray (GRIDSelectedLines) Then
|
||||
|
||||
If Ubound(GRIDSelectedLines) = 0 Then
|
||||
|
||||
LEVEL2_GRID_CURRENT_ROW = GRIDSelectedLines(0)
|
||||
LEVEL2_GRID_CURRENT_GUID = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_GUID)
|
||||
LEVEL2_GRID_CURRENT_AKTIV = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_AKTIV)
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_BESCHREIBUNG)
|
||||
LEVEL2_GRID_CURRENT_Mandant = LEVEL2_GRID.GetCellValue(CURRENT_ROW,LEVEL2_GRID_COLUMN_MANDANT)
|
||||
|
||||
If (DEBUG_ON = True) Or (DebugMode = "Enabled") Then
|
||||
msgbox "CURRENT_ROW: " & LEVEL2_GRID_CURRENT_ROW & vbCrlf & _
|
||||
"CURRENT_GUID: " & LEVEL2_GRID_CURRENT_GUID & vbCrlf & _
|
||||
"CURRENT_AKTIV: " & LEVEL2_GRID_CURRENT_AKTIV & vbCrlf & _
|
||||
"CURRENT_Beschreibung: " & LEVEL2_GRID_CURRENT_Beschreibung & vbCrlf & _
|
||||
"CURRENT_Mandant: " & LEVEL2_GRID_CURRENT_Mandant & vbCrlf & _
|
||||
"",vbOkayonly+vbInformation, DEBUG_TITLE & "SwitchExportWinLineDoc_TableContent"
|
||||
End If
|
||||
|
||||
If (LEVEL2_GRID_CURRENT_GUID > 0) Then
|
||||
|
||||
'For the first call the value allocation (.contents) must run through all fields
|
||||
'Otherwise every "Must-Field" must be clicked manually!
|
||||
'This is corresponding with the "bResult.Value" in the OnCheckUserfield Event
|
||||
LEVEL2_GRID_CALLCOUNT = LEVEL2_GRID_CALLCOUNT + 1
|
||||
|
||||
'Set static fields to activ
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
'get data for selected line
|
||||
GetExportWinLineDoc_Record CURRENT_LEVEL,LEVEL2_GRID_ID,CURRENT_GUID
|
||||
|
||||
'set data to the read only fields
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'set data to the writable fields
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Enable / Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'SPECIAL: set data type fileds depending on selcted type on/off
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
'Check for duplicate on changing data, or new data, or changing someting else and pressing the save button
|
||||
SQLQuery_ConfigCount = SQLQuery_ConfigCount_Template
|
||||
SQLQuery_ConfigCount = Replace(SQLQuery_ConfigCount,"%LEVEL2_TXT_Platzhalter_Value%",LEVEL2_TXT_Platzhalter_DBValue)
|
||||
|
||||
Set SQLResult_ConfigCount = Conn.Select(SQLQuery_ConfigCount)
|
||||
IF ((SQLResult_ConfigCount.Rowcount > 1) and (LEVEL2_GRID_CALLCOUNT > 2)) Then
|
||||
Msgbox "Achtung: Der Platzerhalter " & LEVEL2_TXT_Platzhalter_DBValue & ", " & vbCrlf & _
|
||||
"wird bereits (" & SQLResult_ConfigCount.Rowcount & "x) verwendet!" & vbCrlf & vbCrlf & _
|
||||
"Bitte ändern Sie Ihre Eingabe, " & vbCrlf & _
|
||||
"ansonsten wird es zu Fehlern bei der Dateiablage kommen!" & vbCrlf & vbCrlf & _
|
||||
"Muster: %PLATZHALTER%" & vbCrlf & _
|
||||
"",vbInformation+vbOKOnly,DEFAULT_TITLE & " - Zeilenwechsel"
|
||||
|
||||
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_TXT_Platzhalter_ID
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
'For the first call set focus once to the "Must-Fields"
|
||||
IF ((LEVEL2_GRID_CURRENT_ROW > 0) and (LEVEL2_GRID_CURRENT_GUID > 0) and (LEVEL2_GRID_CALLCOUNT < 2)) Then
|
||||
|
||||
SetExportWinLineDoc_FocusToRequiredFields CURRENT_LEVEL
|
||||
|
||||
End if
|
||||
|
||||
Else
|
||||
|
||||
'Important in this case, to set these vars to 0 at first
|
||||
LEVEL2_GRID_CURRENT_ROW = 0
|
||||
LEVEL2_GRID_CURRENT_GUID = 0
|
||||
LEVEL2_GRID_CURRENT_AKTIV = 0
|
||||
LEVEL2_GRID_CURRENT_Beschreibung = 0
|
||||
LEVEL2_GRID_CURRENT_Mandant = 0
|
||||
|
||||
'If no valid line was selected, clear and disable input area
|
||||
EnableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
SetExportWinLineDoc_InputControls CURRENT_LEVEL,"clear"
|
||||
DisableExportWinLineDoc_InputControls CURRENT_LEVEL,"static"
|
||||
|
||||
SetExportWinLineDoc_ReadOnlyControls CURRENT_LEVEL
|
||||
|
||||
'Disable correponding Toolbar Buttons
|
||||
DisableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
EnableExportWinLineDoc_ButtonControls CURRENT_LEVEL,"dynamic"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End if
|
||||
|
||||
PREVENT_FOCUS_CHANGE = False
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,23 @@
|
||||
/******
|
||||
-- Export-WinLineDoc (EWLD)
|
||||
-- =================================================================
|
||||
-- Dieses Skript legt vordefinierte Konfigurationen an.
|
||||
-- =================================================================
|
||||
-- Copyright (c) 2021 by Digital Data GmbH
|
||||
--
|
||||
-- Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
-- Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
-- =================================================================
|
||||
-- Creation Date / Author: 15.07.2021 / MK
|
||||
-- Version Date / Editor: 15.07.2021 / MK
|
||||
-- Version Number: 1.0.0.0
|
||||
-- =================================================================
|
||||
-- History:
|
||||
-- 15.07.2021 / MK - Erstellung
|
||||
--
|
||||
-- HINWEISE: Keine Go Befehle verwenden!
|
||||
******/
|
||||
|
||||
INSERT [dbo].[t650] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [U010], [U011], [U012], [U013], [U014]) VALUES (1, N'1', N'Mandant Kurzname', N'ALL', N'CUSTOM_VARIABLE', N'%KURZNAME_MANDANT%', N'TEXT', N'Toys&Bikes', 0, 0, CAST(N'1970-01-01T00:00:00.000' AS DateTime), N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t650] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [U010], [U011], [U012], [U013], [U014]) VALUES (2, N'1', N'Exportpfad', N'ALL', N'CUSTOM_VARIABLE', N'%EXPORTPATH%', N'TEXT', N'c:\WinLine\Dokumentablage', 0, 0, CAST(N'1970-01-01T00:00:00.000' AS DateTime), N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
@@ -0,0 +1,112 @@
|
||||
/******
|
||||
-- Export-WinLineDoc (EWLD)
|
||||
-- =================================================================
|
||||
-- Dieses Skript legt vordefinierte Profile an.
|
||||
-- =================================================================
|
||||
-- Copyright (c) 2021 by Digital Data GmbH
|
||||
--
|
||||
-- Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
-- Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
-- =================================================================
|
||||
-- Creation Date / Author: 15.07.2021 / MK
|
||||
-- Version Date / Editor: 15.07.2021 / MK
|
||||
-- Version Number: 1.0.0.0
|
||||
-- =================================================================
|
||||
-- History:
|
||||
-- 15.07.2021 / MK - Erstellung
|
||||
--
|
||||
-- HINWEISE: Keine Go Befehle verwenden!
|
||||
******/
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (1, 1, N'Angebot (debitorisch)', N'ALL', N'1', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Angebot\%YEAR%\%MONTH%', N'%MandantenNr%-AANG-%AngebotsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANG-%AngebotsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (2, 1, N'Angebot-Storno (debitorisch)', N'ALL', N'1', N'11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Angebot-Storno\%YEAR%\%MONTH%', N'%MandantenNr%-AANG-Storno-%AngebotsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANG-Storno-%AngebotsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (3, 1, N'Auftrag (debitorisch)', N'ALL', N'1', N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Auftrag\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AAB-%AuftragsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AAB-%AuftragsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (4, 1, N'Auftrag-Storno (debitorisch)', N'ALL', N'1', N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Auftrag-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AAB-Storno-%AuftragsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AAB-Storno-%AuftragsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (5, 1, N'Lieferschein (debitorisch)', N'ALL', N'1', N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Lieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ALS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ALS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (6, 1, N'Lieferschein-Storno (debitorisch)', N'ALL', N'1', N'13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Lieferschein-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ALS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ALS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (7, 1, N'Rechnung (debitorisch)', N'ALL', N'1', N'4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ARE-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ARE-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (8, 1, N'Rechnung-Storno (debitorisch)', N'ALL', N'1', N'14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ARE-Storno-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ARE-Storno-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (9, 1, N'Anfrage (kreditorisch)', N'ALL', N'2', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Anfrage\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AANF-%AnfragenNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANF-%AnfragenNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (10, 1, N'Anfrage-Storno (kreditorisch)', N'ALL', N'2', N'11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Anfrage-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AANF-Storno-%AnfragenNr%-%KontoName%
|
||||
', N'%MandantenNr%-AANF-Storno-%AnfragenNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (11, 1, N'Bestellung (kreditorisch)', N'ALL', N'2', N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Bestellung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ABE-%BestellNr%-%KontoName%
|
||||
', N'%MandantenNr%-ABE-%BestellNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (12, 1, N'Bestellung-Storno (kreditorisch)', N'ALL', N'2', N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Bestellung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ABE-Storno-%BestellNr%-%KontoName%
|
||||
', N'%MandantenNr%-ABE-Storno-%BestellNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (13, 1, N'Lieferschein (kreditorisch)', N'ALL', N'2', N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Lieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ELS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ELS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (14, 1, N'Lieferschein-Storno (kreditorisch)', N'ALL', N'2', N'13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Lieferschein-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ELS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ELS-Storno-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (15, 1, N'Rechnung (kreditorisch)', N'ALL', N'2', N'4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Rechnung\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ERE-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ERE-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (16, 1, N'Rechnung-Storno (kreditorisch)', N'ALL', N'2', N'14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Lieferanten-Rechnung-Storno\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ERE-Storno-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-ERE-Storno-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (17, 1, N'Teillieferschein (debitorisch)', N'ALL', N'1', N'-3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Teillieferschein\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-ATLS-%LieferscheinNr%-%KontoName%
|
||||
', N'%MandantenNr%-ATLS-%LieferscheinNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (18, 1, N'Gutschrift (debitorisch)', N'ALL', N'1', N'4', NULL, N'NegativAmount', NULL, NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Gutschrift\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AGU-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AGU-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
|
||||
INSERT [dbo].[t651] ([u000], [u001], [u002], [u003], [u004], [u005], [u006], [u007], [u008], [u009], [u010], [u011], [u012], [u013], [u014], [u015], [u016], [u017], [u018], [u019], [u020], [u021], [u022], [u023], [u024], [u025], [U026], [U027], [U028], [U029], [U030], [U031], [U032]) VALUES (19, 1, N'Rechnungskorrektur (debitorisch)', N'ALL', N'1', N'4', NULL, N'NegativAmount', N'Correction', NULL, NULL, NULL, NULL, NULL, N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'<KEIN MAKRO>', N'%EXPORTPATH%\%MandantenNr%\Kunden-Rechnungskorrektur\%YEAR%\%MONTH%
|
||||
', N'%MandantenNr%-AREK-%RechnungsNr%-%KontoName%
|
||||
', N'%MandantenNr%-AREK-%RechnungsNr%-%KontoName%
|
||||
', 5, 9, N'DigitalData', CAST(N'2021-07-16T00:00:00.000' AS DateTime), NULL, NULL)
|
||||
@@ -0,0 +1,618 @@
|
||||
' Export-WinLineDoc (EWLD)
|
||||
' VB-Script for exporting printed docs to Filesystem.
|
||||
' ----------------------------------------------------------------
|
||||
' Copyright (c) 2021-2022 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow(at)digitaldata.works
|
||||
' ----------------------------------------------------------------
|
||||
' Creation Date / Author: 01.07.2021 / MK
|
||||
' Version Date / Editor: 13.07.2022 / JJ
|
||||
' Version Number: 3.1.1.0
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
'#set variables#
|
||||
DocVersionSeparator ="~"
|
||||
ReplaceSpecialChar =""
|
||||
DebugMode ="Disabled" 'Enabled
|
||||
|
||||
PROFILE_TB ="[T651]"
|
||||
CONFIG_TB ="[T650]"
|
||||
CONFIG_GUID =0
|
||||
|
||||
WebServiceUser ="meso"
|
||||
WebServiceUser_MandantenstammID =211
|
||||
|
||||
'#set constants#
|
||||
DEFAULT_TITLE ="Export-WinLineDoc"
|
||||
DEBUG_TITLE ="DEBUG - " & DEFAULT_TITLE
|
||||
|
||||
EWLD_GUID =0
|
||||
DocVersion =1
|
||||
WinLineCurrentUser =CWLStart.CurrentUser.Name
|
||||
MandatorNr =TRIM(CSTR(Value (0,11)))
|
||||
ProgramDocType =TRIM(CSTR(Value (0,20)))
|
||||
RunningNr =TRIM(CSTR(Value (0,31)))
|
||||
OfferNr =TRIM(CSTR(Value (0,34)))
|
||||
OrderNr =TRIM(CSTR(Value (0,35)))
|
||||
DeliveryNoteNr =TRIM(CSTR(Value (0,36)))
|
||||
InvoiceNr =TRIM(CSTR(Value (0,37)))
|
||||
InquireNr =TRIM(CSTR(Value (0,34)))
|
||||
PurchaseNr =TRIM(CSTR(Value (0,35)))
|
||||
OfferDate =TRIM(CSTR(Value (0,50)))
|
||||
OrderDate =TRIM(CSTR(Value (0,51)))
|
||||
DeliveryNoteDate =TRIM(CSTR(Value (0,52)))
|
||||
InvoiceDate =TRIM(CSTR(Value (0,53)))
|
||||
InquireDate =TRIM(CSTR(Value (0,50)))
|
||||
PurchaseDate =TRIM(CSTR(Value (0,51)))
|
||||
DocNr =TRIM(CSTR(Value (0,39)))
|
||||
DocDate =TRIM(CSTR(""))
|
||||
DocCreationDate =TRIM(CSTR(Value (0,54)))
|
||||
DocChangedDate =TRIM(CSTR(Value (0,55)))
|
||||
DocType =TRIM(CSTR(Value (0,113)))
|
||||
Text1 =TRIM(CSTR(Value (25,63)))
|
||||
Text2 =TRIM(CSTR(Value (25,64)))
|
||||
Text3 =TRIM(CSTR(Value (25,65)))
|
||||
Text4 =TRIM(CSTR(Value (25,66)))
|
||||
Text5 =TRIM(CSTR(Value (25,67)))
|
||||
Text6 =TRIM(CSTR(Value (25,68)))
|
||||
Text7 =TRIM(CSTR(Value (25,69)))
|
||||
Text8 =TRIM(CSTR(Value (25,70)))
|
||||
Text9 =TRIM(CSTR(Value (25,71)))
|
||||
Text10 =TRIM(CSTR(Value (25,72)))
|
||||
DocFinalAmount =TRIM(CSTR(Value (25,100)))
|
||||
ProjectNr =TRIM(CSTR(Value (25,136)))
|
||||
InvoiceForCorrection=TRIM(CSTR(Value (25,147)))
|
||||
DocComment =TRIM(CSTR(Value (25,165)))
|
||||
AccountNr =TRIM(CSTR(Value (50,2)))
|
||||
AccountName =TRIM(CSTR(Value (50,3)))
|
||||
PAT1 =TRIM(CSTR(Value (50,201)))
|
||||
PAT2 =TRIM(CSTR(Value (50,202)))
|
||||
PAT3 =TRIM(CSTR(Value (50,203)))
|
||||
PAT4 =TRIM(CSTR(Value (50,204)))
|
||||
PAT5 =TRIM(CSTR(Value (50,205)))
|
||||
PAT6 =TRIM(CSTR(Value (50,206)))
|
||||
PAT7 =TRIM(CSTR(Value (50,207)))
|
||||
PAT8 =TRIM(CSTR(Value (50,208)))
|
||||
PAT9 =TRIM(CSTR(Value (50,209)))
|
||||
PAT10 =TRIM(CSTR(Value (50,210)))
|
||||
PAT11 =TRIM(CSTR(Value (50,211)))
|
||||
PAT12 =TRIM(CSTR(Value (50,212)))
|
||||
PAT13 =TRIM(CSTR(Value (50,213)))
|
||||
PAT14 =TRIM(CSTR(Value (50,214)))
|
||||
PAT15 =TRIM(CSTR(Value (50,215)))
|
||||
PAT16 =TRIM(CSTR(Value (50,216)))
|
||||
PAT17 =TRIM(CSTR(Value (50,217)))
|
||||
PAT18 =TRIM(CSTR(Value (50,218)))
|
||||
PAT19 =TRIM(CSTR(Value (50,219)))
|
||||
PAT20 =TRIM(CSTR(Value (50,220)))
|
||||
PAT21 =TRIM(CSTR(Value (50,221)))
|
||||
PAT22 =TRIM(CSTR(Value (50,222)))
|
||||
PAT23 =TRIM(CSTR(Value (50,223)))
|
||||
PAT24 =TRIM(CSTR(Value (50,224)))
|
||||
PAT25 =TRIM(CSTR(Value (50,225)))
|
||||
PAT26 =TRIM(CSTR(Value (50,226)))
|
||||
PAT27 =TRIM(CSTR(Value (50,227)))
|
||||
PAT28 =TRIM(CSTR(Value (50,228)))
|
||||
PAT29 =TRIM(CSTR(Value (50,229)))
|
||||
PAT30 =TRIM(CSTR(Value (50,230)))
|
||||
PostingType =TRIM(CSTR(Value (357,6)))
|
||||
ExportType =OutputType
|
||||
ExportDone ="ERROR!"
|
||||
|
||||
PROFILE_SQL_MAN = "[u000] = '"& CONFIG_GUID &"' AND [u001] = 1"
|
||||
PROFILE_SQL_AUTO= "[u001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [u004] = '"& PostingType &"' AND [u005] = '"& ProgramDocType &"' AND ([u006] = '"& DocType &"' OR [u006] IS NULL)"
|
||||
CONFIG_SQL = "[u001] = 1 AND [u003] IN ('ALL','"& MandatorNr &"') AND [u004] In ('CUSTOM_VARIABLE') AND [u005] IS NOT NULL AND [u006] IS NOT NULL AND ([u007] IS NOT NULL OR [u008] IS NOT NULL OR [u009] IS NOT NULL OR [u010] IS NOT NULL)"
|
||||
|
||||
RegExpValidFilename = "[^a-zA-Z0-9\"&chr(64)&"\ü\ö\ä\Ü\Ö\Ä\ß\{\[\]\}\ \!\§\$\%\&\(\)\=\+\#\,\.\-\;\_\']{1,}"
|
||||
RegExpValidFilepath = "[^a-zA-Z0-9\"&chr(64)&"\ü\ö\ä\Ü\Ö\Ä\ß\{\[\]\}\ \!\§\$\%\&\(\)\=\+\#\,\.\-\;\_\'\\]{1,}"
|
||||
|
||||
SET FileSystemObject= CreateObject("Scripting.FileSystemObject")
|
||||
SET RI = CreateObject("Scripting.Dictionary")
|
||||
RI.CompareMode = vbTextCompare
|
||||
SET RegExpObject = New RegExp
|
||||
RegExpObject.IgnoreCas = true
|
||||
RegExpObject.Global = true
|
||||
|
||||
'#preparing part#
|
||||
'Reset Error Var
|
||||
Err.Clear
|
||||
|
||||
'No msgbox!
|
||||
If (WinLineCurrentUser=WebServiceUser) Then
|
||||
DebugMode="Disabled"
|
||||
End if
|
||||
|
||||
'Use central
|
||||
If (WebServiceUser="") Then
|
||||
WebServiceUser=CWLStart.CurrentCompany.Value(WebServiceUser_MandantenstammID)
|
||||
End if
|
||||
|
||||
'Fallback "Ursp. Beleg"
|
||||
IF (DocNr=Empty) and (InvoiceNr<>Empty) Then
|
||||
DocNr=InvoiceNr
|
||||
DocDate=InvoiceDate
|
||||
ELSEIF (DocNr=Empty) and (DeliveryNoteNr<>Empty) Then
|
||||
DocNr=DeliveryNoteNr
|
||||
DocDate=DeliveryNoteDate
|
||||
ELSEIF (DocNr=Empty) and (OrderNr<>Empty) Then
|
||||
DocNr=OrderNr
|
||||
DocDate=OrderDate
|
||||
ELSEIF (DocNr=Empty) and (PurchaseNr<>Empty) Then
|
||||
DocNr=PurchaseNr
|
||||
DocDate=PurchaseDate
|
||||
ELSEIF (DocNr=Empty) and (OfferNr<>Empty) Then
|
||||
DocNr=OfferNr
|
||||
DocDate=OfferDate
|
||||
ELSEIF (DocNr=Empty) and (InquireNr<>Empty) Then
|
||||
DocNr=InquireNr
|
||||
DocDate=InquireDate
|
||||
End if
|
||||
|
||||
'Fallback
|
||||
If (AccountNr="") Then
|
||||
AccountNr=TRIM(CSTR(Value (5,2)))
|
||||
If (AccountNr="") Then
|
||||
AccountNr=TRIM(CSTR(Value (0,30)))
|
||||
End if
|
||||
End if
|
||||
|
||||
If (AccountName="") Then
|
||||
AccountName=TRIM(CSTR(Value (5,3)))
|
||||
End if
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "MandatorNr: " &MandatorNr &vbCrLf&_
|
||||
"ProgramDocType: "&ProgramDocType &vbCrLf&_
|
||||
"RunningNr: " &RunningNr &vbCrLf&_
|
||||
"PostingType: " &PostingType,,DEBUG_TITLE&" - WinLine Runtime Variables"
|
||||
|
||||
MSGBOX "Profile SQL:"&vbCrLf& PROFILE_SQL_AUTO&vbCrLf&vbCrLf&_
|
||||
"Config SQL: "&vbCrLf& CONFIG_SQL,,DEBUG_TITLE&" - SQL Commands (not final!)"
|
||||
END IF
|
||||
|
||||
'RI = Replace Object, because functions are not available
|
||||
RI.ADD "%MandantenNr%",MandatorNr
|
||||
RI.ADD "%Laufnummer%",RunningNr
|
||||
|
||||
RI.ADD "%UserName%",WinLineCurrentUser
|
||||
RI.ADD "%KontoNr%",AccountNr
|
||||
RI.ADD "%KontoName%",AccountName
|
||||
RI.ADD "%ProjektNr%",ProjectNr
|
||||
RI.ADD "%AngebotsNr%",OfferNr
|
||||
RI.ADD "%AuftragsNr%",OrderNr
|
||||
RI.ADD "%LieferscheinNr%",DeliveryNoteNr
|
||||
RI.ADD "%RechnungsNr%",InvoiceNr
|
||||
RI.ADD "%AnfragenNr%",InquireNr
|
||||
RI.ADD "%BestellNr%",PurchaseNr
|
||||
RI.ADD "%Belegart%",DocType
|
||||
RI.ADD "%Belegnummer%",DocNr
|
||||
RI.ADD "%BelegKommentar%",DocComment
|
||||
RI.ADD "%Textzeile1%",Text1
|
||||
RI.ADD "%Textzeile2%",Text2
|
||||
RI.ADD "%Textzeile3%",Text3
|
||||
RI.ADD "%Textzeile4%",Text4
|
||||
RI.ADD "%Textzeile5%",Text5
|
||||
RI.ADD "%Textzeile6%",Text6
|
||||
RI.ADD "%Textzeile7%",Text7
|
||||
RI.ADD "%Textzeile8%",Text8
|
||||
RI.ADD "%Textzeile9%",Text9
|
||||
RI.ADD "%Textzeile10%",Text10
|
||||
|
||||
RI.ADD "%Zusatzfeld1%",PAT1
|
||||
RI.ADD "%Zusatzfeld2%",PAT2
|
||||
RI.ADD "%Zusatzfeld3%",PAT3
|
||||
RI.ADD "%Zusatzfeld4%",PAT4
|
||||
RI.ADD "%Zusatzfeld5%",PAT5
|
||||
RI.ADD "%Zusatzfeld6%",PAT6
|
||||
RI.ADD "%Zusatzfeld7%",PAT7
|
||||
RI.ADD "%Zusatzfeld8%",PAT8
|
||||
RI.ADD "%Zusatzfeld9%",PAT9
|
||||
RI.ADD "%Zusatzfeld10%",PAT10
|
||||
RI.ADD "%Zusatzfeld11%",PAT11
|
||||
RI.ADD "%Zusatzfeld12%",PAT12
|
||||
RI.ADD "%Zusatzfeld13%",PAT13
|
||||
RI.ADD "%Zusatzfeld14%",PAT14
|
||||
RI.ADD "%Zusatzfeld15%",PAT15
|
||||
RI.ADD "%Zusatzfeld16%",PAT16
|
||||
RI.ADD "%Zusatzfeld17%",PAT17
|
||||
RI.ADD "%Zusatzfeld18%",PAT18
|
||||
RI.ADD "%Zusatzfeld19%",PAT19
|
||||
RI.ADD "%Zusatzfeld20%",PAT20
|
||||
RI.ADD "%Zusatzfeld21%",PAT21
|
||||
RI.ADD "%Zusatzfeld22%",PAT22
|
||||
RI.ADD "%Zusatzfeld23%",PAT23
|
||||
RI.ADD "%Zusatzfeld24%",PAT24
|
||||
RI.ADD "%Zusatzfeld25%",PAT25
|
||||
RI.ADD "%Zusatzfeld26%",PAT26
|
||||
RI.ADD "%Zusatzfeld27%",PAT27
|
||||
RI.ADD "%Zusatzfeld28%",PAT28
|
||||
RI.ADD "%Zusatzfeld29%",PAT29
|
||||
RI.ADD "%Zusatzfeld30%",PAT30
|
||||
|
||||
RI.ADD "%DAY%",(day(date))
|
||||
RI.ADD "%DAYNAME%",(WeekdayName(weekday(now())))
|
||||
RI.ADD "%MONTH%",(month(date))
|
||||
RI.ADD "%MONTHNAME%",MonthName((month(date)))
|
||||
RI.ADD "%YEAR%",(Year(date))
|
||||
|
||||
'Get doc profile
|
||||
IF ((Mid(DocFinalAmount,1,1))="-") and (InvoiceForCorrection<>Empty) THEN
|
||||
PROFILE_SQL_AUTO = PROFILE_SQL_AUTO&" AND [u007] like '%NegativAmount%' AND [u008] like '%Correction%'"
|
||||
Elseif ((Mid(DocFinalAmount,1,1))="-") THEN
|
||||
PROFILE_SQL_AUTO = PROFILE_SQL_AUTO&" AND [u007] like '%NegativAmount%'"
|
||||
Else
|
||||
PROFILE_SQL_AUTO = PROFILE_SQL_AUTO&" AND [u007] IS NULL AND [u008] IS NULL"
|
||||
END IF
|
||||
|
||||
'Override the logic here, by setting the CONFIG_GUID Var with a value higher then 0 (for not FAKT docs).
|
||||
IF (CONFIG_GUID>0) Then
|
||||
SET PROFILE_RESULT=CWLStart.CurrentCompany.SearchRecord(PROFILE_TB,PROFILE_SQL_MAN)
|
||||
Else
|
||||
SET PROFILE_RESULT=CWLStart.CurrentCompany.SearchRecord(PROFILE_TB,PROFILE_SQL_AUTO)
|
||||
End IF
|
||||
|
||||
IF (Err.Number<>0) THEN
|
||||
MSGBOX "Error Code: "& Err.Number & vbCrLf & _
|
||||
"Error Description: "& Err.Description,,"ERROR: Getting Variables from DB Table "&PROFILE
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF (PROFILE_RESULT=-1) Then
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "No Rows found, SQL: "&vbCrLf& PROFILE_SQL_AUTO,,DEBUG_TITLE&" Profiles from Database table "&PROFILE
|
||||
END IF
|
||||
|
||||
ELSEIF (PROFILE_RESULT.RowCount>1) Then
|
||||
IF (WinLineCurrentUser<>WebServiceUser) Then
|
||||
msgbox "Achtung, das Export-Profil konnte nicht eindeutig identifiziert werden!"&vbCrLf&_
|
||||
"Das erste passende wird nun verwendet!",,"Bitte den Administrator informieren!"
|
||||
End if
|
||||
Else
|
||||
|
||||
EWLD_GUID =cint(PROFILE_RESULT.Value(0))
|
||||
EWLD_DESCRIPTION =Trim(cstr(PROFILE_RESULT.Value(2)))
|
||||
'14 to 23 -> WILL BE USED LATER!
|
||||
EWLD_PATH =Trim(cstr(PROFILE_RESULT.Value(24)))
|
||||
EWLD_FILENAME =Trim(cstr(PROFILE_RESULT.Value(25)))
|
||||
EWLD_FILENAME_PREVIEW =Trim(cstr(PROFILE_RESULT.Value(26)))
|
||||
EWLD_FILEEXT =cint(PROFILE_RESULT.Value(27))
|
||||
EWLD_VERSIONING =cint(PROFILE_RESULT.Value(28))
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "GUID: "&EWLD_GUID&vbCrLf&_
|
||||
"Description: "&EWLD_DESCRIPTION,,DEBUG_TITLE&" document profile from Database table "&PROFILE
|
||||
END IF
|
||||
|
||||
'Get variables from table
|
||||
SET CONFIG_RESULT=CWLStart.CurrentCompany.SearchRecord(CONFIG_TB,CONFIG_SQL)
|
||||
|
||||
IF (Err.Number<>0) THEN
|
||||
MSGBOX "Error Code: "&Err.Number&vbCrLf&_
|
||||
"Error Description: "&Err.Description,,"ERROR: Variables from Database table "&CONFIG_SQL&" !"
|
||||
Err.Clear
|
||||
ELSE
|
||||
|
||||
IF (CONFIG_RESULT=-1) Then
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "No Rows found, SQL: "&CONFIG_SQL,,DEBUG_TITLE&" Variables from Database table "&CONFIG_TB
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
||||
FOR LoopCounter=1 TO CONFIG_RESULT.RowCount
|
||||
|
||||
EWLD_CONFIG_NAME=CONFIG_RESULT.Value(5)
|
||||
EWLD_CONFIG_TYPE=CONFIG_RESULT.Value(6)
|
||||
EWLD_CONFIG_TEXT=CONFIG_RESULT.Value(7)
|
||||
EWLD_CONFIG_INT =CONFIG_RESULT.Value(8)
|
||||
EWLD_CONFIG_DBL =CONFIG_RESULT.Value(9)
|
||||
EWLD_CONFIG_DATE=CONFIG_RESULT.Value(10)
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "Name: " & EWLD_CONFIG_NAME &vbCrLf&_
|
||||
"Type: " & EWLD_CONFIG_TYPE &vbCrLf&vbCrLf&_
|
||||
"Text Value: " & EWLD_CONFIG_TEXT &vbCrLf&_
|
||||
"Integer Value: " & EWLD_CONFIG_INT &vbCrLf&_
|
||||
"Double Value: " & EWLD_CONFIG_DBL &vbCrLf&_
|
||||
"Date Value: " & EWLD_CONFIG_DATE,,DEBUG_TITLE&" - "& LoopCounter &" of "& CONFIG_RESULT.RowCount &" Variables from DB table "& CONFIG_TB
|
||||
END IF
|
||||
|
||||
IF TRIM(((EWLD_CONFIG_TYPE))="TEXT") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_TEXT
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="INTEGER") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_INT
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="DOUBLE") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_DBL
|
||||
ElseIf TRIM(((EWLD_CONFIG_TYPE))="DATE") Then
|
||||
RI.ADD EWLD_CONFIG_NAME,EWLD_CONFIG_DATE
|
||||
End if
|
||||
|
||||
CONFIG_RESULT.NextRecord
|
||||
|
||||
NEXT
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_PATH<>"") THEN
|
||||
|
||||
RIKeys = RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_PATH,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_PATH=Replace(EWLD_PATH,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_PATH_TEMP1=Mid(EWLD_PATH,1,2)
|
||||
EWLD_PATH_TEMP2=Mid(EWLD_PATH,3)
|
||||
EWLD_PATH_TEMP2=Replace(EWLD_PATH_TEMP2,"\\","\")
|
||||
RegExpObject.Pattern=RegExpValidFilepath
|
||||
EWLD_PATH=EWLD_PATH_TEMP1&RegExpObject.Replace(EWLD_PATH_TEMP2,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_PATH%",EWLD_PATH
|
||||
|
||||
EWLD_PATH=Replace(EWLD_PATH,vbCr,"")
|
||||
EWLD_PATH=Replace(EWLD_PATH,vbLf,"")
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "EWLD_PATH: "&vbCrLf& EWLD_PATH&vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_PATH AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_FILENAME<>"") THEN
|
||||
|
||||
RIKeys=RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_FILENAME,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_FILENAME_TEMP=EWLD_FILENAME
|
||||
RegExpObject.Pattern=RegExpValidFilename
|
||||
EWLD_FILENAME=RegExpObject.Replace(EWLD_FILENAME_TEMP,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_FILENAME%",EWLD_FILENAME
|
||||
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbCr,"")
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbLf,"")
|
||||
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MSGBOX "EWLD_FILENAME: "&vbCrLf& EWLD_FILENAME&vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_FILENAME AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
'Replace PlaceHolder and ...
|
||||
IF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
|
||||
RIKeys=RI.keys
|
||||
For LoopCounter=0 To RI.Count -1
|
||||
|
||||
IF InStr(EWLD_FILENAME_PREVIEW,RIKeys(LoopCounter))>0 Then
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,RIKeys(LoopCounter),RI(RIKeys(LoopCounter)))
|
||||
END IF
|
||||
|
||||
Next
|
||||
|
||||
'... invalid Characters
|
||||
EWLD_FILENAME_PREVIEW_TEMP=EWLD_FILENAME_PREVIEW
|
||||
RegExpObject.Pattern=RegExpValidFilename
|
||||
EWLD_FILENAME_PREVIEW=RegExpObject.Replace(EWLD_FILENAME_PREVIEW_TEMP,ReplaceSpecialChar)
|
||||
|
||||
RI.ADD "%EWLD_FILENAME_PREVIEW%",EWLD_FILENAME_PREVIEW
|
||||
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,vbCr,"")
|
||||
EWLD_FILENAME_PREVIEW=Replace(EWLD_FILENAME_PREVIEW,vbLf,"")
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX "EWLD_FILENAME_PREVIEW: "&vbCrLf& EWLD_FILENAME_PREVIEW &vbCrLf&vbCrLf&_
|
||||
"RI includes "& RI.count &" Items.",,DEBUG_TITLE&" - EWLD_FILENAME_PREVIEW Variable AFTER replace routine"
|
||||
END IF
|
||||
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'#main part#
|
||||
IF ((EWLD_PATH<>"") AND (EWLD_FILENAME<>"") AND (EWLD_FILEEXT<>"") and ((ExportType=2) or (ExportType=3) or(ExportType=4) or (ExportType=5))) THEN
|
||||
|
||||
'Check if destination structure exists. If not, try to create.
|
||||
IF NOT FileSystemObject.FolderExists(EWLD_PATH) THEN
|
||||
|
||||
strDir=FileSystemObject.GetAbsolutePathName(EWLD_PATH)
|
||||
arrDirs=Split( strDir, "\" )
|
||||
|
||||
If Left( strDir, 2 ) = "\\" THEN
|
||||
strDirBuild = "\\" & arrDirs(2) & "\" & arrDirs(3) & "\"
|
||||
idxFirst = 4
|
||||
Else
|
||||
strDirBuild = arrDirs(0) & "\"
|
||||
idxFirst = 1
|
||||
End If
|
||||
|
||||
For idx = idxFirst to Ubound( arrDirs )
|
||||
|
||||
strDirBuild = FileSystemObject.BuildPath( strDirBuild, arrDirs(idx) )
|
||||
If Not FileSystemObject.FolderExists( strDirBuild ) THEN
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX strDirBuild,,DEBUG_TITLE&" CreateFolder: Level " & idx & " of " & Ubound( arrDirs )
|
||||
END IF
|
||||
|
||||
FileSystemObject.CreateFolder strDirBuild
|
||||
|
||||
End if
|
||||
Next
|
||||
|
||||
END IF
|
||||
|
||||
'Code block to resolve the file extension, fallback is pdf
|
||||
IF (EWLD_FILEEXT<7) Then
|
||||
Select Case EWLD_FILEEXT
|
||||
Case 0
|
||||
EWLD_FILEEXT_NAME="spl"
|
||||
Case 1
|
||||
EWLD_FILEEXT_NAME="mht"
|
||||
Case 4
|
||||
EWLD_FILEEXT_NAME="spl"
|
||||
Case 5
|
||||
EWLD_FILEEXT_NAME="pdf"
|
||||
Case 6
|
||||
EWLD_FILEEXT_NAME="rtf"
|
||||
Case ELSE
|
||||
EWLD_FILEEXT= 5
|
||||
EWLD_FILEEXT_NAME="pdf"
|
||||
End Select
|
||||
Else
|
||||
EWLD_FILEEXT=5
|
||||
EWLD_FILEEXT_NAME="pdf"
|
||||
End if
|
||||
|
||||
'If EWLD_PATH exists, export file - including version tagging.
|
||||
IF ((FileSystemObject.FolderExists(EWLD_PATH)) AND (EWLD_FILENAME<>"") AND (EWLD_FILEEXT<>"")) THEN
|
||||
EWLD_FULLFILENAME=EWLD_PATH&"\"&EWLD_FILENAME&"."&EWLD_FILEEXT_NAME
|
||||
|
||||
EWLD_FULLFILENAME=Replace(EWLD_FULLFILENAME,vbCr,"")
|
||||
EWLD_FULLFILENAME=Replace(EWLD_FULLFILENAME,vbLf,"")
|
||||
|
||||
IF (EWLD_VERSIONING= 9) or ((EWLD_VERSIONING<>0) and (EWLD_VERSIONING<>1) and (EWLD_VERSIONING<>2) and (EWLD_VERSIONING<>9)) THEN
|
||||
|
||||
'Reset Var to WinLine known value
|
||||
EWLD_VERSIONING=1
|
||||
|
||||
IF (FileSystemObject.FileExists(EWLD_FULLFILENAME)) THEN
|
||||
|
||||
EWLD_FILENAME_ORIGINAL=EWLD_FILENAME
|
||||
|
||||
DO
|
||||
DocVersion=DocVersion+1
|
||||
|
||||
EWLD_FILENAME=EWLD_FILENAME_ORIGINAL
|
||||
EWLD_FILENAME=EWLD_FILENAME & DocVersionSeparator & DocVersion
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbCr,"")
|
||||
EWLD_FILENAME=Replace(EWLD_FILENAME,vbLf,"")
|
||||
|
||||
EWLD_FULLFILENAME=EWLD_PATH & EWLD_FILENAME & "." & EWLD_FILEEXT_NAME
|
||||
|
||||
EWLD_FULLFILENAME_TEMP1=Mid(EWLD_FULLFILENAME,1,2)
|
||||
EWLD_FULLFILENAME_TEMP2=Mid(EWLD_FULLFILENAME,3)
|
||||
EWLD_FULLFILENAME_TEMP2=Replace(EWLD_FULLFILENAME_TEMP2,"\\","\")
|
||||
EWLD_FULLFILENAME=EWLD_FULLFILENAME_TEMP1 & EWLD_FULLFILENAME_TEMP2
|
||||
|
||||
EWLD_FULLFILENAME=Replace(EWLD_FULLFILENAME,vbCr,"")
|
||||
EWLD_FULLFILENAME=Replace(EWLD_FULLFILENAME,vbLf,"")
|
||||
|
||||
LOOP UNTIL (FileSystemObject.FileExists(EWLD_FULLFILENAME) = False)
|
||||
|
||||
RI.Remove("%EWLD_FILENAME%")
|
||||
RI.ADD "%EWLD_FILENAME%",EWLD_FILENAME& "." &EWLD_FILEEXT_NAME
|
||||
RI.ADD "%EWLD_FULLFILENAME%",EWLD_FULLFILENAME
|
||||
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
IF (DebugMode = "Enabled") THEN
|
||||
MSGBOX "FINAL EWLD_FULLFILENAME: "&vbCrLf&EWLD_FULLFILENAME&vbCrLf&vbCrLf&_
|
||||
"FINAL EWLD_FILEEXT: "&vbCrLf&EWLD_FILEEXT&vbCrLf&vbCrLf&_
|
||||
"FINAL EWLD_VERSIONING: "&vbCrLf&EWLD_VERSIONING&vbCrLf&vbCrLf&_
|
||||
"RI includes "&RI.count&" Items.",,DEBUG_TITLE&" Final document settings"
|
||||
END IF
|
||||
|
||||
IF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
Formtitle=EWLD_FILENAME_PREVIEW
|
||||
|
||||
END IF
|
||||
|
||||
'In preview, ExportOutput will not be executed!
|
||||
ExportOutput EWLD_FULLFILENAME, EWLD_FILEEXT, EWLD_VERSIONING
|
||||
ExportDone="export_ready"
|
||||
|
||||
END IF
|
||||
|
||||
ELSEIF (EWLD_FILENAME_PREVIEW<>"") THEN
|
||||
IF (DebugMode="Enabled") THEN
|
||||
MsgBox "Only Preview Filename has been set!"&vbCrLf&vbCrLf&_
|
||||
EWLD_FILENAME_PREVIEW,,DEBUG_TITLE
|
||||
End if
|
||||
|
||||
Formtitle=EWLD_FILENAME_PREVIEW
|
||||
ExportDone="export_ready"
|
||||
|
||||
END IF
|
||||
|
||||
'Call Macros
|
||||
IF ((ExportType=2) or (ExportType=3) or (ExportType=4) or (ExportType=5)) Then
|
||||
|
||||
For LoopCounter = 14 To 23
|
||||
|
||||
CALL_MAKRO_PRE_EXPORT=PROFILE_RESULT.Value(LoopCounter)
|
||||
|
||||
IF (CALL_MAKRO_PRE_EXPORT<>"") and (CALL_MAKRO_PRE_EXPORT<>LTRIM(RTRIM("<KEIN MAKRO>"))) Then
|
||||
|
||||
DIM MPs(33)
|
||||
|
||||
MPs(0)=DebugMode
|
||||
MPs(1)=ExportDone
|
||||
MPs(2)=MandatorNr
|
||||
MPs(3)=EWLD_GUID
|
||||
MPs(4)=EWLD_DESCRIPTION
|
||||
MPs(5)=EWLD_PATH
|
||||
MPs(6)=EWLD_FILENAME
|
||||
MPs(7)=EWLD_FILEEXT_NAME
|
||||
MPs(8)=EWLD_FULLFILENAME
|
||||
MPs(9)=AccountNr
|
||||
MPs(10)=AccountName
|
||||
MPs(11)=RunningNr
|
||||
MPs(12)=DocNr
|
||||
MPs(13)=DocDate
|
||||
MPs(14)=ProjectNr
|
||||
MPs(15)=ProgramDocType
|
||||
MPs(16)=PostingType
|
||||
MPs(17)=DocType
|
||||
MPs(18)=WinLineCurrentUser
|
||||
MPs(19)=DocVersion
|
||||
MPs(20)=DocComment
|
||||
MPs(21)=DocCreationDate
|
||||
MPs(22)=DocChangedDate
|
||||
MPs(23)=Addition1
|
||||
MPs(24)=Addition2
|
||||
MPs(25)=Addition3
|
||||
MPs(26)=Addition4
|
||||
MPs(27)=Addition5
|
||||
MPs(28)=Addition6
|
||||
MPs(29)=Addition7
|
||||
MPs(30)=Addition8
|
||||
MPs(31)=Addition9
|
||||
MPs(32)=Addition10
|
||||
|
||||
pParams = MPs
|
||||
CWLStart.MacroCommands.MRunMacro CALL_MAKRO_PRE_EXPORT, pParams
|
||||
CWLStart.MacroCommands.MWait 500
|
||||
|
||||
End if
|
||||
Next
|
||||
End if
|
||||
|
||||
'Show Error
|
||||
IF ((ExportDone<>"export_ready") and ((ExportType=2) or (ExportType=3) or(ExportType=4) or (ExportType=5)) and (WinLineCurrentUser<>WebServiceUser) and (EWLD_GUID>0)) Then
|
||||
msgbox "Es ist ein Fehler aufgetreten!"&vbCrLf&vbCrLf&_
|
||||
EWLD_PATH&"\"&EWLD_FILENAME&vbCrLf&_
|
||||
EWLD_FILEEXT&" | "&EWLD_VERSIONING,vbInformation,"ACHTUNG: Export wird abgebrochen!"
|
||||
End if
|
||||
|
||||
ResultValue = ""
|
||||
@@ -0,0 +1,36 @@
|
||||
Version 3.1.1.0 - 13.07.2022
|
||||
NEW: - Add %BELEGDATUM% Placeholder, only for WRITE-EXPORT_DOC_DATA_TO_DB
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.1.0.4 - 14.10.2021
|
||||
NEW: -
|
||||
FIX: - Fix Error in path creation function (PDFE)
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.1.0.0 - 09.10.2021
|
||||
NEW: - Added Additional Fields (Personenkonten Zusatzfelder)
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 3.0.0.0 - 16.07.2021 (30.08.2021, 09.10.2021) - Erste Version des Relaunchs
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------legend------------------------------------
|
||||
NEW: = Added a new functionality
|
||||
FIX: = Fixed a Issue with existing functionality
|
||||
CHG: = Changed a existing functionality
|
||||
REM: = Removed a functionality
|
||||
-------------------------------------------------------------------------------
|
||||