This commit is contained in:
2023-11-06 08:31:05 +01:00
parent 85d4307271
commit 4027773db1
3 changed files with 29 additions and 4 deletions

View File

@@ -1,5 +1,6 @@

Imports System.Globalization
Imports awt.ShellApi
Imports Microsoft.Office.Interop
Public Class cFakturierung
@@ -429,12 +430,24 @@ Public Class cFakturierung
End Function
Shared Function checkAnlage_Orig(RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang)
If RECHNUNG IsNot Nothing Then
If (RECHNUNG.Anlage_1.contains("ATR") Or RECHNUNG.Anlage_1.contains("ATR") Or RECHNUNG.Anlage_1.contains("Präf")) And Not (RECHNUNG.Anlage_1.contains("Kopie") Or RECHNUNG.Anlage_1.contains("Copy")) Then Return True
If (RECHNUNG.Anlage_2.contains("ATR") Or RECHNUNG.Anlage_2.contains("ATR") Or RECHNUNG.Anlage_2.contains("Präf")) And Not (RECHNUNG.Anlage_2.contains("Kopie") Or RECHNUNG.Anlage_2.contains("Copy")) Then Return True
If (RECHNUNG.Anlage_3.contains("ATR") Or RECHNUNG.Anlage_3.contains("ATR") Or RECHNUNG.Anlage_3.contains("Präf")) And Not (RECHNUNG.Anlage_3.contains("Kopie") Or RECHNUNG.Anlage_3.contains("Copy")) Then Return True
If (RECHNUNG.Anlage_4.contains("ATR") Or RECHNUNG.Anlage_4.contains("ATR") Or RECHNUNG.Anlage_4.contains("Präf")) And Not (RECHNUNG.Anlage_4.contains("Kopie") Or RECHNUNG.Anlage_4.contains("Copy")) Then Return True
If (RECHNUNG.Anlage_5.contains("ATR") Or RECHNUNG.Anlage_5.contains("ATR") Or RECHNUNG.Anlage_5.contains("Präf")) And Not (RECHNUNG.Anlage_5.contains("Kopie") Or RECHNUNG.Anlage_5.contains("Copy")) Then Return True
If (RECHNUNG.Anlage_6.contains("ATR") Or RECHNUNG.Anlage_6.contains("ATR") Or RECHNUNG.Anlage_6.contains("Präf")) And Not (RECHNUNG.Anlage_6.contains("Kopie") Or RECHNUNG.Anlage_6.contains("Copy")) Then Return True
End If
Return False
End Function
'Shared Function przRechnungstext(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang) As String ', ByRef strZahlbar As String, ByRef strText As String)
' Dim txtZZ = przRechnungstextTXT(RECHNUNG)
' Dim txtTXT = przRechnungstextZZ(RECHNUNG)
' Return (txtZZ & vbNewLine & txtTXT).Trim
'End Function
Shared Function przRechnungstextTXT(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang) As String ', ByRef strZahlbar As String, ByRef strText As String)
Shared Function przRechnungstextTXT(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch) As String ', ByRef strZahlbar As String, ByRef strText As String)
If RECHNUNG Is Nothing Then Exit Function
@@ -539,6 +552,18 @@ Public Class cFakturierung
' strText = strText.Replace("", "")
'End Select
If SPEDBUCH IsNot Nothing Then
Select Case SPEDBUCH.Abfertigungsart
Case 1, 2, 3, 4, 23, 28, 39, 47
If checkAnlage_Orig(RECHNUNG) Then
Select Case RECHNUNG.RechnungSprache
Case "EN" : strText = strText & "Please keep the original documents (e.g. ATR, EUR1) carefully for at least 7 years, as these will be required for any inspections by the customs authorities!" & vbCrLf
Case Else : strText = strText & "Bitte bewahren Sie die Original Dokumente (zB ATR, EUR1) mid. 7 Jahre sorgfältig auf, diese werden bei etwaigen Prüfungen durch die Zollbehörde benötigt!" & vbCrLf
End Select
End If
End Select
End If
'MsgBox("Firma:" & RECHNUNG.Firma_ID & " - Land:" & "" & RECHNUNG.RechnungsLandKz & " - OffertenNr:" & RECHNUNG.OffertenNr & " - TXT: " & strText)