This commit is contained in:
2024-12-13 10:13:01 +01:00
16 changed files with 44377 additions and 142 deletions

View File

@@ -382,7 +382,7 @@
<data name="passpic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\passpic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="house" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="house" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\house.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="therefore" type="System.Resources.ResXFileRef, System.Windows.Forms">

View File

@@ -3379,7 +3379,6 @@
<EmbeddedResource Include="mdm\usrCntlMDMDatenverarbeitungAuswertungen_divers.resx">
<DependentUpon>usrCntlMDMDatenverarbeitungAuswertungen_divers.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\licenses.licx" />
<EmbeddedResource Include="OriginalArchiv_ATR\frmATR.resx">
<DependentUpon>frmATR.vb</DependentUpon>
</EmbeddedResource>

View File

@@ -25,6 +25,11 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label5 = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.Line12 = New GrapeCity.ActiveReports.SectionReportModel.Line()
Me.Detail = New GrapeCity.ActiveReports.SectionReportModel.Detail()
Me.lblAbsKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblEmpfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblEndEmpfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblFrachtfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblAuftrKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblLKWNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblAbs = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblBezugsNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
@@ -42,10 +47,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.txtPackst<EFBFBD>cke = New GrapeCity.ActiveReports.SectionReportModel.TextBox()
Me.txtVermerk = New GrapeCity.ActiveReports.SectionReportModel.TextBox()
Me.lblAnzahl = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblAbsKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblEmpfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblAuftrKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblFrachtfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.txtKdOpt = New GrapeCity.ActiveReports.SectionReportModel.TextBox()
Me.Line3 = New GrapeCity.ActiveReports.SectionReportModel.Line()
Me.Line11 = New GrapeCity.ActiveReports.SectionReportModel.Line()
@@ -58,7 +59,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Shape2 = New GrapeCity.ActiveReports.SectionReportModel.Shape()
Me.Label7 = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblEndEmpf = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblEndEmpfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.PageFooter = New GrapeCity.ActiveReports.SectionReportModel.PageFooter()
Me.Label28 = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.Line2 = New GrapeCity.ActiveReports.SectionReportModel.Line()
@@ -88,6 +88,11 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.Label8, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label4, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label5, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblAbsKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblEmpfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblEndEmpfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblFrachtfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblAuftrKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblLKWNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblAbs, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblBezugsNr, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -105,10 +110,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.txtPackst<EFBFBD>cke, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtVermerk, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblAnzahl, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblAbsKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblEmpfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblAuftrKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblFrachtfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtKdOpt, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label11, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label12, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -116,7 +117,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.Label20, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label7, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblEndEmpf, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblEndEmpfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label28, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ReportInfo2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblDat, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -162,7 +162,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label6.Name = "Label6"
Me.Label6.Style = "background-color: #003680; color: White; font-size: 8pt; font-weight: bold; text-" &
"align: left; vertical-align: middle; ddo-char-set: 1"
Me.Label6.Text = "Best<EFBFBD>tigung/Check"
Me.Label6.Text = "Check/Best<EFBFBD>tigung"
Me.Label6.Top = 0.03622048!
Me.Label6.Width = 1.115747!
'
@@ -174,7 +174,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label8.Name = "Label8"
Me.Label8.Style = "background-color: #003680; color: White; font-size: 8pt; font-weight: bold; text-" &
"align: left; text-justify: auto; vertical-align: middle; ddo-char-set: 1"
Me.Label8.Text = "Firmen/Companies"
Me.Label8.Text = "Companies/Firmen"
Me.Label8.Top = 0.03622048!
Me.Label8.Width = 3.404331!
'
@@ -186,7 +186,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label4.Name = "Label4"
Me.Label4.Style = "background-color: #003680; color: White; font-size: 8pt; font-weight: bold; text-" &
"align: left; text-justify: auto; vertical-align: middle; ddo-char-set: 1"
Me.Label4.Text = "LKW/Truck, Ware/Goods"
Me.Label4.Text = "Truck/LKW, Goods/Ware"
Me.Label4.Top = 0.03622063!
Me.Label4.Width = 1.470473!
'
@@ -198,7 +198,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label5.Name = "Label5"
Me.Label5.Style = "background-color: #003680; color: White; font-size: 8pt; font-weight: bold; text-" &
"align: left; vertical-align: middle; ddo-char-set: 1"
Me.Label5.Text = "Abfertigung/Decalaration"
Me.Label5.Text = "Declaration/Abfertigung"
Me.Label5.Top = 0.03622048!
Me.Label5.Width = 1.479528!
'
@@ -222,6 +222,71 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Detail.KeepTogether = True
Me.Detail.Name = "Detail"
'
'lblAbsKdNr
'
Me.lblAbsKdNr.Height = 0.1574803!
Me.lblAbsKdNr.HyperLink = Nothing
Me.lblAbsKdNr.Left = 3.785039!
Me.lblAbsKdNr.Name = "lblAbsKdNr"
Me.lblAbsKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblAbsKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblAbsKdNr.Text = "100000 VERAG"
Me.lblAbsKdNr.Top = 0.03149589!
Me.lblAbsKdNr.Width = 0.4133854!
'
'lblEmpfKdNr
'
Me.lblEmpfKdNr.Height = 0.1574803!
Me.lblEmpfKdNr.HyperLink = Nothing
Me.lblEmpfKdNr.Left = 3.785039!
Me.lblEmpfKdNr.Name = "lblEmpfKdNr"
Me.lblEmpfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblEmpfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblEmpfKdNr.Text = "100000 VERAG"
Me.lblEmpfKdNr.Top = 0.1889762!
Me.lblEmpfKdNr.Width = 0.4133847!
'
'lblEndEmpfKdNr
'
Me.lblEndEmpfKdNr.Height = 0.1574803!
Me.lblEndEmpfKdNr.HyperLink = Nothing
Me.lblEndEmpfKdNr.Left = 3.785039!
Me.lblEndEmpfKdNr.Name = "lblEndEmpfKdNr"
Me.lblEndEmpfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblEndEmpfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblEndEmpfKdNr.Text = "100000 VERAG"
Me.lblEndEmpfKdNr.Top = 0.3464565!
Me.lblEndEmpfKdNr.Width = 0.4133847!
'
'lblFrachtfKdNr
'
Me.lblFrachtfKdNr.Height = 0.1574803!
Me.lblFrachtfKdNr.HyperLink = Nothing
Me.lblFrachtfKdNr.Left = 3.785039!
Me.lblFrachtfKdNr.Name = "lblFrachtfKdNr"
Me.lblFrachtfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblFrachtfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblFrachtfKdNr.Text = "100000 VERAG"
Me.lblFrachtfKdNr.Top = 0.6614174!
Me.lblFrachtfKdNr.Width = 0.4133847!
'
'lblAuftrKdNr
'
Me.lblAuftrKdNr.Height = 0.1574803!
Me.lblAuftrKdNr.HyperLink = Nothing
Me.lblAuftrKdNr.Left = 3.785039!
Me.lblAuftrKdNr.Name = "lblAuftrKdNr"
Me.lblAuftrKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblAuftrKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblAuftrKdNr.Text = "100000 VERAG"
Me.lblAuftrKdNr.Top = 0.5039369!
Me.lblAuftrKdNr.Width = 0.4133847!
'
'lblLKWNr
'
Me.lblLKWNr.Height = 0.1574803!
@@ -426,58 +491,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.lblAnzahl.Top = 0.1889764!
Me.lblAnzahl.Width = 0.2082677!
'
'lblAbsKdNr
'
Me.lblAbsKdNr.Height = 0.1574803!
Me.lblAbsKdNr.HyperLink = Nothing
Me.lblAbsKdNr.Left = 3.785039!
Me.lblAbsKdNr.Name = "lblAbsKdNr"
Me.lblAbsKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblAbsKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblAbsKdNr.Text = "100000 VERAG"
Me.lblAbsKdNr.Top = 0.03149589!
Me.lblAbsKdNr.Width = 0.4133854!
'
'lblEmpfKdNr
'
Me.lblEmpfKdNr.Height = 0.1574803!
Me.lblEmpfKdNr.HyperLink = Nothing
Me.lblEmpfKdNr.Left = 3.785039!
Me.lblEmpfKdNr.Name = "lblEmpfKdNr"
Me.lblEmpfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblEmpfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblEmpfKdNr.Text = "100000 VERAG"
Me.lblEmpfKdNr.Top = 0.1889762!
Me.lblEmpfKdNr.Width = 0.4133847!
'
'lblAuftrKdNr
'
Me.lblAuftrKdNr.Height = 0.1574803!
Me.lblAuftrKdNr.HyperLink = Nothing
Me.lblAuftrKdNr.Left = 3.785039!
Me.lblAuftrKdNr.Name = "lblAuftrKdNr"
Me.lblAuftrKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblAuftrKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblAuftrKdNr.Text = "100000 VERAG"
Me.lblAuftrKdNr.Top = 0.5039369!
Me.lblAuftrKdNr.Width = 0.4133847!
'
'lblFrachtfKdNr
'
Me.lblFrachtfKdNr.Height = 0.1574803!
Me.lblFrachtfKdNr.HyperLink = Nothing
Me.lblFrachtfKdNr.Left = 3.785039!
Me.lblFrachtfKdNr.Name = "lblFrachtfKdNr"
Me.lblFrachtfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblFrachtfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblFrachtfKdNr.Text = "100000 VERAG"
Me.lblFrachtfKdNr.Top = 0.6614174!
Me.lblFrachtfKdNr.Width = 0.4133847!
'
'txtKdOpt
'
Me.txtKdOpt.CanGrow = False
@@ -544,9 +557,9 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label12.HyperLink = Nothing
Me.Label12.Left = 6.356693!
Me.Label12.Name = "Label12"
Me.Label12.Style = "font-size: 8pt; font-weight: normal; text-align: left; text-decoration: underline" &
"; text-justify: auto; ddo-char-set: 1"
Me.Label12.Text = "Eingelangt bei:"
Me.Label12.Style = "font-size: 6.5pt; font-weight: normal; text-align: left; text-decoration: underli" &
"ne; text-justify: auto; ddo-char-set: 1"
Me.Label12.Text = "Received/Eingelangt bei:"
Me.Label12.Top = 0.03307087!
Me.Label12.Width = 1.113386!
'
@@ -556,10 +569,10 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label18.HyperLink = Nothing
Me.Label18.Left = 6.474803!
Me.Label18.Name = "Label18"
Me.Label18.Style = "font-size: 8pt; font-weight: normal; text-align: left; text-decoration: none; tex" &
"t-justify: auto; ddo-char-set: 3"
Me.Label18.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-decoration: none; tex" &
"t-justify: auto; ddo-char-set: 1"
Me.Label18.Text = "Trader/Abnehmer"
Me.Label18.Top = 0.1889764!
Me.Label18.Top = 0.1968504!
Me.Label18.Width = 0.9677165!
'
'Label20
@@ -571,7 +584,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label20.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-decoration: none; tex" &
"t-justify: auto; ddo-char-set: 1"
Me.Label20.Text = "Consignee/Empf<70>nger"
Me.Label20.Top = 0.3464567!
Me.Label20.Top = 0.3543307!
Me.Label20.Width = 1.003937!
'
'Shape1
@@ -618,19 +631,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.lblEndEmpf.Top = 0.3464567!
Me.lblEndEmpf.Width = 2.122047!
'
'lblEndEmpfKdNr
'
Me.lblEndEmpfKdNr.Height = 0.1574803!
Me.lblEndEmpfKdNr.HyperLink = Nothing
Me.lblEndEmpfKdNr.Left = 3.785039!
Me.lblEndEmpfKdNr.Name = "lblEndEmpfKdNr"
Me.lblEndEmpfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
Me.lblEndEmpfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
"ar-set: 1"
Me.lblEndEmpfKdNr.Text = "100000 VERAG"
Me.lblEndEmpfKdNr.Top = 0.3464565!
Me.lblEndEmpfKdNr.Width = 0.4133847!
'
'PageFooter
'
Me.PageFooter.Controls.AddRange(New GrapeCity.ActiveReports.SectionReportModel.ARControl() {Me.Label28, Me.Line2, Me.ReportInfo2, Me.lblDat})
@@ -662,7 +662,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
'
'ReportInfo2
'
Me.ReportInfo2.FormatString = "Seite {PageNumber} von {PageCount} Seiten "
Me.ReportInfo2.FormatString = "Page/Seite {PageNumber} / {PageCount} Seiten "
Me.ReportInfo2.Height = 0.1330709!
Me.ReportInfo2.Left = 5.032284!
Me.ReportInfo2.Name = "ReportInfo2"
@@ -938,6 +938,11 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.Label8, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label4, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label5, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblAbsKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblEmpfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblEndEmpfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblFrachtfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblAuftrKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblLKWNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblAbs, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblBezugsNr, System.ComponentModel.ISupportInitialize).EndInit()
@@ -955,10 +960,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.txtPackst<EFBFBD>cke, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtVermerk, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblAnzahl, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblAbsKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblEmpfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblAuftrKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblFrachtfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtKdOpt, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label11, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label12, System.ComponentModel.ISupportInitialize).EndInit()
@@ -966,7 +967,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.Label20, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label7, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblEndEmpf, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblEndEmpfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label28, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.ReportInfo2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblDat, System.ComponentModel.ISupportInitialize).EndInit()

