diff --git a/SDL/Fakturierung/frmFaktEmail.vb b/SDL/Fakturierung/frmFaktEmail.vb index 1df58c3a..4a754416 100644 --- a/SDL/Fakturierung/frmFaktEmail.vb +++ b/SDL/Fakturierung/frmFaktEmail.vb @@ -225,6 +225,13 @@ Public Class frmFaktEmail End If End If + 'Parsan + If SPEDBUCH IsNot Nothing Then + If (RECHNUNG.RechnungsKundenNr = 712814) Then + If Not SR Then TextHTMLADD = addRgData_Parsan(RechnungsLandKz) + End If + End If + Dim TextHTML = "" Select Case RechnungsLandKz @@ -500,6 +507,34 @@ Public Class frmFaktEmail ' addRgData_ZF_Passau = RichTextBox.Text.Replace("Mit freundlichen Grüßen", "") + End Function + Function addRgData_Parsan(RechnungsLandKz) As String + addRgData_Parsan = vbNewLine & vbNewLine + Dim ZOLLANMELDUNG As New DAKOSY_Worker.cZollsysteme_Aktenbeschriftung + + Select Case RechnungsLandKz + Case "TR" + ' addRgData_Parsan &= "Sender: " & RECHNUNG.AbsenderName_1 & ", " & If(RECHNUNG.AbsenderOrt, "") & vbNewLine + If ZOLLANMELDUNG.getDataByBezugsnummer(RECHNUNG.FilialenNr & "/" & RECHNUNG.AbfertigungsNr, SPEDBUCH.Abfertigungsart, "", SPEDBUCH.Grenzstelle) Then + addRgData_Parsan &= "Invoice-No.: " & ZOLLANMELDUNG.Handelsrechnung.Replace(", ", "," & vbNewLine) & vbNewLine + addRgData_Parsan &= "Invoice-Total: " & ZOLLANMELDUNG.Rechnungspreis & vbNewLine + End If + Case "A", "AT", "D", "DE", "CH" + ' addRgData_Parsan &= "Absender: " & RECHNUNG.AbsenderName_1 & ", " & If(RECHNUNG.AbsenderOrt, "") & vbNewLine + If ZOLLANMELDUNG.getDataByBezugsnummer(RECHNUNG.FilialenNr & "/" & RECHNUNG.AbfertigungsNr, SPEDBUCH.Abfertigungsart, "", SPEDBUCH.Grenzstelle) Then + addRgData_Parsan &= "Handelsrechnungs-Nr.: " & ZOLLANMELDUNG.Handelsrechnung.Replace(", ", "," & vbNewLine) & vbNewLine + addRgData_Parsan &= "Handelsrechnungs-Betrag: " & ZOLLANMELDUNG.Rechnungspreis & vbNewLine + End If + Case Else + 'addRgData_Parsan &= "Sender: " & RECHNUNG.AbsenderName_1 & ", " & If(RECHNUNG.AbsenderOrt, "") & vbNewLine + If ZOLLANMELDUNG.getDataByBezugsnummer(RECHNUNG.FilialenNr & "/" & RECHNUNG.AbfertigungsNr, SPEDBUCH.Abfertigungsart, "", SPEDBUCH.Grenzstelle) Then + addRgData_Parsan &= "Invoice-No.: " & ZOLLANMELDUNG.Handelsrechnung.Replace(", ", "," & vbNewLine) & vbNewLine + addRgData_Parsan &= "Invoice-Total: " & ZOLLANMELDUNG.Rechnungspreis & vbNewLine + End If + End Select + + + End Function Sub send_StbFAMail(KundenNr, RgAbfNr, RechnungsNr) diff --git a/SDL/SDL.vbproj b/SDL/SDL.vbproj index 32b8a51e..0652e838 100644 --- a/SDL/SDL.vbproj +++ b/SDL/SDL.vbproj @@ -90,7 +90,7 @@ false - Test.pfx + SDL_TemporaryKey.pfx diff --git a/SDL/ZOLLSYSTEM/DAKOSY/frmZollanmeldung.vb b/SDL/ZOLLSYSTEM/DAKOSY/frmZollanmeldung.vb index 9314f7ae..2af74245 100644 --- a/SDL/ZOLLSYSTEM/DAKOSY/frmZollanmeldung.vb +++ b/SDL/ZOLLSYSTEM/DAKOSY/frmZollanmeldung.vb @@ -78,7 +78,7 @@ FIRMA_DY = "AMBAR" ElseIf FilialenNr = 5601 Then FIRMA_DY = "UNISPED" - ElseIf FilialenNr = 4801 Then + ElseIf FilialenNr = 4801 Or FilialenNr = 4802 Then FIRMA_DY = "ATILLA" Else If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then @@ -94,6 +94,8 @@ Me.Close() End If End If + Else + FIRMA_DY = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(FilialenNr) End If End If diff --git a/VERAG_PROG_ALLGEMEIN/Classes/_BASE.vb b/VERAG_PROG_ALLGEMEIN/Classes/_BASE.vb index 7154c46d..921028c5 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/_BASE.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/_BASE.vb @@ -62,7 +62,7 @@ Public Class _BASE End Using End Using Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try End Sub @@ -82,7 +82,7 @@ Public Class _BASE Return (" UPDATE [tblTABLE] SET " & str & " WHERE _BASE_id=@_BASE_id ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function @@ -103,7 +103,7 @@ Public Class _BASE values = values.Substring(0, values.Length - 1) 'wg. ',' Return (" INSERT INTO tblTABLE (" & str & ") VALUES(" & values & ") ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cNCTS_TR.vb b/VERAG_PROG_ALLGEMEIN/Classes/cNCTS_TR.vb index 43a914e1..032e0b3a 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cNCTS_TR.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cNCTS_TR.vb @@ -1041,7 +1041,7 @@ Public Class cNCTS_TR_Sicherheitsangaben values = values.Substring(0, values.Length - 1) 'wg. ',' Return (" INSERT INTO tblNCTS_TR_Sicherheitsangaben (" & str & ") VALUES(" & values & ") ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb b/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb index 8fb1b2c3..8936bbf6 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cUIDPruefung.vb @@ -155,7 +155,7 @@ Public Class cUIDPruefung Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Case "AMBAR" : where = " And Filialen.FilialenNr IN (5701)" Case "IMEX" : where = " And Filialen.FilialenNr IN (5501)" - Case "ATILLA" : where = " And Filialen.FilialenNr IN (4801)" + Case "ATILLA" : where = " And Filialen.FilialenNr IN (4801 )" Case "UNISPED" : where = " AND Filialen.firma='UNISPED' " Case Else : where = " AND Filialen.firma='VERAG' " '" And isnull(FilialenNr,'') Not IN (5501,5701)" End Select diff --git a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/VERAG_OUT_ATEZ_IN/cATEZ_NCTS_IN.vb b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/VERAG_OUT_ATEZ_IN/cATEZ_NCTS_IN.vb index ff239430..630da711 100644 --- a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/VERAG_OUT_ATEZ_IN/cATEZ_NCTS_IN.vb +++ b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/VERAG_OUT_ATEZ_IN/cATEZ_NCTS_IN.vb @@ -39,7 +39,7 @@ Public Class cATEZ_NCTS_DATA Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL - Dim hasEntry As Boolean + Public hasEntry As Boolean Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) @@ -118,7 +118,7 @@ Public Class cATEZ_NCTS_DATA Return (" UPDATE [tblATEZ_NCTS] SET " & str & " WHERE Id=@Id ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function @@ -139,7 +139,7 @@ Public Class cATEZ_NCTS_DATA values = values.Substring(0, values.Length - 1) 'wg. ',' Return (" INSERT INTO tblATEZ_NCTS (" & str & ") VALUES(" & values & ") ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function @@ -170,10 +170,45 @@ Public Class cATEZ_NCTS_DATA End Using End Using Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try End Sub + + Public Shared Function LOAD_ByBezugsNr(VERAG_LRN) As cATEZ_NCTS_DATA + Try + Dim ATEZ As New cATEZ_NCTS_DATA + ATEZ.hasEntry = False + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblATEZ_NCTS WHERE VERAG_LRN=@VERAG_LRN ", conn) + cmd.Parameters.AddWithValue("@VERAG_LRN", VERAG_LRN) + Dim dr = cmd.ExecuteReader() + + If dr.Read Then + For Each li In ATEZ.getParameterList() + Dim propInfo As PropertyInfo = ATEZ.GetType.GetProperty(li.Scalarvariable) + + If dr.Item(li.Text) Is DBNull.Value Then + propInfo.SetValue(ATEZ, Nothing) + Else + propInfo.SetValue(ATEZ, dr.Item(li.Text)) + End If + + Next + ATEZ.hasEntry = True + + End If + dr.Close() + End Using + End Using + Return ATEZ + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + Return Nothing + End Function + End Class @@ -237,7 +272,7 @@ Public Class cATEZ_NCTS_TransitCustomsOffice Return (" UPDATE [tblATEZ_NCTS_TransitCustomsOffice] SET " & str & " WHERE Id=@Id ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function @@ -258,7 +293,7 @@ Public Class cATEZ_NCTS_TransitCustomsOffice values = values.Substring(0, values.Length - 1) 'wg. ',' Return (" INSERT INTO tblATEZ_NCTS_TransitCustomsOffice (" & str & ") VALUES(" & values & ") ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function @@ -288,7 +323,7 @@ Public Class cATEZ_NCTS_TransitCustomsOffice End Using End Using Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try End Sub @@ -363,7 +398,7 @@ Public Class cATEZ_NCTS_Routen Return (" UPDATE [tblATEZ_NCTS_Routen] SET " & str & " WHERE Id=@Id ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function @@ -384,7 +419,7 @@ Public Class cATEZ_NCTS_Routen values = values.Substring(0, values.Length - 1) 'wg. ',' Return (" INSERT INTO tblATEZ_NCTS_Routen (" & str & ") VALUES(" & values & ") ") Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try Return "" End Function @@ -414,7 +449,7 @@ Public Class cATEZ_NCTS_Routen End Using End Using Catch ex As Exception - MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End Try End Sub