Prüfung PDF

This commit is contained in:
2025-01-27 15:13:59 +01:00
parent c05cb36cae
commit 604c116b5a
2 changed files with 73 additions and 37 deletions

View File

@@ -23,15 +23,16 @@ Partial Class frmUSTVoffeneAntraege
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
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 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()
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
Me.btn = New System.Windows.Forms.Button()
Me.Button7 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.btnVerag = New System.Windows.Forms.Button()
Me.btnAlle = New System.Windows.Forms.Button()
Me.lbl = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
@@ -57,7 +58,7 @@ Partial Class frmUSTVoffeneAntraege
Me.txtMWST = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.btnVerag = New System.Windows.Forms.Button()
Me.Button4 = New System.Windows.Forms.Button()
Me.FlowLayoutPanel.SuspendLayout()
Me.Panel4.SuspendLayout()
Me.pnlLand.SuspendLayout()
@@ -138,6 +139,17 @@ Partial Class frmUSTVoffeneAntraege
Me.Button3.Text = "IDS"
Me.Button3.UseVisualStyleBackColor = False
'
'btnVerag
'
Me.btnVerag.BackColor = System.Drawing.Color.FloralWhite
Me.btnVerag.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnVerag.Location = New System.Drawing.Point(633, 3)
Me.btnVerag.Name = "btnVerag"
Me.btnVerag.Size = New System.Drawing.Size(120, 23)
Me.btnVerag.TabIndex = 6
Me.btnVerag.Text = "VERAG"
Me.btnVerag.UseVisualStyleBackColor = False
'
'btnAlle
'
Me.btnAlle.BackColor = System.Drawing.Color.FloralWhite
@@ -433,55 +445,54 @@ Partial Class frmUSTVoffeneAntraege
Me.MyDatagridview1.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)
DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4
DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle5
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle2
Me.MyDatagridview1.Location = New System.Drawing.Point(12, 98)
Me.MyDatagridview1.Name = "MyDatagridview1"
Me.MyDatagridview1.ReadOnly = True
DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle6
DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle3
Me.MyDatagridview1.RowHeadersWidth = 62
Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.MyDatagridview1.Size = New System.Drawing.Size(1409, 528)
Me.MyDatagridview1.TabIndex = 30
'
'btnVerag
'Button4
'
Me.btnVerag.BackColor = System.Drawing.Color.FloralWhite
Me.btnVerag.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnVerag.Location = New System.Drawing.Point(633, 3)
Me.btnVerag.Name = "btnVerag"
Me.btnVerag.Size = New System.Drawing.Size(120, 23)
Me.btnVerag.TabIndex = 6
Me.btnVerag.Text = "VERAG"
Me.btnVerag.UseVisualStyleBackColor = False
Me.Button4.Location = New System.Drawing.Point(15, 639)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(75, 23)
Me.Button4.TabIndex = 46
Me.Button4.Text = "PDFs prüfen"
Me.Button4.UseVisualStyleBackColor = True
'
'frmUSTVoffeneAntraege
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1457, 681)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.lblKunde)
Me.Controls.Add(Me.pnlLand)
Me.Controls.Add(Me.cbxAlleoffenen)
@@ -541,4 +552,5 @@ Partial Class frmUSTVoffeneAntraege
Friend WithEvents Label5 As Label
Friend WithEvents cbxKundeLand As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents btnVerag As Button
Friend WithEvents Button4 As Button
End Class

View File

@@ -853,5 +853,29 @@ Public Class frmUSTVoffeneAntraege
initDgv_gesamt(txtmaxAnz.Text, cbxNichtEroeffneteAntraege.Checked, IIf(cbxAlleoffenen.Checked, -1, kdNr))
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim SQLQuery As String = ""
Select Case LIEFERANT.ToString.ToLower
Case "plose" : SQLQuery = "select count(distinct([plInv_SupplierRechnungsNr])) from [tblPLOSE_Inv_Data] where [plInv_daId] is null and cast([plInv_SupplierRechnungsDatum] as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "'"
Case "rmc" : SQLQuery = "select count(distinct(rmc_reNr)) as Anzahl from [tblRMCImport] where rmc_daId is null and cast([rmc_reDatum] as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "'"
Case "mse" : SQLQuery = "select count(distinct(invoice_id)) as Anzahl from tblMSEInvoices where daId is null and cast(invoice_date as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "'"
Case "uta" : SQLQuery = "select count(distinct(tblUTAImportNew.Abrechnungsnummer)) as Anzahl from tblUTAImportNew where daId is null and cast([Rechnungsdatum] as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' and Lieferland <> 'ROM' and Steuerliches_Lieferland <> 'ROM'"
Case "ids" : SQLQuery = "select count(distinct(Invoicenumber)) as Anzahl from tblIDSInvoicesNew where DocumentName is null and cast(YearMonthDay as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "'"
Case Else
SQLQuery = ""
End Select
Dim fehlendePDFs As Integer = 0
If SQLQuery <> "" Then
fehlendePDFs = CInt((New SQL).getValueTxtBySql(SQLQuery, "FMZOLL"))
MsgBox("Anzahl fehlende PDFs: " & fehlendePDFs)
Else
MsgBox("Funktion nicht implementiert!")
End If
End Sub
End Class