View File

@@ -417,17 +417,17 @@ Public Class frmMDM_USTVAntrag
End If
USTV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
USTV_POS.UStVPo_Zeitstempel = Now()
' Berechnungen
USTV_POS.UStVPo_USteuerbetragEUR = ANTRAG.plose_MWSTBetragWaehrungAbbuchung 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ANTRAG.plose_MWSTBetragWaehrungAbbuchung, USTV_ANTRAG.UStVAn_Währungscode, "EUR")
'USTV_POS.UStVPo_Umrechnungskurs = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuroKurs(ANTRAG.plose_WaehrungAbbuchung, ANTRAG.plose_RechnungsDatum)
USTV_POS.UStVPo_Umrechnungskurs = ANTRAG.plose_MWSTBetrag / ANTRAG.plose_MWSTBetragWaehrungAbbuchung
USTV_POS.UStVPo_USteuerbetrag = ANTRAG.plose_MWSTBetrag
' MsgBox(ANTRAG.plose_Lieferant & " - " & ANTRAG.plose_RechnungsDatum & " - " & ANTRAG.plose_RechnungsNr & " :::::::::: " & CDbl(ANTRAG.plose_MWSTBetrag).ToString("C2"))
USTV_POS.UStVPo_Zeitstempel = Now()
' Berechnungen
USTV_POS.UStVPo_USteuerbetragEUR = ANTRAG.plose_MWSTBetragWaehrungAbbuchung 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ANTRAG.plose_MWSTBetragWaehrungAbbuchung, USTV_ANTRAG.UStVAn_Währungscode, "EUR")
'USTV_POS.UStVPo_Umrechnungskurs = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuroKurs(ANTRAG.plose_WaehrungAbbuchung, ANTRAG.plose_RechnungsDatum)
USTV_POS.UStVPo_Umrechnungskurs = ANTRAG.plose_MWSTBetrag / ANTRAG.plose_MWSTBetragWaehrungAbbuchung
USTV_POS.UStVPo_USteuerbetrag = ANTRAG.plose_MWSTBetrag
' MsgBox(ANTRAG.plose_Lieferant & " - " & ANTRAG.plose_RechnungsDatum & " - " & ANTRAG.plose_RechnungsNr & " :::::::::: " & CDbl(ANTRAG.plose_MWSTBetrag).ToString("C2"))
USTV_POS.INSERT()
End If
USTV_POS.INSERT()
End If
Next
'Einträge als archivert setzen ' vormals wichtig
@@ -1201,7 +1201,7 @@ Public Class frmMDM_USTVAntrag
TextHTML &= "We are always available to answer more questions.<br>"
TextHTML &= "Mit freundlichen Grüßen<br>"
TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "<br>"
TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "<br>"
TextHTML &= "<br>"
Mail.HTMLBody = "<div style=""font-family:Calibri, Arial;font-size:15px;"">" & TextHTML & SDL.cFakturierung.getSignature("DE") & "</div>"

View File

