Sendungsdetails, formualre,
This commit is contained in:
@@ -1135,6 +1135,8 @@ Public Class frmFormulare
|
|||||||
|
|
||||||
|
|
||||||
Dim listMail As New List(Of FormMangagerEmail)
|
Dim listMail As New List(Of FormMangagerEmail)
|
||||||
|
Dim listofFormulare As New List(Of String)
|
||||||
|
Dim attachmentName As String = ""
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
@@ -1143,7 +1145,7 @@ Public Class frmFormulare
|
|||||||
Dim hassValidErr = False
|
Dim hassValidErr = False
|
||||||
For Each c In MyFlowLayoutPanel1.Controls
|
For Each c In MyFlowLayoutPanel1.Controls
|
||||||
Dim err = ""
|
Dim err = ""
|
||||||
If Not FormularManagerNEU.validFormulare(c, err) Then
|
If Not FormularManagerNEU.validFormulare(c, err, listofFormulare) Then
|
||||||
txtErr.Text &= err
|
txtErr.Text &= err
|
||||||
hassValidErr = True
|
hassValidErr = True
|
||||||
End If
|
End If
|
||||||
@@ -1154,6 +1156,11 @@ Public Class frmFormulare
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
attachmentName = createAttachmentName(listofFormulare, KdNr)
|
||||||
|
|
||||||
|
If attachmentName = "" Then
|
||||||
|
attachmentName = "_Formular"
|
||||||
|
End If
|
||||||
|
|
||||||
If isSingleForm And sender Is btnPrint Then 'Sofortdruck --> wir bei ActiveRepots benötigt --> schneller, als zuerst pdf....
|
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
|
If Not MyFlowLayoutPanel1.Controls.Count = 1 Then Me.Cursor = Cursors.Default : Exit Sub 'funkt. nur bei genau 1 Control
|
||||||
@@ -1162,229 +1169,138 @@ Public Class frmFormulare
|
|||||||
|
|
||||||
Dim list As New List(Of String) ' Sammlung PDFs
|
Dim list As New List(Of String) ' Sammlung PDFs
|
||||||
|
|
||||||
|
|
||||||
For Each c In MyFlowLayoutPanel1.Controls
|
For Each c In MyFlowLayoutPanel1.Controls
|
||||||
Dim pfadList As List(Of String) = FormularManagerNEU.genPDF(c,,,,, listMail)
|
Dim pfadList As List(Of String) = FormularManagerNEU.genPDF(c,,,,, listMail)
|
||||||
For Each pfad In pfadList
|
For Each pfad In pfadList
|
||||||
If pfad <> "" Then list.Add(pfad)
|
If pfad <> "" Then list.Add(pfad)
|
||||||
|
Next
|
||||||
Next
|
Next
|
||||||
Next
|
|
||||||
|
|
||||||
|
|
||||||
Dim dest_path = ""
|
Dim dest_path = ""
|
||||||
If list.Count = 0 Then Me.Cursor = Cursors.Default : Exit Sub
|
If list.Count = 0 Then Me.Cursor = Cursors.Default : Exit Sub
|
||||||
|
|
||||||
If list.Count = 1 Then
|
If list.Count = 1 Then
|
||||||
dest_path = list(0)
|
dest_path = list(0)
|
||||||
Else
|
Else
|
||||||
dest_path = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "_Formular.pdf", ".pdf", False, False)
|
dest_path = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & attachmentName & ".pdf", ".pdf", False, False)
|
||||||
If Not FormularManagerNEU.MergePdfFiles(list, dest_path) Then
|
If Not FormularManagerNEU.MergePdfFiles(list, dest_path) Then
|
||||||
dest_path = "" : MsgBox("Fehler PDF")
|
dest_path = "" : MsgBox("Fehler PDF")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If dest_path <> "" Then
|
If dest_path <> "" Then
|
||||||
If sender Is Button2 Then
|
If sender Is Button2 Then
|
||||||
Process.Start(dest_path)
|
Process.Start(dest_path)
|
||||||
ElseIf sender Is btn Then
|
ElseIf sender Is btn Then
|
||||||
'System.Diagnostics.Process.Start("mailto:" & "" & "?subject=" & "?" & "&body=" & "?" & "&attachment=" & dest_path)
|
'System.Diagnostics.Process.Start("mailto:" & "" & "?subject=" & "?" & "&body=" & "?" & "&attachment=" & dest_path)
|
||||||
Try
|
Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Dim Mail As New MailMessage
|
|
||||||
|
|
||||||
'Try
|
|
||||||
' Dim SMTP As New SmtpClient("smtp.gmail.com")
|
|
||||||
' SMTP.EnableSsl = True
|
|
||||||
' SMTP.Credentials = New System.Net.NetworkCredential("[your gmail address@gmail.com]", "[the associated password]")
|
|
||||||
' SMTP.Port = 587
|
|
||||||
|
|
||||||
' Mail.From = New MailAddress("""[Friendly Name]"" <[your gmail address@gmail.com>")
|
|
||||||
|
|
||||||
|
|
||||||
' Mail.Subject = ""
|
|
||||||
' Mail.Body = ""
|
|
||||||
' If dest_path <> "" Then Mail.Attachments.Add(New Mail.Attachment(dest_path))
|
|
||||||
' Mail.IsBodyHtml = True
|
|
||||||
|
|
||||||
' ' SMTP.Send(Mail)
|
|
||||||
|
|
||||||
' 'Clear Mail Object
|
|
||||||
' Mail.Dispose()
|
|
||||||
|
|
||||||
' 'Function Return
|
|
||||||
' Return True
|
|
||||||
|
|
||||||
'Catch ex As Exception
|
|
||||||
|
|
||||||
' 'Function Return
|
|
||||||
' Return False
|
|
||||||
|
|
||||||
'End Try
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If False Then
|
|
||||||
Dim mapi As New VERAG_PROG_ALLGEMEIN.SendFileTo.MAPI
|
|
||||||
|
|
||||||
mapi.AddAttachment(dest_path)
|
|
||||||
mapi.SendMailPopup("testing", "body text")
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
If False Then
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Call ShellExecute(Me.Handle, "open", "mailto:" & "" & "?subject=" & "?" & "&body=" & "?" & "&Attach=""" & dest_path & """", vbNullString, vbNullString, SW_SHOW)
|
|
||||||
' Call ShellExecute(Me.Handle, "open", "mailto:" & "" & "?subject=" & "?" & "&body=" & "?", "", "", SW_SHOW)
|
|
||||||
|
|
||||||
|
|
||||||
Exit Sub
|
|
||||||
|
|
||||||
|
|
||||||
Dim MailMessage As New System.Net.Mail.MailMessage()
|
|
||||||
' MailMessage.From = New MailAddress("someone@yourdomain.com")
|
|
||||||
MailMessage.Subject = "" ' "Your subject here"
|
|
||||||
MailMessage.IsBodyHtml = True
|
|
||||||
' MailMessage.Body = MailHTMLText '"<span style='font-size: 12pt; color: red;'>My HTML formatted body</span>"
|
|
||||||
|
|
||||||
MailMessage.Attachments.Add(New Attachment(dest_path))
|
|
||||||
|
|
||||||
Dim filename = "C://Temp/mymessage.eml"
|
|
||||||
|
|
||||||
'save the MailMessage to the filesystem
|
|
||||||
' MailMessage.save(filename)
|
|
||||||
Save(MailMessage, filename)
|
|
||||||
'Open the file with the default associated application registered on the local machine
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Process.Start(filename)
|
|
||||||
|
|
||||||
'Dim mapi As New VERAG_PROG_ALLGEMEIN.SendFileTo.cSendMailAttach
|
|
||||||
|
|
||||||
'mapi.AddAttachment(dest_path)
|
|
||||||
''mapi.AddRecipientTo("person1@somewhere.com")
|
|
||||||
''mapi.AddRecipientTo("person2@somewhere.com")
|
|
||||||
'mapi.SendMailPopup("", "")
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Dim Mail As Outlook.MailItem = CType(Application.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem)
|
|
||||||
|
|
||||||
' If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "IMEX" Then
|
|
||||||
' Else
|
|
||||||
' Dim outl = CreateObject("Outlook.Application")
|
|
||||||
' Dim Mail = CreateObject("Microsoft.Office.Interop.Outlook.MailItem")
|
|
||||||
|
|
||||||
If listMail IsNot Nothing AndAlso listMail.Count > 0 Then
|
If listMail IsNot Nothing AndAlso listMail.Count > 0 Then
|
||||||
For Each l In listMail
|
For Each l In listMail
|
||||||
|
Dim outl As New Outlook.Application
|
||||||
|
|
||||||
|
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||||
|
Mail = outl.CreateItem(0)
|
||||||
|
|
||||||
|
'Dim StandAcc = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getdefaultOutlookAccount(outl)
|
||||||
|
'If StandAcc IsNot Nothing Then Mail.SendUsingAccount = StandAcc
|
||||||
|
|
||||||
|
If l.MailHTMLText <> "" Then Mail.HTMLBody = l.MailHTMLText
|
||||||
|
If l.Mail_To <> "" Then Mail.To = l.Mail_To
|
||||||
|
If l.Mail_CC <> "" Then Mail.CC = l.Mail_CC
|
||||||
|
If l.Mail_BCC <> "" Then Mail.CC = l.Mail_BCC
|
||||||
|
If l.Mail_Subject <> "" Then Mail.Subject = l.Mail_Subject
|
||||||
|
|
||||||
|
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
|
||||||
|
Try
|
||||||
|
Mail.SentOnBehalfOfName = SDL.cFakturierung.getDefaultMail("AMBAR")
|
||||||
|
Mail.HTMLBody &= cFakturierung.getSignature(cboTextKonserveSprache._value, 24, False, True)
|
||||||
|
Catch ex2 As Exception
|
||||||
|
MsgBox(ex2.Message)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
Mail.Attachments.Add(dest_path, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, , VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & attachmentName & ".pdf")
|
||||||
|
Mail.Display()
|
||||||
|
|
||||||
|
Next
|
||||||
|
Else
|
||||||
Dim outl As New Outlook.Application
|
Dim outl As New Outlook.Application
|
||||||
|
|
||||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||||
Mail = outl.CreateItem(0)
|
Mail = outl.CreateItem(0)
|
||||||
|
|
||||||
|
'MsgBox(VERAG_PROG_ALLGEMEIN.cProgramFunctions.printdefaultOutlookAccount(outl))
|
||||||
'Dim StandAcc = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getdefaultOutlookAccount(outl)
|
'Dim StandAcc = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getdefaultOutlookAccount(outl)
|
||||||
'If StandAcc IsNot Nothing Then Mail.SendUsingAccount = StandAcc
|
'Mail.SendUsingAccount = outl.Session.DefaultAccount
|
||||||
|
|
||||||
If l.MailHTMLText <> "" Then Mail.HTMLBody = l.MailHTMLText
|
|
||||||
If l.Mail_To <> "" Then Mail.To = l.Mail_To
|
|
||||||
If l.Mail_CC <> "" Then Mail.CC = l.Mail_CC
|
|
||||||
If l.Mail_BCC <> "" Then Mail.CC = l.Mail_BCC
|
|
||||||
If l.Mail_Subject <> "" Then Mail.Subject = l.Mail_Subject
|
|
||||||
|
|
||||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
|
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
|
||||||
Try
|
Try
|
||||||
Mail.SentOnBehalfOfName = SDL.cFakturierung.getDefaultMail("AMBAR")
|
Mail.SentOnBehalfOfName = SDL.cFakturierung.getDefaultMail("AMBAR")
|
||||||
Mail.HTMLBody &= cFakturierung.getSignature(cboTextKonserveSprache._value, 24, False, True)
|
Mail.HTMLBody &= cFakturierung.getSignature(cboTextKonserveSprache._value, 24, True, True)
|
||||||
Catch ex2 As Exception
|
Catch ex2 As Exception
|
||||||
MsgBox(ex2.Message)
|
MsgBox(ex2.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
If Me.txtEmail.Text <> "" Then Mail.To = Me.txtEmail.Text
|
||||||
|
If cboTextkonserve._value <> "" AndAlso cboTextKonserveSprache._value <> "" Then
|
||||||
|
Dim tX As New VERAG_PROG_ALLGEMEIN.cTextkonserve("FRM_MNGR_MailText", cboTextkonserve._value, cboTextKonserveSprache._value, VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA)
|
||||||
|
|
||||||
|
Dim TextHTML = ""
|
||||||
|
TextHTML &= tX.txt_text
|
||||||
|
TextHTML &= "<br>"
|
||||||
|
TextHTML &= "<br>"
|
||||||
|
TextHTML &= "Mit freundlichen Grüßen<br>"
|
||||||
|
TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "<br>"
|
||||||
|
TextHTML &= "<br>"
|
||||||
|
TextHTML &= cFakturierung.getSignature(cboTextKonserveSprache._value, tX.txt_firmaSig, True, True)
|
||||||
|
|
||||||
|
|
||||||
|
Mail.HTMLBody = "<div style=""font-family:Calibri, Arial"">" & TextHTML & "</div>"
|
||||||
|
|
||||||
|
|
||||||
|
Mail.Subject = IIf(tX.txt_betreff <> "", tX.txt_betreff, " ")
|
||||||
|
If AVISO IsNot Nothing Then
|
||||||
|
Mail.Subject = Mail.Subject.Replace("%LKW%", AVISO.LKW_Nr)
|
||||||
|
Mail.Subject = Mail.Subject.Replace("%LKWKennzeichen%", AVISO.LKW_Nr)
|
||||||
|
End If
|
||||||
|
Mail.Subject = Mail.Subject.Replace("%LKW%", "")
|
||||||
|
Mail.Subject = Mail.Subject.Replace("%LKWKennzeichen%", "")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Mail.Attachments.Add(dest_path, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, , VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "_Formular.pdf")
|
|
||||||
Mail.Display()
|
|
||||||
|
|
||||||
Next
|
|
||||||
Else
|
|
||||||
Dim outl As New Outlook.Application
|
|
||||||
|
|
||||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
|
||||||
Mail = outl.CreateItem(0)
|
|
||||||
|
|
||||||
'MsgBox(VERAG_PROG_ALLGEMEIN.cProgramFunctions.printdefaultOutlookAccount(outl))
|
|
||||||
'Dim StandAcc = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getdefaultOutlookAccount(outl)
|
|
||||||
'Mail.SendUsingAccount = outl.Session.DefaultAccount
|
|
||||||
|
|
||||||
|
|
||||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
|
Mail.Attachments.Add(dest_path, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, , VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & attachmentName & ".pdf")
|
||||||
Try
|
|
||||||
Mail.SentOnBehalfOfName = SDL.cFakturierung.getDefaultMail("AMBAR")
|
|
||||||
Mail.HTMLBody &= cFakturierung.getSignature(cboTextKonserveSprache._value, 24, True, True)
|
|
||||||
Catch ex2 As Exception
|
|
||||||
MsgBox(ex2.Message)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
If Me.txtEmail.Text <> "" Then Mail.To = Me.txtEmail.Text
|
|
||||||
If cboTextkonserve._value <> "" AndAlso cboTextKonserveSprache._value <> "" Then
|
|
||||||
Dim tX As New VERAG_PROG_ALLGEMEIN.cTextkonserve("FRM_MNGR_MailText", cboTextkonserve._value, cboTextKonserveSprache._value, VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA)
|
|
||||||
|
|
||||||
Dim TextHTML = ""
|
|
||||||
TextHTML &= tX.txt_text
|
|
||||||
TextHTML &= "<br>"
|
|
||||||
TextHTML &= "<br>"
|
|
||||||
TextHTML &= "Mit freundlichen Grüßen<br>"
|
|
||||||
TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "<br>"
|
|
||||||
TextHTML &= "<br>"
|
|
||||||
TextHTML &= cFakturierung.getSignature(cboTextKonserveSprache._value, tX.txt_firmaSig, True, True)
|
|
||||||
|
|
||||||
|
|
||||||
Mail.HTMLBody = "<div style=""font-family:Calibri, Arial"">" & TextHTML & "</div>"
|
|
||||||
|
|
||||||
|
|
||||||
Mail.Subject = IIf(tX.txt_betreff <> "", tX.txt_betreff, " ")
|
|
||||||
If AVISO IsNot Nothing Then
|
|
||||||
Mail.Subject = Mail.Subject.Replace("%LKW%", AVISO.LKW_Nr)
|
|
||||||
Mail.Subject = Mail.Subject.Replace("%LKWKennzeichen%", AVISO.LKW_Nr)
|
|
||||||
End If
|
|
||||||
Mail.Subject = Mail.Subject.Replace("%LKW%", "")
|
|
||||||
Mail.Subject = Mail.Subject.Replace("%LKWKennzeichen%", "")
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Mail.Attachments.Add(dest_path, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, , VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "_Formular.pdf")
|
|
||||||
Mail.Display()
|
Mail.Display()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'Dim matilPath = "C:\TEMP\VERAG_Mail.msg"
|
||||||
|
' Mail.SaveAs(matilPath)
|
||||||
|
' Process.Start(matilPath)
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Fehler beim erstellen der E-Mail:" & vbNewLine & ex.Message & ex.StackTrace)
|
||||||
|
End Try
|
||||||
|
ElseIf sender Is btnPrint Then
|
||||||
|
'VERAG_PROG_ALLGEMEIN.cFormularManager.PrintFile(dest_path, "")
|
||||||
|
If dest_path.ToUpper.EndsWith("PDF") Then
|
||||||
|
VERAG_PROG_ALLGEMEIN.cFormularManager.PrintViaSpirePDF({dest_path}, cboPrinter.SelectedItem.ToString)
|
||||||
|
Else
|
||||||
|
VERAG_PROG_ALLGEMEIN.cFormularManager.PrintViaGS(dest_path, cboPrinter.SelectedItem.ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Dim matilPath = "C:\TEMP\VERAG_Mail.msg"
|
|
||||||
' Mail.SaveAs(matilPath)
|
|
||||||
' Process.Start(matilPath)
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox("Fehler beim erstellen der E-Mail:" & vbNewLine & ex.Message & ex.StackTrace)
|
|
||||||
End Try
|
|
||||||
ElseIf sender Is btnPrint Then
|
|
||||||
'VERAG_PROG_ALLGEMEIN.cFormularManager.PrintFile(dest_path, "")
|
|
||||||
If dest_path.ToUpper.EndsWith("PDF") Then
|
|
||||||
VERAG_PROG_ALLGEMEIN.cFormularManager.PrintViaSpirePDF({dest_path}, cboPrinter.SelectedItem.ToString)
|
|
||||||
Else
|
|
||||||
VERAG_PROG_ALLGEMEIN.cFormularManager.PrintViaGS(dest_path, cboPrinter.SelectedItem.ToString)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
printed = True
|
printed = True
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
MsgBox(ex.Message & ex.StackTrace)
|
||||||
@@ -1393,6 +1309,40 @@ Public Class frmFormulare
|
|||||||
' If list.Count > 0 Then
|
' If list.Count > 0 Then
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function createAttachmentName(listOfFormular As List(Of String), KundenNr As Integer) As String
|
||||||
|
|
||||||
|
Dim Bez As String = ""
|
||||||
|
If KundenNr > 0 Then
|
||||||
|
Dim ADR As New cAdressen(KundenNr)
|
||||||
|
|
||||||
|
If ADR.Name_1 IsNot Nothing AndAlso ADR.Name_1 <> "" Then
|
||||||
|
Bez = "_" & ADR.Name_1
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If listOfFormular.Count = 1 Then
|
||||||
|
|
||||||
|
Bez &= "_" & listOfFormular(0).ToString.Replace("SDL.usrcntl", "")
|
||||||
|
|
||||||
|
Return Bez
|
||||||
|
|
||||||
|
ElseIf listOfFormular.Count > 1 Then
|
||||||
|
|
||||||
|
For Each r In listOfFormular
|
||||||
|
Bez &= "_" & r.ToString.Replace("SDL.usrcntl", "")
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return Bez
|
||||||
|
|
||||||
|
Else
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Const SW_SHOW = 5
|
Const SW_SHOW = 5
|
||||||
Declare Function ShellExecute Lib "shell32.dll" _
|
Declare Function ShellExecute Lib "shell32.dll" _
|
||||||
Alias "ShellExecuteA" (
|
Alias "ShellExecuteA" (
|
||||||
@@ -1684,52 +1634,61 @@ Public Class FormularManagerNEU
|
|||||||
Return striList
|
Return striList
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Shared Function validFormulare(c As Control, ByRef err As String) As Boolean
|
Shared Function validFormulare(c As Control, ByRef err As String, listOfFormulare As List(Of String)) As Boolean
|
||||||
validFormulare = True
|
validFormulare = True
|
||||||
|
|
||||||
Dim striList As New List(Of String)
|
Dim striList As New List(Of String)
|
||||||
|
|
||||||
Select Case c.GetType.ToString
|
Select Case c.GetType.ToString
|
||||||
Case GetType(usrcntlVollmacht_DE).ToString
|
Case GetType(usrcntlVollmacht_DE).ToString
|
||||||
' retStr = FormularManagerNEU.VM_De(c)
|
listOfFormulare.Add(GetType(usrcntlVollmacht_DE).ToString())
|
||||||
|
Case GetType(usrcntlVollmacht_GB_IE).ToString
|
||||||
|
listOfFormulare.Add(GetType(usrcntlVollmacht_GB_IE).ToString())
|
||||||
|
Case GetType(usrcntlVollmacht_GB_indirekt).ToString
|
||||||
|
listOfFormulare.Add(GetType(usrcntlVollmacht_GB_indirekt).ToString())
|
||||||
Case GetType(usrcntlVollmacht_DE_indirekt).ToString
|
Case GetType(usrcntlVollmacht_DE_indirekt).ToString
|
||||||
' retStr = FormularManagerNEU.VM_De(c)
|
listOfFormulare.Add(GetType(usrcntlVollmacht_DE_indirekt).ToString)
|
||||||
Case GetType(usrcntlVollmacht_AT).ToString
|
Case GetType(usrcntlVollmacht_AT).ToString
|
||||||
' retStr = FormularManagerNEU.VM_AT(c)
|
listOfFormulare.Add(GetType(usrcntlVollmacht_AT).ToString)
|
||||||
Case GetType(usrcntlFormOhneFelder).ToString
|
Case GetType(usrcntlFormOhneFelder).ToString
|
||||||
' retStr = FormularManagerNEU.SimplePDF(c)
|
|
||||||
|
|
||||||
Case GetType(usrcntlVollmacht_DE_Fiskal).ToString
|
Case GetType(usrcntlVollmacht_DE_Fiskal).ToString
|
||||||
' retStr = FormularManagerNEU.VM_DE_Fiskal(c)
|
listOfFormulare.Add(GetType(usrcntlVollmacht_DE_Fiskal).ToString)
|
||||||
Case GetType(usrcntlVollmacht_AT_EV).ToString
|
Case GetType(usrcntlVollmacht_AT_EV).ToString
|
||||||
' retStr = FormularManagerNEU.VM_AT_EV(c)
|
listOfFormulare.Add(GetType(usrcntlVollmacht_AT_EV).ToString)
|
||||||
Case GetType(usrcntlVollmacht_AT_Fiskal).ToString
|
Case GetType(usrcntlVollmacht_AT_Fiskal).ToString
|
||||||
' retStr = FormularManagerNEU.VM_AT_Fiskal(c)
|
listOfFormulare.Add(GetType(usrcntlVollmacht_AT_EV).ToString)
|
||||||
Case GetType(usrcntlVollmacht_ATILLA_EXPORT).ToString
|
Case GetType(usrcntlVollmacht_ATILLA_EXPORT).ToString
|
||||||
' retStr = FormularManagerNEU.VM_ATILLA_EXPORT(c)
|
listOfFormulare.Add(GetType(usrcntlVollmacht_AT_EV).ToString)
|
||||||
Case GetType(usrcntlVollmacht_VERAG_EXPORT).ToString
|
Case GetType(usrcntlVollmacht_VERAG_EXPORT).ToString
|
||||||
' retStr = FormularManagerNEU.VM_VERAG_EXPORT(c)
|
listOfFormulare.Add(GetType(usrcntlVollmacht_VERAG_EXPORT).ToString)
|
||||||
Case GetType(usrcntlVorauskasse).ToString
|
Case GetType(usrcntlVorauskasse).ToString
|
||||||
|
listOfFormulare.Add(GetType(usrcntlVorauskasse).ToString)
|
||||||
If Not DirectCast(c, usrcntlVorauskasse).ValidValues(err) Then validFormulare = False
|
If Not DirectCast(c, usrcntlVorauskasse).ValidValues(err) Then validFormulare = False
|
||||||
Case GetType(usrcntlGestellungsgarantie).ToString
|
Case GetType(usrcntlGestellungsgarantie).ToString
|
||||||
' retStr = FormularManagerNEU.Gestellungsgarantie(c)
|
listOfFormulare.Add(GetType(usrcntlGestellungsgarantie).ToString)
|
||||||
|
|
||||||
Case GetType(usrcntlVerzollungspreise).ToString
|
Case GetType(usrcntlVerzollungspreise).ToString
|
||||||
' retStr = FormularManagerNEU.Verzollungspreise(c)
|
listOfFormulare.Add(GetType(usrcntlVerzollungspreise).ToString)
|
||||||
Case GetType(usrcntlCreditreformBoniAuskunft).ToString
|
Case GetType(usrcntlCreditreformBoniAuskunft).ToString
|
||||||
'retStr = FormularManagerNEU.Bonitaetsauskunft(c)
|
listOfFormulare.Add(GetType(usrcntlCreditreformBoniAuskunft).ToString)
|
||||||
Case GetType(usrcntlSonstigesPDF).ToString
|
Case GetType(usrcntlSonstigesPDF).ToString
|
||||||
' retStr = FormularManagerNEU.SonstPDF(c)
|
listOfFormulare.Add(GetType(usrcntlSonstigesPDF).ToString)
|
||||||
Case GetType(usrCntlDispoliste).ToString
|
Case GetType(usrCntlDispoliste).ToString
|
||||||
'retStr = FormularManagerNEU.DispoListe(c)
|
listOfFormulare.Add(GetType(usrCntlDispoliste).ToString)
|
||||||
Case GetType(usrCntlVerpflichtungserklärungFahrer).ToString
|
Case GetType(usrCntlVerpflichtungserklärungFahrer).ToString
|
||||||
' striList = FormularManagerNEU.VerpflichtungserklärungFahrer(c)
|
listOfFormulare.Add(GetType(usrCntlVerpflichtungserklärungFahrer).ToString)
|
||||||
Case GetType(usrcntlFiskalInfoschreiben).ToString
|
Case GetType(usrcntlFiskalInfoschreiben).ToString
|
||||||
' retStr = FormularManagerNEU.FiskalInfoschreiben(c)
|
listOfFormulare.Add(GetType(usrcntlFiskalInfoschreiben).ToString)
|
||||||
Case GetType(usrcntlVerzollungsunterlagen).ToString
|
Case GetType(usrcntlVerzollungsunterlagen).ToString
|
||||||
|
listOfFormulare.Add(GetType(usrcntlVerzollungsunterlagen).ToString)
|
||||||
If Not DirectCast(c, usrcntlVerzollungsunterlagen).ValidValues(err) Then validFormulare = False
|
If Not DirectCast(c, usrcntlVerzollungsunterlagen).ValidValues(err) Then validFormulare = False
|
||||||
|
|
||||||
Case GetType(usrcntlVUB).ToString
|
Case GetType(usrcntlVUB).ToString
|
||||||
' retStr = FormularManagerNEU.VUB(c)
|
listOfFormulare.Add(GetType(usrcntlVUB).ToString)
|
||||||
|
|
||||||
|
Case GetType(usrcntlImportaviso).ToString
|
||||||
|
listOfFormulare.Add(GetType(usrcntlImportaviso).ToString)
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4632,7 +4632,8 @@ Public Class frmMDM_USTVAntrag
|
|||||||
BANK_OWNER = FIRMA.Firma_Bez
|
BANK_OWNER = FIRMA.Firma_Bez
|
||||||
BANK_IBAN = FIRMA.Firma_IBAN1
|
BANK_IBAN = FIRMA.Firma_IBAN1
|
||||||
BANK_BIC = FIRMA.Firma_BIC1
|
BANK_BIC = FIRMA.Firma_BIC1
|
||||||
BankOwnerType = "applicant"
|
|
||||||
|
BankOwnerType = "representative"
|
||||||
If BANK_BIC.ToString.Contains("BIC:") Then
|
If BANK_BIC.ToString.Contains("BIC:") Then
|
||||||
BANK_BIC = BANK_BIC.ToString.Replace("BIC:", "")
|
BANK_BIC = BANK_BIC.ToString.Replace("BIC:", "")
|
||||||
BANK_BIC = BANK_BIC.Trim()
|
BANK_BIC = BANK_BIC.Trim()
|
||||||
@@ -4656,7 +4657,7 @@ Public Class frmMDM_USTVAntrag
|
|||||||
BANK_BIC = dtBank.Rows(0).Item("bnk_bic")
|
BANK_BIC = dtBank.Rows(0).Item("bnk_bic")
|
||||||
End If
|
End If
|
||||||
'wenn nicht hinterlegt, dann leer lassen!
|
'wenn nicht hinterlegt, dann leer lassen!
|
||||||
BankOwnerType = "representative"
|
BankOwnerType = "applicant"
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Dim app As New GlobalVATRefundApplication_HR() With {
|
Dim app As New GlobalVATRefundApplication_HR() With {
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ Public Class cTrdInvoice
|
|||||||
|
|
||||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||||
|
|
||||||
Using cmd As New SqlCommand(" SELECT tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer, tblTrdinInvoice.SteuerbetragLokal,(SteuerpflichtigerBetragLokal+SteuerfreierBetragLokal) as Nettobetrag , tblTrdinInvoice.UStVAn_ID, tblTrdinInvoice.FilialenNr
|
Using cmd As New SqlCommand(" SELECT tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer, tblTrdinInvoice.SteuerbetragLokal,(SteuerpflichtigerBetragLokal) as Nettobetrag , tblTrdinInvoice.UStVAn_ID, tblTrdinInvoice.FilialenNr
|
||||||
FROM tblTrdinInvoice
|
FROM tblTrdinInvoice
|
||||||
WHERE tblTrdinInvoice.Rechnungsdatum Between @von And @bis AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.RechnungsKundenNr=@AdressenNr AND tblTrdinInvoice.WährungLokal='EUR'" & IIf(Archiv, " ", " AND isnull(tblTrdinInvoice.UStVAn_ID,0) = 0 ") & "
|
WHERE tblTrdinInvoice.Rechnungsdatum Between @von And @bis AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.RechnungsKundenNr=@AdressenNr AND tblTrdinInvoice.WährungLokal='EUR'" & IIf(Archiv, " ", " AND isnull(tblTrdinInvoice.UStVAn_ID,0) = 0 ") & "
|
||||||
ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer", conn)
|
ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer", conn)
|
||||||
|
|||||||
Reference in New Issue
Block a user