ustva_antrag

This commit is contained in:
2025-04-30 09:39:58 +02:00
parent 5965000967
commit c7dc4e2ba2
3 changed files with 155 additions and 108 deletions

View File

@@ -49,6 +49,7 @@ Partial Class ustCntlUSTV_AntragPosition
Me.lblAenderungsdatum = New System.Windows.Forms.Label()
Me.lblSachbearbeiter = New System.Windows.Forms.Label()
Me.pnl = New System.Windows.Forms.Panel()
Me.btnDel = New System.Windows.Forms.Button()
Me.cbxAntragsfilter = New VERAG_PROG_ALLGEMEIN.MyCheckBoxValue(Me.components)
Me.lblWarning = New System.Windows.Forms.Label()
Me.btnLeistenderSave = New System.Windows.Forms.Button()
@@ -81,7 +82,7 @@ Partial Class ustCntlUSTV_AntragPosition
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.UsrcntlPDFScanList1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
Me.scanLieferschein = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
Me.btnDel = New System.Windows.Forms.Button()
Me.cnS_KIUPLOAD = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.tabDok.SuspendLayout()
Me.tbcntr.SuspendLayout()
Me.tabVollmachten.SuspendLayout()
@@ -428,6 +429,19 @@ Partial Class ustCntlUSTV_AntragPosition
Me.pnl.Size = New System.Drawing.Size(1300, 239)
Me.pnl.TabIndex = 1
'
'btnDel
'
Me.btnDel.BackgroundImage = Global.SDL.My.Resources.Resources.del
Me.btnDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnDel.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnDel.Location = New System.Drawing.Point(834, 162)
Me.btnDel.Name = "btnDel"
Me.btnDel.Size = New System.Drawing.Size(36, 24)
Me.btnDel.TabIndex = 25
Me.btnDel.TextAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnDel.UseVisualStyleBackColor = True
Me.btnDel.Visible = False
'
'cbxAntragsfilter
'
Me.cbxAntragsfilter._date = Nothing
@@ -981,18 +995,10 @@ Partial Class ustCntlUSTV_AntragPosition
Me.scanLieferschein.TabIndex = 2
Me.scanLieferschein.Visible = False
'
'btnDel
'cnS_KIUPLOAD
'
Me.btnDel.BackgroundImage = Global.SDL.My.Resources.Resources.del
Me.btnDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnDel.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnDel.Location = New System.Drawing.Point(834, 162)
Me.btnDel.Name = "btnDel"
Me.btnDel.Size = New System.Drawing.Size(36, 24)
Me.btnDel.TabIndex = 25
Me.btnDel.TextAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnDel.UseVisualStyleBackColor = True
Me.btnDel.Visible = False
Me.cnS_KIUPLOAD.Name = "ContextMenuStrip1"
Me.cnS_KIUPLOAD.Size = New System.Drawing.Size(61, 4)
'
'ustCntlUSTV_AntragPosition
'
@@ -1081,4 +1087,5 @@ Partial Class ustCntlUSTV_AntragPosition
Friend WithEvents cbxAntragsfilter As VERAG_PROG_ALLGEMEIN.MyCheckBoxValue
Friend WithEvents btnAPIUbload As Button
Friend WithEvents btnDel As Button
Friend WithEvents cnS_KIUPLOAD As ContextMenuStrip
End Class

View File

@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="cnS_KIUPLOAD.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -1,4 +1,5 @@

Imports itextsharp.text.pdf
Imports VERAG_PROG_ALLGEMEIN
Public Class ustCntlUSTV_AntragPosition
@@ -611,7 +612,16 @@ Public Class ustCntlUSTV_AntragPosition
End If
End Sub
Private Sub btnAPIUbload_Click(sender As Object, e As EventArgs) Handles btnAPIUbload.Click
Private Sub mnuItemKIUPLOAD_Clicked(sender As Object, e As EventArgs)
cnS_KIUPLOAD.Hide()
Dim item As ToolStripMenuItem = TryCast(sender, ToolStripMenuItem)
If UStV_POS.UStVPo_daId < 1 Then Exit Sub
If item IsNot Nothing Then
If API IsNot Nothing Then
If vbYes = MsgBox("Möchten Sie die Rechnungsdaten per ATEZ-API auslesen lassen?", vbYesNoCancel) Then
@@ -620,6 +630,7 @@ Public Class ustCntlUSTV_AntragPosition
If dt IsNot Nothing And Not dt.Columns.Contains("currency") Then
dt.Columns.Add("count", GetType(Integer))
dt.Columns.Add("currency", GetType(String))
dt.Columns.Add("seller_VAT_id", GetType(String))
dt.Columns.Add("seller_address_city", GetType(String))
@@ -644,7 +655,7 @@ Public Class ustCntlUSTV_AntragPosition
'If API.SendRequestWithAuthHeader("application/json", failreDesc, "/health", "GET") = "200" Then
'document_type = vat_invoice or receipt
If API.setJsonVAT("vat_invoice", UStV_POS.UStVPo_daId) Then
If API.setJsonVAT(item.Name, UStV_POS.UStVPo_daId) Then
resp = API.SendRequestWithAuthHeader("application/json", failreDesc, "/process", "POST", dt)
@@ -737,6 +748,32 @@ Public Class ustCntlUSTV_AntragPosition
End If
End Sub
Private Sub btnAPIUbload_Click(sender As Object, e As EventArgs) Handles btnAPIUbload.Click
If Not cnS_KIUPLOAD.Items.ContainsKey("vat_invoice") Then
Dim vat = New ToolStripMenuItem() With {.Text = "MWST-Rechnung(en)", .Name = "vat_invoice", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
cnS_KIUPLOAD.Items.Add(vat)
AddHandler vat.Click, AddressOf mnuItemKIUPLOAD_Clicked
End If
If Not cnS_KIUPLOAD.Items.ContainsKey("receipt") Then
Dim receipt = New ToolStripMenuItem() With {.Text = "Quittung(en)", .Name = "receipt", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
cnS_KIUPLOAD.Items.Add(receipt)
AddHandler receipt.Click, AddressOf mnuItemKIUPLOAD_Clicked
End If
cnS_KIUPLOAD.Show(Cursor.Position)
End Sub