Fremdrechnungen, MDM-Zinsrechnung, etc,
This commit is contained in:
@@ -800,7 +800,13 @@ Public Class usrcntlFremdrechnungen
|
||||
|
||||
Dim pdflist = createEMailTable(TextHTMLtable, kvp, cbx.Checked)
|
||||
|
||||
createEmail(kvp.Key, TextHTMLtable, pdflist)
|
||||
If Not cbxMailoeffnen.Checked And Not pdflist.Any() Then
|
||||
|
||||
Else
|
||||
createEmail(kvp.Key, TextHTMLtable, pdflist)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
@@ -935,10 +941,14 @@ Public Class usrcntlFremdrechnungen
|
||||
Lieferant = aktLieferant
|
||||
End If
|
||||
|
||||
If onlyRelevantInvioces AndAlso Lieferant <> "IDS" AndAlso erw.kde_keineMWSt Then Continue For 'abbruchbedingung -> nächste Zeile
|
||||
|
||||
|
||||
Dim sendÍnvoice As Boolean = IIf(onlyRelevantInvioces AndAlso KUNDE.KundenNr = 0, False, True)
|
||||
|
||||
If onlyRelevantInvioces AndAlso Lieferant <> "IDS" AndAlso erw.kde_keineMWSt Then
|
||||
sendÍnvoice = True 'dann immer mitschicken!
|
||||
End If
|
||||
|
||||
'ORIGINAL-RECHNUNG senden wenn:
|
||||
If onlyRelevantInvioces Then
|
||||
|
||||
@@ -994,10 +1004,6 @@ Public Class usrcntlFremdrechnungen
|
||||
TextHTMLtable &= "<td><b>" & r.Item("Land") & "</b></td>"
|
||||
TextHTMLtable &= "<td><b>" & r.Item("Rechnungsdatum") & "</b></td>"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim daId As Integer = IIf(IsDBNull(r.Item("daId")), -1, r.Item("daId"))
|
||||
If daId > 0 Then
|
||||
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(daId)
|
||||
@@ -1012,8 +1018,6 @@ Public Class usrcntlFremdrechnungen
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Else
|
||||
If sendÍnvoice Then
|
||||
TextHTMLtable &= "<tr>"
|
||||
@@ -1127,6 +1131,22 @@ Public Class usrcntlFremdrechnungen
|
||||
|
||||
If cbxMailoeffnen.Checked Then
|
||||
Try
|
||||
|
||||
Dim oAccount As Outlook.Account
|
||||
Dim accountToSent = "mmdabrechnung@verag.ag"
|
||||
|
||||
If outl.Session.Accounts.Count > 0 Then
|
||||
For Each oAccount In outl.Session.Accounts
|
||||
|
||||
If oAccount.SmtpAddress = accountToSent Then
|
||||
Mail.SendUsingAccount = oAccount
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Mail.Display()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
|
||||
Reference in New Issue
Block a user