sammelrechnungsdruck, ustva, etc.

This commit is contained in:
2025-03-03 16:09:02 +01:00
parent 051cf0fce7
commit 2c906976cb
20 changed files with 2360 additions and 431 deletions

View File

@@ -50,7 +50,7 @@ Partial Class frmUSTVoffeneAntraege
Me.Label5 = New System.Windows.Forms.Label()
Me.cbxKundeLand = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cbxNichtEroeffneteAntraege = New System.Windows.Forms.CheckBox()
Me.cbxSteuerNr = New System.Windows.Forms.CheckBox()
Me.cbxUStV = New System.Windows.Forms.CheckBox()
Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.AntragEröffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@@ -284,7 +284,7 @@ Partial Class frmUSTVoffeneAntraege
Me.pnlLand.Controls.Add(Me.Label5)
Me.pnlLand.Controls.Add(Me.cbxKundeLand)
Me.pnlLand.Controls.Add(Me.cbxNichtEroeffneteAntraege)
Me.pnlLand.Controls.Add(Me.cbxSteuerNr)
Me.pnlLand.Controls.Add(Me.cbxUStV)
Me.pnlLand.Controls.Add(Me.Label4)
Me.pnlLand.Controls.Add(Me.MyComboBox1)
Me.pnlLand.Location = New System.Drawing.Point(807, 62)
@@ -325,16 +325,16 @@ Partial Class frmUSTVoffeneAntraege
Me.cbxNichtEroeffneteAntraege.Text = "nicht eröffnete Anträge"
Me.cbxNichtEroeffneteAntraege.UseVisualStyleBackColor = True
'
'cbxSteuerNr
'cbxUStV
'
Me.cbxSteuerNr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cbxSteuerNr.AutoSize = True
Me.cbxSteuerNr.Location = New System.Drawing.Point(338, 17)
Me.cbxSteuerNr.Name = "cbxSteuerNr"
Me.cbxSteuerNr.Size = New System.Drawing.Size(105, 17)
Me.cbxSteuerNr.TabIndex = 46
Me.cbxSteuerNr.Text = " nur mit SteuerNr"
Me.cbxSteuerNr.UseVisualStyleBackColor = True
Me.cbxUStV.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cbxUStV.AutoSize = True
Me.cbxUStV.Location = New System.Drawing.Point(338, 17)
Me.cbxUStV.Name = "cbxUStV"
Me.cbxUStV.Size = New System.Drawing.Size(88, 17)
Me.cbxUStV.TabIndex = 46
Me.cbxUStV.Text = " nur mit UStV"
Me.cbxUStV.UseVisualStyleBackColor = True
'
'MyComboBox1
'
@@ -549,7 +549,7 @@ Partial Class frmUSTVoffeneAntraege
Friend WithEvents cbxNichtEroeffneteAntraege As CheckBox
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
Friend WithEvents AntragEröffnenToolStripMenuItem As ToolStripMenuItem
Friend WithEvents cbxSteuerNr As CheckBox
Friend WithEvents cbxUStV As CheckBox
Friend WithEvents Label5 As Label
Friend WithEvents cbxKundeLand As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents btnVerag As Button

View File

@@ -528,7 +528,7 @@ Public Class frmUSTVoffeneAntraege
sqlwhereLand &= " and Kundenland = '" & cbxKundeLand._value & "'"
End If
If cbxSteuerNr.Checked Then
If cbxUStV.Checked Then
sqlwhereSteuerNr &= " and isnull(tblSteuernummern.UStV,0) <> 0"
End If
@@ -584,7 +584,7 @@ Public Class frmUSTVoffeneAntraege
Dim sqlstring = "select isnull(UStVAn_ID,0) as antragExisitiert,tblSteuernummern.UStV as SteuerNr,Lieferant , KdNr, Kundenname, Kundenland, Einreichland from (" & SQLPLOSEUMSTELLUNG & "
Dim sqlstring = "select isnull(UStVAn_ID,0) as antragExisitiert,tblSteuernummern.UStV as UStV,Lieferant , KdNr, Kundenname, Kundenland, Einreichland from (" & SQLPLOSEUMSTELLUNG & "
UNION ALL
@@ -693,7 +693,7 @@ Public Class frmUSTVoffeneAntraege
If .Columns.Count > 0 Then
.Columns("KdNr").HeaderText = "KdNr"
.Columns("SteuerNr").HeaderText = "SteuerNr"
.Columns("UStV").HeaderText = "UStV"
.Columns("Kundenname").HeaderText = "Kunde"
.Columns("Kundenland").HeaderText = "Kundenland"
.Columns("Einreichland").HeaderText = "Einreichland"
@@ -793,7 +793,7 @@ Public Class frmUSTVoffeneAntraege
initLieferant("VERAG", sender)
End Sub
Private Sub cbxAlleoffenen_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAlleoffenen.CheckedChanged, cbxSteuerNr.CheckedChanged, cbxNichtEroeffneteAntraege.CheckedChanged
Private Sub cbxAlleoffenen_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAlleoffenen.CheckedChanged, cbxUStV.CheckedChanged, cbxNichtEroeffneteAntraege.CheckedChanged
init()
End Sub

