This commit is contained in:
2026-09-23 08:51:40 +02:00
parent d45eb6821e
commit 27aaa560b5
42 changed files with 121750 additions and 118994 deletions

View File

@@ -31,10 +31,10 @@
Shared Function getInvPartner(KdNr As Integer, NameText As String, Type As String) As MIC_IMPORT.TPartner
Shared Function getInvPartner(KdNr As Integer, NameText As String, Type As String) As MicCustImportMessage.TMicPartner
If KdNr > 0 Then
Dim PARTNER As New MIC_IMPORT.TPartner
Dim PARTNER As New MicCustImportMessage.TMicPartner
Dim AD As New cAdressen(KdNr)
Dim KD As New cKunde(KdNr)
PARTNER.partnerType = Type
@@ -48,7 +48,7 @@
PARTNER.PartnerAddress.addrTin = KD.EORITIN
Return PARTNER
ElseIf If(NameText, "") <> "" Then
Dim PARTNER As New MIC_IMPORT.TPartner
Dim PARTNER As New MicCustImportMessage.TMicPartner
PARTNER.partnerType = Type
PARTNER.PartnerAddress.addrName.Add(NameText)
Return PARTNER
@@ -63,11 +63,11 @@
'Dim Interface_VERSION = "003"
'Dim ObjectAktion = DY_ACTION
Dim XML As New MIC_EXPORT.ExportShipment
'Transaktion:
XML.ShipmentHead.company = "VERAG"
XML.ShipmentHead.plant = "GB/01"
XML.ShipmentHead.shipmentId = BezugsNr
'Dim XML As New MIC_EXPORT.ExportShipment
''Transaktion:
'XML.ShipmentHead.company = "VERAG"
'XML.ShipmentHead.plant = "GB/01"
'XML.ShipmentHead.shipmentId = BezugsNr
saveFile = getDefaultFolder_SEND("NCTS") & "MIC_NCTS_" & Now.ToString("yyMMdd_HHmmss") & ".xml"
@@ -81,7 +81,7 @@
'saveFile = saveDir & "MIC_" & Now.ToString("yyMMdd_HHmmss") & ".xml"
'MsgBox(saveFile)
XML.SaveToFile(saveFile)
'XML.SaveToFile(saveFile)
replaceNullDateXML(saveFile)
@@ -98,16 +98,16 @@
Shared Function generateIMPORT(AVISO As cAviso, SENDUNG As cSendungen, ByRef saveFile As String, ByRef BezugsNr As String) As Boolean
Dim Interface_VERSION = "000"
Dim XML As New MIC_IMPORT.InsertImportShipment
Dim XML_IMP As New MicCustImportMessage.MicCustImportMessage
Dim XML_IMP = XML.ImportShipmentMessage.ImportShipment
'XML.schemaVersion =
XML_IMP.Shipment.company = "VERAG"
XML_IMP.Shipment.plant = "GB/01"
XML_IMP.Shipment.plant = "NL/01"
XML_IMP.Shipment.shipmentId = BezugsNr
XML_IMP.Shipment.ShipmentHead.shipmentType = MIC_IMPORT.TShipmentHeadShipmentType.E 'E:Import
XML_IMP.Shipment.ShipmentHead.shipmentType = MicCustImportMessage.TMicShipmentHeadShipmentType.E 'E:Import
XML_IMP.Shipment.ShipmentHead.customsDate = Now
If SENDUNG.tblSnd_Gewicht IsNot Nothing AndAlso IsNumeric(SENDUNG.tblSnd_Gewicht) Then XML_IMP.Shipment.ShipmentHead.grossWeight = CDec(SENDUNG.tblSnd_Gewicht)
'XML.Shipment.ShipmentHead.departurePlace = Now
@@ -118,36 +118,36 @@
XML_IMP.Shipment.ShipmentHead.MotInland.motVehicle = AVISO.LKW_Nr
XML_IMP.Shipment.ShipmentHead.MotInland.motCountry = AVISO.LKW_Nationalitaet
Dim INV As New MIC_IMPORT.TInvoice
Dim INV As New MicCustImportMessage.TMicInvoice
Dim ILN As New MIC_IMPORT.TInvoiceLine
Dim ILN As New MicCustImportMessage.TMicInvoiceLine
Dim Partner_IM = getInvPartner(SENDUNG.tblSnd_EmpfaengerKdNr, SENDUNG.tblSnd_Empfaenger, "IM")
If Partner_IM IsNot Nothing Then ILN.Partners.Add(Partner_IM)
If Partner_IM IsNot Nothing Then ILN.Partners.Partner.Add(Partner_IM)
Dim Partner_CZ = getInvPartner(SENDUNG.tblSnd_AbsenderKdNr, SENDUNG.tblSnd_Absender, "CZ")
If Partner_CZ IsNot Nothing Then ILN.Partners.Add(Partner_CZ)
Dim Partner_CZ = getInvPartner(SENDUNG.tblSnd_AbsenderKdNr, SENDUNG.tblSnd_Absender, "CZ")
If Partner_CZ IsNot Nothing Then ILN.Partners.Partner.Add(Partner_CZ)
INV.InvoiceLines.Add(ILN)
INV.InvoiceLines.Line.Add(ILN)
XML_IMP.Invoice.Add(INV)
XML_IMP.Invoice.Add(INV)
Dim CF_BezugsNr = New MIC_IMPORT.TCustomerText()
CF_BezugsNr.key = 1
CF_BezugsNr.value = BezugsNr
XML_IMP.Shipment.ShipmentHead.CustomerFields.Texts.Add(CF_BezugsNr)
'Dim CF_BezugsNr = New MicCustImportMessage.TMicImportCustomerFields
'CF_BezugsNr.text1 = BezugsNr
XML_IMP.Shipment.ShipmentHead.countryDestination = "UK"
XML_IMP.Shipment.ShipmentHead.creationDate = Now
XML_IMP.Shipment.ShipmentHead.creationUser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
XML_IMP.Shipment.ShipmentHead.CustomerFields.text1 = BezugsNr
XML_IMP.Shipment.ShipmentHead.countryDestination = "NL"
XML_IMP.Shipment.ShipmentHead.creationDate = Now
XML_IMP.Shipment.ShipmentHead.creationUser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
If SENDUNG.tblSnd_Frachtkosten IsNot Nothing Then XML_IMP.Shipment.ShipmentHead.Freight.frtAmount = SENDUNG.tblSnd_Frachtkosten
saveFile = getDefaultFolder_SEND("IMPORT") & "MIC_IMPORT_" & Now.ToString("yyMMdd_HHmmss") & ".xml"
'MsgBox(saveFile)
XML.SaveToFile(saveFile)
XML_IMP.SaveToFile(saveFile)
replaceNullDateXML(saveFile)
Return True