From 051cf0fce7aeabaa02da947f1861381db5a25601 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Thu, 27 Feb 2025 17:20:39 +0100 Subject: [PATCH] Sammelrechnung kosm. Korrekturen, USTVA --- SDL/Fakturierung/cFakturierung.vb | 6 ++--- SDL/My Project/AssemblyInfo.vb | 4 ++-- .../ustCntlUSTV_AntragPosition.Designer.vb | 2 +- SDL/USTV/ustCntlUSTV_AntragPosition.vb | 8 +++---- SDL/seriendruck/usrCntlFakturierung.vb | 24 ++++++++++--------- SDL/zoll/usrCntlZOLLAuswertungen.Designer.vb | 12 +++++----- SDL/zoll/usrCntlZOLLAuswertungen.vb | 4 ++++ 7 files changed, 33 insertions(+), 27 deletions(-) diff --git a/SDL/Fakturierung/cFakturierung.vb b/SDL/Fakturierung/cFakturierung.vb index 21cd649c..5de3fce5 100644 --- a/SDL/Fakturierung/cFakturierung.vb +++ b/SDL/Fakturierung/cFakturierung.vb @@ -3413,7 +3413,7 @@ Public Class cFakturierung Select Case ROW("RechnungSprache") Case "EN" - Select Case BelegartenKz + Select Case ROW("BelegartenKz") Case "AR" rpt.lblUeberschriftRG_GS.Text = IIf(Not isMDMRechnungsdruck, "Attatchment to INVOICE", "INVOICE") rpt.lblSummeUeberschrift.Text = "Invoice Amount:" @@ -3426,11 +3426,11 @@ Public Class cFakturierung rpt.lblRgDatumUeberschrift.Text = "Credit Note Date:" End Select Case Else - Select Case BelegartenKz + Select Case ROW("BelegartenKz") Case "AR" rpt.lblUeberschriftRG_GS.Text = IIf(Not isMDMRechnungsdruck, "Anlage zur Sammelrechnung", "Rechnung") Case "AG" - rpt.lblUeberschriftRG_GS.Text = "GUTSCHRIFT" + rpt.lblUeberschriftRG_GS.Text = IIf(Not isMDMRechnungsdruck, "Anlage zur Sammelgutschrift", "GUTSCHRIFT") rpt.lblSummeUeberschrift.Text = "Gutschriftsbetrag:" rpt.lblRgNrUeberschrift.Text = "Gutschrifts-Nr.:" rpt.lblRgDatumUeberschrift.Text = "Gutschrifts-Datum:" diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index df79a189..e086793e 100644 --- a/SDL/My Project/AssemblyInfo.vb +++ b/SDL/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb b/SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb index ec034375..3ee9ff52 100644 --- a/SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb +++ b/SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb @@ -101,7 +101,7 @@ Partial Class ustCntlUSTV_AntragPosition Me.tabDok.Padding = New System.Windows.Forms.Padding(3) Me.tabDok.Size = New System.Drawing.Size(256, 197) Me.tabDok.TabIndex = 1 - Me.tabDok.Text = "Dokumente" + Me.tabDok.Text = "Rechnungen" Me.tabDok.UseVisualStyleBackColor = True ' 'scanSonstiges diff --git a/SDL/USTV/ustCntlUSTV_AntragPosition.vb b/SDL/USTV/ustCntlUSTV_AntragPosition.vb index 1fd734ef..6212696b 100644 --- a/SDL/USTV/ustCntlUSTV_AntragPosition.vb +++ b/SDL/USTV/ustCntlUSTV_AntragPosition.vb @@ -66,10 +66,10 @@ 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 = True - 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 = True - 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 = True - 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 = True + 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 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 : IIf(UStV_POS.UStVPo_daId > 0, UStV_POS.UStVPo_daId, -1) : scanSonstiges.Enabled = True End Select diff --git a/SDL/seriendruck/usrCntlFakturierung.vb b/SDL/seriendruck/usrCntlFakturierung.vb index 9c9a4327..9dd87a45 100644 --- a/SDL/seriendruck/usrCntlFakturierung.vb +++ b/SDL/seriendruck/usrCntlFakturierung.vb @@ -38,10 +38,12 @@ Public Class usrcntlFakturierung PathMautberichte = (New SQL).getValueTxtBySql("SELECT TOP 1 [Param_value] FROM [tblPartnersystem_Paramter] WHERE Param_system='GESAMTMAUT' AND [Param_name]='ANLAGE_PFAD' AND Param_testsystem = " & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, 1, 0), "FMZOLL") + cbxMautanh.Checked = False + 'PathMautberichte = "C:\Users\d.breimaier\Desktop\MDM\Mautgesamtberichte\" - Dim countCSV = 0 - Dim countPDF = 0 + countCSV = 0 + countPDF = 0 If Directory.Exists(PathMautberichte) Then If Directory.GetFiles(PathMautberichte) IsNot Nothing Then For Each f In Directory.GetFiles(PathMautberichte) @@ -49,11 +51,12 @@ Public Class usrcntlFakturierung If f.ToString.ToLower.EndsWith("_maut.pdf") Then countPDF += 1 Next End If + Else + MsgBox("Mautbericht-Pfad " & PathMautberichte & " nicht verfügbar!") End If + lblAnzahlMautberichte.Text = countCSV + countPDF & "x Mautberichte (" & countCSV & "x CSV " & countPDF & "x PDF )" - - If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG("MDM_FAKTURIERUNG", "SDL") = 0 Then btnMDMSammelrechnung.Enabled = True @@ -1119,9 +1122,7 @@ Public Class usrcntlFakturierung If cbxDateMautbericht._value = "" Then Exit Sub Try - - - + If Not Directory.Exists(PathMautberichte) Then MsgBox("Pfad " & PathMautberichte & " nicht verfügbar" & vbNewLine & "Vorgang wird abgebrochen!") : Exit Sub Select Case cbxMautbericht._value 'nur intern @@ -1274,8 +1275,8 @@ Public Class usrcntlFakturierung End Select - Dim countCSV = 0 - Dim countPDF = 0 + countCSV = 0 + countPDF = 0 If Directory.Exists(PathMautberichte) Then If Directory.GetFiles(PathMautberichte) IsNot Nothing Then For Each f In Directory.GetFiles(PathMautberichte) @@ -1521,7 +1522,7 @@ Public Class usrcntlFakturierung .Columns.Clear() - .SET_SQL("SELECT [Datenquelle] as Lieferant,sum([Net Amount]) as Netto,sum([VAT Amount]) as VAT,sum([Total Amount]) as Brutto + .SET_SQL("SELECT [Datenquelle] as Lieferant,format(sum([Net Amount]),'#,#.00', 'de-de') as Netto,format(sum([VAT Amount]), '#,#.00', 'de-de') as VAT,format(sum([Total Amount]), '#,#.00', 'de-de') as Brutto FROM [VERAG].[dbo].[tblMautbericht] where cast([Billingdate] as date) = '" & cbxDateMautbericht._value & "' group by [Datenquelle]", "FMZOLL") @@ -1591,7 +1592,7 @@ Public Class usrcntlFakturierung MsgBox("Anzahl CSV-Anhänge: " & rechnungenMitGesamtmautanhantCSV & vbNewLine & "Anzahl PDF-Anhänge: " & rechnungenMitGesamtmautanhantPDF) If Directory.GetFiles(PathMautberichte) IsNot Nothing Then - If Not Directory.GetFiles(PathMautberichte).Count = (countCSV + countPDF) Then Exit Sub + If Directory.GetFiles(PathMautberichte).Count = (countCSV + countPDF) OrElse (rechnungenMitGesamtmautanhantCSV = "0" AndAlso rechnungenMitGesamtmautanhantPDF = "0") Then Exit Sub End If @@ -1874,4 +1875,5 @@ Public Class usrcntlFakturierung Next Return False End Function + End Class diff --git a/SDL/zoll/usrCntlZOLLAuswertungen.Designer.vb b/SDL/zoll/usrCntlZOLLAuswertungen.Designer.vb index a7fbb107..d38ec65e 100644 --- a/SDL/zoll/usrCntlZOLLAuswertungen.Designer.vb +++ b/SDL/zoll/usrCntlZOLLAuswertungen.Designer.vb @@ -1302,7 +1302,7 @@ Partial Class usrCntlZOLLAuswertungen Me.tbcntr.Location = New System.Drawing.Point(0, 57) Me.tbcntr.Name = "tbcntr" Me.tbcntr.SelectedIndex = 0 - Me.tbcntr.Size = New System.Drawing.Size(1245, 1829) + Me.tbcntr.Size = New System.Drawing.Size(1228, 1829) Me.tbcntr.TabIndex = 22 ' 'TabPage1 @@ -1345,7 +1345,7 @@ Partial Class usrCntlZOLLAuswertungen Me.TabPage1.Location = New System.Drawing.Point(4, 22) Me.TabPage1.Name = "TabPage1" Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage1.Size = New System.Drawing.Size(1237, 1803) + Me.TabPage1.Size = New System.Drawing.Size(1220, 1803) Me.TabPage1.TabIndex = 0 Me.TabPage1.Text = "Bürgschaften" Me.TabPage1.UseVisualStyleBackColor = True @@ -2562,7 +2562,7 @@ Partial Class usrCntlZOLLAuswertungen Me.UsrCntlAuswertungenKunden_Auftragsrueckgang1.BackColor = System.Drawing.Color.White Me.UsrCntlAuswertungenKunden_Auftragsrueckgang1.Location = New System.Drawing.Point(6, 18) Me.UsrCntlAuswertungenKunden_Auftragsrueckgang1.Name = "UsrCntlAuswertungenKunden_Auftragsrueckgang1" - Me.UsrCntlAuswertungenKunden_Auftragsrueckgang1.Size = New System.Drawing.Size(708, 235) + Me.UsrCntlAuswertungenKunden_Auftragsrueckgang1.Size = New System.Drawing.Size(0, 235) Me.UsrCntlAuswertungenKunden_Auftragsrueckgang1.TabIndex = 0 ' 'TabPage3 @@ -2573,7 +2573,7 @@ Partial Class usrCntlZOLLAuswertungen Me.TabPage3.Location = New System.Drawing.Point(4, 22) Me.TabPage3.Name = "TabPage3" Me.TabPage3.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage3.Size = New System.Drawing.Size(1237, 1803) + Me.TabPage3.Size = New System.Drawing.Size(1220, 1803) Me.TabPage3.TabIndex = 2 Me.TabPage3.Text = "Fiskalvertretung / EV-Veranlagung" Me.TabPage3.UseVisualStyleBackColor = True @@ -2845,7 +2845,7 @@ Partial Class usrCntlZOLLAuswertungen Me.pnl.Dock = System.Windows.Forms.DockStyle.Top Me.pnl.Location = New System.Drawing.Point(0, 0) Me.pnl.Name = "pnl" - Me.pnl.Size = New System.Drawing.Size(1245, 57) + Me.pnl.Size = New System.Drawing.Size(1228, 57) Me.pnl.TabIndex = 23 ' 'usrCntlZOLLAuswertungen @@ -2857,7 +2857,7 @@ Partial Class usrCntlZOLLAuswertungen Me.Controls.Add(Me.tbcntr) Me.Controls.Add(Me.pnl) Me.Name = "usrCntlZOLLAuswertungen" - Me.Size = New System.Drawing.Size(1245, 1174) + Me.Size = New System.Drawing.Size(1228, 1174) Me.GroupBox1.ResumeLayout(False) Me.GroupBox1.PerformLayout() Me.grpDurmaz.ResumeLayout(False) diff --git a/SDL/zoll/usrCntlZOLLAuswertungen.vb b/SDL/zoll/usrCntlZOLLAuswertungen.vb index f517f7a6..dc5b2196 100644 --- a/SDL/zoll/usrCntlZOLLAuswertungen.vb +++ b/SDL/zoll/usrCntlZOLLAuswertungen.vb @@ -1027,6 +1027,10 @@ Public Class usrCntlZOLLAuswertungen End Sub + Private Sub UsrCntlAuswertungenEV_Veranlagungen1_Load(sender As Object, e As EventArgs) Handles UsrCntlAuswertungenEV_Veranlagungen1.Load + + End Sub + 'Private Sub Button5_Click(sender As Object, e As EventArgs, Optional exportPDF As String = "", Optional exportEXCEL As String = "") Handles Button5.Click ' Dim sqlStr = ""