EXG, DY Atilla
This commit is contained in:
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.3.5.7")>
|
||||
<Assembly: AssemblyFileVersion("1.3.5.7")>
|
||||
<Assembly: AssemblyVersion("1.3.5.8")>
|
||||
<Assembly: AssemblyFileVersion("1.3.5.8")>
|
||||
|
||||
@@ -111,76 +111,101 @@ Public Class usrCntlATLAS_EXGestellung
|
||||
For Each l In rtbMRN.Lines
|
||||
If l.Trim <> "" Then
|
||||
|
||||
If Not sendEXP_MRN(l.Trim, sbAbgangZollstelle._value, cnt, exg_list) Then
|
||||
If Not sendEXP_MRN(l.Trim.ToUpper, sbAbgangZollstelle._value, cnt, exg_list) Then
|
||||
MsgBox("Sendefehler bei " & l)
|
||||
err = True
|
||||
End If
|
||||
cnt += 1
|
||||
End If
|
||||
Next
|
||||
Me.FindForm.Close()
|
||||
|
||||
End If
|
||||
If Not err Then
|
||||
If cbxNCTS.Checked Then
|
||||
Dim BezugsNr = ""
|
||||
If Not err Then
|
||||
If cbxNCTS.Checked Then
|
||||
Dim BezugsNr = ""
|
||||
|
||||
|
||||
Dim NCTS_OUT As New DAKOSY_Worker.cDakosyNCTSOut004
|
||||
Dim NCTS_OUT As New DAKOSY_Worker.cDakosyNCTSOut004
|
||||
|
||||
Dim f As New frmDakosyStammreferenz("DE", "NCTS", False,,, FIRMA_DY)
|
||||
Dim Stammreferenz = Nothing
|
||||
f.selectForEXG = True
|
||||
If f.ShowDialog(Me.FindForm) Then
|
||||
Stammreferenz = f.STAMMREF
|
||||
sentToDakosy = f.sentToDakosy
|
||||
End If
|
||||
Try
|
||||
Dim f As New frmDakosyStammreferenz("DE", "NCTS", False,,, FIRMA_DY)
|
||||
Dim Stammreferenz = Nothing
|
||||
f.selectForEXG = True
|
||||
If f.ShowDialog(Me.FindForm) Then
|
||||
Stammreferenz = f.STAMMREF
|
||||
sentToDakosy = f.sentToDakosy
|
||||
End If
|
||||
Try
|
||||
|
||||
BezugsNr = usrCntlATLAS_NCTS004.getBezugsnr(FIRMA_DY, SENDUNG, BezugsNr, "")
|
||||
lblBezugsnummer.Text = BezugsNr
|
||||
BezugsNr = usrCntlATLAS_NCTS004.getBezugsnr(FIRMA_DY, SENDUNG, BezugsNr, "")
|
||||
lblBezugsnummer.Text = BezugsNr
|
||||
|
||||
MsgBox(BezugsNr)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
ncts_OUT = cDakosyNCTSOut004.LOADByBezugsNr(BezugsNr, True)
|
||||
If ncts_OUT Is Nothing Then
|
||||
'Falls zur BezugsNr schon ein Eintrag in der DB vorhanden ist
|
||||
ncts_OUT = cDakosyNCTSOut004.LOADByAnmIDFull(f.STAMMREF_DYID, True) ' DyID --> Falls bei der Stammreferenz eine Vorlage hinterlegt ist!
|
||||
If True Then 'NCTS_OUT Is Nothing Then
|
||||
|
||||
Dim cDy_ART = "T2"
|
||||
Select Case (SENDUNG.tblSnd_Abfertigungsart_ID)
|
||||
Case 5 : cDy_ART = "T1"
|
||||
Case Else : cDy_ART = "T2"
|
||||
End Select
|
||||
|
||||
|
||||
Dim DY_ANM As New cDakosy_Zollanmeldungen
|
||||
If DY_ANM Is Nothing Then
|
||||
DY_ANM = New cDakosy_Zollanmeldungen(NCTS_OUT.ncts_dyaAnmID)
|
||||
End If
|
||||
DY_ANM.dy_ART = cDy_ART 'cDy_ART
|
||||
DY_ANM.dy_BezugsNr = BezugsNr
|
||||
DY_ANM.dy_AvisoId = If(AVISO Is Nothing, Nothing, AVISO.AvisoID)
|
||||
DY_ANM.dy_SendungsId = If(SENDUNG Is Nothing, Nothing, SENDUNG.tblSnd_SendungID)
|
||||
'Status?
|
||||
If DY_ANM.SAVE() Then 'Speichern, ID wird erzeugt
|
||||
|
||||
|
||||
'Falls zur BezugsNr schon ein Eintrag in der DB vorhanden ist
|
||||
NCTS_OUT = cDakosyNCTSOut004.LOADByAnmIDFull(f.STAMMREF_DYID, True) ' DyID --> Falls bei der Stammreferenz eine Vorlage hinterlegt ist!
|
||||
If NCTS_OUT Is Nothing Then
|
||||
NCTS_OUT = New cDakosyNCTSOut004
|
||||
End If
|
||||
|
||||
NCTS_OUT.ncts_Id = -1
|
||||
NCTS_OUT.ncts_dyaAnmID = DY_ANM.dy_Id
|
||||
|
||||
'If NCTS_OUT IsNot Nothing Then
|
||||
' 'Stmmreferenz - Werte zurücksetzen, damit nicht falsch übergeben
|
||||
' NCTS_OUT.ncts_dyaAnmID = -1
|
||||
' NCTS_OUT.ncts_Id = -1
|
||||
'Else
|
||||
' NCTS_OUT = New cDakosyNCTSOut004
|
||||
'End If
|
||||
|
||||
|
||||
usrCntlATLAS_NCTS004.loaddataFromAVISO(AVISO, SENDUNG, cDy_ART, BezugsNr, NCTS_OUT)
|
||||
'cboStammreferenz.changeItem(Stammreferenz)
|
||||
|
||||
If NCTS_OUT.SAVE() Then
|
||||
MsgBox("Eine neue Versandanmeldung mit der BezugsNummer '" & BezugsNr & "' wurde erstellt. Befüllung wird bei Gestellvorgang automatisch vorgenommen.")
|
||||
|
||||
For Each exgId In exg_list
|
||||
MsgBox(NCTS_OUT.ncts_dyaAnmID)
|
||||
cDakosyEXG.UPDATE_FillNCTS_ID(exgId, NCTS_OUT.ncts_dyaAnmID)
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If ncts_OUT IsNot Nothing Then
|
||||
'Stmmreferenz - Werte zurücksetzen, damit nicht falsch übergeben
|
||||
ncts_OUT.ncts_dyaAnmID = -1
|
||||
ncts_OUT.ncts_Id = -1
|
||||
Else
|
||||
ncts_OUT = New cDakosyNCTSOut004
|
||||
End If
|
||||
|
||||
Dim cDy_ART = "T2"
|
||||
Select Case (SENDUNG.tblSnd_Abfertigungsart_ID)
|
||||
Case 5 : cDy_ART = "T1"
|
||||
Case Else : cDy_ART = "T2"
|
||||
End Select
|
||||
|
||||
|
||||
usrCntlATLAS_NCTS004.loaddataFromAVISO(AVISO, SENDUNG, cDy_ART, BezugsNr, NCTS_OUT)
|
||||
'cboStammreferenz.changeItem(Stammreferenz)
|
||||
|
||||
If NCTS_OUT.SAVE_ALL() Then
|
||||
MsgBox("Eine neue Versandanmeldung mit der BezugsNummer '" & BezugsNr & "' wurde erstellt. Befüllung wird bei Gestellvorgang automatisch vorgenommen.")
|
||||
|
||||
For Each exgId In exg_list
|
||||
cDakosyEXG.UPDATE_FillNCTS_ID(exgId, NCTS_OUT.ncts_dyaAnmID)
|
||||
Next
|
||||
End If
|
||||
'ncts_OUT
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
'ncts_OUT
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Me.FindForm.Close()
|
||||
End If
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
@@ -57,7 +57,7 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
|
||||
Case "AMBAR" : txtDyMandant.Text = "ATIL" : txtDyNiederlassung.Text = "AMBWO"
|
||||
End Select
|
||||
|
||||
Dim BezugsNr = ("ID" & AVISO.AvisoID & "_" & SENDUNG.FilialenNr & "-" & SENDUNG.AbfertigungsNr & "_" & If(AVISO.Auftraggeber.Length > 8, AVISO.Auftraggeber.ToString.Substring(0, 5), AVISO.Auftraggeber)).Trim
|
||||
Dim BezugsNr = (SENDUNG.FilialenNr & "/" & SENDUNG.AbfertigungsNr & "_" & "ID" & AVISO.AvisoID & "_" & If(AVISO.Auftraggeber.Length > 8, AVISO.Auftraggeber.ToString.Substring(0, 5), AVISO.Auftraggeber)).Trim
|
||||
lblBezugsnummer.Text = BezugsNr
|
||||
txtMRN.Text = If(SENDUNG.tblSnd_ATB_T1, "")
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ Public Class DAKOSY_Interface_SEND
|
||||
Else
|
||||
Select Case FIRMA_DY
|
||||
Case "ATILLA"
|
||||
Return "VERG"
|
||||
Return "ATIL"
|
||||
Case "VERAG"
|
||||
Return "VERG"
|
||||
Case "DURMAZ"
|
||||
|
||||
@@ -214,6 +214,69 @@ Public Class cATEZ_ncts_api
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Shared Function updateStatusByMRN(MRN As String) As Boolean
|
||||
Try
|
||||
Dim result = False
|
||||
' This example assumes the Chilkat API to have been previously unlocked.
|
||||
' See Global Unlock Sample for sample code.
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
|
||||
Dim http As New Chilkat.Http
|
||||
Dim success As Boolean
|
||||
|
||||
'http.SetRequestHeader("API-KEY", "{{API-KEY}}")
|
||||
http.SetRequestHeader("API-KEY", API_KEY)
|
||||
|
||||
Dim sbResponseBody As New Chilkat.StringBuilder
|
||||
success = http.QuickGetSb("https://transcode.singlewindow.io/api/tds/integrations/verag/declarations/messages/ie015-by-mrn/" & MRN, sbResponseBody)
|
||||
If (success = False) Then
|
||||
Debug.WriteLine(http.LastErrorText)
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Debug.WriteLine("Response status code = " & http.LastStatus)
|
||||
Dim responseString = (sbResponseBody.GetAsString())
|
||||
|
||||
If responseString <> "" Then
|
||||
MsgBox(responseString)
|
||||
Dim tempFilePath = saveStringToTmpXML(responseString)
|
||||
Dim NCTS_P5 = VERAG_PROG_ALLGEMEIN.NCTS_P5_CC015C.CC015CType.LoadFromFile(tempFilePath)
|
||||
|
||||
|
||||
' result = saveXMLtoNCTS_FREMD(NCTS_P5, MRN)
|
||||
|
||||
|
||||
' Dim NCTS_FREMD = VERAG_PROG_ALLGEMEIN.cNCTS_FREMD.LOADByMRN(NCTS_TMP.Mrn, True)
|
||||
'If NCTS_FREMD Is Nothing Then NCTS_FREMD = New cNCTS_FREMD
|
||||
'NCTS_FREMD.ncts_Partnersystem = "ATEZ"
|
||||
'NCTS_FREMD.ncts_MRN = NCTS_TMP.Mrn
|
||||
|
||||
|
||||
'NCTS_FREMD.ncts_Eroeffnung = NCTS_TMP.MrnDate
|
||||
|
||||
'If NCTS_TMP.MrnDate IsNot Nothing Then
|
||||
' If If(NCTS_FREMD.ncts_LimitDate, "").ToString = "" Then NCTS_FREMD.ncts_LimitDate = CDate(NCTS_TMP.MrnDate).AddDays(10)
|
||||
'End If
|
||||
|
||||
|
||||
If File.Exists(tempFilePath) Then
|
||||
File.Delete(tempFilePath)
|
||||
|
||||
Console.WriteLine("Temporäre Datei gelöscht.")
|
||||
End If
|
||||
End If
|
||||
Return result
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Shared Function saveStringToTmpXML(xmlString) As String
|
||||
' Beispiel-XML-String
|
||||
' Dim xmlString As String = "<?xml version=""1.0"" encoding=""UTF-8""?><root><element>Wert</element></root>"
|
||||
|
||||
@@ -10,7 +10,7 @@ Public Class cAllgemein
|
||||
Public Shared STAMMFILIALE As String 'IMEX,UNISPED;ATILLA...
|
||||
Public Shared WARENORT_ZUGANG As Boolean = False
|
||||
Public Shared WARENORT As String
|
||||
Public Shared ATILLA_SND As Boolean = False
|
||||
Public Shared ATILLA_SND As Boolean = True
|
||||
|
||||
Public Shared CLUSTER As String = "" 'Firmenverbund
|
||||
' Public Shared SPECIFIC As cSPECIFIC = New cSPECIFIC
|
||||
|
||||
Reference in New Issue
Block a user