From 5f18e9816c21e936b861f9062a7a99544bd4da33 Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Wed, 7 Jan 2026 15:46:47 +0100 Subject: [PATCH 1/3] CBAM Checkliste --- SDL/Formulare/KDFormulare/frmFormulare.vb | 3 + SDL/kunden/usrCntlCBAM.Designer.vb | 688 +++++++++--------- SDL/kunden/usrCntlCBAM.vb | 9 +- .../cVERAG_Zollanmeldung.vb | 11 +- 4 files changed, 367 insertions(+), 344 deletions(-) diff --git a/SDL/Formulare/KDFormulare/frmFormulare.vb b/SDL/Formulare/KDFormulare/frmFormulare.vb index a153c10f..1e6f0c0e 100644 --- a/SDL/Formulare/KDFormulare/frmFormulare.vb +++ b/SDL/Formulare/KDFormulare/frmFormulare.vb @@ -216,7 +216,10 @@ Public Class frmFormulare Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Case "IMEX" MyListBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("CBAM Checkliste", FormularManagerArten.CBAM_Checkliste)) + Case "FRONTOFFICE" + MyListBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("CBAM Checkliste", FormularManagerArten.CBAM_Checkliste)) Case "AMBAR" + MyListBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("CBAM Checkliste", FormularManagerArten.CBAM_Checkliste)) Case "ATILLA" Case "UNISPED" MyListBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("CBAM Checkliste", FormularManagerArten.CBAM_Checkliste)) diff --git a/SDL/kunden/usrCntlCBAM.Designer.vb b/SDL/kunden/usrCntlCBAM.Designer.vb index c7797fa8..eb730cf9 100644 --- a/SDL/kunden/usrCntlCBAM.Designer.vb +++ b/SDL/kunden/usrCntlCBAM.Designer.vb @@ -68,12 +68,19 @@ Partial Class usrCntlCBAM Me.Button3 = New System.Windows.Forms.Button() Me.lblKafkaCnt = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() + Me.txtBenchmark = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label12 = New System.Windows.Forms.Label() + Me.txtCalcLand = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.txtCalcErg = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Button4 = New System.Windows.Forms.Button() + Me.txtCalcJahr = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label11 = New System.Windows.Forms.Label() + Me.txtCalcEmission = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label10 = New System.Windows.Forms.Label() Me.Label9 = New System.Windows.Forms.Label() + Me.txtCalcGewicht = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label8 = New System.Windows.Forms.Label() + Me.txtCalcKN8 = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label7 = New System.Windows.Forms.Label() Me.Button5 = New System.Windows.Forms.Button() Me.cbxKosten = New System.Windows.Forms.CheckBox() @@ -92,31 +99,24 @@ Partial Class usrCntlCBAM Me.Label13 = New System.Windows.Forms.Label() Me.lblErg_VERAG2 = New System.Windows.Forms.TextBox() Me.Panel2 = New System.Windows.Forms.Panel() + Me.txtCalc_Defaut_Country = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.MyTextBox3 = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Button7 = New System.Windows.Forms.Button() + Me.txtCalc_Defaut_Year = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label15 = New System.Windows.Forms.Label() + Me.txtCalc_Defaut_CertPrice = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label16 = New System.Windows.Forms.Label() Me.Label17 = New System.Windows.Forms.Label() + Me.txtCalc_Defaut_Weight = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label18 = New System.Windows.Forms.Label() + Me.txtCalc_Defaut_KN8 = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label19 = New System.Windows.Forms.Label() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.btnVERAGCost = New System.Windows.Forms.Button() Me.cbxVERAG_GPXLS = New System.Windows.Forms.CheckBox() Me.cbxIndirekt = New System.Windows.Forms.CheckBox() Me.cboIndirekt = New VERAG_PROG_ALLGEMEIN.MyComboBox() - Me.txtCalc_Defaut_Country = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.MyTextBox3 = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalc_Defaut_Year = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalc_Defaut_CertPrice = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalc_Defaut_Weight = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalc_Defaut_KN8 = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.cbo_VERAG_ImpLand = New VERAG_PROG_ALLGEMEIN.MyComboBox() - Me.txtBenchmark = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalcLand = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalcErg = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalcJahr = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalcEmission = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalcGewicht = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtCalcKN8 = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components) Me.cbxUNISPED = New System.Windows.Forms.CheckBox() Me.cbxIMEX = New System.Windows.Forms.CheckBox() @@ -126,6 +126,7 @@ Partial Class usrCntlCBAM Me.txtVon = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtBis = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtEori = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.Button8 = New System.Windows.Forms.Button() Me.cntxtAddSdl.SuspendLayout() Me.Panel1.SuspendLayout() Me.Panel2.SuspendLayout() @@ -668,6 +669,30 @@ Partial Class usrCntlCBAM Me.Panel1.Size = New System.Drawing.Size(223, 372) Me.Panel1.TabIndex = 52 ' + 'txtBenchmark + ' + Me.txtBenchmark._DateTimeOnly = False + Me.txtBenchmark._numbersOnly = True + Me.txtBenchmark._numbersOnlyKommastellen = "" + Me.txtBenchmark._numbersOnlyTrennzeichen = True + Me.txtBenchmark._Prozent = False + Me.txtBenchmark._ShortDateNew = False + Me.txtBenchmark._ShortDateOnly = False + Me.txtBenchmark._TimeOnly = False + Me.txtBenchmark._TimeOnly_Seconds = False + Me.txtBenchmark._value = "" + Me.txtBenchmark._Waehrung = False + Me.txtBenchmark._WaehrungZeichen = True + Me.txtBenchmark.ForeColor = System.Drawing.Color.Black + Me.txtBenchmark.Location = New System.Drawing.Point(73, 82) + Me.txtBenchmark.MaxLength = 10 + Me.txtBenchmark.MaxLineLength = -1 + Me.txtBenchmark.MaxLines_Warning = "" + Me.txtBenchmark.MaxLines_Warning_Label = Nothing + Me.txtBenchmark.Name = "txtBenchmark" + Me.txtBenchmark.Size = New System.Drawing.Size(147, 20) + Me.txtBenchmark.TabIndex = 66 + ' 'Label12 ' Me.Label12.AutoSize = True @@ -677,6 +702,60 @@ Partial Class usrCntlCBAM Me.Label12.TabIndex = 67 Me.Label12.Text = "(Benchmark)" ' + 'txtCalcLand + ' + Me.txtCalcLand._DateTimeOnly = False + Me.txtCalcLand._numbersOnly = False + Me.txtCalcLand._numbersOnlyKommastellen = "" + Me.txtCalcLand._numbersOnlyTrennzeichen = True + Me.txtCalcLand._Prozent = False + Me.txtCalcLand._ShortDateNew = False + Me.txtCalcLand._ShortDateOnly = False + Me.txtCalcLand._TimeOnly = False + Me.txtCalcLand._TimeOnly_Seconds = False + Me.txtCalcLand._value = "" + Me.txtCalcLand._Waehrung = False + Me.txtCalcLand._WaehrungZeichen = True + Me.txtCalcLand.ForeColor = System.Drawing.Color.Black + Me.txtCalcLand.Location = New System.Drawing.Point(149, 101) + Me.txtCalcLand.MaxLength = 2 + Me.txtCalcLand.MaxLineLength = -1 + Me.txtCalcLand.MaxLines_Warning = "" + Me.txtCalcLand.MaxLines_Warning_Label = Nothing + Me.txtCalcLand.Name = "txtCalcLand" + Me.txtCalcLand.Size = New System.Drawing.Size(70, 20) + Me.txtCalcLand.TabIndex = 65 + ' + 'txtCalcErg + ' + Me.txtCalcErg._DateTimeOnly = False + Me.txtCalcErg._numbersOnly = False + Me.txtCalcErg._numbersOnlyKommastellen = "" + Me.txtCalcErg._numbersOnlyTrennzeichen = True + Me.txtCalcErg._Prozent = False + Me.txtCalcErg._ShortDateNew = False + Me.txtCalcErg._ShortDateOnly = False + Me.txtCalcErg._TimeOnly = False + Me.txtCalcErg._TimeOnly_Seconds = False + Me.txtCalcErg._value = "" + Me.txtCalcErg._Waehrung = False + Me.txtCalcErg._WaehrungZeichen = True + Me.txtCalcErg.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCalcErg.BackColor = System.Drawing.Color.FloralWhite + Me.txtCalcErg.ForeColor = System.Drawing.Color.Black + Me.txtCalcErg.Location = New System.Drawing.Point(3, 154) + Me.txtCalcErg.MaxLength = 3000 + Me.txtCalcErg.MaxLineLength = -1 + Me.txtCalcErg.MaxLines_Warning = "" + Me.txtCalcErg.MaxLines_Warning_Label = Nothing + Me.txtCalcErg.Multiline = True + Me.txtCalcErg.Name = "txtCalcErg" + Me.txtCalcErg.ReadOnly = True + Me.txtCalcErg.Size = New System.Drawing.Size(217, 218) + Me.txtCalcErg.TabIndex = 64 + ' 'Button4 ' Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat @@ -687,6 +766,30 @@ Partial Class usrCntlCBAM Me.Button4.Text = "Berechnen" Me.Button4.UseVisualStyleBackColor = True ' + 'txtCalcJahr + ' + Me.txtCalcJahr._DateTimeOnly = False + Me.txtCalcJahr._numbersOnly = False + Me.txtCalcJahr._numbersOnlyKommastellen = "" + Me.txtCalcJahr._numbersOnlyTrennzeichen = True + Me.txtCalcJahr._Prozent = False + Me.txtCalcJahr._ShortDateNew = False + Me.txtCalcJahr._ShortDateOnly = False + Me.txtCalcJahr._TimeOnly = False + Me.txtCalcJahr._TimeOnly_Seconds = False + Me.txtCalcJahr._value = "" + Me.txtCalcJahr._Waehrung = False + Me.txtCalcJahr._WaehrungZeichen = True + Me.txtCalcJahr.ForeColor = System.Drawing.Color.Black + Me.txtCalcJahr.Location = New System.Drawing.Point(73, 101) + Me.txtCalcJahr.MaxLength = 4 + Me.txtCalcJahr.MaxLineLength = -1 + Me.txtCalcJahr.MaxLines_Warning = "" + Me.txtCalcJahr.MaxLines_Warning_Label = Nothing + Me.txtCalcJahr.Name = "txtCalcJahr" + Me.txtCalcJahr.Size = New System.Drawing.Size(70, 20) + Me.txtCalcJahr.TabIndex = 60 + ' 'Label11 ' Me.Label11.AutoSize = True @@ -696,6 +799,30 @@ Partial Class usrCntlCBAM Me.Label11.TabIndex = 61 Me.Label11.Text = "(Jahr)/(Land)" ' + 'txtCalcEmission + ' + Me.txtCalcEmission._DateTimeOnly = False + Me.txtCalcEmission._numbersOnly = True + Me.txtCalcEmission._numbersOnlyKommastellen = "" + Me.txtCalcEmission._numbersOnlyTrennzeichen = True + Me.txtCalcEmission._Prozent = False + Me.txtCalcEmission._ShortDateNew = False + Me.txtCalcEmission._ShortDateOnly = False + Me.txtCalcEmission._TimeOnly = False + Me.txtCalcEmission._TimeOnly_Seconds = False + Me.txtCalcEmission._value = "" + Me.txtCalcEmission._Waehrung = False + Me.txtCalcEmission._WaehrungZeichen = True + Me.txtCalcEmission.ForeColor = System.Drawing.Color.Black + Me.txtCalcEmission.Location = New System.Drawing.Point(73, 62) + Me.txtCalcEmission.MaxLength = 10 + Me.txtCalcEmission.MaxLineLength = -1 + Me.txtCalcEmission.MaxLines_Warning = "" + Me.txtCalcEmission.MaxLines_Warning_Label = Nothing + Me.txtCalcEmission.Name = "txtCalcEmission" + Me.txtCalcEmission.Size = New System.Drawing.Size(147, 20) + Me.txtCalcEmission.TabIndex = 58 + ' 'Label10 ' Me.Label10.AutoSize = True @@ -714,6 +841,30 @@ Partial Class usrCntlCBAM Me.Label9.TabIndex = 57 Me.Label9.Text = "Gewicht(to):" ' + 'txtCalcGewicht + ' + Me.txtCalcGewicht._DateTimeOnly = False + Me.txtCalcGewicht._numbersOnly = True + Me.txtCalcGewicht._numbersOnlyKommastellen = "" + Me.txtCalcGewicht._numbersOnlyTrennzeichen = True + Me.txtCalcGewicht._Prozent = False + Me.txtCalcGewicht._ShortDateNew = False + Me.txtCalcGewicht._ShortDateOnly = False + Me.txtCalcGewicht._TimeOnly = False + Me.txtCalcGewicht._TimeOnly_Seconds = False + Me.txtCalcGewicht._value = "" + Me.txtCalcGewicht._Waehrung = False + Me.txtCalcGewicht._WaehrungZeichen = True + Me.txtCalcGewicht.ForeColor = System.Drawing.Color.Black + Me.txtCalcGewicht.Location = New System.Drawing.Point(73, 42) + Me.txtCalcGewicht.MaxLength = 10 + Me.txtCalcGewicht.MaxLineLength = -1 + Me.txtCalcGewicht.MaxLines_Warning = "" + Me.txtCalcGewicht.MaxLines_Warning_Label = Nothing + Me.txtCalcGewicht.Name = "txtCalcGewicht" + Me.txtCalcGewicht.Size = New System.Drawing.Size(147, 20) + Me.txtCalcGewicht.TabIndex = 56 + ' 'Label8 ' Me.Label8.AutoSize = True @@ -723,6 +874,30 @@ Partial Class usrCntlCBAM Me.Label8.TabIndex = 55 Me.Label8.Text = "Tarif (8 St.)" ' + 'txtCalcKN8 + ' + Me.txtCalcKN8._DateTimeOnly = False + Me.txtCalcKN8._numbersOnly = False + Me.txtCalcKN8._numbersOnlyKommastellen = "" + Me.txtCalcKN8._numbersOnlyTrennzeichen = True + Me.txtCalcKN8._Prozent = False + Me.txtCalcKN8._ShortDateNew = False + Me.txtCalcKN8._ShortDateOnly = False + Me.txtCalcKN8._TimeOnly = False + Me.txtCalcKN8._TimeOnly_Seconds = False + Me.txtCalcKN8._value = "" + Me.txtCalcKN8._Waehrung = False + Me.txtCalcKN8._WaehrungZeichen = True + Me.txtCalcKN8.ForeColor = System.Drawing.Color.Black + Me.txtCalcKN8.Location = New System.Drawing.Point(73, 22) + Me.txtCalcKN8.MaxLength = 8 + Me.txtCalcKN8.MaxLineLength = -1 + Me.txtCalcKN8.MaxLines_Warning = "" + Me.txtCalcKN8.MaxLines_Warning_Label = Nothing + Me.txtCalcKN8.Name = "txtCalcKN8" + Me.txtCalcKN8.Size = New System.Drawing.Size(147, 20) + Me.txtCalcKN8.TabIndex = 54 + ' 'Label7 ' Me.Label7.AutoSize = True @@ -949,6 +1124,60 @@ Partial Class usrCntlCBAM Me.Panel2.Size = New System.Drawing.Size(223, 150) Me.Panel2.TabIndex = 68 ' + 'txtCalc_Defaut_Country + ' + Me.txtCalc_Defaut_Country._DateTimeOnly = False + Me.txtCalc_Defaut_Country._numbersOnly = False + Me.txtCalc_Defaut_Country._numbersOnlyKommastellen = "" + Me.txtCalc_Defaut_Country._numbersOnlyTrennzeichen = True + Me.txtCalc_Defaut_Country._Prozent = False + Me.txtCalc_Defaut_Country._ShortDateNew = False + Me.txtCalc_Defaut_Country._ShortDateOnly = False + Me.txtCalc_Defaut_Country._TimeOnly = False + Me.txtCalc_Defaut_Country._TimeOnly_Seconds = False + Me.txtCalc_Defaut_Country._value = "" + Me.txtCalc_Defaut_Country._Waehrung = False + Me.txtCalc_Defaut_Country._WaehrungZeichen = True + Me.txtCalc_Defaut_Country.ForeColor = System.Drawing.Color.Black + Me.txtCalc_Defaut_Country.Location = New System.Drawing.Point(149, 83) + Me.txtCalc_Defaut_Country.MaxLength = 2 + Me.txtCalc_Defaut_Country.MaxLineLength = -1 + Me.txtCalc_Defaut_Country.MaxLines_Warning = "" + Me.txtCalc_Defaut_Country.MaxLines_Warning_Label = Nothing + Me.txtCalc_Defaut_Country.Name = "txtCalc_Defaut_Country" + Me.txtCalc_Defaut_Country.Size = New System.Drawing.Size(70, 20) + Me.txtCalc_Defaut_Country.TabIndex = 65 + ' + 'MyTextBox3 + ' + Me.MyTextBox3._DateTimeOnly = False + Me.MyTextBox3._numbersOnly = False + Me.MyTextBox3._numbersOnlyKommastellen = "" + Me.MyTextBox3._numbersOnlyTrennzeichen = True + Me.MyTextBox3._Prozent = False + Me.MyTextBox3._ShortDateNew = False + Me.MyTextBox3._ShortDateOnly = False + Me.MyTextBox3._TimeOnly = False + Me.MyTextBox3._TimeOnly_Seconds = False + Me.MyTextBox3._value = "" + Me.MyTextBox3._Waehrung = False + Me.MyTextBox3._WaehrungZeichen = True + Me.MyTextBox3.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.MyTextBox3.BackColor = System.Drawing.Color.FloralWhite + Me.MyTextBox3.ForeColor = System.Drawing.Color.Black + Me.MyTextBox3.Location = New System.Drawing.Point(3, 154) + Me.MyTextBox3.MaxLength = 3000 + Me.MyTextBox3.MaxLineLength = -1 + Me.MyTextBox3.MaxLines_Warning = "" + Me.MyTextBox3.MaxLines_Warning_Label = Nothing + Me.MyTextBox3.Multiline = True + Me.MyTextBox3.Name = "MyTextBox3" + Me.MyTextBox3.ReadOnly = True + Me.MyTextBox3.Size = New System.Drawing.Size(217, 0) + Me.MyTextBox3.TabIndex = 64 + ' 'Button7 ' Me.Button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat @@ -959,6 +1188,30 @@ Partial Class usrCntlCBAM Me.Button7.Text = "Berechnen" Me.Button7.UseVisualStyleBackColor = True ' + 'txtCalc_Defaut_Year + ' + Me.txtCalc_Defaut_Year._DateTimeOnly = False + Me.txtCalc_Defaut_Year._numbersOnly = False + Me.txtCalc_Defaut_Year._numbersOnlyKommastellen = "" + Me.txtCalc_Defaut_Year._numbersOnlyTrennzeichen = True + Me.txtCalc_Defaut_Year._Prozent = False + Me.txtCalc_Defaut_Year._ShortDateNew = False + Me.txtCalc_Defaut_Year._ShortDateOnly = False + Me.txtCalc_Defaut_Year._TimeOnly = False + Me.txtCalc_Defaut_Year._TimeOnly_Seconds = False + Me.txtCalc_Defaut_Year._value = "" + Me.txtCalc_Defaut_Year._Waehrung = False + Me.txtCalc_Defaut_Year._WaehrungZeichen = True + Me.txtCalc_Defaut_Year.ForeColor = System.Drawing.Color.Black + Me.txtCalc_Defaut_Year.Location = New System.Drawing.Point(73, 83) + Me.txtCalc_Defaut_Year.MaxLength = 4 + Me.txtCalc_Defaut_Year.MaxLineLength = -1 + Me.txtCalc_Defaut_Year.MaxLines_Warning = "" + Me.txtCalc_Defaut_Year.MaxLines_Warning_Label = Nothing + Me.txtCalc_Defaut_Year.Name = "txtCalc_Defaut_Year" + Me.txtCalc_Defaut_Year.Size = New System.Drawing.Size(70, 20) + Me.txtCalc_Defaut_Year.TabIndex = 60 + ' 'Label15 ' Me.Label15.AutoSize = True @@ -968,6 +1221,30 @@ Partial Class usrCntlCBAM Me.Label15.TabIndex = 61 Me.Label15.Text = "(Jahr)/(Land)" ' + 'txtCalc_Defaut_CertPrice + ' + Me.txtCalc_Defaut_CertPrice._DateTimeOnly = False + Me.txtCalc_Defaut_CertPrice._numbersOnly = True + Me.txtCalc_Defaut_CertPrice._numbersOnlyKommastellen = "" + Me.txtCalc_Defaut_CertPrice._numbersOnlyTrennzeichen = True + Me.txtCalc_Defaut_CertPrice._Prozent = False + Me.txtCalc_Defaut_CertPrice._ShortDateNew = False + Me.txtCalc_Defaut_CertPrice._ShortDateOnly = False + Me.txtCalc_Defaut_CertPrice._TimeOnly = False + Me.txtCalc_Defaut_CertPrice._TimeOnly_Seconds = False + Me.txtCalc_Defaut_CertPrice._value = "" + Me.txtCalc_Defaut_CertPrice._Waehrung = False + Me.txtCalc_Defaut_CertPrice._WaehrungZeichen = True + Me.txtCalc_Defaut_CertPrice.ForeColor = System.Drawing.Color.Red + Me.txtCalc_Defaut_CertPrice.Location = New System.Drawing.Point(73, 62) + Me.txtCalc_Defaut_CertPrice.MaxLength = 10 + Me.txtCalc_Defaut_CertPrice.MaxLineLength = -1 + Me.txtCalc_Defaut_CertPrice.MaxLines_Warning = "" + Me.txtCalc_Defaut_CertPrice.MaxLines_Warning_Label = Nothing + Me.txtCalc_Defaut_CertPrice.Name = "txtCalc_Defaut_CertPrice" + Me.txtCalc_Defaut_CertPrice.Size = New System.Drawing.Size(147, 20) + Me.txtCalc_Defaut_CertPrice.TabIndex = 58 + ' 'Label16 ' Me.Label16.AutoSize = True @@ -986,6 +1263,30 @@ Partial Class usrCntlCBAM Me.Label17.TabIndex = 57 Me.Label17.Text = "Gewicht(to):" ' + 'txtCalc_Defaut_Weight + ' + Me.txtCalc_Defaut_Weight._DateTimeOnly = False + Me.txtCalc_Defaut_Weight._numbersOnly = True + Me.txtCalc_Defaut_Weight._numbersOnlyKommastellen = "" + Me.txtCalc_Defaut_Weight._numbersOnlyTrennzeichen = True + Me.txtCalc_Defaut_Weight._Prozent = False + Me.txtCalc_Defaut_Weight._ShortDateNew = False + Me.txtCalc_Defaut_Weight._ShortDateOnly = False + Me.txtCalc_Defaut_Weight._TimeOnly = False + Me.txtCalc_Defaut_Weight._TimeOnly_Seconds = False + Me.txtCalc_Defaut_Weight._value = "" + Me.txtCalc_Defaut_Weight._Waehrung = False + Me.txtCalc_Defaut_Weight._WaehrungZeichen = True + Me.txtCalc_Defaut_Weight.ForeColor = System.Drawing.Color.Black + Me.txtCalc_Defaut_Weight.Location = New System.Drawing.Point(73, 42) + Me.txtCalc_Defaut_Weight.MaxLength = 10 + Me.txtCalc_Defaut_Weight.MaxLineLength = -1 + Me.txtCalc_Defaut_Weight.MaxLines_Warning = "" + Me.txtCalc_Defaut_Weight.MaxLines_Warning_Label = Nothing + Me.txtCalc_Defaut_Weight.Name = "txtCalc_Defaut_Weight" + Me.txtCalc_Defaut_Weight.Size = New System.Drawing.Size(147, 20) + Me.txtCalc_Defaut_Weight.TabIndex = 56 + ' 'Label18 ' Me.Label18.AutoSize = True @@ -995,6 +1296,30 @@ Partial Class usrCntlCBAM Me.Label18.TabIndex = 55 Me.Label18.Text = "Tarif (8 St.)" ' + 'txtCalc_Defaut_KN8 + ' + Me.txtCalc_Defaut_KN8._DateTimeOnly = False + Me.txtCalc_Defaut_KN8._numbersOnly = False + Me.txtCalc_Defaut_KN8._numbersOnlyKommastellen = "" + Me.txtCalc_Defaut_KN8._numbersOnlyTrennzeichen = True + Me.txtCalc_Defaut_KN8._Prozent = False + Me.txtCalc_Defaut_KN8._ShortDateNew = False + Me.txtCalc_Defaut_KN8._ShortDateOnly = False + Me.txtCalc_Defaut_KN8._TimeOnly = False + Me.txtCalc_Defaut_KN8._TimeOnly_Seconds = False + Me.txtCalc_Defaut_KN8._value = "" + Me.txtCalc_Defaut_KN8._Waehrung = False + Me.txtCalc_Defaut_KN8._WaehrungZeichen = True + Me.txtCalc_Defaut_KN8.ForeColor = System.Drawing.Color.Black + Me.txtCalc_Defaut_KN8.Location = New System.Drawing.Point(73, 22) + Me.txtCalc_Defaut_KN8.MaxLength = 8 + Me.txtCalc_Defaut_KN8.MaxLineLength = -1 + Me.txtCalc_Defaut_KN8.MaxLines_Warning = "" + Me.txtCalc_Defaut_KN8.MaxLines_Warning_Label = Nothing + Me.txtCalc_Defaut_KN8.Name = "txtCalc_Defaut_KN8" + Me.txtCalc_Defaut_KN8.Size = New System.Drawing.Size(147, 20) + Me.txtCalc_Defaut_KN8.TabIndex = 54 + ' 'Label19 ' Me.Label19.AutoSize = True @@ -1064,156 +1389,6 @@ Partial Class usrCntlCBAM Me.cboIndirekt.TabIndex = 71 Me.cboIndirekt.Visible = False ' - 'txtCalc_Defaut_Country - ' - Me.txtCalc_Defaut_Country._DateTimeOnly = False - Me.txtCalc_Defaut_Country._numbersOnly = False - Me.txtCalc_Defaut_Country._numbersOnlyKommastellen = "" - Me.txtCalc_Defaut_Country._numbersOnlyTrennzeichen = True - Me.txtCalc_Defaut_Country._Prozent = False - Me.txtCalc_Defaut_Country._ShortDateNew = False - Me.txtCalc_Defaut_Country._ShortDateOnly = False - Me.txtCalc_Defaut_Country._TimeOnly = False - Me.txtCalc_Defaut_Country._TimeOnly_Seconds = False - Me.txtCalc_Defaut_Country._value = "" - Me.txtCalc_Defaut_Country._Waehrung = False - Me.txtCalc_Defaut_Country._WaehrungZeichen = True - Me.txtCalc_Defaut_Country.ForeColor = System.Drawing.Color.Black - Me.txtCalc_Defaut_Country.Location = New System.Drawing.Point(149, 83) - Me.txtCalc_Defaut_Country.MaxLength = 2 - Me.txtCalc_Defaut_Country.MaxLineLength = -1 - Me.txtCalc_Defaut_Country.MaxLines_Warning = "" - Me.txtCalc_Defaut_Country.MaxLines_Warning_Label = Nothing - Me.txtCalc_Defaut_Country.Name = "txtCalc_Defaut_Country" - Me.txtCalc_Defaut_Country.Size = New System.Drawing.Size(70, 20) - Me.txtCalc_Defaut_Country.TabIndex = 65 - ' - 'MyTextBox3 - ' - Me.MyTextBox3._DateTimeOnly = False - Me.MyTextBox3._numbersOnly = False - Me.MyTextBox3._numbersOnlyKommastellen = "" - Me.MyTextBox3._numbersOnlyTrennzeichen = True - Me.MyTextBox3._Prozent = False - Me.MyTextBox3._ShortDateNew = False - Me.MyTextBox3._ShortDateOnly = False - Me.MyTextBox3._TimeOnly = False - Me.MyTextBox3._TimeOnly_Seconds = False - Me.MyTextBox3._value = "" - Me.MyTextBox3._Waehrung = False - Me.MyTextBox3._WaehrungZeichen = True - Me.MyTextBox3.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.MyTextBox3.BackColor = System.Drawing.Color.FloralWhite - Me.MyTextBox3.ForeColor = System.Drawing.Color.Black - Me.MyTextBox3.Location = New System.Drawing.Point(3, 154) - Me.MyTextBox3.MaxLength = 3000 - Me.MyTextBox3.MaxLineLength = -1 - Me.MyTextBox3.MaxLines_Warning = "" - Me.MyTextBox3.MaxLines_Warning_Label = Nothing - Me.MyTextBox3.Multiline = True - Me.MyTextBox3.Name = "MyTextBox3" - Me.MyTextBox3.ReadOnly = True - Me.MyTextBox3.Size = New System.Drawing.Size(217, 0) - Me.MyTextBox3.TabIndex = 64 - ' - 'txtCalc_Defaut_Year - ' - Me.txtCalc_Defaut_Year._DateTimeOnly = False - Me.txtCalc_Defaut_Year._numbersOnly = False - Me.txtCalc_Defaut_Year._numbersOnlyKommastellen = "" - Me.txtCalc_Defaut_Year._numbersOnlyTrennzeichen = True - Me.txtCalc_Defaut_Year._Prozent = False - Me.txtCalc_Defaut_Year._ShortDateNew = False - Me.txtCalc_Defaut_Year._ShortDateOnly = False - Me.txtCalc_Defaut_Year._TimeOnly = False - Me.txtCalc_Defaut_Year._TimeOnly_Seconds = False - Me.txtCalc_Defaut_Year._value = "" - Me.txtCalc_Defaut_Year._Waehrung = False - Me.txtCalc_Defaut_Year._WaehrungZeichen = True - Me.txtCalc_Defaut_Year.ForeColor = System.Drawing.Color.Black - Me.txtCalc_Defaut_Year.Location = New System.Drawing.Point(73, 83) - Me.txtCalc_Defaut_Year.MaxLength = 4 - Me.txtCalc_Defaut_Year.MaxLineLength = -1 - Me.txtCalc_Defaut_Year.MaxLines_Warning = "" - Me.txtCalc_Defaut_Year.MaxLines_Warning_Label = Nothing - Me.txtCalc_Defaut_Year.Name = "txtCalc_Defaut_Year" - Me.txtCalc_Defaut_Year.Size = New System.Drawing.Size(70, 20) - Me.txtCalc_Defaut_Year.TabIndex = 60 - ' - 'txtCalc_Defaut_CertPrice - ' - Me.txtCalc_Defaut_CertPrice._DateTimeOnly = False - Me.txtCalc_Defaut_CertPrice._numbersOnly = True - Me.txtCalc_Defaut_CertPrice._numbersOnlyKommastellen = "" - Me.txtCalc_Defaut_CertPrice._numbersOnlyTrennzeichen = True - Me.txtCalc_Defaut_CertPrice._Prozent = False - Me.txtCalc_Defaut_CertPrice._ShortDateNew = False - Me.txtCalc_Defaut_CertPrice._ShortDateOnly = False - Me.txtCalc_Defaut_CertPrice._TimeOnly = False - Me.txtCalc_Defaut_CertPrice._TimeOnly_Seconds = False - Me.txtCalc_Defaut_CertPrice._value = "" - Me.txtCalc_Defaut_CertPrice._Waehrung = False - Me.txtCalc_Defaut_CertPrice._WaehrungZeichen = True - Me.txtCalc_Defaut_CertPrice.ForeColor = System.Drawing.Color.Red - Me.txtCalc_Defaut_CertPrice.Location = New System.Drawing.Point(73, 62) - Me.txtCalc_Defaut_CertPrice.MaxLength = 10 - Me.txtCalc_Defaut_CertPrice.MaxLineLength = -1 - Me.txtCalc_Defaut_CertPrice.MaxLines_Warning = "" - Me.txtCalc_Defaut_CertPrice.MaxLines_Warning_Label = Nothing - Me.txtCalc_Defaut_CertPrice.Name = "txtCalc_Defaut_CertPrice" - Me.txtCalc_Defaut_CertPrice.Size = New System.Drawing.Size(147, 20) - Me.txtCalc_Defaut_CertPrice.TabIndex = 58 - ' - 'txtCalc_Defaut_Weight - ' - Me.txtCalc_Defaut_Weight._DateTimeOnly = False - Me.txtCalc_Defaut_Weight._numbersOnly = True - Me.txtCalc_Defaut_Weight._numbersOnlyKommastellen = "" - Me.txtCalc_Defaut_Weight._numbersOnlyTrennzeichen = True - Me.txtCalc_Defaut_Weight._Prozent = False - Me.txtCalc_Defaut_Weight._ShortDateNew = False - Me.txtCalc_Defaut_Weight._ShortDateOnly = False - Me.txtCalc_Defaut_Weight._TimeOnly = False - Me.txtCalc_Defaut_Weight._TimeOnly_Seconds = False - Me.txtCalc_Defaut_Weight._value = "" - Me.txtCalc_Defaut_Weight._Waehrung = False - Me.txtCalc_Defaut_Weight._WaehrungZeichen = True - Me.txtCalc_Defaut_Weight.ForeColor = System.Drawing.Color.Black - Me.txtCalc_Defaut_Weight.Location = New System.Drawing.Point(73, 42) - Me.txtCalc_Defaut_Weight.MaxLength = 10 - Me.txtCalc_Defaut_Weight.MaxLineLength = -1 - Me.txtCalc_Defaut_Weight.MaxLines_Warning = "" - Me.txtCalc_Defaut_Weight.MaxLines_Warning_Label = Nothing - Me.txtCalc_Defaut_Weight.Name = "txtCalc_Defaut_Weight" - Me.txtCalc_Defaut_Weight.Size = New System.Drawing.Size(147, 20) - Me.txtCalc_Defaut_Weight.TabIndex = 56 - ' - 'txtCalc_Defaut_KN8 - ' - Me.txtCalc_Defaut_KN8._DateTimeOnly = False - Me.txtCalc_Defaut_KN8._numbersOnly = False - Me.txtCalc_Defaut_KN8._numbersOnlyKommastellen = "" - Me.txtCalc_Defaut_KN8._numbersOnlyTrennzeichen = True - Me.txtCalc_Defaut_KN8._Prozent = False - Me.txtCalc_Defaut_KN8._ShortDateNew = False - Me.txtCalc_Defaut_KN8._ShortDateOnly = False - Me.txtCalc_Defaut_KN8._TimeOnly = False - Me.txtCalc_Defaut_KN8._TimeOnly_Seconds = False - Me.txtCalc_Defaut_KN8._value = "" - Me.txtCalc_Defaut_KN8._Waehrung = False - Me.txtCalc_Defaut_KN8._WaehrungZeichen = True - Me.txtCalc_Defaut_KN8.ForeColor = System.Drawing.Color.Black - Me.txtCalc_Defaut_KN8.Location = New System.Drawing.Point(73, 22) - Me.txtCalc_Defaut_KN8.MaxLength = 8 - Me.txtCalc_Defaut_KN8.MaxLineLength = -1 - Me.txtCalc_Defaut_KN8.MaxLines_Warning = "" - Me.txtCalc_Defaut_KN8.MaxLines_Warning_Label = Nothing - Me.txtCalc_Defaut_KN8.Name = "txtCalc_Defaut_KN8" - Me.txtCalc_Defaut_KN8.Size = New System.Drawing.Size(147, 20) - Me.txtCalc_Defaut_KN8.TabIndex = 54 - ' 'cbo_VERAG_ImpLand ' Me.cbo_VERAG_ImpLand._allowedValuesFreiText = Nothing @@ -1225,180 +1400,6 @@ Partial Class usrCntlCBAM Me.cbo_VERAG_ImpLand.Size = New System.Drawing.Size(168, 21) Me.cbo_VERAG_ImpLand.TabIndex = 66 ' - 'txtBenchmark - ' - Me.txtBenchmark._DateTimeOnly = False - Me.txtBenchmark._numbersOnly = True - Me.txtBenchmark._numbersOnlyKommastellen = "" - Me.txtBenchmark._numbersOnlyTrennzeichen = True - Me.txtBenchmark._Prozent = False - Me.txtBenchmark._ShortDateNew = False - Me.txtBenchmark._ShortDateOnly = False - Me.txtBenchmark._TimeOnly = False - Me.txtBenchmark._TimeOnly_Seconds = False - Me.txtBenchmark._value = "" - Me.txtBenchmark._Waehrung = False - Me.txtBenchmark._WaehrungZeichen = True - Me.txtBenchmark.ForeColor = System.Drawing.Color.Black - Me.txtBenchmark.Location = New System.Drawing.Point(73, 82) - Me.txtBenchmark.MaxLength = 10 - Me.txtBenchmark.MaxLineLength = -1 - Me.txtBenchmark.MaxLines_Warning = "" - Me.txtBenchmark.MaxLines_Warning_Label = Nothing - Me.txtBenchmark.Name = "txtBenchmark" - Me.txtBenchmark.Size = New System.Drawing.Size(147, 20) - Me.txtBenchmark.TabIndex = 66 - ' - 'txtCalcLand - ' - Me.txtCalcLand._DateTimeOnly = False - Me.txtCalcLand._numbersOnly = False - Me.txtCalcLand._numbersOnlyKommastellen = "" - Me.txtCalcLand._numbersOnlyTrennzeichen = True - Me.txtCalcLand._Prozent = False - Me.txtCalcLand._ShortDateNew = False - Me.txtCalcLand._ShortDateOnly = False - Me.txtCalcLand._TimeOnly = False - Me.txtCalcLand._TimeOnly_Seconds = False - Me.txtCalcLand._value = "" - Me.txtCalcLand._Waehrung = False - Me.txtCalcLand._WaehrungZeichen = True - Me.txtCalcLand.ForeColor = System.Drawing.Color.Black - Me.txtCalcLand.Location = New System.Drawing.Point(149, 101) - Me.txtCalcLand.MaxLength = 2 - Me.txtCalcLand.MaxLineLength = -1 - Me.txtCalcLand.MaxLines_Warning = "" - Me.txtCalcLand.MaxLines_Warning_Label = Nothing - Me.txtCalcLand.Name = "txtCalcLand" - Me.txtCalcLand.Size = New System.Drawing.Size(70, 20) - Me.txtCalcLand.TabIndex = 65 - ' - 'txtCalcErg - ' - Me.txtCalcErg._DateTimeOnly = False - Me.txtCalcErg._numbersOnly = False - Me.txtCalcErg._numbersOnlyKommastellen = "" - Me.txtCalcErg._numbersOnlyTrennzeichen = True - Me.txtCalcErg._Prozent = False - Me.txtCalcErg._ShortDateNew = False - Me.txtCalcErg._ShortDateOnly = False - Me.txtCalcErg._TimeOnly = False - Me.txtCalcErg._TimeOnly_Seconds = False - Me.txtCalcErg._value = "" - Me.txtCalcErg._Waehrung = False - Me.txtCalcErg._WaehrungZeichen = True - Me.txtCalcErg.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.txtCalcErg.BackColor = System.Drawing.Color.FloralWhite - Me.txtCalcErg.ForeColor = System.Drawing.Color.Black - Me.txtCalcErg.Location = New System.Drawing.Point(3, 154) - Me.txtCalcErg.MaxLength = 3000 - Me.txtCalcErg.MaxLineLength = -1 - Me.txtCalcErg.MaxLines_Warning = "" - Me.txtCalcErg.MaxLines_Warning_Label = Nothing - Me.txtCalcErg.Multiline = True - Me.txtCalcErg.Name = "txtCalcErg" - Me.txtCalcErg.ReadOnly = True - Me.txtCalcErg.Size = New System.Drawing.Size(217, 218) - Me.txtCalcErg.TabIndex = 64 - ' - 'txtCalcJahr - ' - Me.txtCalcJahr._DateTimeOnly = False - Me.txtCalcJahr._numbersOnly = False - Me.txtCalcJahr._numbersOnlyKommastellen = "" - Me.txtCalcJahr._numbersOnlyTrennzeichen = True - Me.txtCalcJahr._Prozent = False - Me.txtCalcJahr._ShortDateNew = False - Me.txtCalcJahr._ShortDateOnly = False - Me.txtCalcJahr._TimeOnly = False - Me.txtCalcJahr._TimeOnly_Seconds = False - Me.txtCalcJahr._value = "" - Me.txtCalcJahr._Waehrung = False - Me.txtCalcJahr._WaehrungZeichen = True - Me.txtCalcJahr.ForeColor = System.Drawing.Color.Black - Me.txtCalcJahr.Location = New System.Drawing.Point(73, 101) - Me.txtCalcJahr.MaxLength = 4 - Me.txtCalcJahr.MaxLineLength = -1 - Me.txtCalcJahr.MaxLines_Warning = "" - Me.txtCalcJahr.MaxLines_Warning_Label = Nothing - Me.txtCalcJahr.Name = "txtCalcJahr" - Me.txtCalcJahr.Size = New System.Drawing.Size(70, 20) - Me.txtCalcJahr.TabIndex = 60 - ' - 'txtCalcEmission - ' - Me.txtCalcEmission._DateTimeOnly = False - Me.txtCalcEmission._numbersOnly = True - Me.txtCalcEmission._numbersOnlyKommastellen = "" - Me.txtCalcEmission._numbersOnlyTrennzeichen = True - Me.txtCalcEmission._Prozent = False - Me.txtCalcEmission._ShortDateNew = False - Me.txtCalcEmission._ShortDateOnly = False - Me.txtCalcEmission._TimeOnly = False - Me.txtCalcEmission._TimeOnly_Seconds = False - Me.txtCalcEmission._value = "" - Me.txtCalcEmission._Waehrung = False - Me.txtCalcEmission._WaehrungZeichen = True - Me.txtCalcEmission.ForeColor = System.Drawing.Color.Black - Me.txtCalcEmission.Location = New System.Drawing.Point(73, 62) - Me.txtCalcEmission.MaxLength = 10 - Me.txtCalcEmission.MaxLineLength = -1 - Me.txtCalcEmission.MaxLines_Warning = "" - Me.txtCalcEmission.MaxLines_Warning_Label = Nothing - Me.txtCalcEmission.Name = "txtCalcEmission" - Me.txtCalcEmission.Size = New System.Drawing.Size(147, 20) - Me.txtCalcEmission.TabIndex = 58 - ' - 'txtCalcGewicht - ' - Me.txtCalcGewicht._DateTimeOnly = False - Me.txtCalcGewicht._numbersOnly = True - Me.txtCalcGewicht._numbersOnlyKommastellen = "" - Me.txtCalcGewicht._numbersOnlyTrennzeichen = True - Me.txtCalcGewicht._Prozent = False - Me.txtCalcGewicht._ShortDateNew = False - Me.txtCalcGewicht._ShortDateOnly = False - Me.txtCalcGewicht._TimeOnly = False - Me.txtCalcGewicht._TimeOnly_Seconds = False - Me.txtCalcGewicht._value = "" - Me.txtCalcGewicht._Waehrung = False - Me.txtCalcGewicht._WaehrungZeichen = True - Me.txtCalcGewicht.ForeColor = System.Drawing.Color.Black - Me.txtCalcGewicht.Location = New System.Drawing.Point(73, 42) - Me.txtCalcGewicht.MaxLength = 10 - Me.txtCalcGewicht.MaxLineLength = -1 - Me.txtCalcGewicht.MaxLines_Warning = "" - Me.txtCalcGewicht.MaxLines_Warning_Label = Nothing - Me.txtCalcGewicht.Name = "txtCalcGewicht" - Me.txtCalcGewicht.Size = New System.Drawing.Size(147, 20) - Me.txtCalcGewicht.TabIndex = 56 - ' - 'txtCalcKN8 - ' - Me.txtCalcKN8._DateTimeOnly = False - Me.txtCalcKN8._numbersOnly = False - Me.txtCalcKN8._numbersOnlyKommastellen = "" - Me.txtCalcKN8._numbersOnlyTrennzeichen = True - Me.txtCalcKN8._Prozent = False - Me.txtCalcKN8._ShortDateNew = False - Me.txtCalcKN8._ShortDateOnly = False - Me.txtCalcKN8._TimeOnly = False - Me.txtCalcKN8._TimeOnly_Seconds = False - Me.txtCalcKN8._value = "" - Me.txtCalcKN8._Waehrung = False - Me.txtCalcKN8._WaehrungZeichen = True - Me.txtCalcKN8.ForeColor = System.Drawing.Color.Black - Me.txtCalcKN8.Location = New System.Drawing.Point(73, 22) - Me.txtCalcKN8.MaxLength = 8 - Me.txtCalcKN8.MaxLineLength = -1 - Me.txtCalcKN8.MaxLines_Warning = "" - Me.txtCalcKN8.MaxLines_Warning_Label = Nothing - Me.txtCalcKN8.Name = "txtCalcKN8" - Me.txtCalcKN8.Size = New System.Drawing.Size(147, 20) - Me.txtCalcKN8.TabIndex = 54 - ' 'MyPanel1 ' Me.MyPanel1.Controls.Add(Me.cbxUNISPED) @@ -1543,11 +1544,23 @@ Partial Class usrCntlCBAM Me.txtEori.Size = New System.Drawing.Size(341, 20) Me.txtEori.TabIndex = 1 ' + 'Button8 + ' + Me.Button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button8.Location = New System.Drawing.Point(825, 672) + Me.Button8.Name = "Button8" + Me.Button8.Size = New System.Drawing.Size(68, 37) + Me.Button8.TabIndex = 72 + Me.Button8.Text = "CBAM Today" + Me.Button8.UseVisualStyleBackColor = True + Me.Button8.Visible = False + ' 'usrCntlCBAM ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.White + Me.Controls.Add(Me.Button8) Me.Controls.Add(Me.cboIndirekt) Me.Controls.Add(Me.cbxIndirekt) Me.Controls.Add(Me.cbxVERAG_GPXLS) @@ -1737,4 +1750,5 @@ Partial Class usrCntlCBAM Friend WithEvents cbxVERAG_GPXLS As CheckBox Friend WithEvents cboIndirekt As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents cbxIndirekt As CheckBox + Friend WithEvents Button8 As Button End Class diff --git a/SDL/kunden/usrCntlCBAM.vb b/SDL/kunden/usrCntlCBAM.vb index 4cafc07d..eb705b72 100644 --- a/SDL/kunden/usrCntlCBAM.vb +++ b/SDL/kunden/usrCntlCBAM.vb @@ -402,7 +402,7 @@ Public Class usrCntlCBAM txtCalcJahr.Text = Now.Year txtCalc_Defaut_Year.Text = Now.Year txtCalc_Defaut_CertPrice._value = 95 - + Button8.Visible = True If Now.Month < 3 Then txtJahr.Text = Now.Year - 1 @@ -2788,5 +2788,12 @@ Public Class usrCntlCBAM cboIndirekt.Visible = cbxIndirekt.Checked txtEori.Visible = Not cbxIndirekt.Checked End Sub + + Private Sub Button8_Click_1(sender As Object, e As EventArgs) Handles Button8.Click + Dim LIST = VERAG_PROG_ALLGEMEIN.cVERAG_CustomsDeclarations.LOAD_List_CBAM({}, "", Now.ToShortDateString, Now.ToShortDateString,, False, True) + MsgBox(LIST.Count & " Einträge: " & vbNewLine & vbNewLine & + String.Join(vbNewLine, LIST. + Where(Function(x) Not String.IsNullOrWhiteSpace(x.za_LRN)))) + End Sub End Class diff --git a/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb b/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb index 654b4fe0..3e7dbc62 100644 --- a/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb +++ b/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb @@ -235,9 +235,9 @@ Public Class cVERAG_CustomsDeclarations " ON z.za_Id = p.zaParty_zaId " & "WHERE z.za_REGIME = 'IMPORT' " & " AND z.za_IsFinalDeclaration = 1 " & - " AND z.za_DeclarationDate >= @dateFrom " & - " AND z.za_DeclarationDate <= @dateTo " & - " AND p.zaParty_EORI IN (" & eoriIn & ") " & + " AND cast(z.za_DeclarationDate as date) >= @dateFrom " & + " AND cast(z.za_DeclarationDate as date) <= @dateTo " & + If(eoriIn <> "", " AND p.zaParty_EORI IN (" & eoriIn & ") ", "") & " AND " & cbamWhere If indirect Then @@ -255,13 +255,12 @@ Public Class cVERAG_CustomsDeclarations If CustomsSystem <> "" Then sqlstr &= " AND z.za_System = @sys " End If - Using conn = SQL.GetNewOpenConnectionFMZOLL() Using cmd As New SqlCommand(sqlstr, conn) ' cmd.Parameters.AddWithValue("@eori", EORI) - cmd.Parameters.AddWithValue("@dateFrom", datFrom) - cmd.Parameters.AddWithValue("@dateTo", datTo) + cmd.Parameters.AddWithValue("@dateFrom", datFrom.ToShortDateString) + cmd.Parameters.AddWithValue("@dateTo", datTo.ToShortDateString) If ImportCountry <> "" Then cmd.Parameters.AddWithValue("@importCountry", ImportCountry) From 0ebe4cf198b10d7594727f464edf6c001ffb5572 Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Tue, 13 Jan 2026 10:01:59 +0100 Subject: [PATCH 2/3] CBAM/VERAG Zollanmeldugnen --- SDL/kunden/usrCntlCBAM.Designer.vb | 245 ++++++++++++++- SDL/kunden/usrCntlCBAM.vb | 130 ++++++-- .../usrCntlKundenuebersicht.Designer.vb | 209 +++++++------ SDL/kunden/usrCntlKundenuebersicht.vb | 20 +- .../Classes/cGreendeal_CBAM_Trn.vb | 45 +++ VERAG_PROG_ALLGEMEIN/Classes/cKunde.vb | 5 +- .../Classes/cKundenErweitert.vb | 14 + .../Classes/cKundenVertraege.vb | 7 +- .../cATEZ_Greenpulse_CBAM_CostCalculation.vb | 1 + .../GREENPULSE/cATEZ_Greenpulse_KafkaDecs.vb | 1 + .../cVERAG_Zollanmeldung.vb | 293 +++++++++++++++++- VERAG_PROG_ALLGEMEIN/cAllgemein.vb | 2 + 12 files changed, 849 insertions(+), 123 deletions(-) diff --git a/SDL/kunden/usrCntlCBAM.Designer.vb b/SDL/kunden/usrCntlCBAM.Designer.vb index eb730cf9..8a8aab71 100644 --- a/SDL/kunden/usrCntlCBAM.Designer.vb +++ b/SDL/kunden/usrCntlCBAM.Designer.vb @@ -127,10 +127,25 @@ Partial Class usrCntlCBAM Me.txtBis = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtEori = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Button8 = New System.Windows.Forms.Button() + Me.Panel3 = New System.Windows.Forms.Panel() + Me.Button9 = New System.Windows.Forms.Button() + Me.txtCBAM_KdSett_CBAMNo = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.Label20 = New System.Windows.Forms.Label() + Me.Label21 = New System.Windows.Forms.Label() + Me.txtCBAM_KdSett_Warn1 = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.Label22 = New System.Windows.Forms.Label() + Me.Label23 = New System.Windows.Forms.Label() + Me.txtCBAM_KdSett_Status = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.txtCBAM_KdSett_Warn2 = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.txtCBAM_KdSett_ApplNo = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.Label14 = New System.Windows.Forms.Label() + Me.Label24 = New System.Windows.Forms.Label() + Me.Label25 = New System.Windows.Forms.Label() Me.cntxtAddSdl.SuspendLayout() Me.Panel1.SuspendLayout() Me.Panel2.SuspendLayout() Me.MyPanel1.SuspendLayout() + Me.Panel3.SuspendLayout() Me.SuspendLayout() ' 'lblOffert @@ -911,7 +926,7 @@ Partial Class usrCntlCBAM 'Button5 ' Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button5.Location = New System.Drawing.Point(825, 620) + Me.Button5.Location = New System.Drawing.Point(1097, 79) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(68, 37) Me.Button5.TabIndex = 53 @@ -1547,7 +1562,7 @@ Partial Class usrCntlCBAM 'Button8 ' Me.Button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button8.Location = New System.Drawing.Point(825, 672) + Me.Button8.Location = New System.Drawing.Point(1097, 131) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(68, 37) Me.Button8.TabIndex = 72 @@ -1555,11 +1570,221 @@ Partial Class usrCntlCBAM Me.Button8.UseVisualStyleBackColor = True Me.Button8.Visible = False ' + 'Panel3 + ' + Me.Panel3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Panel3.BackColor = System.Drawing.Color.FloralWhite + Me.Panel3.Controls.Add(Me.Label25) + Me.Panel3.Controls.Add(Me.Label24) + Me.Panel3.Controls.Add(Me.txtCBAM_KdSett_ApplNo) + Me.Panel3.Controls.Add(Me.Label14) + Me.Panel3.Controls.Add(Me.txtCBAM_KdSett_Warn2) + Me.Panel3.Controls.Add(Me.txtCBAM_KdSett_Status) + Me.Panel3.Controls.Add(Me.Button9) + Me.Panel3.Controls.Add(Me.txtCBAM_KdSett_CBAMNo) + Me.Panel3.Controls.Add(Me.Label20) + Me.Panel3.Controls.Add(Me.Label21) + Me.Panel3.Controls.Add(Me.txtCBAM_KdSett_Warn1) + Me.Panel3.Controls.Add(Me.Label22) + Me.Panel3.Controls.Add(Me.Label23) + Me.Panel3.Location = New System.Drawing.Point(491, 511) + Me.Panel3.Name = "Panel3" + Me.Panel3.Size = New System.Drawing.Size(382, 182) + Me.Panel3.TabIndex = 73 + ' + 'Button9 + ' + Me.Button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button9.Location = New System.Drawing.Point(149, 147) + Me.Button9.Name = "Button9" + Me.Button9.Size = New System.Drawing.Size(217, 28) + Me.Button9.TabIndex = 53 + Me.Button9.Text = "Speichern" + Me.Button9.UseVisualStyleBackColor = True + ' + 'txtCBAM_KdSett_CBAMNo + ' + Me.txtCBAM_KdSett_CBAMNo._DateTimeOnly = False + Me.txtCBAM_KdSett_CBAMNo._numbersOnly = True + Me.txtCBAM_KdSett_CBAMNo._numbersOnlyKommastellen = "" + Me.txtCBAM_KdSett_CBAMNo._numbersOnlyTrennzeichen = True + Me.txtCBAM_KdSett_CBAMNo._Prozent = False + Me.txtCBAM_KdSett_CBAMNo._ShortDateNew = False + Me.txtCBAM_KdSett_CBAMNo._ShortDateOnly = False + Me.txtCBAM_KdSett_CBAMNo._TimeOnly = False + Me.txtCBAM_KdSett_CBAMNo._TimeOnly_Seconds = False + Me.txtCBAM_KdSett_CBAMNo._value = "" + Me.txtCBAM_KdSett_CBAMNo._Waehrung = False + Me.txtCBAM_KdSett_CBAMNo._WaehrungZeichen = True + Me.txtCBAM_KdSett_CBAMNo.Enabled = False + Me.txtCBAM_KdSett_CBAMNo.ForeColor = System.Drawing.Color.Red + Me.txtCBAM_KdSett_CBAMNo.Location = New System.Drawing.Point(110, 118) + Me.txtCBAM_KdSett_CBAMNo.MaxLength = 10 + Me.txtCBAM_KdSett_CBAMNo.MaxLineLength = -1 + Me.txtCBAM_KdSett_CBAMNo.MaxLines_Warning = "" + Me.txtCBAM_KdSett_CBAMNo.MaxLines_Warning_Label = Nothing + Me.txtCBAM_KdSett_CBAMNo.Name = "txtCBAM_KdSett_CBAMNo" + Me.txtCBAM_KdSett_CBAMNo.Size = New System.Drawing.Size(256, 20) + Me.txtCBAM_KdSett_CBAMNo.TabIndex = 58 + ' + 'Label20 + ' + Me.Label20.AutoSize = True + Me.Label20.Location = New System.Drawing.Point(3, 121) + Me.Label20.Name = "Label20" + Me.Label20.Size = New System.Drawing.Size(88, 13) + Me.Label20.TabIndex = 59 + Me.Label20.Text = "CBAM Konto-Nr.:" + ' + 'Label21 + ' + Me.Label21.AutoSize = True + Me.Label21.Location = New System.Drawing.Point(2, 69) + Me.Label21.Name = "Label21" + Me.Label21.Size = New System.Drawing.Size(102, 13) + Me.Label21.TabIndex = 57 + Me.Label21.Text = "Warnschwelle/Jahr:" + ' + 'txtCBAM_KdSett_Warn1 + ' + Me.txtCBAM_KdSett_Warn1._DateTimeOnly = False + Me.txtCBAM_KdSett_Warn1._numbersOnly = True + Me.txtCBAM_KdSett_Warn1._numbersOnlyKommastellen = "" + Me.txtCBAM_KdSett_Warn1._numbersOnlyTrennzeichen = True + Me.txtCBAM_KdSett_Warn1._Prozent = False + Me.txtCBAM_KdSett_Warn1._ShortDateNew = False + Me.txtCBAM_KdSett_Warn1._ShortDateOnly = False + Me.txtCBAM_KdSett_Warn1._TimeOnly = False + Me.txtCBAM_KdSett_Warn1._TimeOnly_Seconds = False + Me.txtCBAM_KdSett_Warn1._value = "30" + Me.txtCBAM_KdSett_Warn1._Waehrung = False + Me.txtCBAM_KdSett_Warn1._WaehrungZeichen = True + Me.txtCBAM_KdSett_Warn1.ForeColor = System.Drawing.Color.Black + Me.txtCBAM_KdSett_Warn1.Location = New System.Drawing.Point(110, 66) + Me.txtCBAM_KdSett_Warn1.MaxLength = 10 + Me.txtCBAM_KdSett_Warn1.MaxLineLength = -1 + Me.txtCBAM_KdSett_Warn1.MaxLines_Warning = "" + Me.txtCBAM_KdSett_Warn1.MaxLines_Warning_Label = Nothing + Me.txtCBAM_KdSett_Warn1.Name = "txtCBAM_KdSett_Warn1" + Me.txtCBAM_KdSett_Warn1.Size = New System.Drawing.Size(58, 20) + Me.txtCBAM_KdSett_Warn1.TabIndex = 56 + Me.txtCBAM_KdSett_Warn1.Text = "30" + ' + 'Label22 + ' + Me.Label22.AutoSize = True + Me.Label22.Location = New System.Drawing.Point(3, 25) + Me.Label22.Name = "Label22" + Me.Label22.Size = New System.Drawing.Size(73, 13) + Me.Label22.TabIndex = 55 + Me.Label22.Text = "CBAM-Status:" + ' + 'Label23 + ' + Me.Label23.AutoSize = True + Me.Label23.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label23.Location = New System.Drawing.Point(3, 3) + Me.Label23.Name = "Label23" + Me.Label23.Size = New System.Drawing.Size(142, 13) + Me.Label23.TabIndex = 53 + Me.Label23.Text = "CBAM-Kundeneinstellungen:" + ' + 'txtCBAM_KdSett_Status + ' + Me.txtCBAM_KdSett_Status._allowedValuesFreiText = Nothing + Me.txtCBAM_KdSett_Status._allowFreiText = False + Me.txtCBAM_KdSett_Status._value = "" + Me.txtCBAM_KdSett_Status.FormattingEnabled = True + Me.txtCBAM_KdSett_Status.Location = New System.Drawing.Point(110, 24) + Me.txtCBAM_KdSett_Status.Name = "txtCBAM_KdSett_Status" + Me.txtCBAM_KdSett_Status.Size = New System.Drawing.Size(256, 21) + Me.txtCBAM_KdSett_Status.TabIndex = 74 + ' + 'txtCBAM_KdSett_Warn2 + ' + Me.txtCBAM_KdSett_Warn2._DateTimeOnly = False + Me.txtCBAM_KdSett_Warn2._numbersOnly = True + Me.txtCBAM_KdSett_Warn2._numbersOnlyKommastellen = "" + Me.txtCBAM_KdSett_Warn2._numbersOnlyTrennzeichen = True + Me.txtCBAM_KdSett_Warn2._Prozent = False + Me.txtCBAM_KdSett_Warn2._ShortDateNew = False + Me.txtCBAM_KdSett_Warn2._ShortDateOnly = False + Me.txtCBAM_KdSett_Warn2._TimeOnly = False + Me.txtCBAM_KdSett_Warn2._TimeOnly_Seconds = False + Me.txtCBAM_KdSett_Warn2._value = "40" + Me.txtCBAM_KdSett_Warn2._Waehrung = False + Me.txtCBAM_KdSett_Warn2._WaehrungZeichen = True + Me.txtCBAM_KdSett_Warn2.ForeColor = System.Drawing.Color.Black + Me.txtCBAM_KdSett_Warn2.Location = New System.Drawing.Point(174, 66) + Me.txtCBAM_KdSett_Warn2.MaxLength = 10 + Me.txtCBAM_KdSett_Warn2.MaxLineLength = -1 + Me.txtCBAM_KdSett_Warn2.MaxLines_Warning = "" + Me.txtCBAM_KdSett_Warn2.MaxLines_Warning_Label = Nothing + Me.txtCBAM_KdSett_Warn2.Name = "txtCBAM_KdSett_Warn2" + Me.txtCBAM_KdSett_Warn2.Size = New System.Drawing.Size(58, 20) + Me.txtCBAM_KdSett_Warn2.TabIndex = 75 + Me.txtCBAM_KdSett_Warn2.Text = "40" + ' + 'txtCBAM_KdSett_ApplNo + ' + Me.txtCBAM_KdSett_ApplNo._DateTimeOnly = False + Me.txtCBAM_KdSett_ApplNo._numbersOnly = True + Me.txtCBAM_KdSett_ApplNo._numbersOnlyKommastellen = "" + Me.txtCBAM_KdSett_ApplNo._numbersOnlyTrennzeichen = True + Me.txtCBAM_KdSett_ApplNo._Prozent = False + Me.txtCBAM_KdSett_ApplNo._ShortDateNew = False + Me.txtCBAM_KdSett_ApplNo._ShortDateOnly = False + Me.txtCBAM_KdSett_ApplNo._TimeOnly = False + Me.txtCBAM_KdSett_ApplNo._TimeOnly_Seconds = False + Me.txtCBAM_KdSett_ApplNo._value = "" + Me.txtCBAM_KdSett_ApplNo._Waehrung = False + Me.txtCBAM_KdSett_ApplNo._WaehrungZeichen = True + Me.txtCBAM_KdSett_ApplNo.Enabled = False + Me.txtCBAM_KdSett_ApplNo.ForeColor = System.Drawing.Color.Red + Me.txtCBAM_KdSett_ApplNo.Location = New System.Drawing.Point(110, 95) + Me.txtCBAM_KdSett_ApplNo.MaxLength = 10 + Me.txtCBAM_KdSett_ApplNo.MaxLineLength = -1 + Me.txtCBAM_KdSett_ApplNo.MaxLines_Warning = "" + Me.txtCBAM_KdSett_ApplNo.MaxLines_Warning_Label = Nothing + Me.txtCBAM_KdSett_ApplNo.Name = "txtCBAM_KdSett_ApplNo" + Me.txtCBAM_KdSett_ApplNo.Size = New System.Drawing.Size(256, 20) + Me.txtCBAM_KdSett_ApplNo.TabIndex = 77 + ' + 'Label14 + ' + Me.Label14.AutoSize = True + Me.Label14.Location = New System.Drawing.Point(3, 98) + Me.Label14.Name = "Label14" + Me.Label14.Size = New System.Drawing.Size(79, 13) + Me.Label14.TabIndex = 78 + Me.Label14.Text = "Application-Nr.:" + ' + 'Label24 + ' + Me.Label24.AutoSize = True + Me.Label24.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!) + Me.Label24.Location = New System.Drawing.Point(118, 52) + Me.Label24.Name = "Label24" + Me.Label24.Size = New System.Drawing.Size(43, 13) + Me.Label24.TabIndex = 79 + Me.Label24.Text = "Warn 1 " + ' + 'Label25 + ' + Me.Label25.AutoSize = True + Me.Label25.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!) + Me.Label25.Location = New System.Drawing.Point(182, 52) + Me.Label25.Name = "Label25" + Me.Label25.Size = New System.Drawing.Size(40, 13) + Me.Label25.TabIndex = 80 + Me.Label25.Text = "Warn 2" + ' 'usrCntlCBAM ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.White + Me.Controls.Add(Me.Panel3) Me.Controls.Add(Me.Button8) Me.Controls.Add(Me.cboIndirekt) Me.Controls.Add(Me.cbxIndirekt) @@ -1643,6 +1868,8 @@ Partial Class usrCntlCBAM Me.Panel2.PerformLayout() Me.MyPanel1.ResumeLayout(False) Me.MyPanel1.PerformLayout() + Me.Panel3.ResumeLayout(False) + Me.Panel3.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -1751,4 +1978,18 @@ Partial Class usrCntlCBAM Friend WithEvents cboIndirekt As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents cbxIndirekt As CheckBox Friend WithEvents Button8 As Button + Friend WithEvents Panel3 As Panel + Friend WithEvents txtCBAM_KdSett_ApplNo As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents Label14 As Label + Friend WithEvents txtCBAM_KdSett_Warn2 As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents txtCBAM_KdSett_Status As VERAG_PROG_ALLGEMEIN.MyComboBox + Friend WithEvents Button9 As Button + Friend WithEvents txtCBAM_KdSett_CBAMNo As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents Label20 As Label + Friend WithEvents Label21 As Label + Friend WithEvents txtCBAM_KdSett_Warn1 As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents Label22 As Label + Friend WithEvents Label23 As Label + Friend WithEvents Label25 As Label + Friend WithEvents Label24 As Label End Class diff --git a/SDL/kunden/usrCntlCBAM.vb b/SDL/kunden/usrCntlCBAM.vb index eb705b72..24c806ac 100644 --- a/SDL/kunden/usrCntlCBAM.vb +++ b/SDL/kunden/usrCntlCBAM.vb @@ -1,5 +1,6 @@ Imports DAKOSY_Worker Imports DocumentFormat.OpenXml.Spreadsheet +Imports Org.BouncyCastle.Crypto.Agreement Imports VERAG_PROG_ALLGEMEIN Public Class usrCntlCBAM @@ -8,6 +9,7 @@ Public Class usrCntlCBAM Public kdnr As Integer = -1 Dim AD As VERAG_PROG_ALLGEMEIN.cAdressen = Nothing Dim KD As VERAG_PROG_ALLGEMEIN.cKunde = Nothing + Dim ERW As VERAG_PROG_ALLGEMEIN.cKundenErweitert = Nothing Sub New() InitializeComponent() @@ -415,11 +417,21 @@ Public Class usrCntlCBAM If kdnr > 0 Then AD = New VERAG_PROG_ALLGEMEIN.cAdressen(kdnr) KD = New VERAG_PROG_ALLGEMEIN.cKunde(kdnr) + ERW = New VERAG_PROG_ALLGEMEIN.cKundenErweitert(kdnr) End If If KD IsNot Nothing Then txtEori.Text = KD.EORITIN End If + txtCBAM_KdSett_Status.Items.Clear() + txtCBAM_KdSett_Status.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("unbestimmt", "")) + txtCBAM_KdSett_Status.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("< 50 to (de minis)", "50to")) + txtCBAM_KdSett_Status.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Antrag abgegeben", "APPL")) + txtCBAM_KdSett_Status.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("CBAM Konto vorhanden", "CBAM")) + txtCBAM_KdSett_Status.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Kein Interesse/Fremdkunde", "NO")) + txtCBAM_KdSett_Status.changeItem("undefined") + + cboIndirekt.Items.Clear() cboIndirekt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG Spedition GmbH - DE4824105", "DE4824105")) cboIndirekt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG Customs Service GmbH - ATEOS1000059121", "DE4ATEOS1000059121824105")) @@ -430,6 +442,15 @@ Public Class usrCntlCBAM cboIndirekt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNISPED Zollservice GmbH - ATEOS1000040508", "ATEOS1000040508")) cboIndirekt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNISPED Deutschland GmbH - DE7467540", "DE7467540")) + If ERW IsNot Nothing Then + txtCBAM_KdSett_Status.changeItem(If(ERW.kde_CBAM_Status, "")) + txtCBAM_KdSett_Warn1._value = If(ERW.kde_CBAM_Warn1, "") + txtCBAM_KdSett_Warn2._value = If(ERW.kde_CBAM_Warn2, "") + txtCBAM_KdSett_ApplNo._value = If(ERW.kde_CBAM_ApplicationNo, "") + txtCBAM_KdSett_CBAMNo.Text = If(ERW.kde_CBAM_CBAMAccountNo, "") + End If + + End Sub Private Sub cboQuartal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboQuartal.SelectedIndexChanged @@ -2245,24 +2266,34 @@ Public Class usrCntlCBAM Try Dim summary = - From za In LIST - From it In za.Items - Group By - Tarifnummer = LeftStr(it.zaItem_HSCode, 8), - VersendungsLand = za.za_CountryDispatch, - Verfahren = LeftStr(za.za_MainProcedure, 2), - Vorverfahren = it.zaItem_PrevProcedure - Into grp = Group - Select New With { - .Tarifnummer = Tarifnummer, - .Eigenmasse = grp.Sum(Function(x) If(x.it.zaItem_NetMass, 0D)), - .Rohmasse = grp.Sum(Function(x) If(x.it.zaItem_GrossMass, 0D)), - .Rechnungspreis = grp.Sum(Function(x) If(x.it.zaItem_InvoiceValueEUR, 0D)), - .VersendungsLand = VersendungsLand, - .Verfahren = Verfahren, - .VorangegangenesVerfahren = Vorverfahren - } - + From za In LIST + From it In za.Items + Group By + Tarifnummer = LeftStr(it.zaItem_HSCode, 8), + VersendungsLand = za.za_CountryDispatch + Into grp = Group + Let verfahren = + grp.Select(Function(x) LeftStr(x.za.za_MainProcedure, 2)). + FirstOrDefault(Function(v) Not String.IsNullOrWhiteSpace(v)) + Let verfahrenFallback = + grp.Select(Function(x) LeftStr(x.it.zaItem_MainProcedure, 2)). + FirstOrDefault(Function(v) Not String.IsNullOrWhiteSpace(v)) + Let vorverfahren = + grp.Select(Function(x) x.it.zaItem_PrevProcedure). + FirstOrDefault(Function(v) Not String.IsNullOrWhiteSpace(v)) + Let rohmasseItems = + grp.Sum(Function(x) If(x.it.zaItem_GrossMass, 0D)) + Let rohmasseZA = + grp.Max(Function(x) If(x.za.za_TotGrossMass, 0D)) + Select New With { + .Tarifnummer = Tarifnummer, + .Eigenmasse = grp.Sum(Function(x) If(x.it.zaItem_NetMass, 0D)), + .Rohmasse = Math.Max(rohmasseItems, rohmasseZA), + .Rechnungspreis = grp.Sum(Function(x) If(x.it.zaItem_InvoiceValueEUR, x.it.zaItem_StatisticalValueEUR)), + .VersendungsLand = VersendungsLand, + .Verfahren = If(verfahrenFallback, verfahren), + .VorangegangenesVerfahren = vorverfahren + } Dim dt As New DataTable @@ -2316,7 +2347,7 @@ Public Class usrCntlCBAM Let exporter = za.Parties. FirstOrDefault(Function(p) {"CZ", "EX", "EXP", "EXPORTER"}.Contains(p.zaParty_Role)) Let invoice = - za.Documents.FirstOrDefault(Function(d) d.zaDoc_Code = "N380" OrElse d.zaDoc_Code = "N325") + it.Documents.FirstOrDefault(Function(d) d.zaDoc_Code = "N380" OrElse d.zaDoc_Code = "N325") Let Anmeldedatum = (Function(x) If(x.za_releaseDate, x.za_DeclarationDate)) Order By Anmeldedatum Select New With { @@ -2330,14 +2361,14 @@ Public Class usrCntlCBAM .Rohmasse = it.zaItem_GrossMass, .VersendungsLand = za.za_CountryDispatch, .BestimmungsLand = za.za_CountryDestination, - .Rechnungspreis = it.zaItem_InvoiceValueEUR, + .Rechnungspreis = If(it.zaItem_InvoiceValueEUR, it.zaItem_StatisticalValueEUR), .Rechnungswaehrung = it.zaItem_InvoiceCurrency, .EmpfaengerEORI = If(importer IsNot Nothing, importer.zaParty_EORI, ""), .Empfaenger = If(importer IsNot Nothing, importer.zaParty_Name, ""), .AbsenderEORI = If(exporter IsNot Nothing, exporter.zaParty_EORI, ""), .Absender = If(exporter IsNot Nothing, exporter.zaParty_Name, ""), .Rechnungsnummer = If(invoice IsNot Nothing, invoice.zaDoc_Reference, "-"), - .Rechnungsdatum = If(invoice IsNot Nothing, invoice.zaDoc_Date, Nothing) + .Rechnungsdatum = If(invoice IsNot Nothing, ParseDateSafe(invoice.zaDoc_Date), Nothing) } @@ -2398,7 +2429,25 @@ Public Class usrCntlCBAM End Try End Sub - + Public Shared Function ParseDateSafe(value As String) As Date? + If String.IsNullOrWhiteSpace(value) Then Return Nothing + Dim d As DateTime + If DateTime.TryParseExact( + value.Trim(), + {"dd.MM.yyyy", "dd.MM.yyyy HH:mm:ss", "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "MM/dd/yyyy", "MM/dd/yyyy HH:mm:ss"}, + Globalization.CultureInfo.InvariantCulture, + Globalization.DateTimeStyles.None, + d) Then + Return d + End If + If DateTime.TryParse(value, Globalization.CultureInfo.InvariantCulture, Globalization.DateTimeStyles.None, d) Then + Return d + End If + If DateTime.TryParse(value, Globalization.CultureInfo.CurrentCulture, Globalization.DateTimeStyles.None, d) Then + Return d + End If + Return Nothing + End Function Sub doVERAG_GREENPULSE_XLS(LIST As List(Of VERAG_PROG_ALLGEMEIN.cVERAG_CustomsDeclarations), EORI As String) btnCBAM_DS_VERAG_GP.Enabled = False @@ -2795,5 +2844,42 @@ Public Class usrCntlCBAM String.Join(vbNewLine, LIST. Where(Function(x) Not String.IsNullOrWhiteSpace(x.za_LRN)))) End Sub + + Private Sub MyComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles txtCBAM_KdSett_Status.SelectedIndexChanged + + txtCBAM_KdSett_ApplNo.Enabled = False + txtCBAM_KdSett_CBAMNo.Enabled = False + txtCBAM_KdSett_Warn1.Enabled = False + txtCBAM_KdSett_Warn2.Enabled = False + + Select Case txtCBAM_KdSett_Status._value + Case "" + txtCBAM_KdSett_Warn1.Enabled = True + txtCBAM_KdSett_Warn2.Enabled = True + Case "50to" + txtCBAM_KdSett_Warn1.Enabled = True + txtCBAM_KdSett_Warn2.Enabled = True + Case "APPL" + txtCBAM_KdSett_ApplNo.Enabled = True + Case "CBAM" + txtCBAM_KdSett_ApplNo.Enabled = True + txtCBAM_KdSett_CBAMNo.Enabled = True + Case "NO" 'nix + End Select + + End Sub + + Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click + If ERW Is Nothing Then ERW = New cKundenErweitert(kdnr) + + ERW.kde_CBAM_Status = txtCBAM_KdSett_Status._value + ERW.kde_CBAM_Warn1 = txtCBAM_KdSett_Warn1._value + ERW.kde_CBAM_Warn2 = txtCBAM_KdSett_Warn2._value + ERW.kde_CBAM_ApplicationNo = If(txtCBAM_KdSett_ApplNo._value <> "", txtCBAM_KdSett_ApplNo._value, Nothing) + ERW.kde_CBAM_CBAMAccountNo = If(txtCBAM_KdSett_CBAMNo._value <> "", txtCBAM_KdSett_CBAMNo._value, Nothing) + + ERW.SAVE() + + End Sub End Class diff --git a/SDL/kunden/usrCntlKundenuebersicht.Designer.vb b/SDL/kunden/usrCntlKundenuebersicht.Designer.vb index b7aa03e5..9f5521db 100644 --- a/SDL/kunden/usrCntlKundenuebersicht.Designer.vb +++ b/SDL/kunden/usrCntlKundenuebersicht.Designer.vb @@ -23,19 +23,19 @@ Partial Class usrCntlKundenuebersicht Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrCntlKundenuebersicht)) - Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.cntxtAddVM = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.DToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.btnExcel = New System.Windows.Forms.Button() @@ -209,6 +209,8 @@ Partial Class usrCntlKundenuebersicht Me.tbAvisoMail = New System.Windows.Forms.TabPage() Me.UsrCntlKundenAvisoMailBenachrichtigung1 = New SDL.usrCntlKundenAvisoMailBenachrichtigung() Me.tbKdSpez = New System.Windows.Forms.TabPage() + Me.txtBelegMail_FixBetreffText = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.cbxBelegMail_FixBetreff = New System.Windows.Forms.CheckBox() Me.Label14 = New System.Windows.Forms.Label() Me.Label43 = New System.Windows.Forms.Label() Me.cbxKdAuftragsNr = New System.Windows.Forms.CheckBox() @@ -264,8 +266,7 @@ Partial Class usrCntlKundenuebersicht Me.ToolStripMenuItem12 = New System.Windows.Forms.ToolStripMenuItem() Me.cboFirmaFMZOLL = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.SessionService1 = New VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.session.sessionService() - Me.cbxBelegMail_FixBetreff = New System.Windows.Forms.CheckBox() - Me.txtBelegMail_FixBetreffText = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.datVertragBis = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.cntxtAddVM.SuspendLayout() Me.tbWeitereKundenDetails.SuspendLayout() Me.tbOfferten.SuspendLayout() @@ -429,8 +430,8 @@ Partial Class usrCntlKundenuebersicht Me.dgvOfferteDetailsUebersicht.AllowUserToDeleteRows = False Me.dgvOfferteDetailsUebersicht.AllowUserToOrderColumns = True Me.dgvOfferteDetailsUebersicht.AllowUserToResizeRows = False - DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvOfferteDetailsUebersicht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13 + DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvOfferteDetailsUebersicht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1 Me.dgvOfferteDetailsUebersicht.BackgroundColor = System.Drawing.Color.White Me.dgvOfferteDetailsUebersicht.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.dgvOfferteDetailsUebersicht.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize @@ -450,8 +451,8 @@ Partial Class usrCntlKundenuebersicht Me.dgvOffertenSperrliste.AllowUserToDeleteRows = False Me.dgvOffertenSperrliste.AllowUserToOrderColumns = True Me.dgvOffertenSperrliste.AllowUserToResizeRows = False - DataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvOffertenSperrliste.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14 + DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvOffertenSperrliste.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2 Me.dgvOffertenSperrliste.BackgroundColor = System.Drawing.Color.White Me.dgvOffertenSperrliste.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.dgvOffertenSperrliste.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize @@ -461,10 +462,10 @@ Partial Class usrCntlKundenuebersicht Me.dgvOffertenSperrliste.Name = "dgvOffertenSperrliste" Me.dgvOffertenSperrliste.ReadOnly = True Me.dgvOffertenSperrliste.RowHeadersVisible = False - DataGridViewCellStyle15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer)) - DataGridViewCellStyle15.SelectionForeColor = System.Drawing.Color.Black - Me.dgvOffertenSperrliste.RowsDefaultCellStyle = DataGridViewCellStyle15 + DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer)) + DataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.Black + Me.dgvOffertenSperrliste.RowsDefaultCellStyle = DataGridViewCellStyle3 Me.dgvOffertenSperrliste.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect Me.dgvOffertenSperrliste.Size = New System.Drawing.Size(173, 257) Me.dgvOffertenSperrliste.TabIndex = 0 @@ -602,8 +603,8 @@ Partial Class usrCntlKundenuebersicht Me.dgvOffenePosten.AllowUserToAddRows = False Me.dgvOffenePosten.AllowUserToDeleteRows = False Me.dgvOffenePosten.AllowUserToResizeRows = False - DataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvOffenePosten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle16 + DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvOffenePosten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4 Me.dgvOffenePosten.BackgroundColor = System.Drawing.Color.White Me.dgvOffenePosten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvOffenePosten.Dock = System.Windows.Forms.DockStyle.Fill @@ -683,8 +684,8 @@ Partial Class usrCntlKundenuebersicht Me.dgvUmsatzbericht.AllowUserToDeleteRows = False Me.dgvUmsatzbericht.AllowUserToOrderColumns = True Me.dgvUmsatzbericht.AllowUserToResizeRows = False - DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvUmsatzbericht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17 + DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvUmsatzbericht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5 Me.dgvUmsatzbericht.BackgroundColor = System.Drawing.Color.White Me.dgvUmsatzbericht.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvUmsatzbericht.Dock = System.Windows.Forms.DockStyle.Fill @@ -747,8 +748,8 @@ Partial Class usrCntlKundenuebersicht Me.dgvAnhaenge.AllowUserToAddRows = False Me.dgvAnhaenge.AllowUserToDeleteRows = False Me.dgvAnhaenge.AllowUserToResizeRows = False - DataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvAnhaenge.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle18 + DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvAnhaenge.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6 Me.dgvAnhaenge.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.dgvAnhaenge.BackgroundColor = System.Drawing.Color.White Me.dgvAnhaenge.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize @@ -2511,8 +2512,8 @@ Partial Class usrCntlKundenuebersicht Me.dgvVollmachten.AllowUserToDeleteRows = False Me.dgvVollmachten.AllowUserToOrderColumns = True Me.dgvVollmachten.AllowUserToResizeRows = False - DataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvVollmachten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle22 + DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvVollmachten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7 Me.dgvVollmachten.BackgroundColor = System.Drawing.Color.White Me.dgvVollmachten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvVollmachten.Dock = System.Windows.Forms.DockStyle.Fill @@ -2565,8 +2566,8 @@ Partial Class usrCntlKundenuebersicht Me.dgvVertraege.AllowUserToDeleteRows = False Me.dgvVertraege.AllowUserToOrderColumns = True Me.dgvVertraege.AllowUserToResizeRows = False - DataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvVertraege.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle23 + DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvVertraege.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8 Me.dgvVertraege.BackgroundColor = System.Drawing.Color.White Me.dgvVertraege.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvVertraege.Dock = System.Windows.Forms.DockStyle.Fill @@ -2582,6 +2583,7 @@ Partial Class usrCntlKundenuebersicht 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.White + Me.Panel1.Controls.Add(Me.datVertragBis) Me.Panel1.Controls.Add(Me.Button11) Me.Panel1.Controls.Add(Me.Button12) Me.Panel1.Controls.Add(Me.txtVertragVermerk) @@ -2644,7 +2646,7 @@ Partial Class usrCntlKundenuebersicht Me.txtVertragVermerk.MaxLines_Warning = "" Me.txtVertragVermerk.MaxLines_Warning_Label = Nothing Me.txtVertragVermerk.Name = "txtVertragVermerk" - Me.txtVertragVermerk.Size = New System.Drawing.Size(326, 20) + Me.txtVertragVermerk.Size = New System.Drawing.Size(255, 20) Me.txtVertragVermerk.TabIndex = 6 ' 'Label16 @@ -2661,11 +2663,11 @@ Partial Class usrCntlKundenuebersicht ' Me.Label5.AutoSize = True Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label5.Location = New System.Drawing.Point(244, 6) + Me.Label5.Location = New System.Drawing.Point(255, 6) Me.Label5.Name = "Label5" - Me.Label5.Size = New System.Drawing.Size(41, 13) + Me.Label5.Size = New System.Drawing.Size(60, 13) Me.Label5.TabIndex = 2 - Me.Label5.Text = "Datum:" + Me.Label5.Text = "Datum/Bis:" ' 'cboVertrag ' @@ -2675,7 +2677,7 @@ Partial Class usrCntlKundenuebersicht Me.cboVertrag.FormattingEnabled = True Me.cboVertrag.Location = New System.Drawing.Point(60, 3) Me.cboVertrag.Name = "cboVertrag" - Me.cboVertrag.Size = New System.Drawing.Size(178, 21) + Me.cboVertrag.Size = New System.Drawing.Size(189, 21) Me.cboVertrag.TabIndex = 1 ' 'datVertrag @@ -2693,13 +2695,13 @@ Partial Class usrCntlKundenuebersicht Me.datVertrag._Waehrung = False Me.datVertrag._WaehrungZeichen = True Me.datVertrag.ForeColor = System.Drawing.Color.Black - Me.datVertrag.Location = New System.Drawing.Point(291, 3) + Me.datVertrag.Location = New System.Drawing.Point(321, 3) Me.datVertrag.MaxLength = 10 Me.datVertrag.MaxLineLength = -1 Me.datVertrag.MaxLines_Warning = "" Me.datVertrag.MaxLines_Warning_Label = Nothing Me.datVertrag.Name = "datVertrag" - Me.datVertrag.Size = New System.Drawing.Size(95, 20) + Me.datVertrag.Size = New System.Drawing.Size(65, 20) Me.datVertrag.TabIndex = 3 ' 'Label4 @@ -2741,8 +2743,8 @@ Partial Class usrCntlKundenuebersicht Me.dgvGestGarantie.AllowUserToDeleteRows = False Me.dgvGestGarantie.AllowUserToOrderColumns = True Me.dgvGestGarantie.AllowUserToResizeRows = False - DataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvGestGarantie.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle24 + DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvGestGarantie.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9 Me.dgvGestGarantie.BackgroundColor = System.Drawing.Color.White Me.dgvGestGarantie.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvGestGarantie.Dock = System.Windows.Forms.DockStyle.Fill @@ -2909,6 +2911,40 @@ Partial Class usrCntlKundenuebersicht Me.tbKdSpez.Text = "Kundenspezifisch" Me.tbKdSpez.UseVisualStyleBackColor = True ' + 'txtBelegMail_FixBetreffText + ' + Me.txtBelegMail_FixBetreffText._DateTimeOnly = False + Me.txtBelegMail_FixBetreffText._numbersOnly = False + Me.txtBelegMail_FixBetreffText._numbersOnlyKommastellen = "" + Me.txtBelegMail_FixBetreffText._numbersOnlyTrennzeichen = True + Me.txtBelegMail_FixBetreffText._Prozent = False + Me.txtBelegMail_FixBetreffText._ShortDateNew = False + Me.txtBelegMail_FixBetreffText._ShortDateOnly = False + Me.txtBelegMail_FixBetreffText._TimeOnly = False + Me.txtBelegMail_FixBetreffText._TimeOnly_Seconds = False + Me.txtBelegMail_FixBetreffText._value = "" + Me.txtBelegMail_FixBetreffText._Waehrung = False + Me.txtBelegMail_FixBetreffText._WaehrungZeichen = True + Me.txtBelegMail_FixBetreffText.Enabled = False + Me.txtBelegMail_FixBetreffText.ForeColor = System.Drawing.Color.Black + Me.txtBelegMail_FixBetreffText.Location = New System.Drawing.Point(327, 64) + Me.txtBelegMail_FixBetreffText.MaxLineLength = -1 + Me.txtBelegMail_FixBetreffText.MaxLines_Warning = "" + Me.txtBelegMail_FixBetreffText.MaxLines_Warning_Label = Nothing + Me.txtBelegMail_FixBetreffText.Name = "txtBelegMail_FixBetreffText" + Me.txtBelegMail_FixBetreffText.Size = New System.Drawing.Size(131, 20) + Me.txtBelegMail_FixBetreffText.TabIndex = 11 + ' + 'cbxBelegMail_FixBetreff + ' + Me.cbxBelegMail_FixBetreff.AutoSize = True + Me.cbxBelegMail_FixBetreff.Location = New System.Drawing.Point(235, 67) + Me.cbxBelegMail_FixBetreff.Name = "cbxBelegMail_FixBetreff" + Me.cbxBelegMail_FixBetreff.Size = New System.Drawing.Size(97, 17) + Me.cbxBelegMail_FixBetreff.TabIndex = 10 + Me.cbxBelegMail_FixBetreff.Text = "Betreff Fix(Blg):" + Me.cbxBelegMail_FixBetreff.UseVisualStyleBackColor = True + ' 'Label14 ' Me.Label14.AutoSize = True @@ -3198,24 +3234,24 @@ Partial Class usrCntlKundenuebersicht Me.dgvAufschub.AllowUserToResizeColumns = False Me.dgvAufschub.AllowUserToResizeRows = False Me.dgvAufschub.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvAufschub.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle19 + DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvAufschub.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle10 Me.dgvAufschub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvAufschub.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.KtoId, Me.Art, Me.HZA, Me.KontoNr, Me.EORI, Me.NL, Me.BIN}) - DataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle21.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvAufschub.DefaultCellStyle = DataGridViewCellStyle21 + DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.dgvAufschub.DefaultCellStyle = DataGridViewCellStyle12 Me.dgvAufschub.Location = New System.Drawing.Point(13, 61) Me.dgvAufschub.MultiSelect = False Me.dgvAufschub.Name = "dgvAufschub" @@ -3242,8 +3278,8 @@ Partial Class usrCntlKundenuebersicht ' 'HZA ' - DataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight - Me.HZA.DefaultCellStyle = DataGridViewCellStyle20 + DataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + Me.HZA.DefaultCellStyle = DataGridViewCellStyle11 Me.HZA.HeaderText = "HZA" Me.HZA.Name = "HZA" Me.HZA.ReadOnly = True @@ -3461,39 +3497,29 @@ Partial Class usrCntlKundenuebersicht Me.SessionService1.Url = "https://finanzonline.bmf.gv.at/fonws/ws/session" Me.SessionService1.UseDefaultCredentials = False ' - 'cbxBelegMail_FixBetreff + 'datVertragBis ' - Me.cbxBelegMail_FixBetreff.AutoSize = True - Me.cbxBelegMail_FixBetreff.Location = New System.Drawing.Point(235, 67) - Me.cbxBelegMail_FixBetreff.Name = "cbxBelegMail_FixBetreff" - Me.cbxBelegMail_FixBetreff.Size = New System.Drawing.Size(97, 17) - Me.cbxBelegMail_FixBetreff.TabIndex = 10 - Me.cbxBelegMail_FixBetreff.Text = "Betreff Fix(Blg):" - Me.cbxBelegMail_FixBetreff.UseVisualStyleBackColor = True - ' - 'txtBelegMail_FixBetreffText - ' - Me.txtBelegMail_FixBetreffText._DateTimeOnly = False - Me.txtBelegMail_FixBetreffText._numbersOnly = False - Me.txtBelegMail_FixBetreffText._numbersOnlyKommastellen = "" - Me.txtBelegMail_FixBetreffText._numbersOnlyTrennzeichen = True - Me.txtBelegMail_FixBetreffText._Prozent = False - Me.txtBelegMail_FixBetreffText._ShortDateNew = False - Me.txtBelegMail_FixBetreffText._ShortDateOnly = False - Me.txtBelegMail_FixBetreffText._TimeOnly = False - Me.txtBelegMail_FixBetreffText._TimeOnly_Seconds = False - Me.txtBelegMail_FixBetreffText._value = "" - Me.txtBelegMail_FixBetreffText._Waehrung = False - Me.txtBelegMail_FixBetreffText._WaehrungZeichen = True - Me.txtBelegMail_FixBetreffText.Enabled = False - Me.txtBelegMail_FixBetreffText.ForeColor = System.Drawing.Color.Black - Me.txtBelegMail_FixBetreffText.Location = New System.Drawing.Point(327, 64) - Me.txtBelegMail_FixBetreffText.MaxLineLength = -1 - Me.txtBelegMail_FixBetreffText.MaxLines_Warning = "" - Me.txtBelegMail_FixBetreffText.MaxLines_Warning_Label = Nothing - Me.txtBelegMail_FixBetreffText.Name = "txtBelegMail_FixBetreffText" - Me.txtBelegMail_FixBetreffText.Size = New System.Drawing.Size(131, 20) - Me.txtBelegMail_FixBetreffText.TabIndex = 11 + Me.datVertragBis._DateTimeOnly = False + Me.datVertragBis._numbersOnly = False + Me.datVertragBis._numbersOnlyKommastellen = "" + Me.datVertragBis._numbersOnlyTrennzeichen = True + Me.datVertragBis._Prozent = False + Me.datVertragBis._ShortDateNew = True + Me.datVertragBis._ShortDateOnly = False + Me.datVertragBis._TimeOnly = False + Me.datVertragBis._TimeOnly_Seconds = False + Me.datVertragBis._value = "" + Me.datVertragBis._Waehrung = False + Me.datVertragBis._WaehrungZeichen = True + Me.datVertragBis.ForeColor = System.Drawing.Color.Black + Me.datVertragBis.Location = New System.Drawing.Point(321, 23) + Me.datVertragBis.MaxLength = 10 + Me.datVertragBis.MaxLineLength = -1 + Me.datVertragBis.MaxLines_Warning = "" + Me.datVertragBis.MaxLines_Warning_Label = Nothing + Me.datVertragBis.Name = "datVertragBis" + Me.datVertragBis.Size = New System.Drawing.Size(65, 20) + Me.datVertragBis.TabIndex = 10 ' 'usrCntlKundenuebersicht ' @@ -3821,4 +3847,5 @@ Partial Class usrCntlKundenuebersicht Friend WithEvents lblInsolvent As Label Friend WithEvents txtBelegMail_FixBetreffText As VERAG_PROG_ALLGEMEIN.MyTextBox Friend WithEvents cbxBelegMail_FixBetreff As CheckBox + Friend WithEvents datVertragBis As VERAG_PROG_ALLGEMEIN.MyTextBox End Class diff --git a/SDL/kunden/usrCntlKundenuebersicht.vb b/SDL/kunden/usrCntlKundenuebersicht.vb index e5cfe4c9..330957e1 100644 --- a/SDL/kunden/usrCntlKundenuebersicht.vb +++ b/SDL/kunden/usrCntlKundenuebersicht.vb @@ -3,6 +3,7 @@ Imports System.Globalization Imports System.IO Imports org.BouncyCastle.Asn1.Ocsp Imports SDL.EORI +Imports sun.util.resources.cldr.aa Imports VERAG_PROG_ALLGEMEIN Public Class usrCntlKundenuebersicht @@ -1047,8 +1048,11 @@ Public Class usrCntlKundenuebersicht .Columns("kv_vertragArtId").Visible = False .Columns("kv_datenarchivId").Visible = False .Columns("kv_erhalten_Datum").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter - .Columns("kv_erhalten_Datum").Width = 70 + .Columns("kv_erhalten_Datum").Width = 65 .Columns("kv_erhalten_Datum").HeaderText = "Datum" + .Columns("kv_gueltigBis_Datum").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter + .Columns("kv_gueltigBis_Datum").Width = 65 + .Columns("kv_gueltigBis_Datum").HeaderText = "GültigBis" .Columns("kva_Bezeichnung").Width = 120 .Columns("kva_Bezeichnung").HeaderText = "Art" .Columns("kv_Info").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill @@ -1067,6 +1071,12 @@ Public Class usrCntlKundenuebersicht If r.Cells("kv_datenarchivId").Value IsNot DBNull.Value AndAlso CInt(r.Cells("kv_datenarchivId").Value) > 0 Then DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = My.Resources.pdf End If + If (r.Cells("kv_gueltigBis_Datum").Value IsNot DBNull.Value AndAlso CDate(r.Cells("kv_gueltigBis_Datum").Value) <= CDate(Now.ToShortDateString)) OrElse + (Not CBool(r.Cells("kv_gueltig").Value)) Then + r.DefaultCellStyle.ForeColor = Color.Red + Else + r.DefaultCellStyle.ForeColor = Color.Black + End If Next End If .ClearSelection() @@ -2447,6 +2457,7 @@ Public Class usrCntlKundenuebersicht Sub clearKV() cboVertrag.changeItem("") datVertrag.Text = "" + datVertragBis.Text = "" txtVertragVermerk.Text = "" Button11.Text = "Hinzufügen" Button12.Visible = False @@ -2549,6 +2560,12 @@ Public Class usrCntlKundenuebersicht End If KV.kv_KundenNr = kdNr KV.kv_erhalten_Datum = datVertrag._value + If datVertragBis._value = "" Then + KV.kv_gueltigBis_Datum = Nothing + Else + KV.kv_gueltigBis_Datum = datVertragBis._value + End If + 'KV.kv_Zollamt = If(cbxKV.Checked, "GENERELL", txtT1VerzollungsadresseBestimmungszollstelle._value) 'If Not Button9.Visible AndAlso VERAG_PROG_ALLGEMEIN.cKundenVertraege.ENTRY_Exists(kdNr, KV.kv_Zollamt) Then @@ -2600,6 +2617,7 @@ Public Class usrCntlKundenuebersicht cboVertrag.changeItem(KV.kv_vertragArtId) datVertrag.Text = KV.kv_erhalten_Datum + datVertragBis.Text = If(KV.kv_gueltigBis_Datum, "") txtVertragVermerk.Text = KV.kv_Info Button11.Text = "Ändern" diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cGreendeal_CBAM_Trn.vb b/VERAG_PROG_ALLGEMEIN/Classes/cGreendeal_CBAM_Trn.vb index 242ad940..e0ddfacd 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cGreendeal_CBAM_Trn.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cGreendeal_CBAM_Trn.vb @@ -211,6 +211,51 @@ Public Class cGreendeal_CBAM_Trn End Function + Public Shared Function LoadCBAMTariffNumbers(Optional onlyActive As Boolean = True, + Optional includeExclusions As Boolean = False) _ + As List(Of String) + + Dim sql As String = + "SELECT DISTINCT trnPattern " & + "FROM VERAG.dbo.tblGreendeal_CBAM_Trn " & + "WHERE trnPattern IS NOT NULL " & + "AND LTRIM(RTRIM(trnPattern)) <> '' " + + If onlyActive Then + sql &= " AND is_active = 1 " & + " AND (start_date IS NULL OR start_date <= GETDATE()) " & + " AND (end_date IS NULL OR end_date >= GETDATE()) " + End If + + If Not includeExclusions Then + sql &= " AND ISNULL(is_exclusion,0) = 0 " + End If + + Dim dt As DataTable = + (New VERAG_PROG_ALLGEMEIN.SQL).loadDgvBySql(sql, "FMZOLL") + + Dim result As New List(Of String) + + If dt Is Nothing OrElse dt.Rows.Count = 0 Then + Return result + End If + + For Each r As DataRow In dt.Rows + Dim pattern As String = r("trnPattern").ToString().Trim() + + ' % entfernen → reine Tarifnummer + pattern = pattern.Replace("%", "") + + ' nur numerische Werte zulassen + If pattern <> "" AndAlso pattern.All(AddressOf Char.IsDigit) Then + result.Add(pattern) + End If + Next + + Return result.Distinct().OrderBy(Function(x) x).ToList() + + End Function + Public Shared Function DELETE_ALL() As Boolean Try diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cKunde.vb b/VERAG_PROG_ALLGEMEIN/Classes/cKunde.vb index 3ae5f7b4..c595e0c3 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cKunde.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cKunde.vb @@ -321,12 +321,13 @@ Public Class cKunde ' Return Nothing End Sub - Public Shared Function LOAD_ByEORI(EORI) As cKunde + Public Shared Function LOAD_ByEORI(EORI, Optional searchfirma = "") As cKunde Dim test = "" Dim KUNDE As New cKunde() Try Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() - Using cmd As New SqlCommand("SELECT * FROM Kunden INNER JOIN Filialen on Filialen.FilialenNr=Kunden.FilialenNr WHERE EORITIN=@EORITIN and ( '" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA.Replace("ATILLA", "VERAG") & "' IN (Filialen.Firma,Filialen.Cluster)) ", conn) + If searchfirma = "" Then searchfirma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA.Replace("ATILLA", "VERAG") + Using cmd As New SqlCommand("SELECT * FROM Kunden INNER JOIN Filialen on Filialen.FilialenNr=Kunden.FilialenNr WHERE EORITIN=@EORITIN and ( '" & searchfirma & "' IN (Filialen.Firma,Filialen.Cluster)) ", conn) cmd.Parameters.AddWithValue("@EORITIN", EORI) Dim dr = cmd.ExecuteReader() diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cKundenErweitert.vb b/VERAG_PROG_ALLGEMEIN/Classes/cKundenErweitert.vb index 1e5438e4..ebef10fe 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cKundenErweitert.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cKundenErweitert.vb @@ -107,6 +107,11 @@ Public Class cKundenErweitert Property kde_ATEZ_GreenpulseID As Object = Nothing Property kde_SEG_Summe As Object = Nothing Property kde_SEG_Datum As Object = Nothing + Property kde_CBAM_Status As String = "" + Property kde_CBAM_Warn1 As Decimal? = 30 + Property kde_CBAM_Warn2 As Decimal? = 40 + Property kde_CBAM_ApplicationNo As Object = Nothing + Property kde_CBAM_CBAMAccountNo As Object = Nothing Dim SQL As New SQL @@ -221,6 +226,15 @@ Public Class cKundenErweitert list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_SEG_Summe", kde_SEG_Summe)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_SEG_Datum", kde_SEG_Datum)) + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_CBAM_Status", kde_CBAM_Status)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_CBAM_Warn1", kde_CBAM_Warn1)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_CBAM_Warn2", kde_CBAM_Warn2)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_CBAM_ApplicationNo", kde_CBAM_ApplicationNo)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_CBAM_CBAMAccountNo", kde_CBAM_CBAMAccountNo)) + + + Return list End Function diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cKundenVertraege.vb b/VERAG_PROG_ALLGEMEIN/Classes/cKundenVertraege.vb index f4182022..a3cc88d7 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cKundenVertraege.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cKundenVertraege.vb @@ -6,6 +6,7 @@ Public Class cKundenVertraege Property kv_Id As Integer Property kv_KundenNr As Integer Property kv_erhalten_Datum As Date + Property kv_gueltigBis_Datum As Date? Property kv_vertragArtId As Integer Property kv_Info As Object = Nothing Property kv_datenarchivId As Object = Nothing @@ -24,10 +25,11 @@ Public Class cKundenVertraege LOAD() End Sub - Sub New(kv_KundenNr, kv_erhalten_Datum, kv_vertragArtId) + Sub New(kv_KundenNr, kv_erhalten_Datum, kv_vertragArtId, Optional kv_gueltigBis_Datum = Nothing) Me.kv_KundenNr = kv_KundenNr Me.kv_erhalten_Datum = kv_erhalten_Datum Me.kv_vertragArtId = kv_vertragArtId + Me.kv_gueltigBis_Datum = kv_gueltigBis_Datum LOAD(kv_KundenNr, kv_erhalten_Datum, kv_vertragArtId) End Sub @@ -40,12 +42,13 @@ Public Class cKundenVertraege list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kv_Info", kv_Info)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kv_datenarchivId", kv_datenarchivId)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kv_gueltig", kv_gueltig)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kv_gueltigBis_Datum", kv_gueltigBis_Datum)) Return list End Function Public Shared Function LOAD_LIST(KundenNr As Integer) As DataTable - Return (New SQL).loadDgvBySql("SELECT [kv_Id],[kv_KundenNr],[kv_erhalten_Datum],[kv_vertragArtId],kva_Bezeichnung,[kv_Info],[kv_datenarchivId],[kv_gueltig] FROM tblKundenVertraege INNER JOIN tblKundenVertraegeArten ON kv_vertragArtId=kva_id WHERE kv_KundenNr=" & KundenNr, "FMZOLL") + Return (New SQL).loadDgvBySql("SELECT [kv_Id],[kv_KundenNr],[kv_erhalten_Datum],[kv_vertragArtId],kva_Bezeichnung,[kv_Info],[kv_datenarchivId],[kv_gueltig],kv_gueltigBis_Datum FROM tblKundenVertraege INNER JOIN tblKundenVertraegeArten ON kv_vertragArtId=kva_id WHERE kv_KundenNr=" & KundenNr, "FMZOLL") End Function Public Shared Function ENTRY_Exists(KundenNr As Integer, kv_vertragArtId As Integer) As Boolean diff --git a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_CBAM_CostCalculation.vb b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_CBAM_CostCalculation.vb index 40b45c56..749cd4be 100644 --- a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_CBAM_CostCalculation.vb +++ b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_CBAM_CostCalculation.vb @@ -367,6 +367,7 @@ Public Class cATEZ_Greenpulse_CBAM_CostCalculation Return s End Function + ' ------------------------------------------------------------------------ ' Helpers ' ------------------------------------------------------------------------ diff --git a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_KafkaDecs.vb b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_KafkaDecs.vb index 52d264b3..755d587b 100644 --- a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_KafkaDecs.vb +++ b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_KafkaDecs.vb @@ -46,6 +46,7 @@ Public Class cATEZ_Greenpulse_KafkaDecs Dim m = (mrn).ToUpperInvariant() Return String.Join(SEP_PIPE, New String() {KEY_VERSION, c, s, m}) End Function + Public Shared Function GetUniqueKey_Pipe_FromVERAG_CustomsDec(CD As VERAG_PROG_ALLGEMEIN.cVERAG_CustomsDeclarations, Optional mrn As String = "") As String Dim c = (If(CD.za_CountryImport, CD.za_CustomsSystemCountry)).ToUpperInvariant() diff --git a/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb b/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb index 3e7dbc62..819ad26f 100644 --- a/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb +++ b/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb @@ -1,5 +1,10 @@ Imports System.Data.SqlClient Imports System.Reflection +Imports System.Runtime.InteropServices.ComTypes +Imports com.sun.tools.javac.util +Imports java.lang.ProcessBuilder +Imports sun.util.resources.cldr.aa +Imports VERAG_PROG_ALLGEMEIN.TESTJSON ' ========================================================================== ' MASTER CLASS @@ -231,7 +236,7 @@ Public Class cVERAG_CustomsDeclarations "FROM VERAG.dbo.tblVERAG_CustomsDeclarations z " & "INNER JOIN VERAG.dbo.tblVERAG_CustomsDeclarations_Items i " & " ON z.za_Id = i.zaItem_zaId " & - "INNER JOIN VERAG.dbo.tblVERAG_CustomsDeclarations_Parties p " & + "LEFT JOIN VERAG.dbo.tblVERAG_CustomsDeclarations_Parties p " & " ON z.za_Id = p.zaParty_zaId " & "WHERE z.za_REGIME = 'IMPORT' " & " AND z.za_IsFinalDeclaration = 1 " & @@ -357,12 +362,294 @@ Public Class cVERAG_CustomsDeclarations Return ZA End Function + Public Sub checkfreshCBAMWarning() + Try + Dim CBAM_ITEMS As New List(Of cVERAG_CustomsDeclarations_Item) + + If hasCBAM(CBAM_ITEMS) Then + + Dim importerEORI As String = Me.Parties.Where(Function(p) {"CN", "IM", "IMP", "IMPORTER"}.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_EORI).FirstOrDefault() + Dim ExporterEORI As String = Me.Parties.Where(Function(p) {"CZ", "EX", "EXP", "EXPORTER"}.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_EORI).FirstOrDefault() + Dim ExporterString As String = Me.Parties.Where(Function(p) {"CZ", "EX", "EXP", "EXPORTER"}.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_Name).FirstOrDefault() + + Dim KD As cKunde = Nothing + Dim AD As cAdressen = Nothing + If If(importerEORI, "") <> "" Then + KD = cKunde.LOAD_ByEORI(importerEORI, If(za_Firma, "")) + If KD Is Nothing Then KD = cKunde.LOAD_ByEORI(importerEORI) 'Wenn kein Kunde mit Firma gefunden wurde, nur nach EORI suchen (default VERAG) + AD = New cAdressen(KD.KundenNr) + End If + + If isIndirect() Then + Dim KD_EX As cKunde = Nothing + Dim AD_EX As cAdressen = Nothing + If If(ExporterEORI, "") <> "" Then + KD_EX = cKunde.LOAD_ByEORI(ExporterEORI, If(za_Firma, "")) + If KD_EX Is Nothing Then KD_EX = cKunde.LOAD_ByEORI(ExporterEORI) 'Wenn kein Kunde mit Firma gefunden wurde, nur nach EORI suchen (default VERAG) + AD_EX = New cAdressen(KD_EX.KundenNr) + End If + + '==================>> INDIRECT <<========================= + Dim itemsHtml As String = + String.Join("", CBAM_ITEMS.Select(Function(i) "" & + "" & i.zaItem_PosNo.ToString & "" & + "" & If(i.zaItem_HSCode, "") & "" & + "" & If(i.zaItem_Description, "") & "" & + "" + )) + + Dim bodyHtml As String = + "" & + "

