div. Änderungen
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function genDatensatzCSV_Stammdaten(ByRef Firma_ID As Integer, Optional OpenFile As Boolean = False, Optional Geschaeftsjahr As Integer = -1) As Boolean ' Optional OpenFile = False, Optional boolKunden = True, Optional boolBuchungen = True ) As Boolean
|
||||
Public Shared Function genDatensatzCSV_Stammdaten(ByRef Firma_ID As Integer, Optional OpenFile As Boolean = False, Optional Geschaeftsjahr As Integer = -1, Optional filepath As String = "") As Boolean ' Optional OpenFile = False, Optional boolKunden = True, Optional boolBuchungen = True ) As Boolean
|
||||
Try
|
||||
|
||||
Dim FIRMA As New VERAG_PROG_ALLGEMEIN.cFirmen(Firma_ID)
|
||||
@@ -147,6 +147,7 @@
|
||||
End If
|
||||
|
||||
updateFibu(filialNr) ' UPDATE FiBuSchnittstelle --> 0
|
||||
filepath = pathKD & DateinameKD
|
||||
Return True
|
||||
End If
|
||||
|
||||
@@ -161,8 +162,10 @@
|
||||
|
||||
|
||||
|
||||
Public Shared Function genDatensatzCSV_ALL(firma As String, Optional OpenFile As Boolean = False, Optional boolKunden As Boolean = True, Optional boolBuchungen As Boolean = True, Optional Geschaeftsjahr As Integer = -1) As Boolean
|
||||
Public Shared Function genDatensatzCSV_ALL(firma As String, Optional OpenFile As Boolean = False, Optional boolKunden As Boolean = True, Optional boolBuchungen As Boolean = True, Optional Geschaeftsjahr As Integer = -1, Optional PathList As List(Of String) = Nothing) As Boolean
|
||||
|
||||
PathList.Clear()
|
||||
Dim Path = ""
|
||||
|
||||
If firma <> "AMBAR" Then
|
||||
MsgBox("Export für Firma" & firma & " nicht aktiviert")
|
||||
@@ -171,20 +174,26 @@
|
||||
|
||||
Dim CSV_ALL = True
|
||||
If boolKunden Then
|
||||
If Not genDatensatzCSV_Stammdaten(24, OpenFile, Geschaeftsjahr) Then
|
||||
If Not genDatensatzCSV_Stammdaten(24, OpenFile, Geschaeftsjahr, Path) Then
|
||||
CSV_ALL = False
|
||||
If Path <> "" Then
|
||||
PathList.Add(Path)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If boolBuchungen Then
|
||||
If Not genDatensatzCSV_Buchungen(24, OpenFile, Geschaeftsjahr) Then
|
||||
If Not genDatensatzCSV_Buchungen(24, OpenFile, Geschaeftsjahr, Path) Then
|
||||
CSV_ALL = False
|
||||
If Path <> "" Then
|
||||
PathList.Add(Path)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Return CSV_ALL
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Shared Function genDatensatzCSV_Buchungen(ByRef Firma_ID As Integer, Optional OpenFile As Boolean = False, Optional Geschaeftsjahr As Integer = -1) As Boolean ' Optional OpenFile = False, Optional boolKunden = True, Optional boolBuchungen = True ) As Boolean
|
||||
Public Shared Function genDatensatzCSV_Buchungen(ByRef Firma_ID As Integer, Optional OpenFile As Boolean = False, Optional Geschaeftsjahr As Integer = -1, Optional ByRef filepath As String = "") As Boolean ' Optional OpenFile = False, Optional boolKunden = True, Optional boolBuchungen = True ) As Boolean
|
||||
Try
|
||||
|
||||
Dim FIRMA As New VERAG_PROG_ALLGEMEIN.cFirmen(Firma_ID)
|
||||
@@ -235,7 +244,7 @@
|
||||
bool_DatenVorhanden = True
|
||||
|
||||
'Update Filename TrdIn
|
||||
SQL.doSQL("update [tblTrdinInvoice] Set TrdinDateiname='" & Now.ToString("ddMMyyyyHHmm") & "' WHERE [Firma_ID] = " & FIRMA.Firma_ID & " AND TrdinDateiname is null ", "FMZOLL")
|
||||
SQL.doSQL("update [tblTrdinInvoice] Set TrdinDateiname='" & Now.ToString("ddMMyyyyHHmm") & "' WHERE [Firma_ID] = " & FIRMA.Firma_ID & " AND TrdinDateiname is null ", "FMZOLL")
|
||||
|
||||
file.Close()
|
||||
|
||||
@@ -250,10 +259,11 @@
|
||||
Else
|
||||
IO.File.Delete(path & Dateiname)
|
||||
End If
|
||||
|
||||
filepath = path & Dateiname
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
Return True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
Reference in New Issue
Block a user