offert, ustva
This commit is contained in:
@@ -3642,7 +3642,8 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim mailText As String = ""
|
||||
|
||||
Dim spracheRechnung As String = "EN" 'Defaultsprache
|
||||
|
||||
Dim Attachmens_Bez As String = ""
|
||||
Dim Attachmens_Bez_POS As String = ""
|
||||
Dim outl As New Outlook.Application
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
@@ -3651,23 +3652,30 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim KUNDE As New cKunde(USTV_ANTRAG.UStVAn_KuNr)
|
||||
Dim AD As New cAdressen(USTV_ANTRAG.UStVAn_KuNr)
|
||||
|
||||
If KUNDE_ERW IsNot Nothing AndAlso KUNDE_ERW.kde_Fakturierung_Sprache <> "" Then
|
||||
If KUNDE_ERW IsNot Nothing AndAlso KUNDE_ERW.kde_Fakturierung_Sprache <> "" Then spracheRechnung = KUNDE_ERW.kde_Fakturierung_Sprache
|
||||
|
||||
If listOfTextconserven.LIST.Any(Function(c) c.txt_sprache = spracheRechnung) Then spracheRechnung = KUNDE_ERW.kde_Fakturierung_Sprache
|
||||
If listOfTextconserven.LIST.Any(Function(c) c.txt_sprache = spracheRechnung) Then
|
||||
|
||||
Dim r As cTextkonserve = listOfTextconserven.LIST.Find(Function(c) c.txt_sprache = spracheRechnung)
|
||||
If r IsNot Nothing Then
|
||||
|
||||
Mail.Subject = r.txt_betreff
|
||||
Mail.Subject = Mail.Subject.Replace("%KdNr%", USTV_ANTRAG.UStVAn_KuNr)
|
||||
Mail.Subject = Mail.Subject.Replace("%KdName%", USTV_ANTRAG.UStVAn_Name)
|
||||
mailText = r.txt_text
|
||||
End If
|
||||
|
||||
Dim r As cTextkonserve = listOfTextconserven.LIST.Find(Function(c) c.txt_sprache = spracheRechnung)
|
||||
If r IsNot Nothing Then
|
||||
|
||||
Mail.Subject = r.txt_betreff
|
||||
Mail.Subject = Mail.Subject.Replace("%KdNr%", USTV_ANTRAG.UStVAn_KuNr)
|
||||
Mail.Subject = Mail.Subject.Replace("%KdName%", USTV_ANTRAG.UStVAn_Name)
|
||||
mailText = r.txt_text
|
||||
End If
|
||||
|
||||
End If
|
||||
Select Case spracheRechnung
|
||||
Case "DE" : Attachmens_Bez = "Lief.-Rechn" : Attachmens_Bez_POS = "POS-Liste"
|
||||
Case "EN", "TR" : Attachmens_Bez = "Supplier Invoice(s)" : Attachmens_Bez_POS = "Item List"
|
||||
Case "RO" : Attachmens_Bez = "Factura furnizorului" : Attachmens_Bez_POS = "Lista articolelor"
|
||||
End Select
|
||||
|
||||
Dim path As String = PDFInvoicesPath(posID)
|
||||
Mail.Attachments.Add(path, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
|
||||
If path <> "" Then Mail.Attachments.Add(path, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue,, Attachmens_Bez)
|
||||
|
||||
'NOCH DEAKTIVIERT
|
||||
If vbYes = MsgBox("Möchten Sie die Positionsliste an die Mail hinzufügen?", vbYesNoCancel) Then
|
||||
@@ -3678,7 +3686,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Dim pathPosList As String = generatePOSListe(spedBuch, posID, False)
|
||||
|
||||
If pathPosList <> "" Then Mail.Attachments.Add(pathPosList, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
|
||||
If pathPosList <> "" Then Mail.Attachments.Add(pathPosList, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue,, Attachmens_Bez_POS)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user