CBAM-Warnmeldung bei Zollanmeldung " & Me.za_MRN & "

" & + "

" & + "Bei der Zollanmeldung mit der MRN " & Me.za_MRN & " wurden CBAM-relevante Warenpositionen erkannt.
" & + "Bitte prüfen Sie diese Anmeldung im Hinblick auf die CBAM-Meldepflicht." & + "

" & + "

Erkannte CBAM-Positionen

" & + "" & + "" & + "" & + "" & + "" & + "" & + itemsHtml & + "
PosNrHS-CodeBeschreibung
" & + "

" & + "Importeur:
" & + importerEORI & " – " & vbNewLine & + If(AD Is Nothing, ExporterString, AD.Name_1 & " " & If(AD.Name_2, "") & "
" & + If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "")) & + "

" & + "

" & + "Exporteur:
" & + If(ExporterEORI, "") & " – " & vbNewLine & + If(AD_EX Is Nothing, ExporterString, AD_EX.Name_1 & " " & If(AD_EX.Name_2, "") & "
" & + If(AD_EX.LandKz, "") & " " & If(AD_EX.PLZ, "") & " " & If(AD_EX.Ort, "")) & + "

" & + "

VERAG – CBAM Compliance Services

" & + "" + + VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag", "CBAM WARNUNG - " & Me.za_MRN, bodyHtml, "cbam@verag.ag") + + 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag", "CBAM WARNUNG", + ' "CBAM-Warnmeldung bei Zollanmeldung " & Me.za_MRN & vbNewLine & + ' "Bei der Zollanmeldung mit der MRN " & Me.za_MRN & " wurden CBAM-relevante Warenpositionen erkannt." & vbCrLf & + ' "Bitte prüfen Sie diese Anmeldung im Hinblick auf die CBAM-Meldepflicht." & vbCrLf & vbCrLf & + ' "Erkannte CBAM-Positionen:" & vbCrLf & + ' String.Join(vbCrLf, CBAM_ITEMS.Select(Function(i) " - PosNr: " & i.zaItem_PosNo.ToString & " | HS-Code: " & If(i.zaItem_HSCode, "") & " | Beschreibung: " & If(i.zaItem_Description, ""))) + ' ) + ''========================================================= + Else + '==================>> DIRECT <<========================= + + Try + If KD IsNot Nothing Then + Dim ERW As New cKundenErweitert(KD.KundenNr) + + Select Case ERW.kde_CBAM_Status + Case "", "50to" ' Nur hier wird eine Warnung gesendet!! -> WEnn der Kunde bereits Registriert ist, nicht notwendig. + + Dim dateCBAM = If(If(za_ReleaseDate, za_DeclarationDate), Now) + + Dim eigenmasseSumme_Shipment As Decimal = CBAM_ITEMS.Sum(Function(i) If(i.zaItem_NetMass, 0D)) / 1000 + Dim eigenmasseSumme_YEAR As Decimal = getCBAM_KG(importerEORI, CDate("01.01." & dateCBAM.Year), CDate("31.12." & dateCBAM.Year), za_MRN) / 1000 + + Dim WarnLevel As String = "" + Dim Schwellenwert As Decimal = 0 + + Dim Warn1 As Decimal = If(If(ERW.kde_CBAM_Warn1, 0) > 0, ERW.kde_CBAM_Warn1, 30) + Dim Warn2 As Decimal = If(If(ERW.kde_CBAM_Warn2, 0) > 0, ERW.kde_CBAM_Warn2, 40) + Dim Warn50to As Decimal = 50 + + 'geprüft werden die bisherigen CBAM Waren im Jahr + die aktuelle Sendung + If eigenmasseSumme_YEAR < Warn50to And (eigenmasseSumme_Shipment + eigenmasseSumme_YEAR) >= Warn50to Then + '--> WARN 2 überschritten + WarnLevel = "3" + Schwellenwert = 50 + End If + 'geprüft werden die bisherigen CBAM Waren im Jahr + die aktuelle Sendung + If eigenmasseSumme_YEAR < Warn2 And (eigenmasseSumme_Shipment + eigenmasseSumme_YEAR) >= Warn2 Then + '--> WARN 2 überschritten + WarnLevel = "2" + Schwellenwert = Warn2 + End If + 'geprüft werden die bisherigen CBAM Waren im Jahr + die aktuelle Sendung + If eigenmasseSumme_YEAR < Warn1 And (eigenmasseSumme_Shipment + eigenmasseSumme_YEAR) >= Warn1 Then + '--> WARN 1 überschritten + WarnLevel = "1" + Schwellenwert = Warn1 + End If + + '===========>>>> WARNUNG <<<<<<<================================= + If WarnLevel <> "" Then + Dim bodyHtml As String = + "" & + "

