offert, ustva
This commit is contained in:
@@ -3642,7 +3642,8 @@ Public Class frmMDM_USTVAntrag
|
|||||||
Dim mailText As String = ""
|
Dim mailText As String = ""
|
||||||
|
|
||||||
Dim spracheRechnung As String = "EN" 'Defaultsprache
|
Dim spracheRechnung As String = "EN" 'Defaultsprache
|
||||||
|
Dim Attachmens_Bez As String = ""
|
||||||
|
Dim Attachmens_Bez_POS As String = ""
|
||||||
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)
|
||||||
@@ -3651,23 +3652,30 @@ Public Class frmMDM_USTVAntrag
|
|||||||
Dim KUNDE As New cKunde(USTV_ANTRAG.UStVAn_KuNr)
|
Dim KUNDE As New cKunde(USTV_ANTRAG.UStVAn_KuNr)
|
||||||
Dim AD As New cAdressen(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
|
||||||
|
|
||||||
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)
|
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
|
'NOCH DEAKTIVIERT
|
||||||
If vbYes = MsgBox("Möchten Sie die Positionsliste an die Mail hinzufügen?", vbYesNoCancel) Then
|
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)
|
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
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -529,6 +529,11 @@ Public Class cOffertPosition
|
|||||||
Return SQL.doSQLVarList(getUpdateCmd(LEISTUNGSBEZ_ORG), "FMZOLL", False, list)
|
Return SQL.doSQLVarList(getUpdateCmd(LEISTUNGSBEZ_ORG), "FMZOLL", False, list)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UPDATE(LEISTUNGSNR_ORG As Integer) As Boolean
|
||||||
|
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList(True)
|
||||||
|
Return SQL.doSQLVarList(getUpdateCmd(LEISTUNGSNR_ORG), "FMZOLL", False, list)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -572,6 +577,26 @@ Public Class cOffertPosition
|
|||||||
Return ""
|
Return ""
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function getUpdateCmd(LEISTUNGNR_ORG As Integer) As String
|
||||||
|
Try
|
||||||
|
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList(True)
|
||||||
|
|
||||||
|
Dim str As String = ""
|
||||||
|
For Each i In list
|
||||||
|
If Not i.isPrimaryParam Then
|
||||||
|
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
str = str.Substring(0, str.Length - 1) 'wg. ','
|
||||||
|
Return (" UPDATE [Offertenpositionen] SET " & str & " WHERE KundenNr=@KundenNr and OffertenNr=@OffertenNr and LeistungsNr=" & LEISTUNGNR_ORG & " and LeistungsBez= @LeistungsBez")
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||||
|
End Try
|
||||||
|
Return ""
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class cOfferteArchiv
|
Public Class cOfferteArchiv
|
||||||
|
|||||||
Reference in New Issue
Block a user