EXG Auto Ncts

This commit is contained in:
2026-10-14 16:56:50 +02:00
parent ea85aed73d
commit d78bba81e3
9 changed files with 1138 additions and 275 deletions

View File

@@ -946,7 +946,13 @@ Public Class frmDYNachrichtenVerarbeitung
End If
End Sub
Shared Sub setFirmaNL(iopartner As String, division As String, ByRef firma As String, ByRef nl As String)
Shared Sub setFirmaNL(iopartner As String, division As String, ByRef firma As String, ByRef nl As String, BezugsNr As String)
If iopartner = "UNAT" Then
firma = "UNISPED"
nl = "SUB"
End If
If division Is Nothing Then Exit Sub
If division <> "" Then
Select Case division
@@ -979,15 +985,40 @@ Public Class frmDYNachrichtenVerarbeitung
nl = "AMBAR"
Case "IME"
firma = "IMEX"
nl = "IMX"
nl = "SUB"
Case "UNAT", "ATSPED"
firma = "UNISPED"
nl = "ATSP"
nl = "SUB"
End Select
End If
If String.IsNullOrWhiteSpace(firma) OrElse String.IsNullOrWhiteSpace(nl) Then
If Not String.IsNullOrWhiteSpace(BezugsNr) AndAlso BezugsNr.Length >= 4 Then
Dim neueFirma As String = ""
Dim neueNL As String = ""
Select Case BezugsNr.Substring(0, 4)
Case "5501" : neueFirma = "IMEX" : neueNL = "SUB"
Case "5701" : neueFirma = "AMBAR" : neueNL = "SBG"
Case "4801", "4802" : neueFirma = "ATILLA" : neueNL = "SUB"
Case "5801" : neueFirma = "FRONTOFFICE" : neueNL = "SUB"
Case "5802" : neueFirma = "FRONTOFFICE" : neueNL = "KLIPP"
Case "5003" : neueFirma = "VERAG" : neueNL = "SBG"
Case "5103" : neueFirma = "VERAG" : neueNL = "WAI"
Case "5303" : neueFirma = "VERAG" : neueNL = "NKD"
Case "4803", "4805", "4811", "7001" : neueFirma = "VERAG" : neueNL = "SUB"
Case "5601" : neueFirma = "UNISPED" : neueNL = "SUB"
End Select
If String.IsNullOrWhiteSpace(firma) Then firma = neueFirma
If String.IsNullOrWhiteSpace(nl) Then nl = neueNL
End If
End If
End Sub
@@ -1004,7 +1035,7 @@ Public Class frmDYNachrichtenVerarbeitung
Function getVerahrensartFromBezugsNr(bezugsNr) As String
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
If SQL.getValueTxtBySql("SELECT TOP 1 COUNT(*) FROM tblDakosy_NCTSOut004 WHERE ncts_ObjectName='" & bezugsNr & "'", "FMZOLL") > 0 Then Return "NCTS"
If SQL.getValueTxtBySql("Select TOP 1 COUNT(*) FROM tblDakosy_NCTSOut004 WHERE ncts_ObjectName='" & bezugsNr & "'", "FMZOLL") > 0 Then Return "NCTS"
If SQL.getValueTxtBySql("SELECT TOP 1 COUNT(*) FROM tblDakosy_NCTSOut WHERE ncts_ObjectName='" & bezugsNr & "'", "FMZOLL") > 0 Then Return "NCTS"
If SQL.getValueTxtBySql("SELECT TOP 1 COUNT(*) FROM tblDakosy_EZA WHERE eza_ObjectName='" & bezugsNr & "'", "FMZOLL") > 0 Then Return "EZA"
Return ""
@@ -7214,6 +7245,7 @@ Public Class frmDYNachrichtenVerarbeitung
Public Shared Sub tryGetFirmaNiederlassung(ByRef firma As String, ByRef niederlassung As String, Mail As String, BezugsNr As String)
If Mail.Contains("@imex") Then
firma = "IMEX"
niederlassung = "IMEX"