diff --git a/MailSender/MAILSender.vb b/MailSender/MAILSender.vb
index af45b9f..685053a 100644
--- a/MailSender/MAILSender.vb
+++ b/MailSender/MAILSender.vb
@@ -50,7 +50,7 @@ Module Mail
'Exit Sub
- 'PARAM = "UID_OPS_SYSKA_ABGLEICH"
+ 'PARAM = "ZF_QUARTER"
'PARAM = "JAHRESABRECHNUNG AG-ZS"
' PARAM = "UID_OPS_SYSKA_ABGLEICH"
@@ -331,10 +331,18 @@ Module Mail
Case "ZF_QUARTER" 'umgebaut auf neue Mailsender-Logik
- Dim quartal As Integer = ((Now.Month - 1) \ 3)
+ Dim quartal As Integer = ((Now.Month - 1) \ 3) + 1
+ Dim jahr As Integer = Now.Year
- Dim von = CDate("01." & (quartal - 1) * 3 + 1 & "." & Now.Year)
- Dim bis = CDate(von.AddMonths(3).AddDays(-1))
+ If quartal = 1 Then
+ quartal = 4
+ jahr -= 1
+ Else
+ quartal -= 1
+ End If
+
+ Dim von As Date = New Date(jahr, (quartal - 1) * 3 + 1, 1)
+ Dim bis As Date = von.AddMonths(3).AddDays(-1)
'--------ZF STEYR------------
@@ -949,6 +957,7 @@ Module Mail
If Subject = "" Then
Select Case KdNr
Case "764755" : Subject = "Auswertungen Zollanmeldungen ZF STEYR "
+ Case "714869" : Subject = "Auswertungen Zollanmeldungen ZF PASSAU "
Case Else : Subject = "Auswertungen Zollanmeldungen ZF Friedrichshafen AG "
End Select
@@ -957,9 +966,14 @@ Module Mail
Subject = replaceBodyVariable(Subject, von, bis)
End If
+ Dim Typ As String = "Auswertung"
+ Select Case Auswertungstyp
+ Case "monthly" : Typ = "monatliche Auswertungen"
+ Case "quarter" : Typ = "Quartalsauswertung"
+ End Select
If Body = "" Then
- Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
+ Body = "Anbei befinden sich die " & Typ & " der Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
"
Erstellt am: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
"
Automatisch generiertes E-Mail. Bitte Antworten Sie nicht an dieses E-Mail." &
"
VERAG SPEDITION AG"
@@ -2458,7 +2472,7 @@ Module Mail
For Each row As DataRow In ZOLLANMELDUNG.dtWARENPOS.Rows
- Dim ZollInProzent As Double = ZOLLANMELDUNG.ABGABEN_ZOLL / ZOLLANMELDUNG.Rechnungspreis * 100
+ Dim ZollInProzent As Double = ZOLLANMELDUNG.ABGABEN_ZOLL / ZOLLANMELDUNG.RechnungspreisohneWahrung * 100
Blatt.Range("A" & cnt).Value = cnt - 1
Blatt.Range("B" & cnt).Value = r("Abfertigungsdatum")
@@ -2499,7 +2513,7 @@ Module Mail
Else
- Dim ZollInProzent As Double = ZOLLANMELDUNG.ABGABEN_ZOLL / ZOLLANMELDUNG.Rechnungspreis * 100
+ Dim ZollInProzent As Double = ZOLLANMELDUNG.ABGABEN_ZOLL / ZOLLANMELDUNG.RechnungspreisohneWahrung * 100
Blatt.Range("A" & cnt).Value = cnt - 1
Blatt.Range("B" & cnt).Value = r("Abfertigungsdatum")
diff --git a/UID/usrctlProcedures.Designer.vb b/UID/usrctlProcedures.Designer.vb
index 993a85e..7d5a956 100644
--- a/UID/usrctlProcedures.Designer.vb
+++ b/UID/usrctlProcedures.Designer.vb
@@ -87,10 +87,22 @@ Partial Class usrctlProcedures
Me.Button48 = New System.Windows.Forms.Button()
Me.Button47 = New System.Windows.Forms.Button()
Me.TabPage6 = New System.Windows.Forms.TabPage()
+ Me.Label19 = New System.Windows.Forms.Label()
+ Me.Label18 = New System.Windows.Forms.Label()
+ Me.Label17 = New System.Windows.Forms.Label()
Me.Button51 = New System.Windows.Forms.Button()
Me.cbxMDM_Testsystem = New System.Windows.Forms.CheckBox()
Me.Button50 = New System.Windows.Forms.Button()
Me.Button49 = New System.Windows.Forms.Button()
+ Me.TabPage7 = New System.Windows.Forms.TabPage()
+ Me.Label22 = New System.Windows.Forms.Label()
+ Me.dtpbis = New System.Windows.Forms.DateTimePicker()
+ Me.lblDakosyImport = New System.Windows.Forms.Label()
+ Me.Label21 = New System.Windows.Forms.Label()
+ Me.Button33 = New System.Windows.Forms.Button()
+ Me.Label20 = New System.Windows.Forms.Label()
+ Me.dtp_von = New System.Windows.Forms.DateTimePicker()
+ Me.Button52 = New System.Windows.Forms.Button()
Me.Button18 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.lblAnzahl = New System.Windows.Forms.Label()
@@ -140,14 +152,10 @@ Partial Class usrctlProcedures
Me.Button31 = New System.Windows.Forms.Button()
Me.Button32 = New System.Windows.Forms.Button()
Me.lblStatus = New System.Windows.Forms.Label()
- Me.Button33 = New System.Windows.Forms.Button()
Me.Button43 = New System.Windows.Forms.Button()
+ Me.Button99 = New System.Windows.Forms.Button()
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
- Me.Button99 = New System.Windows.Forms.Button()
- Me.Label17 = New System.Windows.Forms.Label()
- Me.Label18 = New System.Windows.Forms.Label()
- Me.Label19 = New System.Windows.Forms.Label()
Me.TabControl1.SuspendLayout()
Me.TabPage3.SuspendLayout()
Me.TabPage1.SuspendLayout()
@@ -158,6 +166,7 @@ Partial Class usrctlProcedures
Me.TabPage4.SuspendLayout()
Me.TabPage5.SuspendLayout()
Me.TabPage6.SuspendLayout()
+ Me.TabPage7.SuspendLayout()
Me.SuspendLayout()
'
'TabControl1
@@ -168,6 +177,7 @@ Partial Class usrctlProcedures
Me.TabControl1.Controls.Add(Me.TabPage4)
Me.TabControl1.Controls.Add(Me.TabPage5)
Me.TabControl1.Controls.Add(Me.TabPage6)
+ Me.TabControl1.Controls.Add(Me.TabPage7)
Me.TabControl1.Location = New System.Drawing.Point(7, 407)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
@@ -796,6 +806,33 @@ Partial Class usrctlProcedures
Me.TabPage6.Text = "MDM Importe"
Me.TabPage6.UseVisualStyleBackColor = True
'
+ 'Label19
+ '
+ Me.Label19.AutoSize = True
+ Me.Label19.Location = New System.Drawing.Point(11, 45)
+ Me.Label19.Name = "Label19"
+ Me.Label19.Size = New System.Drawing.Size(66, 13)
+ Me.Label19.TabIndex = 71
+ Me.Label19.Text = "CSV-Importe"
+ '
+ 'Label18
+ '
+ Me.Label18.AutoSize = True
+ Me.Label18.Location = New System.Drawing.Point(11, 105)
+ Me.Label18.Name = "Label18"
+ Me.Label18.Size = New System.Drawing.Size(16, 13)
+ Me.Label18.TabIndex = 70
+ Me.Label18.Text = "2."
+ '
+ 'Label17
+ '
+ Me.Label17.AutoSize = True
+ Me.Label17.Location = New System.Drawing.Point(11, 71)
+ Me.Label17.Name = "Label17"
+ Me.Label17.Size = New System.Drawing.Size(19, 13)
+ Me.Label17.TabIndex = 66
+ Me.Label17.Text = "1. "
+ '
'Button51
'
Me.Button51.Location = New System.Drawing.Point(32, 97)
@@ -835,6 +872,93 @@ Partial Class usrctlProcedures
Me.Button49.Text = "Standard-Off."
Me.Button49.UseVisualStyleBackColor = True
'
+ 'TabPage7
+ '
+ Me.TabPage7.Controls.Add(Me.Label22)
+ Me.TabPage7.Controls.Add(Me.dtpbis)
+ Me.TabPage7.Controls.Add(Me.lblDakosyImport)
+ Me.TabPage7.Controls.Add(Me.Label21)
+ Me.TabPage7.Controls.Add(Me.Button33)
+ Me.TabPage7.Controls.Add(Me.Label20)
+ Me.TabPage7.Controls.Add(Me.dtp_von)
+ Me.TabPage7.Controls.Add(Me.Button52)
+ Me.TabPage7.Location = New System.Drawing.Point(4, 22)
+ Me.TabPage7.Name = "TabPage7"
+ Me.TabPage7.Size = New System.Drawing.Size(601, 288)
+ Me.TabPage7.TabIndex = 6
+ Me.TabPage7.Text = "Dakosy Import"
+ Me.TabPage7.UseVisualStyleBackColor = True
+ '
+ 'Label22
+ '
+ Me.Label22.Location = New System.Drawing.Point(279, 19)
+ Me.Label22.Name = "Label22"
+ Me.Label22.Size = New System.Drawing.Size(145, 13)
+ Me.Label22.TabIndex = 72
+ Me.Label22.Text = "auf Vollständigkeit prüfen"
+ '
+ 'dtpbis
+ '
+ Me.dtpbis.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
+ Me.dtpbis.Location = New System.Drawing.Point(336, 69)
+ Me.dtpbis.Name = "dtpbis"
+ Me.dtpbis.Size = New System.Drawing.Size(85, 20)
+ Me.dtpbis.TabIndex = 71
+ '
+ 'lblDakosyImport
+ '
+ Me.lblDakosyImport.Location = New System.Drawing.Point(18, 85)
+ Me.lblDakosyImport.Name = "lblDakosyImport"
+ Me.lblDakosyImport.Size = New System.Drawing.Size(145, 13)
+ Me.lblDakosyImport.TabIndex = 67
+ Me.lblDakosyImport.Text = "0/0"
+ Me.lblDakosyImport.TextAlign = System.Drawing.ContentAlignment.TopRight
+ '
+ 'Label21
+ '
+ Me.Label21.AutoSize = True
+ Me.Label21.Location = New System.Drawing.Point(291, 69)
+ Me.Label21.Name = "Label21"
+ Me.Label21.Size = New System.Drawing.Size(20, 13)
+ Me.Label21.TabIndex = 70
+ Me.Label21.Text = "bis"
+ '
+ 'Button33
+ '
+ Me.Button33.Location = New System.Drawing.Point(22, 33)
+ Me.Button33.Name = "Button33"
+ Me.Button33.Size = New System.Drawing.Size(145, 49)
+ Me.Button33.TabIndex = 64
+ Me.Button33.Text = "DAKOSY CSV Importieren"
+ Me.Button33.UseVisualStyleBackColor = True
+ '
+ 'Label20
+ '
+ Me.Label20.AutoSize = True
+ Me.Label20.Location = New System.Drawing.Point(291, 51)
+ Me.Label20.Name = "Label20"
+ Me.Label20.Size = New System.Drawing.Size(25, 13)
+ Me.Label20.TabIndex = 69
+ Me.Label20.Text = "von"
+ '
+ 'dtp_von
+ '
+ Me.dtp_von.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
+ Me.dtp_von.Location = New System.Drawing.Point(336, 45)
+ Me.dtp_von.Name = "dtp_von"
+ Me.dtp_von.Size = New System.Drawing.Size(85, 20)
+ Me.dtp_von.TabIndex = 68
+ Me.dtp_von.Value = New Date(2025, 1, 1, 16, 31, 0, 0)
+ '
+ 'Button52
+ '
+ Me.Button52.Location = New System.Drawing.Point(276, 95)
+ Me.Button52.Name = "Button52"
+ Me.Button52.Size = New System.Drawing.Size(145, 32)
+ Me.Button52.TabIndex = 67
+ Me.Button52.Text = "DAKOSY Daten prüfen"
+ Me.Button52.UseVisualStyleBackColor = True
+ '
'Button18
'
Me.Button18.Location = New System.Drawing.Point(59, 183)
@@ -1286,15 +1410,6 @@ Partial Class usrctlProcedures
Me.lblStatus.TabIndex = 63
Me.lblStatus.Text = "Zeilen:"
'
- 'Button33
- '
- Me.Button33.Location = New System.Drawing.Point(399, 29)
- Me.Button33.Name = "Button33"
- Me.Button33.Size = New System.Drawing.Size(145, 49)
- Me.Button33.TabIndex = 64
- Me.Button33.Text = "DAKOSY CSV Importieren"
- Me.Button33.UseVisualStyleBackColor = True
- '
'Button43
'
Me.Button43.Location = New System.Drawing.Point(565, 29)
@@ -1304,6 +1419,15 @@ Partial Class usrctlProcedures
Me.Button43.Text = "TELOTEC NCTS"
Me.Button43.UseVisualStyleBackColor = True
'
+ 'Button99
+ '
+ Me.Button99.Location = New System.Drawing.Point(741, 654)
+ Me.Button99.Name = "Button99"
+ Me.Button99.Size = New System.Drawing.Size(75, 23)
+ Me.Button99.TabIndex = 66
+ Me.Button99.Text = "Kafka TEST"
+ Me.Button99.UseVisualStyleBackColor = True
+ '
'DataGridViewTextBoxColumn1
'
Me.DataGridViewTextBoxColumn1.HeaderText = "dat"
@@ -1314,49 +1438,12 @@ Partial Class usrctlProcedures
Me.DataGridViewTextBoxColumn2.HeaderText = "anz"
Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2"
'
- 'Label17
- '
- Me.Label17.AutoSize = True
- Me.Label17.Location = New System.Drawing.Point(11, 71)
- Me.Label17.Name = "Label17"
- Me.Label17.Size = New System.Drawing.Size(19, 13)
- Me.Label17.TabIndex = 66
- Me.Label17.Text = "1. "
- '
- 'Label18
- '
- Me.Label18.AutoSize = True
- Me.Label18.Location = New System.Drawing.Point(11, 105)
- Me.Label18.Name = "Label18"
- Me.Label18.Size = New System.Drawing.Size(16, 13)
- Me.Label18.TabIndex = 70
- Me.Label18.Text = "2."
- '
- 'Label19
- '
- Me.Label19.AutoSize = True
- Me.Label19.Location = New System.Drawing.Point(11, 45)
- Me.Label19.Name = "Label19"
- Me.Label19.Size = New System.Drawing.Size(66, 13)
- Me.Label19.TabIndex = 71
- Me.Label19.Text = "CSV-Importe"
- '
- 'Button49
- '
- Me.Button99.Location = New System.Drawing.Point(741, 654)
- Me.Button99.Name = "Button99"
- Me.Button99.Size = New System.Drawing.Size(75, 23)
- Me.Button99.TabIndex = 66
- Me.Button99.Text = "Kafka TEST"
- Me.Button99.UseVisualStyleBackColor = True
- '
'usrctlProcedures
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Controls.Add(Me.Button99)
Me.Controls.Add(Me.Button43)
- Me.Controls.Add(Me.Button33)
Me.Controls.Add(Me.lblStatus)
Me.Controls.Add(Me.Button32)
Me.Controls.Add(Me.Button31)
@@ -1425,6 +1512,8 @@ Partial Class usrctlProcedures
Me.TabPage5.ResumeLayout(False)
Me.TabPage6.ResumeLayout(False)
Me.TabPage6.PerformLayout()
+ Me.TabPage7.ResumeLayout(False)
+ Me.TabPage7.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -1555,4 +1644,12 @@ Partial Class usrctlProcedures
Friend WithEvents Label18 As Label
Friend WithEvents Label17 As Label
Friend WithEvents Button99 As Button
+ Friend WithEvents TabPage7 As TabPage
+ Friend WithEvents lblDakosyImport As Label
+ Friend WithEvents Label21 As Label
+ Friend WithEvents Label20 As Label
+ Friend WithEvents dtp_von As DateTimePicker
+ Friend WithEvents Button52 As Button
+ Friend WithEvents Label22 As Label
+ Friend WithEvents dtpbis As DateTimePicker
End Class
diff --git a/UID/usrctlProcedures.resx b/UID/usrctlProcedures.resx
index 508fc32..c9977e7 100644
--- a/UID/usrctlProcedures.resx
+++ b/UID/usrctlProcedures.resx
@@ -123,4 +123,10 @@
True
+
+ True
+
+
+ True
+
\ No newline at end of file
diff --git a/UID/usrctlProcedures.vb b/UID/usrctlProcedures.vb
index 08bbbdf..86de3b4 100644
--- a/UID/usrctlProcedures.vb
+++ b/UID/usrctlProcedures.vb
@@ -11,8 +11,9 @@ Imports System.Xml.Serialization
Imports Chilkat
Imports Confluent.Kafka
Imports DAKOSY_Worker
+Imports DAKOSY_Worker.FreierVerkehrAktVeredelUmwandlung_004
Imports GrapeCity
-Imports iTextSharp.text.pdf
+Imports itextsharp.text.pdf
Imports Microsoft.Office.Interop
Imports PdfSharp.Drawing
Imports PdfSharp.Pdf
@@ -587,7 +588,7 @@ Public Class usrctlProcedures
For Each file As String In System.IO.Directory.GetFiles("C:\Users\DEVELOPER1\Desktop\Verpfl\Fahrer_NCTS_Verpflichtungserklärungen\") ' Ermittelt alle Dateien des Ordners
Try
- Dim pdf As iTextSharp.text.pdf.PdfReader = New iTextSharp.text.pdf.PdfReader(file)
+ Dim pdf As itextsharp.text.pdf.PdfReader = New itextsharp.text.pdf.PdfReader(file)
Dim stamper = New PdfStamper(pdf, New FileStream("C:\Users\DEVELOPER1\Desktop\Verpfl\tmp.pdf", FileMode.Create))
Dim f = stamper.AcroFields
@@ -649,7 +650,7 @@ Public Class usrctlProcedures
Return file
End Function
Sub pdf2()
- Dim pdf As iTextSharp.text.pdf.PdfReader = New iTextSharp.text.pdf.PdfReader("C:\Users\DEVELOPER1\Desktop\Verpfl\test.pdf")
+ Dim pdf As itextsharp.text.pdf.PdfReader = New itextsharp.text.pdf.PdfReader("C:\Users\DEVELOPER1\Desktop\Verpfl\test.pdf")
Using fw As New FileStream("C:\Users\DEVELOPER1\Desktop\Verpfl\tmp.pdf", FileMode.Open)
@@ -3682,7 +3683,7 @@ Public Class usrctlProcedures
DYIMPORT.Shipmentnummer = isleernothing((currentRow(138)))
DYIMPORT.Importstatus = isleernothing((currentRow(139)))
DYIMPORT.Importdate = Now()
- DYIMPORT.Importfile = fd.FileName
+ DYIMPORT.Importfile = System.IO.Path.GetFileName(fd.FileName)
If DYIMPORT.SAVE() Then
TextBox10.Text &= DYIMPORT.Id & vbNewLine
If Not savedDY Then savedDY = True
@@ -3694,7 +3695,7 @@ Public Class usrctlProcedures
If cnt Mod 10 = 0 Then
Application.DoEvents()
- Label10.Text = (cnt + 1)
+ lblDakosyImport.Text = (cnt + 1)
End If
End If
@@ -4258,6 +4259,50 @@ Public Class usrctlProcedures
End Sub
+ Private Sub Button52_Click(sender As Object, e As EventArgs) Handles Button52.Click
+
+ Dim dt As DataTable = SQL.loadDgvBySql("WITH Monate AS (
+ SELECT CAST('" & dtp_von.Value & "' AS DATE) AS MonatStart
+ UNION ALL
+ SELECT DATEADD(MONTH, 1, MonatStart)
+ FROM Monate
+ WHERE MonatStart < '" & dtpbis.Value & "'
+),
+Daten AS (
+ SELECT
+ Teilnehmer,
+ YEAR(Überlassungsdatum) AS Jahr,
+ MONTH(Überlassungsdatum) AS Monat,
+ COUNT(*) AS DS_Anzahl
+ FROM [AVISO].[dbo].[tbl_DY_Zollmeldungen_Import]
+ WHERE Überlassungsdatum IS NOT NULL
+ GROUP BY Teilnehmer, YEAR(Überlassungsdatum), MONTH(Überlassungsdatum)
+),
+TeilnehmerListe AS (
+ SELECT DISTINCT Teilnehmer
+ FROM [AVISO].[dbo].[tbl_DY_Zollmeldungen_Import]
+)
+SELECT
+ t.Teilnehmer,
+ YEAR(m.MonatStart) AS Jahr,
+ MONTH(m.MonatStart) AS Monat,
+ ISNULL(d.DS_Anzahl, 0) AS DS_Anzahl
+FROM Monate m
+CROSS JOIN TeilnehmerListe t
+LEFT JOIN Daten d
+ ON d.Teilnehmer = t.Teilnehmer
+ AND d.Jahr = YEAR(m.MonatStart)
+ AND d.Monat = MONTH(m.MonatStart)
+ORDER BY Jahr DESC, Monat DESC, Teilnehmer DESC
+OPTION (MAXRECURSION 1000);", "AVISO") '
+
+
+ cProgramFunctions.genExcelFromDT_NEW(dt)
+
+
+
+ End Sub
+
'Private Sub Button26_Click(sender As Object, e As EventArgs)
diff --git a/initATLASAufschubkonten/cAsfinag.vb b/initATLASAufschubkonten/cAsfinag.vb
index fbe8cfd..71cb4cd 100644
--- a/initATLASAufschubkonten/cAsfinag.vb
+++ b/initATLASAufschubkonten/cAsfinag.vb
@@ -1964,12 +1964,12 @@ Public Class cAsfinag
- MDMEinarb.ds_total = savedTrans
- MDMEinarb.ds_count = counTrans
+ MDMEinarb.ds_total = counTrans
+ MDMEinarb.ds_count = savedTrans
MDMEinarb.importfilename = fi.Name
MDMEinarb.import_date = Now()
- If MDMEinarb.ds_total = MDMEinarb.ds_count Then
+ If MDMEinarb.ds_total - 2 = MDMEinarb.ds_count Then 'total - header - trailer
MDMEinarb.completed = True
MDMEinarb.completed_date = Now()
End If