RMC Einarbeitung von EasyTrip, Sammelrechnung, Creditsafe, etc.
This commit is contained in:
@@ -5111,6 +5111,8 @@ Public Class cFakturierung
|
||||
Dim RG As New VERAG_PROG_ALLGEMEIN.cRechnungsausgang(r("RK_ID"))
|
||||
If RG IsNot Nothing Then
|
||||
RG.LOAD_ANHAENGE()
|
||||
Dim PDFList As New List(Of String)
|
||||
Dim mergedPDFList = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("Attachment_" & RG.RechnungsNr & ".pdf", "pdf",, False, "Zusammenfassung")
|
||||
For Each RG_AH In RG.ANHAENGE.Where(Function(x) x.Bezeichnung.ToLower.EndsWith(extTyp))
|
||||
|
||||
Select Case extTyp
|
||||
@@ -5123,16 +5125,30 @@ Public Class cFakturierung
|
||||
End If
|
||||
Else
|
||||
|
||||
If RG_AH.Bezeichnung.ToUpper.Contains("MAUT") Or RG_AH.Bezeichnung.ToUpper.Contains("DIESEL") Or RG_AH.Bezeichnung.ToUpper.Contains("INVOICE") Then
|
||||
|
||||
If RG.Firma_ID = 19 AndAlso RG.Sammelrechnung = 6 AndAlso RG.FilialenNr = 4817 Then 'in diesem Fall PDFs zusammenfassen!
|
||||
|
||||
Dim Path = VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(RG_AH.dsId)
|
||||
If Not listAnh.Contains(Path) Then
|
||||
If Not Path.ToString.Contains("Sammelrechnung") Then
|
||||
PDFList.Add(Path)
|
||||
Else
|
||||
listAnh.Add(Path)
|
||||
End If
|
||||
|
||||
If Not (listAnh.Any(Function(f) f.Contains("COPY_INVOICE")) And Path.ToUpper.Contains("COPY_INVOICE")) Then 'damit diesel IDS-Rechnung nicht doppelt hinzugefügt wird.
|
||||
listAnh.Add(Path)
|
||||
Else
|
||||
|
||||
If RG_AH.Bezeichnung.ToUpper.Contains("MAUT") Or RG_AH.Bezeichnung.ToUpper.Contains("DIESEL") Or RG_AH.Bezeichnung.ToUpper.Contains("INVOICE") Then
|
||||
Dim Path = VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(RG_AH.dsId)
|
||||
If Not listAnh.Contains(Path) Then
|
||||
|
||||
If Not (listAnh.Any(Function(f) f.Contains("COPY_INVOICE")) And Path.ToUpper.Contains("COPY_INVOICE")) Then 'damit diesel IDS-Rechnung nicht doppelt hinzugefügt wird.
|
||||
listAnh.Add(Path)
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -5152,7 +5168,14 @@ Public Class cFakturierung
|
||||
|
||||
|
||||
Next
|
||||
|
||||
If mergedPDFList.Count > 0 Then
|
||||
If FormularManagerNEU.MergePdfFiles(PDFList, mergedPDFList) Then
|
||||
listAnh.Add(mergedPDFList)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user