german email texts
This commit is contained in:
parent
f3d6a8cae3
commit
0d1b87947a
@ -25,6 +25,18 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Public Const ZUGFERD_ATTACHMENTS = "ZUGFeRD Attachments"
|
Public Const ZUGFERD_ATTACHMENTS = "ZUGFeRD Attachments"
|
||||||
Public HISTORY_ID As Integer
|
Public HISTORY_ID As Integer
|
||||||
|
|
||||||
|
Private Const EMAIL_MISSINGPROPERTIES_1 = "<p>Die angehängte Datei entspricht nicht dem WISAG ZUGFeRD-Format: {0}</p>"
|
||||||
|
Private Const EMAIL_MISSINGPROPERTIES_2 = "Die folgenden Eigenschaften wurden als ERFORDERLICH eingestuft, wurden aber nicht gefunden:"
|
||||||
|
Private Const EMAIL_MD5_ERROR = "<p>Die von Ihnen gesendete Rechnung wurde bereits von unserem System verarbeitet.</p>"
|
||||||
|
Private Const EMAIL_TOO_MUCH_FERDS = "<p>Ihre Email enthielt mehr als ein ZUGFeRD-Dokument.</p>"
|
||||||
|
Private Const EMAIL_NO_FERDS = "<p>Ihre Email enthielt keine ZUGFeRD-Dokumente.</p>"
|
||||||
|
Private Const EMAIL_INVALID_DOCUMENT = """
|
||||||
|
<p>Ihre Email enthielt ein ZUGFeRD Dokument, welches aber inkorrekt formatiert wurde.</p>
|
||||||
|
<p>Mögliche Gründe für ein inkorrektes Format:<ul>
|
||||||
|
<li>Betrags-Werte weisen ungültiges Format auf (25,01 anstatt 25.01)</li>
|
||||||
|
</ul></p>
|
||||||
|
"""
|
||||||
|
|
||||||
Private _logger As Logger
|
Private _logger As Logger
|
||||||
Private _logConfig As LogConfig
|
Private _logConfig As LogConfig
|
||||||
Private _zugferd As ZUGFeRDInterface
|
Private _zugferd As ZUGFeRDInterface
|
||||||
@ -540,7 +552,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = 'REJECTED - Already processed (MD5Hash)' WHERE GUID = '{HISTORY_ID}'"
|
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = 'REJECTED - Already processed (MD5Hash)' WHERE GUID = '{HISTORY_ID}'"
|
||||||
_firebird.ExecuteNonQuery(oSQL)
|
_firebird.ExecuteNonQuery(oSQL)
|
||||||
|
|
||||||
Dim oBody = "<p>The invoice attached to your email has already been processed in our system.</p>"
|
Dim oBody = EMAIL_MD5_ERROR
|
||||||
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oFileGroupId)
|
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oFileGroupId)
|
||||||
AddToEmailQueue(oFileGroupId, oBody, oEmailData)
|
AddToEmailQueue(oFileGroupId, oBody, oEmailData)
|
||||||
|
|
||||||
@ -550,12 +562,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
oMoveDirectory = oArgs.ErrorDirectory
|
oMoveDirectory = oArgs.ErrorDirectory
|
||||||
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = 'REJECTED - ZUGFeRD yes but incorrect format' WHERE GUID = '{HISTORY_ID}'"
|
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = 'REJECTED - ZUGFeRD yes but incorrect format' WHERE GUID = '{HISTORY_ID}'"
|
||||||
_firebird.ExecuteNonQuery(oSQL)
|
_firebird.ExecuteNonQuery(oSQL)
|
||||||
Dim oBody = """
|
Dim oBody = EMAIL_INVALID_DOCUMENT
|
||||||
<p>Ihre email einthielt ein ZUGFeRD Dokument, welches aber inkorrekt formatiert wurde.</p>
|
|
||||||
<p>Mögliche Gründe für ein inkorrektes Format:<ul>
|
|
||||||
<li>Betrags-Werte weisen ungültiges Format auf (25,01 anstatt 25.01)</li>
|
|
||||||
</ul></p>
|
|
||||||
"""
|
|
||||||
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oFileGroupId)
|
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oFileGroupId)
|
||||||
AddToEmailQueue(oFileGroupId, oBody, oEmailData)
|
AddToEmailQueue(oFileGroupId, oBody, oEmailData)
|
||||||
Catch ex As TooMuchFerdsException
|
Catch ex As TooMuchFerdsException
|
||||||
@ -564,7 +571,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
oMoveDirectory = oArgs.ErrorDirectory
|
oMoveDirectory = oArgs.ErrorDirectory
|
||||||
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = 'REJECTED - More than one ZUGFeRD-document in email' WHERE GUID = '{HISTORY_ID}'"
|
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = 'REJECTED - More than one ZUGFeRD-document in email' WHERE GUID = '{HISTORY_ID}'"
|
||||||
_firebird.ExecuteNonQuery(oSQL)
|
_firebird.ExecuteNonQuery(oSQL)
|
||||||
Dim oBody = "<p>Ihre email enthielt mehr als ein ZUGFeRD-Dokument.</p>"
|
Dim oBody = EMAIL_TOO_MUCH_FERDS
|
||||||
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oFileGroupId)
|
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oFileGroupId)
|
||||||
AddToEmailQueue(oFileGroupId, oBody, oEmailData)
|
AddToEmailQueue(oFileGroupId, oBody, oEmailData)
|
||||||
Catch ex As NoFerdsException
|
Catch ex As NoFerdsException
|
||||||
@ -573,7 +580,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
oMoveDirectory = oArgs.ErrorDirectory
|
oMoveDirectory = oArgs.ErrorDirectory
|
||||||
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = 'REJECTED - no ZUGFeRD-Document in email' WHERE GUID = '{HISTORY_ID}'"
|
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = 'REJECTED - no ZUGFeRD-Document in email' WHERE GUID = '{HISTORY_ID}'"
|
||||||
_firebird.ExecuteNonQuery(oSQL)
|
_firebird.ExecuteNonQuery(oSQL)
|
||||||
Dim oBody = "<p>Your email contained no ZUGFeRD-Documents.</p>"
|
Dim oBody = EMAIL_NO_FERDS
|
||||||
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oFileGroupId)
|
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oFileGroupId)
|
||||||
AddToEmailQueue(oFileGroupId, oBody, oEmailData)
|
AddToEmailQueue(oFileGroupId, oBody, oEmailData)
|
||||||
Catch ex As MissingValueException
|
Catch ex As MissingValueException
|
||||||
@ -651,11 +658,11 @@ Public Class ImportZUGFeRDFiles
|
|||||||
|
|
||||||
|
|
||||||
Private Function CreateBodyForMissingProperties(OriginalFilename As String, MissingProperties As List(Of String))
|
Private Function CreateBodyForMissingProperties(OriginalFilename As String, MissingProperties As List(Of String))
|
||||||
Dim oBody = $"<p>Die angehängte Datei entspricht nicht dem WISAG ZUGFeRD-Format: {OriginalFilename}</p>"
|
Dim oBody = String.Format(EMAIL_MISSINGPROPERTIES_1, OriginalFilename)
|
||||||
|
|
||||||
If MissingProperties.Count > 0 Then
|
If MissingProperties.Count > 0 Then
|
||||||
oBody &= $"{vbNewLine}{vbNewLine}"
|
oBody &= $"{vbNewLine}{vbNewLine}"
|
||||||
oBody &= $"Die folgenden Eigenschaften wurden als ERFORDERLICH eingestuft, wurden aber nicht gefunden:"
|
oBody &= EMAIL_MISSINGPROPERTIES_2
|
||||||
oBody &= $"{vbNewLine}{vbNewLine}"
|
oBody &= $"{vbNewLine}{vbNewLine}"
|
||||||
|
|
||||||
For Each prop In MissingProperties
|
For Each prop In MissingProperties
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user