14.08.2019

This commit is contained in:
2019-08-14 08:59:04 +02:00
parent d98d9950c3
commit 19cc980474
15 changed files with 1502 additions and 344 deletions

View File

@@ -301,7 +301,7 @@ Public Class frmFormulare
End Sub
Sub addForm(valueTMP As String, Optional param() As Object = Nothing)
Public Sub addForm(valueTMP As String, Optional param() As Object = Nothing)
Try
Select Case valueTMP
Case FormularManagerArten.DE_Vollmacht
@@ -551,6 +551,15 @@ Public Class frmFormulare
AddHandler c.MOVE_UP, AddressOf ControlMoveUp
AddHandler c.MOVE_DOWN, AddressOf ControlMoveDown
MyFlowLayoutPanel1.Controls.Add(c)
Case FormularManagerArten.VerzollungsunterlagenBAR
' If param Is Nothing Then Exit Sub
Dim c As New usrcntlVerzollungsunterlagen_BAR()
c.Width = MyFlowLayoutPanel1.Width - 6
c.KdNR = KdNr
AddHandler c.DELETE, AddressOf ControlDELETE
AddHandler c.MOVE_UP, AddressOf ControlMoveUp
AddHandler c.MOVE_DOWN, AddressOf ControlMoveDown
MyFlowLayoutPanel1.Controls.Add(c)
Case FormularManagerArten.AT_InformationsblattFiskalverzollung, FormularManagerArten.DE_InformationsblattFiskalverzollung
Dim displayName = ""
' If param Is Nothing Then Exit Sub
@@ -707,6 +716,13 @@ Public Class frmFormulare
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click, btn.Click, btnPrint.Click
Me.Cursor = Cursors.WaitCursor
Dim MailHTMLText = ""
Dim Mail_To = ""
Dim Mail_CC = ""
Dim Mail_Subject = ""
Try
'VALIDIERUNG:
@@ -728,13 +744,13 @@ Public Class frmFormulare
If isSingleForm And sender Is btnPrint Then 'Sofortdruck --> wir bei ActiveRepots benötigt --> schneller, als zuerst pdf....
If Not MyFlowLayoutPanel1.Controls.Count = 1 Then Me.Cursor = Cursors.Default : Exit Sub 'funkt. nur bei genau 1 Control
FormularManagerNEU.genPDF(MyFlowLayoutPanel1.Controls(0), , True, cboPrinter.SelectedItem.ToString)
FormularManagerNEU.genPDF(MyFlowLayoutPanel1.Controls(0), , True, cboPrinter.SelectedItem.ToString,, MailHTMLText, Mail_To, Mail_CC, Mail_Subject)
Else
Dim list As New List(Of String) ' Sammlung PDFs
For Each c In MyFlowLayoutPanel1.Controls
Dim pfadList As List(Of String) = FormularManagerNEU.genPDF(c)
Dim pfadList As List(Of String) = FormularManagerNEU.genPDF(c,,,,, MailHTMLText, Mail_To, Mail_CC, Mail_Subject)
For Each pfad In pfadList
If pfad <> "" Then list.Add(pfad)
Next
@@ -819,7 +835,7 @@ Public Class frmFormulare
' MailMessage.From = New MailAddress("someone@yourdomain.com")
MailMessage.Subject = "" ' "Your subject here"
MailMessage.IsBodyHtml = True
MailMessage.Body = "" '"<span style='font-size: 12pt; color: red;'>My HTML formatted body</span>"
MailMessage.Body = MailHTMLText '"<span style='font-size: 12pt; color: red;'>My HTML formatted body</span>"
MailMessage.Attachments.Add(New Attachment(dest_path))
@@ -854,6 +870,10 @@ Public Class frmFormulare
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
Mail = outl.CreateItem(0)
If MailHTMLText <> "" Then Mail.HTMLBody = MailHTMLText
If Mail_To <> "" Then Mail.To = Mail_To
If Mail_CC <> "" Then Mail.CC = Mail_CC
If Mail_Subject <> "" Then Mail.Subject = Mail_Subject
Mail.Attachments.Add(dest_path, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, , "VERAG_Formular.pdf")
@@ -1035,7 +1055,7 @@ End Class
Public Class FormularManagerNEU
Shared VSQL As New VERAG_PROG_ALLGEMEIN.SQL
Shared Function genPDF(c As Control, Optional open As Boolean = False, Optional printReportElsePdf As Boolean = False, Optional printerName As String = "", Optional openWord As Boolean = False) As List(Of String)
Shared Function genPDF(c As Control, Optional open As Boolean = False, Optional printReportElsePdf As Boolean = False, Optional printerName As String = "", Optional openWord As Boolean = False, Optional ByRef MailHTMLText As String = "", Optional ByRef Mail_To As String = "", Optional ByRef Mail_CC As String = "", Optional ByRef Mail_Subject As String = "") As List(Of String)
Dim retStr = ""
Dim striList As New List(Of String)
Select Case c.GetType.ToString
@@ -1081,6 +1101,8 @@ Public Class FormularManagerNEU
retStr = FormularManagerNEU.FiskalInfoschreiben(c)
Case GetType(usrcntlVerzollungsunterlagen).ToString
striList = FormularManagerNEU.Verzollungsunterlagen(c, printReportElsePdf, printerName, openWord)
Case GetType(usrcntlVerzollungsunterlagen_BAR).ToString
striList = FormularManagerNEU.VerzollungsunterlagenBAR(c, MailHTMLText, Mail_To, Mail_CC, Mail_Subject)
Case GetType(usrcntlQS_UeDok).ToString
retStr = FormularManagerNEU.QS_UeDok(c)
@@ -2702,6 +2724,132 @@ Public Class FormularManagerNEU
End Function
Shared Function VerzollungsunterlagenBAR(usrCntl As usrcntlVerzollungsunterlagen_BAR, ByRef MailHTMLText As String, ByRef Mail_To As String, ByRef Mail_CC As String, ByRef Mail_Subject As String) As List(Of String)
Try
MailHTMLText = "<div style=""font-family:Calibri, Arial"">"
If usrCntl.KdNR > 0 Then
Dim FISKAL As New cFiskal_Daten(usrCntl.KdNR)
If FISKAL IsNot Nothing Then Mail_CC = If(FISKAL.fisk_schreibenSB_Mail, "")
Dim AD As New VERAG_PROG_ALLGEMEIN.cAdressen(usrCntl.KdNR)
If AD IsNot Nothing Then Mail_To = If(AD.E_Mail, "")
End If
Select Case usrCntl.cboTEXT._value
Case "AT_FISKAL"
Select Case usrCntl.cboSprache._value
Case "DE", ""
Mail_Subject = "Meldung innergemeinschaftlicher Erwerb"
MailHTMLText &= "<b>!!! DRINGENDE ZOLLSACHE !!!</b><br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Sehr geehrte Damen und Herren,<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "in der Anlage erhalten Sie die Unterlagen zu der Verzollung im Verfahren 4200.<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Bitte melden Sie den Import in Ihrer Steuererklärung (UVA) als <b>""innergemeinschaftlichen Erwerb""</b><br>"
MailHTMLText &= "mit unser <b>Sonder - UID-Nr.: ATU 68374145 an</b>.<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Des Weiteren möchten wir Sie darauf hinweisen, dass eine <b>Intrastat Anmeldung</b> zu machen ist! <br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Die österreichische Zollbehörde verlangt in diesem Verfahren die Vorlegung einer gültigen Empfangsbestätigung. Aufgrund dessen ersuchen wir Sie den CMR/Frachtbrief, welchen der Fahrer bei der Abladung abgibt, zu bestätigen. <br>"
MailHTMLText &= "Wir müssen diesen im Original vorlegen können, deshalb bitten wir Sie, das Dokument per Post an uns abzusenden!<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<b>Bitte:<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "• GUT LESBAR<br>"
MailHTMLText &= "• VERMERK: WAREN ERHALTEN<br>"
MailHTMLText &= "• GENAUES DATUM DER WARENÜBERNAHME<br>"
MailHTMLText &= "• ORIGINAL FIRMENSTEMPEL<br>"
MailHTMLText &= "• ORIGINAL UNTERSCHRIFT</b><br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<b>Post Adresse:</b><br>"
MailHTMLText &= "VERAG CUSTOMS SERVICE GMBH<br>"
MailHTMLText &= "POSTFACH 1013<br>"
MailHTMLText &= "D 94152 NEUHAUS AM INN<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Freundlichen Grüßen<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<br>"
MailHTMLText &= cFakturierung.getSignature("D", 11)
Case "EN"
Mail_Subject = "intra-community acquisition"
MailHTMLText &= "<b>!! URGENT CUSTOMS MATTER !!</b><br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Dear Sir / Madam,<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Please find enclosed the documents regarding the customs clearance (process 4200).<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Please register the import on your tax decleration ( turnover tax advance return ) as <br>"
MailHTMLText &= "<b>""intra-community acquisition""</b> with our <b>special value added tax identification number ATU68374145.</b>"
MailHTMLText &= "<br>"
MailHTMLText &= "Furthermore, we would like to point out that you must fill out an <b>Intrastat decleration!</b> <br>"
MailHTMLText &= "<br>"
MailHTMLText &= "In this procedure, the Austrian customs authority requires the presentation of a valid entry certificate. For this reason, we ask you to confirm the CMR/consignment note which the driver hands out in during unloading. <br>"
MailHTMLText &= "We must be able to present this document in original. Therefore we ask you to send the document to us by post!<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<b>Please ensure the following:<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "• THE DOCUMENT IS FULLY LEGIBLE<br>"
MailHTMLText &= "• YOU NOTE ON THE FORM: GOODS RECEIVED<br>"
MailHTMLText &= "• YOU NOTE THE EXACT DATE OF RECEIPT OF GOODS<br>"
MailHTMLText &= "• YOU PROVIDE AN ORIGINAL COMPANY STAMP<br>"
MailHTMLText &= "• YOU PROVIDE AN ORIGINAL SIGNATURE</b><br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<b>Adress:</b><br>"
MailHTMLText &= "VERAG CUSTOMS SERVICE GMBH<br>"
MailHTMLText &= "POSTFACH 1013<br>"
MailHTMLText &= "D 94152 NEUHAUS AM INN<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Yours faithfully,<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<br>"
MailHTMLText &= cFakturierung.getSignature("EN", 11)
End Select
Case "DE_FISKAL"
Select Case usrCntl.cboSprache._value
Case "EN"
Mail_Subject = "intra-community acquisition"
MailHTMLText &= "<b>!! URGENT CUSTOMS MATTER !!</b><br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Dear Sir / Madam,<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Please find enclosed the documents regarding the customs clearance (process 4200).<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Please register the import on your tax declaration (turnover tax advance return) as ""<b>intra-Community acquisition</b>"" with our <b>special value added tax identification number DE 813667748.</b> <br>"
MailHTMLText &= "<b>""intra-community acquisition""</b> with our <b>special value added tax identification number ATU68374145.</b>"
MailHTMLText &= "<br>"
MailHTMLText &= "Furthermore, we would like to point out that you must fill out an Intrastat declaration!<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "Yours faithfully,<br>"
MailHTMLText &= "<br>"
MailHTMLText &= "<br>"
MailHTMLText &= cFakturierung.getSignature("EN", 99)
End Select
'MailHTMLText &= cFakturierung.getSignature(11)
End Select
MailHTMLText &= "</div>"
'MAIL??
Catch ex As Exception
MessageBox.Show(ex.ToString & ex.StackTrace)
End Try
Return New List(Of String)
End Function
Shared Function Verbundenheit(usrCntl As usrcntlVerbundenheit) As String
Dim fm As New VERAG_PROG_ALLGEMEIN.cFormularManager
@@ -3158,6 +3306,7 @@ Public Class FormularManagerArten
Shared Property DE_InformationsblattFiskalverzollung = "DE_InformationsblattFiskalverzollung"
Shared Property AT_InformationsblattFiskalverzollung = "AT_InformationsblattFiskalverzollung"
Shared Property Verzollungsunterlagen = "Verzollungsunterlagen"
Shared Property VerzollungsunterlagenBAR = "VerzollungsunterlagenBAR"
Shared Property QS_UeDok = "QS_UeDok"
Shared Property SA_Gestellung = "SA_Gestellung"
Shared Property Importaviso = "Importaviso"