View File

@@ -1077,7 +1077,7 @@ Public Class usrCntlUSTV
For Each row In distinctDT.Rows
Dim dt_Data_selected = dtVorschau.Select("AdressenNr ='" & row.Item(0) & "'").CopyToDataTable
Dim dt_Data_selected = dtVorschau.Select("AdressenNr ='" & row.Item(0) & "' AND Gültig = 0").CopyToDataTable
Try

View File

@@ -65,12 +65,12 @@ Public Class ustCntlUSTV_AntragPosition
Dim da_id = -1
Select Case If(UStV_POS.UStVPo_SchnittstellenNr, -1)
Case 6, 0 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [plInv_daId] FROM [tblPLOSE_Inv_Data] where plInv_SupplierRechnungsDatum='" & UStV_POS.UStVPo_ReDat & "' and plInv_SupplierRechnungsNr='" & UStV_POS.UStVPo_ReNr & "' and plInv_SupplierCountry='" & Antrag_LandKz & "' AND [plInv_daId] is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
Case 7 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & UStV_POS.UStVPo_ReDat & "' and rmc_reNr='" & UStV_POS.UStVPo_ReNr & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_daId] is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
Case 4, 9 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblMSEInvoices] as inv inner join tblMSECustomers on inv.customer_number = customer_id where invoice_date='" & UStV_POS.UStVPo_ReDat & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & kdnr & " AND daId is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
Case 10 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & UStV_POS.UStVPo_ReDat & "' and Abrechnungsnummer='" & UStV_POS.UStVPo_ReNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
Case 6, 0 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [plInv_daId] FROM [tblPLOSE_Inv_Data] where plInv_SupplierRechnungsDatum='" & UStV_POS.UStVPo_ReDat & "' and plInv_SupplierRechnungsNr='" & UStV_POS.UStVPo_ReNr & "' and plInv_SupplierCountry='" & Antrag_LandKz & "' AND [plInv_daId] is not null", "FMZOLL",,, -1)
Case 7 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & UStV_POS.UStVPo_ReDat & "' and rmc_reNr='" & UStV_POS.UStVPo_ReNr & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_daId] is not null", "FMZOLL",,, -1)
Case 4, 9 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblMSEInvoices] as inv inner join tblMSECustomers on inv.customer_number = customer_id where invoice_date='" & UStV_POS.UStVPo_ReDat & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & kdnr & " AND daId is not null", "FMZOLL",,, -1)
Case 10 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & UStV_POS.UStVPo_ReDat & "' and Abrechnungsnummer='" & UStV_POS.UStVPo_ReNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1)
Case 8 : da_id = sql.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & UStV_POS.UStVPo_ReDat & "' and ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) ='" & UStV_POS.UStVPo_ReNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
Case 1 : da_id = 1 : scanSonstiges.Enabled = False 'VERAG-RECHNUGNEN werden immer direkt OHNE daid geöffnet!
Case 1 : da_id = 1 'VERAG-RECHNUGNEN werden immer direkt OHNE daid geöffnet!
Case -1 : IIf(UStV_POS.UStVPo_daId > 0, UStV_POS.UStVPo_daId, -1) : scanSonstiges.Enabled = True
End Select