CBAM-Warnmeldung zu Ihrer Zollanmeldung " & Me.za_MRN & "

" & + "

" & + "Laut unserem System wurden in der Zollanmeldung mit der MRN " & Me.za_MRN & " " & + "CBAM-pflichtige Warenpositionen erkannt.
" & + "Für Ihr Unternehmen liegen uns derzeit keine Informationen über eine gültige CBAM-Registrierung vor." & + "

" & + "" & + "" & + "" & + "
Warnstufe" & WarnLevel & If(WarnLevel = 3, " - ÜBERSCHREITUNG!", "") & "
Schwellenwert" & Schwellenwert.ToString("N0") & " Tonnen

" & + "

" & + "Importeur:
" & + importerEORI & " – " & vbNewLine & + If(AD Is Nothing, ExporterString, AD.Name_1 & " " & If(AD.Name_2, "") & "
" & + If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "")) & + "

" & + "

" & + "Exporteur:
" & + If(ExporterEORI, "") & " – " & vbNewLine & If(ExporterString, "") & + "

" & + "

WICHTIG

" & + "

" & + "Bei Überschreitung einer jährlichen Gesamtmenge von 50 Tonnen CBAM-pflichtiger Waren (Jahressumme) " & + "ist eine gültige CBAM-Registrierung zwingend erforderlich.
" & + "Ohne gültige Registrierung kann es zu Zollblockaden oder Abfertigungsstopps kommen." & + "