@@ -6,6 +6,7 @@ Imports System.Data.SqlClient
Imports System.Globalization
Imports System.Reflection
Imports System.Web.UI.WebControls.WebParts
Imports System.Windows.Forms
Public Class cSqlDb
@@ -195,6 +196,12 @@ Public Class cDatenbankAVISO
Return Nothing
End Function
Public Shared Function CreateNewOpenConnection() As SqlConnection
Dim conn As New SqlConnection(cSqlDb.GetAVISOConnectionString())
conn.Open()
Return conn
End Function
Public Shared Function GetNewOpenConnectionWithoutError(Optional newConn As Boolean = False) As SqlConnection
Try
@@ -2443,6 +2450,646 @@ Public Class cVermerkeDAL
End Class
Public Class cAvisoTvNew
Public Property TvTextBezeichnungID As Integer
Public Property TvTextBezeichnung As String
Public Property FixeZeile1RTF As String
Public Property FixeZeile1HTML As String
Public Property FixeZeile2RTF As String
Public Property FixeZeile2HTML As String
Public Property FixeZeile3HTML As String
Public Property FixeZeile3RTF As String
Public Property StandortID As Integer
Public Property Standort As String
Public Property Prio As Integer
Public Property StartDate As Date?
Public Property EndDate As Date?
Public Property StartTime As TimeSpan?
Public Property EndTime As TimeSpan?
Public Property IsRecurring As Boolean?
Public Property IsMonday As Boolean?
Public Property IsTuesday As Boolean?
Public Property IsWednesday As Boolean?
Public Property IsThursday As Boolean?
Public Property IsFriday As Boolean?
Public Property IsSaturday As Boolean?
Public Property IsSunday As Boolean?
Public Property IsActive As Boolean
End Class
Public Class cTvTextBezeichnung
Public Property TvTextBezeichnungID As Integer
Public Property TvTextBezeichnung As String
End Class
Public Class cTvSettings
Public Property TVSettingID As Integer
Public Property StandortID As Integer
Public Property KachelWidthInPercent As Double?
Public Property KachelHeightInPercent As Double?
Public Property KachelFontSizeLkwNummer As Double?
Public Property KachelFontSizeDateTime As Double?
Public Property KachelRowGapInPercent As Double?
Public Property SeitenwechselInSek As Integer?
Public Property TextBalkenHeightInPercent As Double?
Public Property TextFlaggeLeft As Double?
Public Property TextFlaggeBottom As Double?
Public Property SelectedLogoValue As String
End Class
Public Class cAvisoTvNewDAL
''' <summary>
''' Holt die StandortID basierend auf dem Standortnamen.
''' </summary>
''' <param name="standort">Der Name des Standorts.</param>
''' <returns>Die zugehörige StandortID oder 0, wenn nicht gefunden.</returns>
Public Function GetStandortID(standort As String) As Integer
Dim standortID As Integer = 0
Dim sql As String = "SELECT StandortID FROM StandorteTV WHERE StandortBezeichnung = @StandortBezeichnung"
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@StandortBezeichnung", standort)
Dim result As Object = cmd.ExecuteScalar()
If result IsNot Nothing AndAlso Not IsDBNull(result) Then
standortID = Convert.ToInt32(result)
End If
End Using
End Using
Catch ex As SqlException
Throw New Exception("SQL Fehler beim Abrufen der StandortID: " & ex.Message, ex)
Catch ex As Exception
Throw New Exception("Allgemeiner Fehler beim Abrufen der StandortID: " & ex.Message, ex)
End Try
Return standortID
End Function
''' <summary>
''' Speichert die TV-Einstellungen in der Datenbank.
''' </summary>
''' <param name="settings">Die TV-Einstellungen, die gespeichert werden sollen.</param>
Public Sub SaveTvSettings(settings As cTvSettings)
Dim sqlCheck As String = "SELECT COUNT(*) FROM AvisoTvSettings WHERE StandortID = @StandortID"
Dim sqlUpdate As String = "UPDATE AvisoTvSettings SET
KachelWidthInPercent = @KachelWidthInPercent,
KachelHeightInPercent = @KachelHeightInPercent,
KachelFontSizeLkwNummer = @KachelFontSizeLkwNummer,
KachelFontSizeDateTime = @KachelFontSizeDateTime,
KachelRowGapInPercent = @KachelRowGapInPercent,
SeitenwechselInSek = @SeitenwechselInSek,
TextBalkenHeightInPercent = @TextBalkenHeightInPercent,
FlaggeLeft = @FlaggeLeft,
FlaggeBottom = @FlaggeBottom,
Logo = @Logo
WHERE StandortID = @StandortID"
Dim sqlInsert As String = "INSERT INTO AvisoTvSettings
(StandortID, KachelWidthInPercent, KachelHeightInPercent,KachelRowGapInPercent,
KachelFontSizeLkwNummer, KachelFontSizeDateTime,
SeitenwechselInSek, TextBalkenHeightInPercent,FlaggeLeft,FlaggeBottom,Logo)
VALUES
(@StandortID, @KachelWidthInPercent, @KachelHeightInPercent,@KachelRowGapInPercent,
@KachelFontSizeLkwNummer, @KachelFontSizeDateTime,
@SeitenwechselInSek, @TextBalkenHeightInPercent,@FlaggeLeft,@FlaggeBottom,@Logo)"
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
' Überprüfen, ob bereits Einstellungen für den Standort existieren
Dim recordExists As Boolean
Using cmdCheck As New SqlCommand(sqlCheck, conn)
cmdCheck.Parameters.AddWithValue("@StandortID", settings.StandortID)
recordExists = Convert.ToInt32(cmdCheck.ExecuteScalar()) > 0
End Using
' Wähle Update oder Insert basierend auf der Existenz
Dim sql As String = If(recordExists, sqlUpdate, sqlInsert)
Using cmdSave As New SqlCommand(sql, conn)
cmdSave.Parameters.AddWithValue("@StandortID", settings.StandortID)
cmdSave.Parameters.AddWithValue("@KachelWidthInPercent", settings.KachelWidthInPercent)
cmdSave.Parameters.AddWithValue("@KachelHeightInPercent", settings.KachelHeightInPercent)
cmdSave.Parameters.AddWithValue("@KachelRowGapInPercent", settings.KachelRowGapInPercent)
cmdSave.Parameters.AddWithValue("@KachelFontSizeLkwNummer", settings.KachelFontSizeLkwNummer)
cmdSave.Parameters.AddWithValue("@KachelFontSizeDateTime", settings.KachelFontSizeDateTime)
cmdSave.Parameters.AddWithValue("@SeitenwechselInSek", settings.SeitenwechselInSek)
cmdSave.Parameters.AddWithValue("@TextBalkenHeightInPercent", settings.TextBalkenHeightInPercent)
cmdSave.Parameters.AddWithValue("@FlaggeLeft", settings.TextFlaggeLeft)
cmdSave.Parameters.AddWithValue("@FlaggeBottom", settings.TextFlaggeBottom)
cmdSave.Parameters.AddWithValue("@Logo", settings.SelectedLogoValue)
cmdSave.ExecuteNonQuery()
End Using
End Using
Catch ex As SqlException
Throw New Exception("SQL Fehler beim Speichern der TV-Einstellungen: " & ex.Message, ex)
Catch ex As Exception
Throw New Exception("Allgemeiner Fehler beim Speichern der TV-Einstellungen: " & ex.Message, ex)
End Try
End Sub
''' <summary>
''' Lädt die TV-Einstellungen basierend auf der StandortID.
''' </summary>
''' <param name="standortID">Die StandortID, für die die Einstellungen geladen werden sollen.</param>
''' <returns>Eine Liste der entsprechenden TV-Einstellungen.</returns>
Public Function GetTvSettingsByStandort(standortID As Integer) As List(Of cTvSettings)
Dim SettingsList As New List(Of cTvSettings)()
Dim sql As String = "SELECT * FROM AvisoTvSettings WHERE StandortID = @StandortID"
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@StandortID", standortID)
Using dr As SqlDataReader = cmd.ExecuteReader()
While dr.Read()
Dim settings As New cTvSettings() With {
.TVSettingID = Convert.ToInt32(dr("TvSettingID")),
.StandortID = Convert.ToInt32(dr("StandortID")),
.KachelWidthInPercent = If(IsDBNull(dr("KachelWidthInPercent")), 0, Convert.ToDouble(dr("KachelWidthInPercent"))),
.KachelHeightInPercent = If(IsDBNull(dr("KachelHeightInPercent")), 0, Convert.ToDouble(dr("KachelHeightInPercent"))),
.KachelRowGapInPercent = If(IsDBNull(dr("KachelRowGapInPercent")), 0, Convert.ToDouble(dr("KachelRowGapInPercent"))),
.KachelFontSizeLkwNummer = If(IsDBNull(dr("KachelFontSizeLkwNummer")), 0, Convert.ToDouble(dr("KachelFontSizeLkwNummer"))),
.KachelFontSizeDateTime = If(IsDBNull(dr("KachelFontSizeDateTime")), 0, Convert.ToDouble(dr("KachelFontSizeDateTime"))),
.SeitenwechselInSek = If(IsDBNull(dr("SeitenwechselInSek")), 0, Convert.ToInt32(dr("SeitenwechselInSek"))),
.TextBalkenHeightInPercent = If(IsDBNull(dr("TextBalkenHeightInPercent")), 0, Convert.ToDouble(dr("TextBalkenHeightInPercent"))),
.TextFlaggeBottom = If(IsDBNull(dr("FlaggeBottom")), 0, Convert.ToDouble(dr("FlaggeBottom"))),
.TextFlaggeLeft = If(IsDBNull(dr("FlaggeLeft")), 0, Convert.ToDouble(dr("FlaggeLeft"))),
.SelectedLogoValue = If(IsDBNull(dr("Logo")), "", Convert.ToString(dr("Logo")))
}
SettingsList.Add(settings)
End While
End Using
End Using
End Using
Catch ex As SqlException
Throw New Exception("SQL Fehler beim Laden der TV-Einstellungen: " & ex.Message, ex)
Catch ex As Exception
Throw New Exception("Allgemeiner Fehler beim Laden der TV-Einstellungen: " & ex.Message, ex)
End Try
Return SettingsList
End Function
''' <summary>
''' Lädt alle TV-Textbezeichnungen aus der Datenbank.
''' </summary>
''' <returns>Eine Liste aller TV-Textbezeichnungen.</returns>
Public Function LadenAlleTvTextBezeichnungen() As List(Of cTvTextBezeichnung)
Dim bezeichnungen As New List(Of cTvTextBezeichnung)()
Dim sql As String = "
SELECT TvTextBezeichnungID, TvTextBezeichnung
FROM AvisoTvNew
ORDER BY TvTextBezeichnung
"
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
Using dr As SqlDataReader = cmd.ExecuteReader()
While dr.Read()
Dim bezeichnung As New cTvTextBezeichnung() With {
.TvTextBezeichnungID = Convert.ToInt32(dr("TvTextBezeichnungID")),
.TvTextBezeichnung = Convert.ToString(dr("TvTextBezeichnung"))
}
bezeichnungen.Add(bezeichnung)
End While
End Using
End Using
End Using
Catch ex As SqlException
Throw New Exception("SQL Fehler beim Laden der TvTextBezeichnungen: " & ex.Message, ex)
Catch ex As Exception
Throw New Exception("Allgemeiner Fehler beim Laden der TvTextBezeichnungen: " & ex.Message, ex)
End Try
Return bezeichnungen
End Function
''' <summary>
''' Überprüft, ob eine TV-Textbezeichnung bereits vorhanden ist.
''' </summary>
''' <param name="tvTextBezeichnung">Die TV-Textbezeichnung, die überprüft werden soll.</param>
''' <returns>True, wenn die Bezeichnung vorhanden ist; andernfalls False.</returns>
Public Function IstTvTextBezeichnungVorhanden(tvTextBezeichnung As String) As Boolean
Dim vorhanden As Boolean = False
Dim sql As String = "SELECT COUNT(*) FROM AvisoTvNew WHERE TvTextBezeichnung = @TvTextBezeichnung"
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@TvTextBezeichnung", tvTextBezeichnung)
Dim count As Integer = Convert.ToInt32(cmd.ExecuteScalar())
If count > 0 Then
vorhanden = True
End If
End Using
End Using
Catch ex As SqlException
Throw New Exception("SQL Fehler beim Überprüfen der TvTextBezeichnung: " & ex.Message, ex)
Catch ex As Exception
Throw New Exception("Allgemeiner Fehler beim Überprüfen der TvTextBezeichnung: " & ex.Message, ex)
End Try
Return vorhanden
End Function
''' <summary>
''' Liest AvisoTvNew-Einträge basierend auf den angegebenen Kriterien.
''' </summary>
''' <param name="tvid">Die TV-TextbezeichnungID.</param>
''' <param name="bezeichnung">Die Bezeichnung.</param>
''' <param name="StandortBezeichnung">Der Standort.</param>
''' <param name="liste">Die Liste, in die die Ergebnisse eingefügt werden.</param>
Public Sub LesenAvisoTvNew(tvid As Integer, bezeichnung As String, StandortBezeichnung As String, ByRef liste As List(Of cAvisoTvNew))
Dim sql As String = "SELECT
stv.TvTextBezeichnungID,
stv.StandortID,
stv.Prio,
a.TvTextBezeichnung,
s.Standort,
a.FixeZeile1RTF,
a.FixeZeile2RTF,
a.FixeZeile3RTF,
a.StartDate,
a.EndDate,
a.StartTime,
a.EndTime,
a.IsRecurring,
a.IsMonday,
a.IsTuesday,
a.IsWednesday,
a.IsThursday,
a.IsFriday,
a.IsSaturday,
a.IsSunday,
a.IsActive
FROM AvisoTvNew a
JOIN StandortTvBezeichnung stv ON a.TvTextBezeichnungID = stv.TvTextBezeichnungID
JOIN StandorteTV s ON stv.StandortID = s.StandortID
WHERE 1=1"
If tvid <> 0 Then
sql &= " AND a.TvTextBezeichnungID = @TvTextBezeichnungID"
End If
If Not String.IsNullOrWhiteSpace(bezeichnung) Then
sql &= " AND a.TVTextBezeichnung LIKE @TVTextBezeichnung"
End If
If Not String.IsNullOrWhiteSpace(StandortBezeichnung) Then
sql &= " AND s.Standortbezeichnung = @StandortBezeichnung"
End If
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
If tvid <> 0 Then
cmd.Parameters.AddWithValue("@TvTextBezeichnungID", tvid)
End If
If Not String.IsNullOrWhiteSpace(bezeichnung) Then
cmd.Parameters.AddWithValue("@TVTextBezeichnung", "%" & bezeichnung & "%")
End If
If Not String.IsNullOrWhiteSpace(StandortBezeichnung) Then
cmd.Parameters.AddWithValue("@StandortBezeichnung", StandortBezeichnung)
End If
Using dr As SqlDataReader = cmd.ExecuteReader()
While dr.Read()
Dim aviso As New cAvisoTvNew() With {
.TvTextBezeichnungID = Convert.ToInt32(dr("TvTextBezeichnungID")),
.StandortID = Convert.ToInt32(dr("StandortID")),
.TvTextBezeichnung = Convert.ToString(dr("TVTextBezeichnung")),
.Standort = Convert.ToString(dr("Standort")),
.FixeZeile1RTF = If(IsDBNull(dr("FixeZeile1RTF")), Nothing, Convert.ToString(dr("FixeZeile1RTF"))),
.FixeZeile2RTF = If(IsDBNull(dr("FixeZeile2RTF")), Nothing, Convert.ToString(dr("FixeZeile2RTF"))),
.FixeZeile3RTF = If(IsDBNull(dr("FixeZeile3RTF")), Nothing, Convert.ToString(dr("FixeZeile3RTF"))),
.Prio = If(IsDBNull(dr("Prio")), Nothing, Convert.ToInt32(dr("Prio"))),
.StartDate = If(IsDBNull(dr("StartDate")), CType(Nothing, Date?), Convert.ToDateTime(dr("StartDate"))),
.EndDate = If(IsDBNull(dr("EndDate")), CType(Nothing, Date?), Convert.ToDateTime(dr("EndDate"))),
.StartTime = If(IsDBNull(dr("StartTime")), CType(Nothing, TimeSpan?), CType(dr("StartTime"), TimeSpan)),
.EndTime = If(IsDBNull(dr("EndTime")), CType(Nothing, TimeSpan?), CType(dr("EndTime"), TimeSpan)),
.IsRecurring = If(IsDBNull(dr("IsRecurring")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsRecurring"))),
.IsMonday = If(IsDBNull(dr("IsMonday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsMonday"))),
.IsTuesday = If(IsDBNull(dr("IsTuesday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsTuesday"))),
.IsWednesday = If(IsDBNull(dr("IsWednesday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsWednesday"))),
.IsThursday = If(IsDBNull(dr("IsThursday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsThursday"))),
.IsFriday = If(IsDBNull(dr("IsFriday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsFriday"))),
.IsSaturday = If(IsDBNull(dr("IsSaturday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsSaturday"))),
.IsSunday = If(IsDBNull(dr("IsSunday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsSunday"))),
.IsActive = Convert.ToBoolean(dr("IsActive"))
}
liste.Add(aviso)
End While
End Using
End Using
End Using
Catch ex As SqlException
Throw New Exception("SQL Fehler beim Lesen der Daten: " & ex.Message, ex)
Catch ex As Exception
Throw New Exception("Allgemeiner Fehler beim Lesen der Daten: " & ex.Message, ex)
End Try
End Sub
''' <summary>
''' Liest alle AvisoTvNew-Einträge aus der Datenbank.
''' </summary>
''' <param name="liste">Die Liste, in die die Ergebnisse eingefügt werden.</param>
Public Sub LesenAlleAvisoTvNew(ByRef liste As List(Of cAvisoTvNew))
' Basis-SQL-Abfrage ohne Filter
Dim sql As String = "SELECT
a.TvTextBezeichnungID,
a.TvTextBezeichnung,
a.FixeZeile1RTF,
a.FixeZeile2RTF,
a.FixeZeile3RTF,
a.Prio,
a.StartDate,
a.EndDate,
a.StartTime,
a.EndTime,
a.IsRecurring,
a.IsMonday,
a.IsTuesday,
a.IsWednesday,
a.IsThursday,
a.IsFriday,
a.IsSaturday,
a.IsSunday,
a.IsActive
FROM AvisoTvNew a"
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
Using dr As SqlDataReader = cmd.ExecuteReader()
While dr.Read()
Dim aviso As New cAvisoTvNew() With {
.TvTextBezeichnungID = If(IsDBNull(dr("TvTextBezeichnungID")), 0, Convert.ToInt32(dr("TvTextBezeichnungID"))),
.TvTextBezeichnung = If(IsDBNull(dr("TvTextBezeichnung")), String.Empty, dr("TvTextBezeichnung").ToString()),
.FixeZeile1RTF = If(IsDBNull(dr("FixeZeile1RTF")), Nothing, dr("FixeZeile1RTF").ToString()),
.FixeZeile2RTF = If(IsDBNull(dr("FixeZeile2RTF")), Nothing, dr("FixeZeile2RTF").ToString()),
.FixeZeile3RTF = If(IsDBNull(dr("FixeZeile3RTF")), Nothing, dr("FixeZeile3RTF").ToString()),
.Prio = If(IsDBNull(dr("Prio")), 0, Convert.ToInt32(dr("Prio"))),
.StartDate = If(IsDBNull(dr("StartDate")), CType(Nothing, Date?), Convert.ToDateTime(dr("StartDate"))),
.EndDate = If(IsDBNull(dr("EndDate")), CType(Nothing, Date?), Convert.ToDateTime(dr("EndDate"))),
.StartTime = If(IsDBNull(dr("StartTime")), CType(Nothing, TimeSpan?), CType(dr("StartTime"), TimeSpan)),
.EndTime = If(IsDBNull(dr("EndTime")), CType(Nothing, TimeSpan?), CType(dr("EndTime"), TimeSpan)),
.IsRecurring = If(IsDBNull(dr("IsRecurring")), False, Convert.ToBoolean(dr("IsRecurring"))),
.IsMonday = If(IsDBNull(dr("IsMonday")), False, Convert.ToBoolean(dr("IsMonday"))),
.IsTuesday = If(IsDBNull(dr("IsTuesday")), False, Convert.ToBoolean(dr("IsTuesday"))),
.IsWednesday = If(IsDBNull(dr("IsWednesday")), False, Convert.ToBoolean(dr("IsWednesday"))),
.IsThursday = If(IsDBNull(dr("IsThursday")), False, Convert.ToBoolean(dr("IsThursday"))),
.IsFriday = If(IsDBNull(dr("IsFriday")), False, Convert.ToBoolean(dr("IsFriday"))),
.IsSaturday = If(IsDBNull(dr("IsSaturday")), False, Convert.ToBoolean(dr("IsSaturday"))),
.IsSunday = If(IsDBNull(dr("IsSunday")), False, Convert.ToBoolean(dr("IsSunday"))),
.IsActive = If(IsDBNull(dr("IsActive")), False, Convert.ToBoolean(dr("IsActive")))
}
liste.Add(aviso)
End While
End Using
End Using
End Using
Catch ex As SqlException
Throw New Exception($"SQL Fehler beim Lesen der Daten: {ex.Message}", ex)
Catch ex As Exception
Throw New Exception($"Allgemeiner Fehler beim Lesen der Daten: {ex.Message}", ex)
End Try
End Sub
''' <summary>
''' Speichert einen AvisoTvNew-Eintrag in der Datenbank.
''' </summary>
''' <param name="aviso">Der AvisoTvNew-Eintrag, der gespeichert werden soll.</param>
Public Sub SpeichernAvisoTvNew(aviso As cAvisoTvNew)
Dim sqlInsert As String
Dim sqlUpdate As String
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
Using transaction As SqlTransaction = conn.BeginTransaction()
Try
If aviso.TvTextBezeichnungID = 0 Then
' Neuanlage
sqlInsert = "INSERT INTO AvisoTvNew (
TvTextBezeichnung,
FixeZeile1RTF,
FixeZeile1HTML,
FixeZeile2RTF,
FixeZeile2HTML,
FixeZeile3RTF,
FixeZeile3HTML,
StartDate,
EndDate,
StartTime,
EndTime,
IsRecurring,
IsMonday,
IsTuesday,
IsWednesday,
IsThursday,
IsFriday,
IsSaturday,
IsSunday,
Prio,
IsActive
) VALUES (
@TvTextBezeichnung,
@FixeZeile1RTF,
@FixeZeile1HTML,
@FixeZeile2RTF,
@FixeZeile2HTML,
@FixeZeile3RTF,
@FixeZeile3HTML,
@StartDate,
@EndDate,
@StartTime,
@EndTime,
@IsRecurring,
@IsMonday,
@IsTuesday,
@IsWednesday,
@IsThursday,
@IsFriday,
@IsSaturday,
@IsSunday,
@Prio,
@IsActive
);
SELECT CAST(scope_identity() AS int);"
Using cmd As New SqlCommand(sqlInsert, conn, transaction)
cmd.Parameters.AddWithValue("@TvTextBezeichnung", aviso.TvTextBezeichnung)
cmd.Parameters.AddWithValue("@FixeZeile1RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile1RTF), CType(Nothing, String), aviso.FixeZeile1RTF))
cmd.Parameters.AddWithValue("@FixeZeile1HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile1HTML), CType(Nothing, String), aviso.FixeZeile1HTML))
cmd.Parameters.AddWithValue("@FixeZeile2RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile2RTF), DBNull.Value, aviso.FixeZeile2RTF))
cmd.Parameters.AddWithValue("@FixeZeile2HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile2HTML), DBNull.Value, aviso.FixeZeile2HTML))
cmd.Parameters.AddWithValue("@FixeZeile3RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile3RTF), DBNull.Value, aviso.FixeZeile3RTF))
cmd.Parameters.AddWithValue("@FixeZeile3HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile3HTML), DBNull.Value, aviso.FixeZeile3HTML))
cmd.Parameters.AddWithValue("@StartDate", If(aviso.StartDate.HasValue, CType(aviso.StartDate.Value, Object), DBNull.Value))
cmd.Parameters.AddWithValue("@EndDate", If(aviso.EndDate.HasValue, CType(aviso.EndDate.Value, Object), DBNull.Value))
cmd.Parameters.AddWithValue("@StartTime", If(aviso.StartTime.HasValue, CType(aviso.StartTime.Value, Object), DBNull.Value))
cmd.Parameters.AddWithValue("@EndTime", If(aviso.EndTime.HasValue, CType(aviso.EndTime.Value, Object), DBNull.Value))
cmd.Parameters.AddWithValue("@Prio", aviso.Prio)
cmd.Parameters.AddWithValue("@IsRecurring", aviso.IsRecurring)
cmd.Parameters.AddWithValue("@IsMonday", aviso.IsMonday)
cmd.Parameters.AddWithValue("@IsTuesday", aviso.IsTuesday)
cmd.Parameters.AddWithValue("@IsWednesday", aviso.IsWednesday)
cmd.Parameters.AddWithValue("@IsThursday", aviso.IsThursday)
cmd.Parameters.AddWithValue("@IsFriday", aviso.IsFriday)
cmd.Parameters.AddWithValue("@IsSaturday", aviso.IsSaturday)
cmd.Parameters.AddWithValue("@IsSunday", aviso.IsSunday)
cmd.Parameters.AddWithValue("@IsActive", aviso.IsActive)
Dim result As Object = cmd.ExecuteScalar()
If result Is Nothing OrElse IsDBNull(result) Then
Throw New Exception("Das INSERT hat keine ID zurückgegeben.")
End If
aviso.TvTextBezeichnungID = Convert.ToInt32(result)
End Using
Else
' Aktualisierung
sqlUpdate = "UPDATE AvisoTvNew SET
FixeZeile1RTF = @FixeZeile1RTF,
FixeZeile1HTML = @FixeZeile1HTML,
FixeZeile2RTF = @FixeZeile2RTF,
FixeZeile2HTML = @FixeZeile2HTML,
FixeZeile3RTF = @FixeZeile3RTF,
FixeZeile3HTML = @FixeZeile3HTML,
StartDate = @StartDate,
EndDate = @EndDate,
StartTime = @StartTime,
EndTime = @EndTime,
IsRecurring = @IsRecurring,
IsMonday = @IsMonday,
IsTuesday = @IsTuesday,
IsWednesday = @IsWednesday,
IsThursday = @IsThursday,
IsFriday = @IsFriday,
IsSaturday = @IsSaturday,
IsSunday = @IsSunday,
IsActive = @IsActive,
Prio = @Prio
WHERE TvTextBezeichnungID = @TvTextBezeichnungID"
Using cmd As New SqlCommand(sqlUpdate, conn, transaction)
cmd.Parameters.AddWithValue("@FixeZeile1RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile1RTF), CType(Nothing, String), aviso.FixeZeile1RTF))
cmd.Parameters.AddWithValue("@FixeZeile1HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile1HTML), CType(Nothing, String), aviso.FixeZeile1HTML))
cmd.Parameters.AddWithValue("@FixeZeile2RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile2RTF), DBNull.Value, aviso.FixeZeile2RTF))
cmd.Parameters.AddWithValue("@FixeZeile2HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile2HTML), DBNull.Value, aviso.FixeZeile2HTML))
cmd.Parameters.AddWithValue("@FixeZeile3RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile3RTF), DBNull.Value, aviso.FixeZeile3RTF))
cmd.Parameters.AddWithValue("@FixeZeile3HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile3HTML), DBNull.Value, aviso.FixeZeile3HTML))
cmd.Parameters.AddWithValue("@StartDate", If(aviso.StartDate.HasValue, CType(aviso.StartDate.Value, Object), DBNull.Value))
cmd.Parameters.AddWithValue("@EndDate", If(aviso.EndDate.HasValue, CType(aviso.EndDate.Value, Object), DBNull.Value))
cmd.Parameters.AddWithValue("@StartTime", If(aviso.StartTime.HasValue, CType(aviso.StartTime.Value, Object), DBNull.Value))
cmd.Parameters.AddWithValue("@EndTime", If(aviso.EndTime.HasValue, CType(aviso.EndTime.Value, Object), DBNull.Value))
cmd.Parameters.AddWithValue("@IsRecurring", aviso.IsRecurring)
cmd.Parameters.AddWithValue("@IsMonday", aviso.IsMonday)
cmd.Parameters.AddWithValue("@IsTuesday", aviso.IsTuesday)
cmd.Parameters.AddWithValue("@IsWednesday", aviso.IsWednesday)
cmd.Parameters.AddWithValue("@IsThursday", aviso.IsThursday)
cmd.Parameters.AddWithValue("@IsFriday", aviso.IsFriday)
cmd.Parameters.AddWithValue("@IsSaturday", aviso.IsSaturday)
cmd.Parameters.AddWithValue("@IsSunday", aviso.IsSunday)
cmd.Parameters.AddWithValue("@IsActive", aviso.IsActive)
cmd.Parameters.AddWithValue("@Prio", aviso.Prio)
cmd.Parameters.AddWithValue("@TvTextBezeichnungID", aviso.TvTextBezeichnungID)
cmd.ExecuteNonQuery()
End Using
End If
' Einfügen oder Aktualisieren in die StandortTvBezeichnung-Tabelle
Dim sqlLink As String = "
IF EXISTS (
SELECT 1
FROM StandortTvBezeichnung
WHERE StandortID = @StandortID
AND TvTextBezeichnungID = @TvTextBezeichnungID
)
BEGIN
UPDATE StandortTvBezeichnung
SET
Prio = @Prio
WHERE StandortID = @StandortID
AND TvTextBezeichnungID = @TvTextBezeichnungID
END
ELSE
BEGIN
INSERT INTO StandortTvBezeichnung (StandortID, TvTextBezeichnungID)
VALUES (@StandortID, @TvTextBezeichnungID)
END
"
Using cmdLink As New SqlCommand(sqlLink, conn, transaction)
cmdLink.Parameters.AddWithValue("@StandortID", aviso.StandortID)
cmdLink.Parameters.AddWithValue("@Prio", aviso.Prio)
cmdLink.Parameters.AddWithValue("@TvTextBezeichnungID", aviso.TvTextBezeichnungID)
cmdLink.ExecuteNonQuery()
End Using
' Transaktion committen
transaction.Commit()
Catch ex As Exception
' Fehler: Transaktion zurückrollen
Try
transaction.Rollback()
Catch rollbackEx As Exception
Throw New Exception("Fehler beim Zurückrollen der Transaktion: " & rollbackEx.Message, rollbackEx)
End Try
Throw
End Try
End Using
End Using
Catch ex As SqlException
Throw New Exception("SQL Fehler beim Speichern des Eintrags: " & ex.Message, ex)
Catch ex As Exception
Throw New Exception("Allgemeiner Fehler beim Speichern des Eintrags: " & ex.Message, ex)
End Try
End Sub
''' <summary>
''' Setzt einen AvisoTvNew-Eintrag auf inaktiv.
''' </summary>
''' <param name="hID">Die ID des Eintrags, der inaktiv gesetzt werden soll.</param>
Public Sub SetzeAufInaktiv(ByVal hID As Integer)
Dim sql As String = "UPDATE AvisoTvNew SET IsActive = 0 WHERE TVID = @TVID"
Try
Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@TVID", hID)
Dim rowsAffected As Integer = cmd.ExecuteNonQuery()
If rowsAffected = 0 Then
Throw New Exception("Der Datensatz konnte nicht auf inaktiv gesetzt werden. Möglicherweise existiert er nicht mehr.")
End If
End Using
End Using
Catch ex As SqlException
Throw New Exception("AvisoTvNew-Eintrag kann nicht auf inaktiv gesetzt werden! " & vbCrLf & ex.Message, ex)
Catch ex As Exception
Throw New Exception("Fehler beim Setzen auf inaktiv: " & ex.Message, ex)
End Try
End Sub
End Class
Public Class cAvisoTV
Property TVID As Long = 0
Property FixeZeile1 As String

View File

@@ -53,7 +53,9 @@ Public Class cMessenger
Public Shared Function SET_LKWCHAT_INAKTIV(AvisoId) As Integer
Return SQL.doSQL("UPDATE tblMessenger_Chat SET chat_aktiv=0 WHERE chat_AvisoId='" & AvisoId & "' AND chat_art='LKW_CHAT' ", "ADMIN")
End Function
Public Shared Function SET_LKWCHAT_AKTIV(AvisoId) As Integer
Return SQL.doSQL("UPDATE tblMessenger_Chat SET chat_aktiv=1 WHERE chat_AvisoId='" & AvisoId & "' AND chat_art='LKW_CHAT' ", "ADMIN")
End Function
Public Shared Function GET_NewMSG_COUNT_ART(maId, chat_art) As Integer
If maId < 0 Then maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
'Return SQL.getValueTxtBySql("SELECT isnull(COUNT(*),0) FROM tblMessenger_ChatMessages INNER JOIN tblMessenger_Chat on chat_id=chatMg_chatId INNER JOIN tblMessenger_ChatMessageStatus ON chatMgSt_chatMsgId=chatMg_id WHERE chatMgSt_MaId=" & maId & " AND chatMgSt_gelesen=0 AND chat_art='" & chat_art & "' AND (SELECT COUNT(*) FROM tblMessenger_ChatMembers WHERE chatMB_chatId=chat_id AND chatMB_maId=" & maId & ")>0", "ADMIN",,, 0)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ncts.dgtaxud.ec" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" targetNamespace="http://ncts.dgtaxud.ec" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="51.8.6" vc:minVersion="1.1">
<!--================================================================================-->
<!--===== IE015: E_DEC_DAT -->
<!--===== DECLARATION DATA -->
<!--===== NCTS P5 Phase Definition -->
<!--===== XSD Version 51.8.6 -->
<!--================================================================================-->
<!--================================================================================-->
<!--===== Includes -->
<!--================================================================================-->
<xs:include schemaLocation="ctypes.xsd" />
<xs:include schemaLocation="htypes.xsd" />
<!--================================================================================-->
<!--===== Root Element -->
<!--================================================================================-->
<xs:element name="CC015C" type="CC015CType" />
<!--================================================================================-->
<!--===== Root Element Content -->
<!--================================================================================-->
<xs:complexType name="CC015CType">
<xs:sequence>
<xs:group ref="MESSAGE" />
<xs:element name="TransitOperation" type="TransitOperationType06">
<xs:annotation>
<xs:documentation>
<description value="TRANSIT OPERATION" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Authorisation" minOccurs="0" maxOccurs="9" type="AuthorisationType03">
<xs:annotation>
<xs:documentation>
<description value="AUTHORISATION" />
<optionality value="D" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CustomsOfficeOfDeparture" type="CustomsOfficeOfDepartureType03">
<xs:annotation>
<xs:documentation>
<description value="CUSTOMS OFFICE OF DEPARTURE" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CustomsOfficeOfDestinationDeclared" type="CustomsOfficeOfDestinationDeclaredType01">
<xs:annotation>
<xs:documentation>
<description value="CUSTOMS OFFICE OF DESTINATION (DECLARED)" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CustomsOfficeOfTransitDeclared" minOccurs="0" maxOccurs="9" type="CustomsOfficeOfTransitDeclaredType04">
<xs:annotation>
<xs:documentation>
<description value="CUSTOMS OFFICE OF TRANSIT (DECLARED)" />
<optionality value="D" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CustomsOfficeOfExitForTransitDeclared" minOccurs="0" maxOccurs="9" type="CustomsOfficeOfExitForTransitDeclaredType02">
<xs:annotation>
<xs:documentation>
<description value="CUSTOMS OFFICE OF EXIT FOR TRANSIT (DECLARED)" />
<optionality value="D" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HolderOfTheTransitProcedure" type="HolderOfTheTransitProcedureType14">
<xs:annotation>
<xs:documentation>
<description value="HOLDER OF THE TRANSIT PROCEDURE" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Representative" minOccurs="0" type="RepresentativeType05">
<xs:annotation>
<xs:documentation>
<description value="REPRESENTATIVE" />
<optionality value="O" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Guarantee" maxOccurs="9" type="GuaranteeType02">
<xs:annotation>
<xs:documentation>
<description value="GUARANTEE" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Consignment" type="ConsignmentType20">
<xs:annotation>
<xs:documentation>
<description value="CONSIGNMENT" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="PhaseID" type="phaseIDtype" />
</xs:complexType>
</xs:schema>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ncts.dgtaxud.ec" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified" version="51.8.6" targetNamespace="http://ncts.dgtaxud.ec" attributeFormDefault="unqualified" vc:minVersion="1.1">
<!--=========================================-->
<!-- DOCUMENTATION ELEMENTS -->
<!--=========================================-->
<xs:element name="description">
<xs:complexType>
<xs:attribute name="value" type="xs:token" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="rule">
<xs:complexType>
<xs:attribute name="name" type="xs:token" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="condition">
<xs:complexType>
<xs:attribute name="name" type="xs:token" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="codeList">
<xs:complexType>
<xs:attribute name="name" type="xs:token" use="required" />
<xs:attribute name="type" type="xs:token" default="technical" />
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ncts.dgtaxud.ec" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="51.8.6" vc:minVersion="1.1" targetNamespace="http://ncts.dgtaxud.ec">
<!--=======================================================-->
<!--============= Message Header Definition ==============-->
<!--=======================================================-->
<xs:include schemaLocation="doc.xsd" />
<xs:include schemaLocation="tcl.xsd" />
<xs:include schemaLocation="stypes.xsd" />
<xs:group name="MESSAGE">
<xs:annotation>
<xs:documentation>Used by all messages</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="messageSender" type="MessageSenderContentType">
<xs:annotation>
<xs:documentation>
<description value="Message sender" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="messageRecipient" type="MessageRecipientContentType">
<xs:annotation>
<xs:documentation>
<description value="Message recipient" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="preparationDateAndTime" type="PreparationDateAndTimeContentType">
<xs:annotation>
<xs:documentation>
<description value="Preparation date and time" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="messageIdentification" type="MessageIdentificationContentType">
<xs:annotation>
<xs:documentation>
<description value="Message identification" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="messageType" type="MessageTypes">
<xs:annotation>
<xs:documentation>
<description value="Message type" />
<codeList name="MessageTypes" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="correlationIdentifier" type="CorrelationIdentifierContentType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<description value="Correlation identifier" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<!--================================================================================-->
<!--===== MessageIdentification -->
<!--================================================================================-->
<xs:simpleType name="MessageIdentificationContentType">
<xs:restriction base="xs:token">
<xs:pattern value=".{1,35}" />
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== MessageRecipient -->
<!--================================================================================-->
<xs:simpleType name="MessageRecipientContentType">
<xs:restriction base="xs:token">
<xs:pattern value=".{1,35}" />
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== MessageSender -->
<!--================================================================================-->
<xs:simpleType name="MessageSenderContentType">
<xs:restriction base="xs:token">
<xs:pattern value=".{1,35}" />
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== CorrelationIdentifier -->
<!--================================================================================-->
<xs:simpleType name="CorrelationIdentifierContentType">
<xs:restriction base="xs:token">
<xs:pattern value=".{1,35}" />
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== PreparationDateAndTime -->
<!--================================================================================-->
<xs:simpleType name="PreparationDateAndTimeContentType">
<xs:restriction base="xs:dateTime">
<xs:pattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}" />
</xs:restriction>
</xs:simpleType>
</xs:schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,974 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ncts.dgtaxud.ec" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" targetNamespace="http://ncts.dgtaxud.ec" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="51.8.6" vc:minVersion="1.1">
<!--================================================================================-->
<!--===== Modification Type -->
<!--===== Format: a1 -->
<!--===== CL024 -->
<!--================================================================================-->
<xs:simpleType name="ModificationType">
<xs:annotation>
<xs:documentation>The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="C">
<xs:annotation>
<xs:documentation>Create</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="D">
<xs:annotation>
<xs:documentation>Delete</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="U">
<xs:annotation>
<xs:documentation>Update</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== Month of Year -->
<!--===== Format: an2 -->
<!--===== CL026 -->
<!--================================================================================-->
<xs:simpleType name="MonthOfYear">
<xs:annotation>
<xs:documentation />
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="01">
<xs:annotation>
<xs:documentation>January</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="02">
<xs:annotation>
<xs:documentation>February</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="03">
<xs:annotation>
<xs:documentation>March</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="04">
<xs:annotation>
<xs:documentation>April</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="05">
<xs:annotation>
<xs:documentation>May</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="06">
<xs:annotation>
<xs:documentation>June</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="07">
<xs:annotation>
<xs:documentation>July</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="08">
<xs:annotation>
<xs:documentation>August</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="09">
<xs:annotation>
<xs:documentation>September</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="10">
<xs:annotation>
<xs:documentation>October</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="11">
<xs:annotation>
<xs:documentation>November</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="12">
<xs:annotation>
<xs:documentation>December</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== Flag -->
<!--===== Format: n1 -->
<!--===== CL027 -->
<!--================================================================================-->
<xs:simpleType name="Flag">
<xs:annotation>
<xs:documentation>Used for attributes that can have a positive or a negative value. The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="0">
<xs:annotation>
<xs:documentation>NO</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation>YES</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== XML Error Codes -->
<!--===== Format: n2 -->
<!--===== CL030 -->
<!--================================================================================-->
<xs:simpleType name="XmlErrorCodes">
<xs:annotation>
<xs:documentation>Defines the codes to be used for reporting errors on XML messages. The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="12">
<xs:annotation>
<xs:documentation>Incorrect enumeration</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="13">
<xs:annotation>
<xs:documentation>Missing</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="15">
<xs:annotation>
<xs:documentation>Not supported in this position</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="18">
<xs:annotation>
<xs:documentation>Unspecified Error / Other</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="35">
<xs:annotation>
<xs:documentation>Too many repetitions</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="39">
<xs:annotation>
<xs:documentation>Element too long (length constraint)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="40">
<xs:annotation>
<xs:documentation>Element too short (length constraint)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="50">
<xs:annotation>
<xs:documentation>Invalid Value for the specific type</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="51">
<xs:annotation>
<xs:documentation>Invalid value according to the pattern</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="52">
<xs:annotation>
<xs:documentation>Invalid XML format</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="53">
<xs:annotation>
<xs:documentation>Invalid character(s)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="54">
<xs:annotation>
<xs:documentation>Value is lower than the allowed lowest limit (Minimum Inclusive)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="55">
<xs:annotation>
<xs:documentation>Value is greater than the allowed upper limit (Maximum Inclusive)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="56">
<xs:annotation>
<xs:documentation>Value is lower than or equal to the allowed lowest limit (Minimum Exlcusive)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="57">
<xs:annotation>
<xs:documentation>Value is greater than or equal to the allowed upper limit (Maximum Exclusive)</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== Message Types -->
<!--===== Format: an..6 -->
<!--===== CL060 -->
<!--================================================================================-->
<xs:simpleType name="MessageTypes">
<xs:annotation>
<xs:documentation>The list of codes used to identify the type of messages exchanged on the Common Domain and on the External Domain (e.g. CD001B, CD302A, CC515C, CD801A).The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="CC004C">
<xs:annotation>
<xs:documentation>Amendment Acceptance</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC007C">
<xs:annotation>
<xs:documentation>Arrival Notification</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC009C">
<xs:annotation>
<xs:documentation>Invalidation Decision</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC013C">
<xs:annotation>
<xs:documentation>DECLARATION AMENDMENT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC014C">
<xs:annotation>
<xs:documentation>DECLARATION CANCELLATION REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC015C">
<xs:annotation>
<xs:documentation>DECLARATION DATA</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC017C">
<xs:annotation>
<xs:documentation>DEPARTURE CONTROL RESULTS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC019C">
<xs:annotation>
<xs:documentation>DISCREPANCIES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC022C">
<xs:annotation>
<xs:documentation>NOTIFICATION TO AMEND DECLARATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC023C">
<xs:annotation>
<xs:documentation>GUARANTOR NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC025C">
<xs:annotation>
<xs:documentation>GOODS RELEASE NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC026C">
<xs:annotation>
<xs:documentation>GUARANTEE ACCESS CODES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC028C">
<xs:annotation>
<xs:documentation>MRN ALLOCATED</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC029C">
<xs:annotation>
<xs:documentation>RELEASE FOR TRANSIT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC034C">
<xs:annotation>
<xs:documentation>QUERY ON GUARANTEES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC035C">
<xs:annotation>
<xs:documentation>RECOVERY NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC037C">
<xs:annotation>
<xs:documentation>RESPONSE QUERY ON GUARANTEES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC040C">
<xs:annotation>
<xs:documentation>TRANSIT CANCELLATION NOTIFICATION TO AES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC042C">
<xs:annotation>
<xs:documentation>DESTINATION CONTROL RESULTS TO AES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC043C">
<xs:annotation>
<xs:documentation>UNLOADING PERMISSION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC044C">
<xs:annotation>
<xs:documentation>UNLOADING REMARKS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC045C">
<xs:annotation>
<xs:documentation>WRITE-OFF NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC048C">
<xs:annotation>
<xs:documentation>RECOVERY COMMUNICATION TO AES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC051C">
<xs:annotation>
<xs:documentation>NO RELEASE FOR TRANSIT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC054C">
<xs:annotation>
<xs:documentation>REQUEST OF RELEASE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC055C">
<xs:annotation>
<xs:documentation>GUARANTEE NOT VALID</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC056C">
<xs:annotation>
<xs:documentation>REJECTION FROM OFFICE OF DEPARTURE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC057C">
<xs:annotation>
<xs:documentation>REJECTION FROM OFFICE OF DESTINATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC060C">
<xs:annotation>
<xs:documentation>CONTROL DECISION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC140C">
<xs:annotation>
<xs:documentation>REQUEST ON NON-ARRIVED MOVEMENT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC141C">
<xs:annotation>
<xs:documentation>INFORMATION ABOUT NON-ARRIVED MOVEMENT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC170C">
<xs:annotation>
<xs:documentation>PRESENTATION NOTIFICATION FOR THE PRE-LODGED DECLARATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC182C">
<xs:annotation>
<xs:documentation>FORWARDED INCIDENT NOTIFICATION TO ED</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC190C">
<xs:annotation>
<xs:documentation>TRANSIT PRESENTATION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC191C">
<xs:annotation>
<xs:documentation>TRANSIT PRESENTATION NOTIFICATION RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC224C">
<xs:annotation>
<xs:documentation>INDIVIDUAL GUARANTEE VOUCHER SOLD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC225C">
<xs:annotation>
<xs:documentation>GUARANTEE UPDATE NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC228C">
<xs:annotation>
<xs:documentation>COMPREHENSIVE GUARANTEE CANCELLATION LIABILITY LIBERATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC229C">
<xs:annotation>
<xs:documentation>INDIVIDUAL GUARANTEE VOUCHER REVOCATION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC231C">
<xs:annotation>
<xs:documentation>COMPREHENSIVE GUARANTEE INVALIDATION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC906C">
<xs:annotation>
<xs:documentation>FUNCTIONAL NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC917C">
<xs:annotation>
<xs:documentation>XML NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC928C">
<xs:annotation>
<xs:documentation>POSITIVE ACKNOWLEDGE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD001C">
<xs:annotation>
<xs:documentation>AAR</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD002C">
<xs:annotation>
<xs:documentation>AAR Request</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD003C">
<xs:annotation>
<xs:documentation>AAR Response</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD006C">
<xs:annotation>
<xs:documentation>ARRIVAL ADVICE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD010C">
<xs:annotation>
<xs:documentation>CANCELLATION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD012C">
<xs:annotation>
<xs:documentation>AAR-TIR-SPEED</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD018C">
<xs:annotation>
<xs:documentation>DESTINATION CONTROL RESULTS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD024C">
<xs:annotation>
<xs:documentation>FORWARDED ARRIVAL ADVICE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD027C">
<xs:annotation>
<xs:documentation>MOVEMENT QUERY</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD038C">
<xs:annotation>
<xs:documentation>RESPONSE TO MOVEMENT QUERY</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD049C">
<xs:annotation>
<xs:documentation>DISCREPANCIES SOLVED NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD050C">
<xs:annotation>
<xs:documentation>ANTICIPATED TRANSIT RECORD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD059C">
<xs:annotation>
<xs:documentation>CANCEL ENQUIRY NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD063C">
<xs:annotation>
<xs:documentation>RECOVERY COMMUNICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD070C">
<xs:annotation>
<xs:documentation>NOTIFICATION OF SYSTEM UNAVAILABILITY TO CD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD071C">
<xs:annotation>
<xs:documentation>NOTIFICATION OF SYSTEM UNAVAILABILITY TO ND</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD078C">
<xs:annotation>
<xs:documentation>INTER-DOMAIN LINKING</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD094C">
<xs:annotation>
<xs:documentation>STATUS REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD095C">
<xs:annotation>
<xs:documentation>STATUS RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD114C">
<xs:annotation>
<xs:documentation>ANTICIPATED TRANSIT RECORD REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD115C">
<xs:annotation>
<xs:documentation>ANTICIPATED TRANSIT RECORD RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD118C">
<xs:annotation>
<xs:documentation>NOTIFICATION CROSSING FRONTIER</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD142C">
<xs:annotation>
<xs:documentation>ENQUIRY REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD143C">
<xs:annotation>
<xs:documentation>ENQUIRY RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD144C">
<xs:annotation>
<xs:documentation>ENQUIRY INFORMATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD145C">
<xs:annotation>
<xs:documentation>ENQUIRY INFORMATION REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD150C">
<xs:annotation>
<xs:documentation>RECOVERY REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD151C">
<xs:annotation>
<xs:documentation>RECOVERY ACCEPTANCE NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD152C">
<xs:annotation>
<xs:documentation>RECOVERY DISPATCH NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD160C">
<xs:annotation>
<xs:documentation>ANTICIPATED EXIT FOR TRANSIT RECORD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD164C">
<xs:annotation>
<xs:documentation>ANTICIPATED EXIT FOR TRANSIT RECORD REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD165C">
<xs:annotation>
<xs:documentation>ANTICIPATED EXIT FOR TRANSIT RECORD RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD168C">
<xs:annotation>
<xs:documentation>NOTIFICATION LEAVING SECURITY AREA</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD180C">
<xs:annotation>
<xs:documentation>INCIDENT NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD181C">
<xs:annotation>
<xs:documentation>FORWARDED INCIDENT NOTIFICATION TO CD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD200C">
<xs:annotation>
<xs:documentation>GUARANTEE CHECK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD201C">
<xs:annotation>
<xs:documentation>GUARANTEE CHECK RESULT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD203C">
<xs:annotation>
<xs:documentation>GUARANTEE USE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD204C">
<xs:annotation>
<xs:documentation>GUARANTEE USE CANCELLATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD205C">
<xs:annotation>
<xs:documentation>GUARANTEE USE RESULT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD209C">
<xs:annotation>
<xs:documentation>CREDIT REFERENCE AMOUNT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD411D">
<xs:annotation>
<xs:documentation>SENDING OF STATISTICS DATA</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD903D">
<xs:annotation>
<xs:documentation>WARNING MESSAGE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD906C">
<xs:annotation>
<xs:documentation>FUNCTIONAL NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD917C">
<xs:annotation>
<xs:documentation>XML NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD971C">
<xs:annotation>
<xs:documentation>FULL UNAVAILABILITY SCHEDULE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD974C">
<xs:annotation>
<xs:documentation>NCA Availability request</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD975C">
<xs:annotation>
<xs:documentation>NCA Availability response</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== Country Codes (Customs Office Lists) -->
<!--===== Format: a2 -->
<!--===== CL070 -->
<!--================================================================================-->
<xs:simpleType name="CountryCodesCustomsOfficeLists">
<xs:annotation>
<xs:documentation>This Codelist includes the countries who are maintaining their Customs Offices in CS/RD2. It lists the country codes used as the first two characters of the Customs Office Reference Number. It corresponds to the content of the code list CL009 excluding 'AX', 'GF', 'GG', 'GP', 'IM', 'JE', 'LI', 'MC', 'MF', 'MQ', 'RE', 'SJ', 'XS' and 'YT'. This codelist is used for the Customs Office List. The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="AD">
<xs:annotation>
<xs:documentation>Andorra</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="AT">
<xs:annotation>
<xs:documentation>Austria</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="BE">
<xs:annotation>
<xs:documentation>Belgium</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="BG">
<xs:annotation>
<xs:documentation>Bulgaria</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CH">
<xs:annotation>
<xs:documentation>Switzerland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CY">
<xs:annotation>
<xs:documentation>Cyprus</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CZ">
<xs:annotation>
<xs:documentation>Czech Republic</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DE">
<xs:annotation>
<xs:documentation>Germany</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DK">
<xs:annotation>
<xs:documentation>Denmark</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="EE">
<xs:annotation>
<xs:documentation>Estonia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ES">
<xs:annotation>
<xs:documentation>Spain</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FI">
<xs:annotation>
<xs:documentation>Finland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FR">
<xs:annotation>
<xs:documentation>France</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="GB">
<xs:annotation>
<xs:documentation>United Kingdom</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="GR">
<xs:annotation>
<xs:documentation>Greece</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="HR">
<xs:annotation>
<xs:documentation>Croatia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="HU">
<xs:annotation>
<xs:documentation>Hungary</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="IE">
<xs:annotation>
<xs:documentation>Ireland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="IS">
<xs:annotation>
<xs:documentation>Iceland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="IT">
<xs:annotation>
<xs:documentation>Italy</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LT">
<xs:annotation>
<xs:documentation>Lithuania</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LU">
<xs:annotation>
<xs:documentation>Luxembourg</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LV">
<xs:annotation>
<xs:documentation>Latvia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MK">
<xs:annotation>
<xs:documentation>North Macedonia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MT">
<xs:annotation>
<xs:documentation>Malta</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="NL">
<xs:annotation>
<xs:documentation>Netherlands</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="NO">
<xs:annotation>
<xs:documentation>Norway</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="PL">
<xs:annotation>
<xs:documentation>Poland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="PT">
<xs:annotation>
<xs:documentation>Portugal</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RO">
<xs:annotation>
<xs:documentation>Romania</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RS">
<xs:annotation>
<xs:documentation>Serbia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SE">
<xs:annotation>
<xs:documentation>Sweden</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SI">
<xs:annotation>
<xs:documentation>Slovenia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SK">
<xs:annotation>
<xs:documentation>Slovakia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SM">
<xs:annotation>
<xs:documentation>San Marino</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="TR">
<xs:annotation>
<xs:documentation>Turkey</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="UA">
<xs:annotation>
<xs:documentation>Ukraine</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="XI">
<xs:annotation>
<xs:documentation>United Kingdom (Northern Ireland)</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== System Unavailability Type -->
<!--===== Format: a1 -->
<!--===== CL079 -->
<!--================================================================================-->
<xs:simpleType name="SystemUnavailabilityType">
<xs:annotation>
<xs:documentation>Used for the attribute SYSTEM UNAVAILABILITY.System Unavailability Type.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="N">
<xs:annotation>
<xs:documentation>Business service not implemented</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="S">
<xs:annotation>
<xs:documentation>Scheduled Unavailability</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="U">
<xs:annotation>
<xs:documentation>Unscheduled Unavailability</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== AES/NCTS P5 Functional Error Codes -->
<!--===== Format: n2 -->
<!--===== CL180 -->
<!--================================================================================-->
<xs:simpleType name="AesNctsP5FunctionalErrorCodes">
<xs:annotation>
<xs:documentation>Set of generic error codes, specific for AES and NCTS P5. The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="12">
<xs:annotation>
<xs:documentation>Codelist violation</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="13">
<xs:annotation>
<xs:documentation>Condition violation (Missing)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="14">
<xs:annotation>
<xs:documentation>Rule violation</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="15">
<xs:annotation>
<xs:documentation>Condition violation (Not allowed)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="26">
<xs:annotation>
<xs:documentation>Duplicate Message ID</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="50">
<xs:annotation>
<xs:documentation>Transitional constraint violation</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="51">
<xs:annotation>
<xs:documentation>EDI violation post downgrade</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="52">
<xs:annotation>
<xs:documentation>Functional violation post downgrade</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="90">
<xs:annotation>
<xs:documentation>Unknown MRN</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="92">
<xs:annotation>
<xs:documentation>Message out of sequence</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="93">
<xs:annotation>
<xs:documentation>Invalid MRN</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@@ -1,62 +1,214 @@
Public Class cATEZ_ncts_api
Imports System.Globalization
Imports System.IO
Imports System.Xml
Imports com.sun.corba.se.spi.orb
Public Class cATEZ_ncts_api
Shared API_KEY = "2a6fe6bf-6547-4d56-b14a-8a18f94f9e94"
Public Shared Sub query_declarations(startDate As Date, endDate As Date)
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Try
' 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
Dim http As New Chilkat.Http
Dim success As Boolean
Dim queryParams As New Chilkat.JsonObject
queryParams.UpdateString("startDate", startDate.ToString("yyyy-MM-ddTHH:mm:ss"))
queryParams.UpdateString("endDate", endDate.ToString("yyyy-MM-ddTHH:mm:ss"))
queryParams.UpdateInt("page", 0)
queryParams.UpdateInt("size", 10000)
Dim queryParams As New Chilkat.JsonObject
queryParams.UpdateString("startDate", startDate.ToString("yyyy-MM-ddTHH:mm:ss"))
queryParams.UpdateString("endDate", endDate.ToString("yyyy-MM-ddTHH:mm:ss"))
queryParams.UpdateInt("page", 0)
queryParams.UpdateInt("size", 10000)
http.SetRequestHeader("API-KEY", API_KEY)
http.SetRequestHeader("API-KEY", API_KEY)
Dim resp As Chilkat.HttpResponse = http.QuickRequestParams("GET", "https://transcode.singlewindow.io/api/tds/integrations/verag/declarations", queryParams)
If (http.LastMethodSuccess = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
Dim resp As Chilkat.HttpResponse = http.QuickRequestParams("GET", "https://transcode.singlewindow.io/api/tds/integrations/verag/declarations", queryParams)
If (http.LastMethodSuccess = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
Debug.WriteLine(resp.StatusCode)
Debug.WriteLine(resp.BodyStr)
Debug.WriteLine(resp.StatusCode)
Debug.WriteLine(resp.BodyStr)
'Dim SS = VERAG_PROG_ALLGEMEIN.cNCTS_ATEZ_query_declaration_response.root.LoadFromFile("")
'Dim SS = VERAG_PROG_ALLGEMEIN.cNCTS_ATEZ_query_declaration_response.root.LoadFromFile("")
'For Each c In SS.properties.content
'For Each c In SS.properties.content
'Next
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
'Next
End Sub
Public Shared Sub get_ie015_xml_by_mrn(MRN As String)
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Public Shared Function get_ie015_xml_by_mrn(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
Dim http As New Chilkat.Http
Dim success As Boolean
'http.SetRequestHeader("API-KEY", "{{API-KEY}}")
http.SetRequestHeader("API-KEY", API_KEY)
'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)
Exit Sub
End If
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)
Debug.WriteLine(sbResponseBody.GetAsString())
End Sub
Debug.WriteLine("Response status code = " & http.LastStatus)
Dim responseString = (sbResponseBody.GetAsString())
If responseString <> "" Then
Dim tempFilePath = saveStringToTmpXML(responseString)
Dim NCTS_P5 = VERAG_PROG_ALLGEMEIN.NCTS_P5_CC015C.CC015CType.LoadFromFile(tempFilePath)
result = saveXMLtoNCTS_FREMD(NCTS_P5, MRN)
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>"
' Temporäre Datei erstellen
Dim tempFilePath As String = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() & ".xml")
Try
' XML-String in die Datei schreiben
File.WriteAllText(tempFilePath, xmlString)
' Ausgabe des Pfads zur Kontrolle
Console.WriteLine("XML-Datei wurde gespeichert unter: " & tempFilePath)
' Optional: Datei laden und prüfen
Dim doc As New XmlDocument()
doc.Load(tempFilePath)
Return tempFilePath '"" doc.OuterXml
Catch ex As Exception
Console.WriteLine("Fehler: " & ex.Message)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
Private Shared Function saveXMLtoNCTS_FREMD(NCTS_P5 As VERAG_PROG_ALLGEMEIN.NCTS_P5_CC015C.CC015CType, MRN As String) As Boolean
Try
Dim NCTS_FREMD = VERAG_PROG_ALLGEMEIN.cNCTS_FREMD.LOADByMRN(MRN, True)
If NCTS_FREMD Is Nothing Then NCTS_FREMD = New cNCTS_FREMD
NCTS_FREMD.ncts_Partnersystem = "ATEZ"
NCTS_FREMD.ncts_MRN = MRN
If NCTS_P5 IsNot Nothing Then
If NCTS_P5.TransitOperation IsNot Nothing Then
If NCTS_P5.TransitOperation.limitDate.ToString <> "01.01.0001" Then
Try
NCTS_FREMD.ncts_LimitDate = DateTime.ParseExact(DateString, "yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture)
Catch ex As FormatException
Console.WriteLine("Invalid date format.")
End Try
End If
NCTS_FREMD.ncts_ObjectName = NCTS_P5.TransitOperation.LRN
NCTS_FREMD.ncts_Declarationtype = NCTS_P5.TransitOperation.declarationType
NCTS_FREMD.ncts_TransitDeclarationType = NCTS_P5.TransitOperation.declarationType
NCTS_FREMD.ncts_Security = NCTS_P5.TransitOperation.security
NCTS_FREMD.ncts_ReductedDatasetIndicator = NCTS_P5.TransitOperation.reducedDatasetIndicator
NCTS_FREMD.ncts_BindingItinerary = NCTS_P5.TransitOperation.bindingItinerary
End If
If NCTS_P5.CustomsOfficeOfDeparture IsNot Nothing Then NCTS_FREMD.ncts_CustomsOfficeOfDeparture = NCTS_P5.CustomsOfficeOfDeparture.referenceNumber
If NCTS_P5.CustomsOfficeOfDestinationDeclared IsNot Nothing Then NCTS_FREMD.ncts_CustomsOfficeOfDestinationDeclared = NCTS_P5.CustomsOfficeOfDestinationDeclared.referenceNumber
If NCTS_P5.HolderOfTheTransitProcedure IsNot Nothing Then
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_IdentificationNumber = NCTS_P5.HolderOfTheTransitProcedure.identificationNumber
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_Name = NCTS_P5.HolderOfTheTransitProcedure.name
If NCTS_P5.HolderOfTheTransitProcedure.Address IsNot Nothing Then
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_City = NCTS_P5.HolderOfTheTransitProcedure.Address.city
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_Postcode = NCTS_P5.HolderOfTheTransitProcedure.Address.postcode
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_Country = NCTS_P5.HolderOfTheTransitProcedure.Address.country
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_StreetNumber = NCTS_P5.HolderOfTheTransitProcedure.Address.streetAndNumber
End If
End If
If NCTS_P5.Guarantee IsNot Nothing AndAlso NCTS_P5.Guarantee.Count >= 0 AndAlso NCTS_P5.Guarantee(0).GuaranteeReference.Count > 0 Then
Dim GRT = New cNCTS_FREMD_Guarantee
GRT.nctsGRT_Type = NCTS_P5.Guarantee(0).guaranteeType
GRT.nctsGRT_AccessCode = NCTS_P5.Guarantee(0).GuaranteeReference(0).accessCode
GRT.nctsGRT_GRN = NCTS_P5.Guarantee(0).GuaranteeReference(0).GRN
GRT.nctsGRT_AmountToBeCoveredFremdWaehrung = NCTS_P5.Guarantee(0).GuaranteeReference(0).amountToBeCovered
GRT.nctsGRT_Currency = NCTS_P5.Guarantee(0).GuaranteeReference(0).currency
' MsgBox(If(GRT.nctsGRT_Currency, ""))
'--> EUR
If GRT.nctsGRT_AmountToBeCoveredFremdWaehrung IsNot Nothing Then
If If(GRT.nctsGRT_Currency, "") <> "EUR" Then
Dim betragEUR = VERAG_PROG_ALLGEMEIN.cEZB_Waehrungskurse.EXCHANGE(GRT.nctsGRT_AmountToBeCoveredFremdWaehrung, GRT.nctsGRT_Currency, NCTS_FREMD.ncts_Trans_DatumZeit.ToShortDateString)
GRT.nctsGRT_AmountToBeCovered = If(betragEUR > 0, betragEUR, GRT.nctsGRT_AmountToBeCoveredFremdWaehrung)
Else
GRT.nctsGRT_AmountToBeCovered = GRT.nctsGRT_AmountToBeCoveredFremdWaehrung
End If
End If
NCTS_FREMD.ncts_GUARANTEE.Clear()
NCTS_FREMD.ncts_GUARANTEE.Add(GRT)
End If
If NCTS_P5.Consignment IsNot Nothing AndAlso NCTS_P5.Consignment.HouseConsignment IsNot Nothing AndAlso NCTS_P5.Consignment.HouseConsignment.Count >= 0 Then
For Each NCTS_P5_HC In NCTS_P5.Consignment.HouseConsignment
Dim HC = New cNCTS_FREMD_HouseConsignment
HC.nctsHC_GrossMass = NCTS_P5_HC.grossMass
HC.nctsHC_ReferenceNumberUCR = NCTS_P5_HC.referenceNumberUCR
HC.nctsHC_CountryOfDestination = NCTS_P5_HC.countryOfDestination
Next
End If
Return NCTS_FREMD.SAVE_ALL 'Speichern
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Return False
End Try
End Function
End Class

View File

@@ -417,6 +417,8 @@
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Schnittstellen\ATEZ\NCTS_API\cATEZ_ncts_api.vb" />
<Compile Include="Schnittstellen\ATEZ\NCTS_API\NCTS-P5\CC015C.Designer.vb" />
<Compile Include="Schnittstellen\ATEZ\NCTS_API\NCTS-P5\cNCTS_FREMD.vb" />
<Compile Include="Schnittstellen\ATEZ\TARIFF\cATEZ_Tariff.vb" />
<Compile Include="Schnittstellen\CBAM\QReport_v17.00.Designer.vb" />
<Compile Include="Schnittstellen\cTariffKN8.vb" />
@@ -833,6 +835,24 @@
</None>
<None Include="ProgAllg.pfx" />
<None Include="Schnittstellen\ATEZ\NCTS_API\JSON_schema\query_declarationSchema.json" />
<None Include="Schnittstellen\ATEZ\NCTS_API\NCTS-P5\CC015C.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Schnittstellen\ATEZ\NCTS_API\NCTS-P5\ctypes.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Schnittstellen\ATEZ\NCTS_API\NCTS-P5\doc.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Schnittstellen\ATEZ\NCTS_API\NCTS-P5\htypes.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Schnittstellen\ATEZ\NCTS_API\NCTS-P5\stypes.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Schnittstellen\ATEZ\NCTS_API\NCTS-P5\tcl.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Schnittstellen\CBAM\QReport_v17.00.xsd">
<SubType>Designer</SubType>
</None>