" & + "

" & + "Bitte teilen Sie uns kurzfristig unter " & + "cbam@verag.ag mit, wie Sie weiter vorgehen möchten " & + "(z. B. bestehende Registrierung, Beantragung mit VERAG oder Bevollmächtigung)." & + "

" & + "

VERAG DCS – CBAM Compliance Services

" & + "

VERAG Spedition AG
A-4975 Suben, Suben 100

" & + "" + + + VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(If(AD.E_Mail, ""), "CBAM-WARNUNG – " & If(WarnLevel = 3, " - ACHTUNG: Überschreitung 50to! ", "Überschreitung der Meldeschwelle"), bodyHtml, "cbam@verag.ag", (WarnLevel = 3), "cbam@verag.ag",, "al@verag.ag") + + 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail( + ' "al@verag.ag", + ' "CBAM-WARNUNG – Überschreitung der Meldeschwelle", + ' "CBAM-Warnmeldung zu Ihrer Zollanmeldung " & Me.za_MRN & vbCrLf & vbCrLf & + ' "Laut unserem System wurden in der Zollanmeldung mit der MRN " & Me.za_MRN & " CBAM-pflichtige Warenpositionen erkannt." & vbCrLf & + ' "Für Ihr Unternehmen liegen uns derzeit keine Informationen über eine gültige CBAM-Registrierung vor." & vbCrLf & vbCrLf & + ' "Der für diese Sendung relevante Schwellenwert wurde überschritten." & vbCrLf & + ' "Aktuelle Warnstufe: " & WarnLevel & vbCrLf & + ' "Angewendeter Schwellenwert: " & Schwellenwert.ToString("N0") & " Tonnen" & vbCrLf & vbCrLf & + ' "Importeur: " & importerEORI & " - " & AD.Name_1 & " " & If(AD.Name_2, "") & " " & If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "") & vbCrLf & + ' "WICHTIG:" & vbCrLf & + ' "Bei Überschreitung einer jährlichen Gesamtmenge von 50 Tonnen CBAM-pflichtiger Waren ist eine gültige CBAM-Registrierung zwingend erforderlich." & vbCrLf & + ' "Ohne gültige Registrierung kann es zu Zollblockaden oder Abfertigungsstopps kommen." & vbCrLf & vbCrLf & + ' "Bitte teilen Sie uns kurzfristig unter cbam@verag.ag mit, wie Sie weiter vorgehen möchten (z. B. bestehende Registrierung, Beantragung mit VERAG oder Bevollmächtigung)." & vbCrLf & vbCrLf & + ' "VERAG – CBAM Compliance Services" + ' ) + End If + '================================================================ + End Select + End If + '========================================================= + Catch ex As Exception + cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + End If + End If + Catch ex As Exception + cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + + End Sub + + Public Function getCBAM_KG(EORI As String, von As Date, bis As Date, Optional without_MRN As String = "") As Decimal + Try + Dim sqlstr = "SELECT SUM(i.zaItem_NetMass) AS CBAM_Eigenmasse_kg + FROM VERAG.dbo.tblVERAG_CustomsDeclarations_Items i + JOIN VERAG.dbo.tblVERAG_CustomsDeclarations z + ON z.za_Id = i.zaItem_zaId + + JOIN VERAG.dbo.tblVERAG_CustomsDeclarations_Parties p + ON p.zaParty_zaId = z.za_Id + AND p.zaParty_EORI = '" & EORI & "' + AND p.zaParty_Role IN ('CN','IM','IMP','IMPORTER') + + WHERE z.za_ReleaseDate BETWEEN '" & von.ToShortDateString & "' AND '" & bis.ToShortDateString & "' + AND EXISTS ( + SELECT 1 + FROM VERAG.dbo.tblGreendeal_CBAM_Trn t + WHERE + i.zaItem_HSCode LIKE t.trnPattern + AND t.is_active = 1 + AND ISNULL(t.is_exclusion,0) = 0 + AND (t.start_date IS NULL OR t.start_date <= z.za_ReleaseDate) + AND (t.end_date IS NULL OR t.end_date >= z.za_ReleaseDate) + ) " + + If without_MRN <> "" Then sqlstr &= " and za_MRN <>'" & without_MRN & "'" + + Return SQL.getValueTxtBySql(sqlstr, "FMZOLL",,, 0) + + Catch ex As Exception + cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + Return 0 + End Function + Public Function isIndirect() As Boolean + If Me.za_System Is Nothing Then Return False + If Me.za_RepresentationCode Is Nothing Then Return False + If Me.za_System.Contains("DHF") AndAlso Me.za_RepresentationCode = 3 Then Return True + If Me.za_System.Contains("TELOTEC") AndAlso Me.za_RepresentationCode = 3 Then Return True + If Me.za_System.Contains("DAKOSY") AndAlso Me.za_RepresentationCode = 2 Then Return True + Return False + End Function + Public Function hasCBAM(Optional ByRef CBAM_ITEMS As List(Of cVERAG_CustomsDeclarations_Item) = Nothing) As Boolean + + Dim LIST As New List(Of cVERAG_CustomsDeclarations) + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + Try + CBAM_ITEMS = getCBAM_ITEMS() + If CBAM_ITEMS IsNot Nothing AndAlso CBAM_ITEMS.Count > 0 Then + Return True + End If + + Catch ex As Exception + cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + Return False + End Function + + Public Function getCBAM_ITEMS() As List(Of cVERAG_CustomsDeclarations_Item) + + Dim LIST As New List(Of cVERAG_CustomsDeclarations) + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + Try + ' ------------------------------------------------------------ + ' CBAM Pattern (HSCode) + ' ------------------------------------------------------------ + Dim cbamHsCodes = VERAG_PROG_ALLGEMEIN.cGreendeal_CBAM_Trn.LoadCBAMTariffNumbers() + + + If Items Is Nothing OrElse cbamHsCodes Is Nothing OrElse cbamHsCodes.Count = 0 Then Return Nothing + + ' Performance: HashSet für Prefix-Liste + Dim prefixes As HashSet(Of String) = + New HashSet(Of String)(cbamHsCodes) + + Return Me.Items. + Where(Function(it) + Dim hs As String = If(it.zaItem_HSCode, "").Trim() + If hs = "" Then Return False + ' linksseitiger Prefix-Abgleich + For Each p In prefixes + If hs.StartsWith(p) Then + Return True + End If + Next + End Function).ToList() + Catch ex As Exception + cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + Return Nothing + End Function Public Function SAVE() As Boolean Dim list = getParameterList() Dim sqlstr = - "BEGIN TRAN " & - "IF EXISTS(SELECT 1 FROM tblVERAG_CustomsDeclarations WHERE za_Id=@za_Id) " & + "BEGIN TRAN " & + "IF EXISTS(SELECT 1 FROM tblVERAG_CustomsDeclarations WHERE za_Id=@za_Id) " & "BEGIN " & getUpdateCmd() & " END " & "ELSE BEGIN " & getInsertCmd() & " END " & "COMMIT TRAN" diff --git a/VERAG_PROG_ALLGEMEIN/cAllgemein.vb b/VERAG_PROG_ALLGEMEIN/cAllgemein.vb index e840a728..bbbe8982 100644 --- a/VERAG_PROG_ALLGEMEIN/cAllgemein.vb +++ b/VERAG_PROG_ALLGEMEIN/cAllgemein.vb @@ -29,6 +29,8 @@ Public Class cAllgemein Public Shared FMZOLL_SERVER As String = "[FMZOLL\SQLFMZOLL]" '"[SQLGUIDE01.verag.ost.dmn]" Public Shared SQLGUIDE01_USED As Boolean = False 'FM-ZOLL Ablöse!!!! + Public Shared AVISO_LAYOUT_NEW As Boolean = False + 'Public Shared FMZOLL_ATLAS_Datensicherung As String = "\\192.168.0.91\f\FMZoll\Datensicherung\atlas\atlas\fssouzb" Public Shared FMZOLL_ATLAS_Datensicherung_OLD As String = "\\share01\F\FMZoll\Datensicherung\atlas\atlas\fssouzb" From 283ba40d9c9fd8826dbaf62c14c3c1ca2decbce4 Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Tue, 13 Jan 2026 15:29:00 +0100 Subject: [PATCH 3/3] VK CBAM --- .../frmVorauskasse_CBAM.Designer.vb | 11 +++- .../frmVorauskasse_CBAM.resx | 3 + .../FormulareBaukasten/frmVorauskasse_CBAM.vb | 4 +- .../cATEZ_Greenpulse_CBAM_CostCalculation.vb | 55 +++++++++++++---- .../cVERAG_Zollanmeldung.vb | 60 +++++++++++-------- 5 files changed, 94 insertions(+), 39 deletions(-) diff --git a/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.Designer.vb b/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.Designer.vb index 8763cbab..26e7155d 100644 --- a/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.Designer.vb +++ b/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.Designer.vb @@ -44,6 +44,7 @@ Partial Class frmVorauskasse_CBAM Me.clmnYear = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.clmnKosten = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.cmlnEmission = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.clmnBenchmark = New System.Windows.Forms.DataGridViewTextBoxColumn() CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' @@ -124,7 +125,7 @@ Partial Class frmVorauskasse_CBAM ' Me.MyDatagridview1.AKTUALISIERUNGS_INTERVALL = -1 Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.MyDatagridview1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.clmnTarif, Me.clmnWeight, Me.clmnCountry, Me.clmnYear, Me.clmnKosten, Me.cmlnEmission}) + Me.MyDatagridview1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.clmnTarif, Me.clmnWeight, Me.clmnCountry, Me.clmnYear, Me.clmnKosten, Me.cmlnEmission, Me.clmnBenchmark}) Me.MyDatagridview1.Location = New System.Drawing.Point(12, 12) Me.MyDatagridview1.Name = "MyDatagridview1" Me.MyDatagridview1.Size = New System.Drawing.Size(430, 359) @@ -176,7 +177,6 @@ Partial Class frmVorauskasse_CBAM ' 'Button1 ' - Me.Button1.DialogResult = System.Windows.Forms.DialogResult.OK Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Image = Global.SDL.My.Resources.Resources.Excel_logo Me.Button1.Location = New System.Drawing.Point(12, 451) @@ -236,6 +236,12 @@ Partial Class frmVorauskasse_CBAM Me.cmlnEmission.Name = "cmlnEmission" Me.cmlnEmission.Visible = False ' + 'clmnBenchmark + ' + Me.clmnBenchmark.HeaderText = "Benchmark" + Me.clmnBenchmark.Name = "clmnBenchmark" + Me.clmnBenchmark.Visible = False + ' 'frmVorauskasse_CBAM ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -279,4 +285,5 @@ Partial Class frmVorauskasse_CBAM Friend WithEvents clmnYear As DataGridViewTextBoxColumn Friend WithEvents clmnKosten As DataGridViewTextBoxColumn Friend WithEvents cmlnEmission As DataGridViewTextBoxColumn + Friend WithEvents clmnBenchmark As DataGridViewTextBoxColumn End Class diff --git a/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.resx b/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.resx index 8dbfb4fa..3954f2d7 100644 --- a/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.resx +++ b/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.resx @@ -135,6 +135,9 @@ True + + True + diff --git a/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.vb b/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.vb index 728a27fb..fdc7faa5 100644 --- a/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.vb +++ b/SDL/Formulare/KDFormulare/FormulareBaukasten/frmVorauskasse_CBAM.vb @@ -27,11 +27,13 @@ Public Class frmVorauskasse_CBAM If Not r.IsNewRow Then Dim cost As Double = 0 Dim emission As Double = 0 - cATEZ_Greenpulse_CBAM_CostCalculation.calcCBAM_ByCertificatePrice(r.Cells("clmnTarif").Value, r.Cells("clmnWeight").Value, r.Cells("clmnCountry").Value, txtCalc_Defaut_CertPrice._value, r.Cells("clmnYear").Value, cost, emission) + Dim benchmark As Double = 0 + cATEZ_Greenpulse_CBAM_CostCalculation.calcCBAM_ByCertificatePrice(r.Cells("clmnTarif").Value, r.Cells("clmnWeight").Value, r.Cells("clmnCountry").Value, txtCalc_Defaut_CertPrice._value, r.Cells("clmnYear").Value, cost, emission, benchmark) If cost > 0 Then r.Cells("clmnKosten").Value = cost r.Cells("cmlnEmission").Value = emission + r.Cells("clmnBenchmark").Value = benchmark GesamtBetrag += cost End If diff --git a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_CBAM_CostCalculation.vb b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_CBAM_CostCalculation.vb index 749cd4be..57958d02 100644 --- a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_CBAM_CostCalculation.vb +++ b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/GREENPULSE/cATEZ_Greenpulse_CBAM_CostCalculation.vb @@ -285,7 +285,9 @@ Public Class cATEZ_Greenpulse_CBAM_CostCalculation End Function - Public Shared Function calcCBAM_ByCertificatePrice(cn_code As String, weight As Object, country_code As String, certificate_price As Object, year As Object, Optional ByRef CBAM_COST As Decimal = -1, Optional ByRef CBAM_EMISSION As Decimal = -1) As String + Public Shared Function calcCBAM_ByCertificatePrice(cn_code As String, weight As Object, country_code As String, certificate_price As Object, year As Object, Optional ByRef CBAM_COST As Decimal = -1, Optional ByRef CBAM_EMISSION As Decimal = -1, Optional ByRef CBAM_BENCHMARK As Decimal = -1, Optional ByRef CBAM_Faktor As Decimal = -1) As String + + VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat() ' ------------------------------------------------------------ ' Validierung @@ -316,6 +318,7 @@ Public Class cATEZ_Greenpulse_CBAM_CostCalculation ' ------------------------------------------------------------ Dim api As New cATEZ_Greenpulse_CBAM_CostCalculation() Dim see_total As Decimal + Dim benchmark As Decimal Try Dim defResp = api.GetCnCodeDefaults( @@ -333,6 +336,7 @@ Public Class cATEZ_Greenpulse_CBAM_CostCalculation End If see_total = defResp.data.default_emission + benchmark = defResp.data.benchmark Catch ex As Exception Return "Technischer Fehler beim Laden der CN-Code Defaults: " & ex.Message @@ -344,25 +348,52 @@ Public Class cATEZ_Greenpulse_CBAM_CostCalculation Dim w As Decimal = CDec(weight) Dim price As Decimal = CDec(certificate_price) - Dim cbamEmission As Decimal = w * see_total - Dim cbamCost As Decimal = cbamEmission * price - ' ------------------------------------------------------------ - ' Ausgabe - ' ------------------------------------------------------------ + ' --- Faktoren als echte Faktoren (nicht Prozent) --- + Dim cbamf As Decimal = 0D + Select Case CInt(year) + Case 2026 : cbamf = 0.975D + Case 2027 : cbamf = 0.95D + Case 2028 : cbamf = 0.9D + Case 2029 : cbamf = 0.775D + Case 2030 : cbamf = 0.515D + Case 2031 : cbamf = 0.39D + Case 2032 : cbamf = 0.265D + Case 2033 : cbamf = 0.14D + Case Else : cbamf = 0D + End Select + + + ' SEFA = Benchmark * CBAMF * CSCF + Dim sefa As Decimal = benchmark * cbamf + + ' Zertifikatspflicht je Tonne Ware + Dim certPerTon As Decimal = see_total - sefa + If certPerTon < 0D Then certPerTon = 0D + + ' Gesamte Zertifikatspflicht (t CO2e) + Dim certTotal As Decimal = certPerTon * w + + ' Kosten + Dim cbamCost As Decimal = certTotal * price + + ' --- Ausgabe --- Dim s As String = "" - s &= "CBAM Kostenberechnung (ohne Benchmark)" & vbCrLf + s &= "CBAM Kostenberechnung (Default EE mit SEFA-Abzug)" & vbCrLf s &= "-----------------------------------------------------------" & vbCrLf s &= $"CN-Code: {cn_code}" & vbCrLf s &= $"Ursprungsland: {country_code.ToUpperInvariant()}" & vbCrLf + s &= $"Jahr: {year}" & vbCrLf s &= $"Gewicht: {w:N2} t" & vbCrLf - s &= $"SEE total (Default): {see_total:N5}" & vbCrLf - s &= $"CBAM Emission: {cbamEmission:N5} t CO₂" & vbCrLf - s &= $"Zertifikatspreis: {price:N2} EUR/t" & vbCrLf - s &= vbCrLf - s &= $"CBAM Kosten: {cbamCost:N2} EUR" & vbCrLf + s &= $"EE / SEE total (Default): {see_total:N6} t CO₂e/t" & vbCrLf + s &= $"Benchmark BMg: {benchmark:N6} t CO₂e/t" & vbCrLf + s &= $"CBAMF: {cbamf:N3}" + Console.WriteLine(s) + CBAM_COST = cbamCost CBAM_EMISSION = see_total + CBAM_BENCHMARK = benchmark + CBAM_Faktor = cbamf Return s diff --git a/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb b/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb index 819ad26f..f43d1a23 100644 --- a/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb +++ b/VERAG_PROG_ALLGEMEIN/VERAG_Zollanmeldung/cVERAG_Zollanmeldung.vb @@ -369,6 +369,7 @@ Public Class cVERAG_CustomsDeclarations If hasCBAM(CBAM_ITEMS) Then Dim importerEORI As String = Me.Parties.Where(Function(p) {"CN", "IM", "IMP", "IMPORTER"}.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_EORI).FirstOrDefault() + Dim ImporterString As String = Me.Parties.Where(Function(p) {"CZ", "EX", "EXP", "EXPORTER"}.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_Name).FirstOrDefault() Dim ExporterEORI As String = Me.Parties.Where(Function(p) {"CZ", "EX", "EXP", "EXPORTER"}.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_EORI).FirstOrDefault() Dim ExporterString As String = Me.Parties.Where(Function(p) {"CZ", "EX", "EXP", "EXPORTER"}.Contains(p.zaParty_Role)).Select(Function(p) p.zaParty_Name).FirstOrDefault() @@ -380,14 +381,27 @@ Public Class cVERAG_CustomsDeclarations AD = New cAdressen(KD.KundenNr) End If + + If AD IsNot Nothing Then + ImporterString = AD.Name_1 & " " & If(AD.Name_2, "") & "
" & If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "") + End If + + Dim KD_EX As cKunde = Nothing + Dim AD_EX As cAdressen = Nothing + If If(ExporterEORI, "") <> "" Then + KD_EX = cKunde.LOAD_ByEORI(ExporterEORI, If(za_Firma, "")) + If KD_EX Is Nothing Then KD_EX = cKunde.LOAD_ByEORI(ExporterEORI) 'Wenn kein Kunde mit Firma gefunden wurde, nur nach EORI suchen (default VERAG) + AD_EX = New cAdressen(KD_EX.KundenNr) + + End If + If AD_EX IsNot Nothing Then + ExporterString = AD_EX.Name_1 & " " & If(AD_EX.Name_2, "") & "
" & If(AD_EX.LandKz, "") & " " & If(AD_EX.PLZ, "") & " " & If(AD_EX.Ort, "") + End If + + If isIndirect() Then - Dim KD_EX As cKunde = Nothing - Dim AD_EX As cAdressen = Nothing - If If(ExporterEORI, "") <> "" Then - KD_EX = cKunde.LOAD_ByEORI(ExporterEORI, If(za_Firma, "")) - If KD_EX Is Nothing Then KD_EX = cKunde.LOAD_ByEORI(ExporterEORI) 'Wenn kein Kunde mit Firma gefunden wurde, nur nach EORI suchen (default VERAG) - AD_EX = New cAdressen(KD_EX.KundenNr) - End If + + '==================>> INDIRECT <<========================= Dim itemsHtml As String = @@ -416,9 +430,7 @@ Public Class cVERAG_CustomsDeclarations "" & "

" & "Importeur:
" & - importerEORI & " – " & vbNewLine & - If(AD Is Nothing, ExporterString, AD.Name_1 & " " & If(AD.Name_2, "") & "
" & - If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "")) & + If(importerEORI, "") & "
" & If(ImporterString, "") & "

" & "

" & "Exporteur:
" & @@ -480,29 +492,28 @@ Public Class cVERAG_CustomsDeclarations Schwellenwert = Warn1 End If - '===========>>>> WARNUNG <<<<<<<================================= - If WarnLevel <> "" Then + '===========>>>> WARNUNG <<<<<<<================================= + If WarnLevel <> "" Then + Dim bodyHtml As String = "" & "

CBAM-Warnmeldung zu Ihrer Zollanmeldung " & Me.za_MRN & "

" & - "

" & + "

" & "Laut unserem System wurden in der Zollanmeldung mit der MRN " & Me.za_MRN & " " & "CBAM-pflichtige Warenpositionen erkannt.
" & "Für Ihr Unternehmen liegen uns derzeit keine Informationen über eine gültige CBAM-Registrierung vor." & "

" & - "" & - "" & + "
Warnstufe" & WarnLevel & If(WarnLevel = 3, " - ÜBERSCHREITUNG!", "") & "
" & + "" & "" & "
Warnstufe" & WarnLevel & If(WarnLevel = 3, " - ÜBERSCHREITUNG!", "") & "
Schwellenwert" & Schwellenwert.ToString("N0") & " Tonnen

" & "

" & "Importeur:
" & - importerEORI & " – " & vbNewLine & - If(AD Is Nothing, ExporterString, AD.Name_1 & " " & If(AD.Name_2, "") & "
" & - If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "")) & - "

" & + If(importerEORI, "") & "
" & If(ImporterString, "") & + "

" & "

" & "Exporteur:
" & - If(ExporterEORI, "") & " – " & vbNewLine & If(ExporterString, "") & + If(ExporterEORI, "") & "
" & If(ExporterString, "") & "

" & "

WICHTIG

" & "

" & @@ -518,9 +529,10 @@ Public Class cVERAG_CustomsDeclarations "

VERAG DCS – CBAM Compliance Services

" & "

VERAG Spedition AG
A-4975 Suben, Suben 100

" & "" + Console.WriteLine(bodyHtml) - - VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(If(AD.E_Mail, ""), "CBAM-WARNUNG – " & If(WarnLevel = 3, " - ACHTUNG: Überschreitung 50to! ", "Überschreitung der Meldeschwelle"), bodyHtml, "cbam@verag.ag", (WarnLevel = 3), "cbam@verag.ag",, "al@verag.ag") + ' VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(If(AD.E_Mail, ""), "CBAM-WARNUNG – " & If(WarnLevel = 3, " ACHTUNG: Überschreitung 50to! ", "Überschreitung der Meldeschwelle"), bodyHtml, "cbam@verag.ag", (WarnLevel = 3), "cbam@verag.ag",, "al@verag.ag") + VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(If(AD.E_Mail, ""), "CBAM-WARNUNG – " & If(WarnLevel = 3, " ACHTUNG: Überschreitung 50to! ", "Überschreitung der Meldeschwelle"), bodyHtml, "cbam@verag.ag", (WarnLevel = 3), False, "cbam@verag.ag", "al@verag.ag") 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail( ' "al@verag.ag", @@ -539,8 +551,8 @@ Public Class cVERAG_CustomsDeclarations ' "VERAG – CBAM Compliance Services" ' ) End If - '================================================================ - End Select + '================================================================ + End Select End If '========================================================= Catch ex As Exception