Merge branch 'newMaster2024' of https://dev.azure.com/VeragAG/_git/SDL into newMaster2024

This commit is contained in:
2025-03-19 15:34:05 +01:00
29 changed files with 1406 additions and 353 deletions

View File

@@ -778,7 +778,10 @@ Public Class cFakturierung
rpt.txtBank1.Text = If(FIRMA.Firma_Bankverbindung1, "") & vbNewLine & If(FIRMA.Firma_IBAN1, "") & vbNewLine & If(FIRMA.Firma_BIC1, "").ToString.Trim
rpt.txtBank2.Text = If(FIRMA.Firma_Bankverbindung2, "") & vbNewLine & If(FIRMA.Firma_IBAN2, "") & vbNewLine & If(FIRMA.Firma_BIC2, "").ToString.Trim
rpt.txtBank3.Visible = True
rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR90 0006 2001 6040 0009 0804 66" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
'Änderung Ticket_Nr.: 6983
'rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR90 0006 2001 6040 0009 0804 66" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR67 0006 2000 5440 0009 0513 57" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
rpt.picVERAG.Size = New SizeF(2.712, 0.61)
rpt.txtDisclaimer.Text = rpt.txtDisclaimer.Text.Replace("Schärding oder Passau", "Bad Reichenhall")
Case 26
@@ -896,7 +899,10 @@ Public Class cFakturierung
rpt.txtBank1.Text = If(FIRMA.Firma_Bankverbindung1, "") & vbNewLine & If(FIRMA.Firma_IBAN1, "") & vbNewLine & If(FIRMA.Firma_BIC1, "").ToString.Trim
rpt.txtBank2.Text = If(FIRMA.Firma_Bankverbindung2, "") & vbNewLine & If(FIRMA.Firma_IBAN2, "") & vbNewLine & If(FIRMA.Firma_BIC2, "").ToString.Trim
rpt.txtBank3.Visible = True
rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR90 0006 2001 6040 0009 0804 66" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
'Änderung Ticket_Nr.: 6983
'rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR90 0006 2001 6040 0009 0804 66" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR67 0006 2000 5440 0009 0513 57" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
rpt.txtDisclaimer.Text = rpt.txtDisclaimer.Text.Replace("Schärding oder Passau", "Bad Reichenhall")
Case 26 'VERAG-UNISPED"
rpt.txtBank1.Text = If(FIRMA.Firma_Bankverbindung1, "") & vbNewLine & If(FIRMA.Firma_IBAN1, "") & vbNewLine & If(FIRMA.Firma_BIC1, "").ToString.Trim
@@ -971,7 +977,9 @@ Public Class cFakturierung
rpt.txtBank1.Text = If(FIRMA.Firma_Bankverbindung1, "") & vbNewLine & If(FIRMA.Firma_IBAN1, "") & vbNewLine & If(FIRMA.Firma_BIC1, "").ToString.Trim
rpt.txtBank2.Text = If(FIRMA.Firma_Bankverbindung2, "") & vbNewLine & If(FIRMA.Firma_IBAN2, "") & vbNewLine & If(FIRMA.Firma_BIC2, "").ToString.Trim
rpt.txtBank3.Visible = True
rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR90 0006 2001 6040 0009 0804 66" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
'Änderung Ticket_Nr.: 6983
'rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR90 0006 2001 6040 0009 0804 66" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR67 0006 2000 5440 0009 0513 57" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
rpt.txtDisclaimer.Text = rpt.txtDisclaimer.Text.Replace("Schärding oder Passau", "Bad Reichenhall")
Case 20 '"IMEX"
@@ -1043,7 +1051,10 @@ Public Class cFakturierung
rpt.txtBank1.Text = If(FIRMA.Firma_Bankverbindung1, "") & vbNewLine & If(FIRMA.Firma_IBAN1, "") & vbNewLine & If(FIRMA.Firma_BIC1, "").ToString.Trim
rpt.txtBank2.Text = If(FIRMA.Firma_Bankverbindung2, "") & vbNewLine & If(FIRMA.Firma_IBAN2, "") & vbNewLine & If(FIRMA.Firma_BIC2, "").ToString.Trim
rpt.txtBank3.Visible = True
rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR90 0006 2001 6040 0009 0804 66" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
'Änderung Ticket_Nr.: 6983
'rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR90 0006 2001 6040 0009 0804 66" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
rpt.txtBank3.Text = "Garanti Bank Türkei Euro Konto" & vbNewLine & "IBAN: TR67 0006 2000 5440 0009 0513 57" & vbNewLine & "BIC/SWIFT: TGBATRISXXX".ToString.Trim
rpt.txtDisclaimer.Text = rpt.txtDisclaimer.Text.Replace("Schärding oder Passau", "Bad Reichenhall")
Case 20 '"IMEX"
@@ -1971,7 +1982,9 @@ Public Class cFakturierung
Case 24 'AMBAR"
If FIRMA.Firma_IBAN1 IsNot Nothing AndAlso FIRMA.Firma_BIC1 IsNot Nothing AndAlso FIRMA.Firma_Bankverbindung1 IsNot Nothing Then desc.AddCreditorFinancialAccount(IIf(FIRMA.Firma_IBAN1 IsNot Nothing, FIRMA.Firma_IBAN1.ToString.Replace("IBAN: ", ""), ""), IIf(FIRMA.Firma_BIC1 IsNot Nothing, FIRMA.Firma_BIC1.ToString.Replace("BIC: ", ""), ""),,, IIf(FIRMA.Firma_Bankverbindung1 IsNot Nothing, FIRMA.Firma_Bankverbindung1, ""))
If FIRMA.Firma_IBAN2 IsNot Nothing AndAlso FIRMA.Firma_BIC2 IsNot Nothing AndAlso FIRMA.Firma_Bankverbindung2 IsNot Nothing Then desc.AddCreditorFinancialAccount(IIf(FIRMA.Firma_IBAN2 IsNot Nothing, FIRMA.Firma_IBAN2.ToString.Replace("IBAN: ", ""), ""), IIf(FIRMA.Firma_BIC2 IsNot Nothing, FIRMA.Firma_BIC2.ToString.Replace("BIC: ", ""), ""),,, IIf(FIRMA.Firma_Bankverbindung2 IsNot Nothing, FIRMA.Firma_Bankverbindung2, ""))
desc.AddCreditorFinancialAccount("TR90 0006 2001 6040 0009 0804 66", "TGBATRISXXX",,, "Garanti Bank Türkei Euro Konto")
'Änderung Ticket_Nr.: 6983
'desc.AddCreditorFinancialAccount("TR90 0006 2001 6040 0009 0804 66", "TGBATRISXXX",,, "Garanti Bank Türkei Euro Konto")
desc.AddCreditorFinancialAccount("TR67 0006 2000 5440 0009 0513 57", "TGBATRISXXX",,, "Garanti Bank Türkei Euro Konto")
Case 20 '"IMEX"
If RECHNUNG.RechnungsLandKz = "TR" Then
@@ -2256,9 +2269,10 @@ Public Class cFakturierung
Case 24 'AMBAR"
If FIRMA.Firma_IBAN1 IsNot Nothing AndAlso FIRMA.Firma_BIC1 IsNot Nothing AndAlso FIRMA.Firma_Bankverbindung1 IsNot Nothing Then desc.AddCreditorFinancialAccount(IIf(FIRMA.Firma_IBAN1 IsNot Nothing, FIRMA.Firma_IBAN1.ToString.Replace("IBAN: ", ""), ""), IIf(FIRMA.Firma_BIC1 IsNot Nothing, FIRMA.Firma_BIC1.ToString.Replace("BIC: ", ""), ""),,, IIf(FIRMA.Firma_Bankverbindung1 IsNot Nothing, FIRMA.Firma_Bankverbindung1, ""))
If FIRMA.Firma_IBAN2 IsNot Nothing AndAlso FIRMA.Firma_BIC2 IsNot Nothing AndAlso FIRMA.Firma_Bankverbindung2 IsNot Nothing Then desc.AddCreditorFinancialAccount(IIf(FIRMA.Firma_IBAN2 IsNot Nothing, FIRMA.Firma_IBAN2.ToString.Replace("IBAN: ", ""), ""), IIf(FIRMA.Firma_BIC2 IsNot Nothing, FIRMA.Firma_BIC2.ToString.Replace("BIC: ", ""), ""),,, IIf(FIRMA.Firma_Bankverbindung2 IsNot Nothing, FIRMA.Firma_Bankverbindung2, ""))
desc.AddCreditorFinancialAccount("TR90 0006 2001 6040 0009 0804 66", "TGBATRISXXX",,, "Garanti Bank Türkei Euro Konto")
'Änderung Ticket_Nr.: 6983
'desc.AddCreditorFinancialAccount("TR90 0006 2001 6040 0009 0804 66", "TGBATRISXXX",,, "Garanti Bank Türkei Euro Konto")
desc.AddCreditorFinancialAccount("TR67 0006 2000 5440 0009 0513 57", "TGBATRISXXX",,, "Garanti Bank Türkei Euro Konto")
Case 20 '"IMEX"
If RechnungsLandKz = "TR" Then

View File

@@ -313,49 +313,37 @@ Public Class frmFaktEmail
End Select
Else
Dim mailText As String = ""
If steuerbetrag = 0 Then
mailText &= (New SQL).getValueTxtBySql("SELECT Text FROM Rechnungstexte WHERE Firma_ID=0 AND EMailRechnung=1 AND Rechnungstexte.DrucksteuerungsKz='R' AND LandKZ='" & RechnungsLandKz & "'", "FMZOLL")
End If
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim listOfTextconserven As cTextkonserve_LIST = New cTextkonserve_LIST(4, "", Firma_ID)
Dim spracheRechnung As String = "EN" 'Defaultsprache
Select Case RechnungsLandKz
Case "TR"
txtSubject.Text = If(BelegartenNr = 71, "Kredi Nr. ", "Fatura Nr. ") & txtRgNr
TextHTML = "Sayin yetkili," & vbNewLine & vbNewLine & "ekte yeni Faturanizi ve Dökümünü bulabilirsiniz."
TextHTML &= TextHTMLADD
TextHTML &= "" & vbNewLine & "Fatura kopileri kdv iadesi icin kullanilamaz."
If mailText <> "" Then TextHTML &= mailText & vbNewLine
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Saygilarimizla" & vbNewLine & vbNewLine & ""
Case "A", "AT", "D", "DE", "CH"
txtSubject.Text = If(BelegartenNr = 71, "Gutschrift Nr. ", "Rechnung Nr. ") & txtRgNr
TextHTML = "Sehr geehrte Kunde" & vbNewLine & vbNewLine & "anbei unsere neue " & If(BelegartenNr = 71, "Gutschrift(en)", "Rechnung(en)") & " der letzten Abrechnungsperiode mit den dazugehörigen Anhängen."
TextHTML &= TextHTMLADD
TextHTML &= "" & vbNewLine & "Da es sich bei den beigefügten Rechnungen nur um Kopien handelt, dürfen diese NICHT zur MWST-Rückerstattung verwendet werden. "
If mailText <> "" Then TextHTML &= mailText & vbNewLine
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Mit freundlichen Grüßen" & vbNewLine & vbNewLine & ""
Case "HR", "SRB", "SLO"
txtSubject.Text = If(BelegartenNr = 71, "Credit No. ", "Invoice No. ") & txtRgNr
TextHTML = "Postovani komitente" & vbNewLine & vbNewLine & "u prilogu novi " & If(BelegartenNr = 71, "kredit", "racun") & " sa specifikacijma za prethodni period. "
TextHTML &= TextHTMLADD
TextHTML &= "" & vbNewLine & "Prilozeni racuni nisu dopusteni za povrat PDV-a, jer su samo kopije."
If mailText <> "" Then TextHTML &= mailText & vbNewLine
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Best regards" & vbNewLine & vbNewLine & ""
Case "RO"
txtSubject.Text = If(BelegartenNr = 71, "Credit No. ", "Invoice No. ") & txtRgNr
TextHTML = "Stimate client" & vbNewLine & vbNewLine & "Va transmitem factura " & If(BelegartenNr = 71, "kredit", "racun") & " referitoare ultimei perioade de decontare impreuna cu anexele aferente."
TextHTML &= TextHTMLADD
TextHTML &= "" & vbNewLine & "Prilozeni racuni nisu dopusteni za povrat PDV-a, jer su samo kopije."
If mailText <> "" Then TextHTML &= mailText & vbNewLine
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Best regards" & vbNewLine & vbNewLine & ""
Case Else
txtSubject.Text = If(BelegartenNr = 71, "Credit No. ", "Invoice No. ") & txtRgNr
TextHTML = "Dear Customer" & vbNewLine & vbNewLine & "Enclosed is our new " & If(BelegartenNr = 71, "credit note", "invoice") & " for the last billing period with the associated attachments."
TextHTML &= TextHTMLADD
TextHTML &= "" & vbNewLine & "Since the attached invoices are only copies, the may NOT be used for VAT refunds."
If mailText <> "" Then TextHTML &= mailText & vbNewLine
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Best regards" & vbNewLine & vbNewLine & ""
Case "TR", "RO", "DE", "SRB" : spracheRechnung = RechnungsLandKz
Case "A", "AT", "D", "CH" : spracheRechnung = "DE"
Case "HR", "SLO", "BIH", "MNE", "MK", "MO" : spracheRechnung = "SRB"
End Select
If listOfTextconserven.LIST.Any(Function(c) c.txt_sprache = spracheRechnung) Then
Dim r As cTextkonserve = listOfTextconserven.LIST.Find(Function(c) c.txt_sprache = spracheRechnung)
If r IsNot Nothing Then
txtSubject.Text = r.txt_betreff
txtSubject.Text = txtSubject.Text.Replace("%BelegNr%", txtRgNr)
TextHTML &= r.txt_text
If mailText <> "" Then TextHTML &= mailText & vbNewLine
'TextHTML &= "<br><br><br>" & cFakturierung.getSignature(RechnungsLandKz, Firma_ID)
End If
End If
End If

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.7.1")>
<Assembly: AssemblyFileVersion("1.3.7.1")>
<Assembly: AssemblyVersion("1.3.7.5")>
<Assembly: AssemblyFileVersion("1.3.7.5")>

View File

@@ -1034,6 +1034,36 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Byte[].
'''</summary>
Friend ReadOnly Property Kostenkalkulation_AG() As Byte()
Get
Dim obj As Object = ResourceManager.GetObject("Kostenkalkulation_AG", resourceCulture)
Return CType(obj,Byte())
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Byte[].
'''</summary>
Friend ReadOnly Property Kostenkalkulation_CS() As Byte()
Get
Dim obj As Object = ResourceManager.GetObject("Kostenkalkulation_CS", resourceCulture)
Return CType(obj,Byte())
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Byte[].
'''</summary>
Friend ReadOnly Property Kostenkalkulation_IMEX() As Byte()
Get
Dim obj As Object = ResourceManager.GetObject("Kostenkalkulation_IMEX", resourceCulture)
Return CType(obj,Byte())
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>

View File

@@ -934,4 +934,13 @@
<data name="Kostenkalkulation" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Kostenkalkulation.xlsx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Kostenkalkulation_AG" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Kostenkalkulation_AG.xlsx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Kostenkalkulation_CS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Kostenkalkulation_CS.xlsx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Kostenkalkulation_IMEX" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Kostenkalkulation_IMEX.xlsx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -4551,7 +4551,9 @@
<None Include="Resources\FA_Graz_EV-Veranlagung_Muster.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\Kostenkalkulation.xlsx" />
<None Include="Resources\Kostenkalkulation_CS.xlsx" />
<None Include="Resources\Kostenkalkulation_AG.xlsx" />
<None Include="Resources\Kostenkalkulation_IMEX.xlsx" />
<None Include="Resources\LKW_Liste.xlsx" />
<None Include="Resources\MDM_Schreiben\GOBOX_UMSTELLUNG.dotx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

View File

@@ -158,7 +158,7 @@ Public Class frmMDM_USTVAntrag
For Each r As DataGridViewRow In .Rows
Dim da_id As Integer
Dim da_id As Integer = -1
If Not IsDBNull(r.Cells("UStVPo_daId").Value) Then
da_id = r.Cells("UStVPo_daId").Value
@@ -636,7 +636,8 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
USTV_POS.UStVPo_Zeitstempel = Now()
USTV_POS.UStVPo_daId = ANTRAG.plose_daId
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
' USTV_POS.UStVPo_daId = ANTRAG.plose_daId
' Berechnungen
If Not MWSTSummenAusBeleg Then
@@ -745,6 +746,8 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_Zeitstempel = Now()
USTV_POS.UStVPo_daId = sql.getValueTxtBySql("SELECT TOP(1) RK_ID FROM Rechnungsausgang where cast(Rechnungsausgang.RechnungsDatum as Date) ='" & USTV_POS.UStVPo_ReDat & "' and Rechnungsausgang.RechnungsNr='" & USTV_POS.UStVPo_ReNr & "' AND FilialenNr = 4814 AND RK_ID is not null", "FMZOLL")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
Dim dt_Prod As New DataTable
Dim GET_Positionen = cTrdProduct.GET_PRODUCTS(dt_Prod, USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr)
@@ -834,6 +837,7 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = r.Item("rmc_reNr").ToString
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
USTV_POS.UStVPo_daId = r.Item("rmc_daId")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
@@ -900,6 +904,7 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = r.Item("invoice_number") & " - " & kdNr & IIf(Antrag_LandKz = "BE", "/Belgium", "")
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
USTV_POS.UStVPo_daId = r.Item("daId")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If Not alreadyExistsMitLeistungsBez(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
@@ -967,6 +972,7 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = r.Item("Rechnungsnummer").ToString
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
USTV_POS.UStVPo_daId = r.Item("daId")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
@@ -1036,7 +1042,7 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
USTV_POS.UStVPo_daId = 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")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
USTV_POS.UStVPo_Schnittstelle = True
@@ -2087,16 +2093,16 @@ Public Class frmMDM_USTVAntrag
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
getValue(USTV_ANTRAG)
USTV_ANTRAG.SAVE()
If IsDBNull(USTV_ANTRAG.FilialenNr) OrElse USTV_ANTRAG.FilialenNr Is Nothing OrElse USTV_ANTRAG.FilialenNr = 0 Then MsgBox("Für das Speditionsbuch muss die Filiale eingegeben werden.") : Exit Sub
If IsDBNull(USTV_ANTRAG.AbfertigungsNr) OrElse USTV_ANTRAG.AbfertigungsNr Is Nothing OrElse USTV_ANTRAG.AbfertigungsNr <= 0 Then MsgBox("Für das Speditionsbuch muss die Abfertigungs-Nr eingegeben werden.") : Exit Sub
Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr)
Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, 0)
If spedBuch.hasEntry Then MsgBox("Es existiert bereits ein Speditionsbucheintrag!" & vbNewLine & "Vorgang wird abgebrochen ") : Exit Sub
With spedBuch
.UnterNr = 0
.Abfertigungsdatum = Today()
.AvisUhrzeit = Now()
.Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
@@ -2105,7 +2111,7 @@ Public Class frmMDM_USTVAntrag
.Abfertigungsart = 10
.Abfertigungsanzahl = 1
.Packstücke = "Mehrwertsteuerrückerstattung " & USTV_ANTRAG.UStVAn_LandKz & " / " & USTV_ANTRAG.UStVAn_ReDatVon & " - " & USTV_ANTRAG.UStVAn_ReDatBis
.VermittlerKundenNr = KundenNr
.VermittlerKundenNr = USTV_ANTRAG.UStVAn_KuNr
If .SAVE() Then MsgBox("Sped-Eintrag wurde angelegt")
End With

View File

@@ -1,4 +1,5 @@
Imports System.Windows.Documents
Imports com.sun.org.apache.bcel.internal.generic
Imports com.sun.org.apache.xpath.internal.objects
Imports DocumentFormat.OpenXml.Drawing.Spreadsheet
Imports VERAG_PROG_ALLGEMEIN
@@ -10,6 +11,7 @@ Public Class frmUSTVoffeneAntraege
Dim datumVon As Date = Nothing
Dim kdNr As Integer = -1
Dim kdName As String
Dim dtkeineMWST As DataTable
Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn.Click
initLieferant("PLOSE", sender)
End Sub
@@ -509,6 +511,8 @@ Public Class frmUSTVoffeneAntraege
Dim sqlwhereLand = ""
Dim sqlwhereSteuerNr = ""
Dim kundenLandISO2 As String = ""
Dim SQLPLOSEUMSTELLUNG = ""
If kdnr > 0 Then
@@ -526,6 +530,15 @@ Public Class frmUSTVoffeneAntraege
If cbxKundeLand._value <> "" Then
sqlwhereLand &= " and Kundenland = '" & cbxKundeLand._value & "'"
'LandKZ vom Kunden muss auf ISO2 konvertiert werden, weil da ein Misch-Masch in der Datenbank herrscht!
If cbxKundeLand._value.Length = 2 Then
kundenLandISO2 = cbxKundeLand._value
ElseIf cbxKundeLand._value.Length = 3 Then
kundenLandISO2 = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getISO2LandFromISO3Land(cbxKundeLand._value)
ElseIf cbxKundeLand._value.Length = 1 Then
kundenLandISO2 = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getISO2LandFromISO1Land(cbxKundeLand._value)
End If
End If
If cbxUStV.Checked Then
@@ -536,6 +549,20 @@ Public Class frmUSTVoffeneAntraege
sqlwhereLand &= " and isnull(UStVAn_ID,0) = 0 "
End If
If dtkeineMWST.Rows.Count > 0 AndAlso kundenLandISO2 <> "" Then
Dim dtkeineMWST_ohneContraint As DataTable = dtkeineMWST.Select("Land = '" & kundenLandISO2 & "'").CopyToDataTable
Dim counter = 0
Dim landBez As String = ""
For Each row As DataRow In dtkeineMWST_ohneContraint.Rows
landBez &= "'" & row.Item("Erstattungsland") & "'"
counter = counter + 1
If (dtkeineMWST_ohneContraint.Rows.Count <> 0 And counter <> dtkeineMWST_ohneContraint.Rows.Count) Then landBez &= ","
Next
sqlwhereLand &= " AND Einreichland not in (" & landBez & ")"
End If
Dim year = CDate(dat_Sum_Von.Value).Year
If year >= 2025 Then
@@ -688,6 +715,13 @@ Public Class frmUSTVoffeneAntraege
where 1 = 1 and isnull(kde_keineMWSt,0) = 0 " & sqlwhereLand & sqlwhereSteuerNr &
" group by isnull(UStVAn_ID,0) , Lieferant, KdNr, Kundenname,Kundenland, Einreichland, tblSteuernummern.UStV"
Dim SQLWhere = ""
.SET_SQL(sqlstring, "FMZOLL")
.LOAD()
If .Columns.Count > 0 Then
@@ -926,4 +960,8 @@ Public Class frmUSTVoffeneAntraege
End Sub
Private Sub frmUSTVoffeneAntraege_Load(sender As Object, e As EventArgs) Handles MyBase.Load
dtkeineMWST = (New SQL).loadDgvBySql("select Land, Erstattungsland, Lieferant from tblKeineMWSTErstattung", "FMZOLL")
End Sub
End Class

View File

@@ -64,20 +64,33 @@ Public Class ustCntlUSTV_AntragPosition
loadChangedDSToPanel(UStV_Leitender, True)
Dim da_id = -1
If Not IsDBNull(UStV_POS.UStVPo_daId) AndAlso UStV_POS.UStVPo_daId > 0 Then
da_id = UStV_POS.UStVPo_daId
Else
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)
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 '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
Case 1 : da_id = 1 : scanSonstiges.Enabled = False 'VERAG-RECHNUGNEN werden immer direkt OHNE daid geöffnet!
Case -1 : da_id = IIf(UStV_POS.UStVPo_daId > 0, UStV_POS.UStVPo_daId, -1)
End Select
End If
If da_id > -1 Then
scanSonstiges.INIT_daId(da_id)
scanSonstiges.Enabled = UStV_POS.UStVPo_daId_loeschbar 'Not UStV_POS.UStVPo_SchnittstellenNr > 0
Else
scanSonstiges.INIT(kdnr, "MDM", "MDM_DATEN", "DIVERSE")
scanSonstiges.INIT(kdnr, "MDM", "MDM_DATEN", "USTVA_" & UStV_POS.UStVAn_ID & "_" & UStV_POS.UStVPo_ID)
'scanSonstiges.INIT_daId(da_id)
scanSonstiges.Enabled = True
End If
scanUSTVFABest.INIT(kdnr, "KUNDENDATEN", "FA_Bestaetigungen")
@@ -437,12 +450,13 @@ Public Class ustCntlUSTV_AntragPosition
Private Sub scanSonstiges_FileAdded(id As String, path As String, name As String) Handles scanSonstiges.FileAdded
getValues(UStV_POS, True)
UStV_POS.UStVPo_daId = id
UStV_POS.SAVE()
If UStV_POS.SAVE() Then scanSonstiges.INIT_daId(UStV_POS.UStVPo_daId)
End Sub
Private Sub scanSonstiges_FileDeleted() Handles scanSonstiges.FileDeleted
getValues(UStV_POS, True)
UStV_POS.UStVPo_daId = -1
UStV_POS.UStVPo_daId = Nothing
UStV_POS.SAVE()
End Sub
End Class

View File

@@ -22,6 +22,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.Panel2 = New System.Windows.Forms.Panel()
@@ -59,9 +60,27 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.txtUmrechnungskurs = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtUSTBetrag = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Panel3 = New System.Windows.Forms.Panel()
Me.tbcntr = New System.Windows.Forms.TabControl()
Me.tabDok = New System.Windows.Forms.TabPage()
Me.scanSonstiges = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
Me.Panel4 = New System.Windows.Forms.Panel()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.UsrcntlPDFScanList1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
Me.scanLieferschein = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
Me.scanUSTVVollmachten = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
Me.tabVZ = New System.Windows.Forms.TabPage()
Me.Panel2.SuspendLayout()
Me.pnl.SuspendLayout()
Me.Panel1.SuspendLayout()
Me.Panel3.SuspendLayout()
Me.tbcntr.SuspendLayout()
Me.tabDok.SuspendLayout()
Me.Panel4.SuspendLayout()
Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.tabVZ.SuspendLayout()
Me.SuspendLayout()
'
'Label8
@@ -92,7 +111,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel2.Location = New System.Drawing.Point(0, 0)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(1300, 30)
Me.Panel2.Size = New System.Drawing.Size(1307, 30)
Me.Panel2.TabIndex = 0
'
'Label9
@@ -109,7 +128,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(504, 14)
Me.Label1.Location = New System.Drawing.Point(465, 14)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(62, 13)
Me.Label1.TabIndex = 1
@@ -145,7 +164,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
Me.Label2.Location = New System.Drawing.Point(504, 31)
Me.Label2.Location = New System.Drawing.Point(465, 31)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(108, 15)
Me.Label2.TabIndex = 4
@@ -155,7 +174,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
Me.Label3.Location = New System.Drawing.Point(692, 31)
Me.Label3.Location = New System.Drawing.Point(640, 31)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(87, 15)
Me.Label3.TabIndex = 5
@@ -288,14 +307,14 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.pnl.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnl.Location = New System.Drawing.Point(0, 30)
Me.pnl.Name = "pnl"
Me.pnl.Size = New System.Drawing.Size(1300, 235)
Me.pnl.Size = New System.Drawing.Size(1307, 235)
Me.pnl.TabIndex = 1
'
'Label19
'
Me.Label19.AutoSize = True
Me.Label19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
Me.Label19.Location = New System.Drawing.Point(504, 112)
Me.Label19.Location = New System.Drawing.Point(465, 112)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(107, 15)
Me.Label19.TabIndex = 34
@@ -305,7 +324,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
'
Me.Label18.AutoSize = True
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label18.Location = New System.Drawing.Point(504, 92)
Me.Label18.Location = New System.Drawing.Point(465, 92)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(58, 13)
Me.Label18.TabIndex = 33
@@ -325,7 +344,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.txtGuNr._value = Nothing
Me.txtGuNr._Waehrung = False
Me.txtGuNr._WaehrungZeichen = False
Me.txtGuNr.Location = New System.Drawing.Point(695, 49)
Me.txtGuNr.Location = New System.Drawing.Point(643, 49)
Me.txtGuNr.MaxLength = 22
Me.txtGuNr.MaxLineLength = -1
Me.txtGuNr.MaxLines_Warning = ""
@@ -349,7 +368,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.txtBerufungsdatum._Waehrung = False
Me.txtBerufungsdatum._WaehrungZeichen = True
Me.txtBerufungsdatum.ForeColor = System.Drawing.Color.Red
Me.txtBerufungsdatum.Location = New System.Drawing.Point(507, 130)
Me.txtBerufungsdatum.Location = New System.Drawing.Point(468, 130)
Me.txtBerufungsdatum.MaxLength = 50
Me.txtBerufungsdatum.MaxLineLength = -1
Me.txtBerufungsdatum.MaxLines_Warning = ""
@@ -383,20 +402,20 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.txtBemerkung._Waehrung = False
Me.txtBemerkung._WaehrungZeichen = True
Me.txtBemerkung.ForeColor = System.Drawing.Color.Red
Me.txtBemerkung.Location = New System.Drawing.Point(507, 179)
Me.txtBemerkung.Location = New System.Drawing.Point(468, 179)
Me.txtBemerkung.MaxLength = 50
Me.txtBemerkung.MaxLineLength = -1
Me.txtBemerkung.MaxLines_Warning = ""
Me.txtBemerkung.MaxLines_Warning_Label = Nothing
Me.txtBemerkung.Name = "txtBemerkung"
Me.txtBemerkung.Size = New System.Drawing.Size(458, 20)
Me.txtBemerkung.Size = New System.Drawing.Size(418, 20)
Me.txtBemerkung.TabIndex = 11
'
'Label14
'
Me.Label14.AutoSize = True
Me.Label14.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
Me.Label14.Location = New System.Drawing.Point(692, 112)
Me.Label14.Location = New System.Drawing.Point(645, 112)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(95, 15)
Me.Label14.TabIndex = 23
@@ -406,7 +425,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
'
Me.Label15.AutoSize = True
Me.Label15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
Me.Label15.Location = New System.Drawing.Point(863, 112)
Me.Label15.Location = New System.Drawing.Point(784, 112)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(91, 15)
Me.Label15.TabIndex = 25
@@ -427,7 +446,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.txtBerufungshoehe._Waehrung = False
Me.txtBerufungshoehe._WaehrungZeichen = True
Me.txtBerufungshoehe.ForeColor = System.Drawing.Color.Red
Me.txtBerufungshoehe.Location = New System.Drawing.Point(866, 130)
Me.txtBerufungshoehe.Location = New System.Drawing.Point(787, 130)
Me.txtBerufungshoehe.MaxLength = 10
Me.txtBerufungshoehe.MaxLineLength = -1
Me.txtBerufungshoehe.MaxLines_Warning = ""
@@ -463,7 +482,7 @@ Partial Class ustCntlUSTV_ErstattungPosition
'
Me.Label16.AutoSize = True
Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
Me.Label16.Location = New System.Drawing.Point(504, 161)
Me.Label16.Location = New System.Drawing.Point(465, 161)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(71, 15)
Me.Label16.TabIndex = 27
@@ -484,13 +503,13 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.txtBerurunfgrund._Waehrung = False
Me.txtBerurunfgrund._WaehrungZeichen = True
Me.txtBerurunfgrund.ForeColor = System.Drawing.Color.Red
Me.txtBerurunfgrund.Location = New System.Drawing.Point(695, 130)
Me.txtBerurunfgrund.Location = New System.Drawing.Point(643, 130)
Me.txtBerurunfgrund.MaxLength = 50
Me.txtBerurunfgrund.MaxLineLength = -1
Me.txtBerurunfgrund.MaxLines_Warning = ""
Me.txtBerurunfgrund.MaxLines_Warning_Label = Nothing
Me.txtBerurunfgrund.Name = "txtBerurunfgrund"
Me.txtBerurunfgrund.Size = New System.Drawing.Size(154, 20)
Me.txtBerurunfgrund.Size = New System.Drawing.Size(136, 20)
Me.txtBerurunfgrund.TabIndex = 9
'
'txtBelegDatum
@@ -531,13 +550,13 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.txtGuDatum._value = Nothing
Me.txtGuDatum._Waehrung = False
Me.txtGuDatum._WaehrungZeichen = False
Me.txtGuDatum.Location = New System.Drawing.Point(507, 49)
Me.txtGuDatum.Location = New System.Drawing.Point(468, 49)
Me.txtGuDatum.MaxLength = 22
Me.txtGuDatum.MaxLineLength = -1
Me.txtGuDatum.MaxLines_Warning = ""
Me.txtGuDatum.MaxLines_Warning_Label = Nothing
Me.txtGuDatum.Name = "txtGuDatum"
Me.txtGuDatum.Size = New System.Drawing.Size(182, 20)
Me.txtGuDatum.Size = New System.Drawing.Size(169, 20)
Me.txtGuDatum.TabIndex = 3
'
'txtUSTBetragEUR
@@ -614,14 +633,172 @@ Partial Class ustCntlUSTV_ErstattungPosition
'
'Panel1
'
Me.Panel1.Controls.Add(Me.Panel3)
Me.Panel1.Controls.Add(Me.btnBildAuf)
Me.Panel1.Controls.Add(Me.Button1)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Right
Me.Panel1.Location = New System.Drawing.Point(1201, 30)
Me.Panel1.Location = New System.Drawing.Point(945, 30)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(99, 235)
Me.Panel1.Size = New System.Drawing.Size(362, 235)
Me.Panel1.TabIndex = 2
'
'Panel3
'
Me.Panel3.Controls.Add(Me.tbcntr)
Me.Panel3.Controls.Add(Me.Panel4)
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Right
Me.Panel3.Location = New System.Drawing.Point(98, 0)
Me.Panel3.Name = "Panel3"
Me.Panel3.Size = New System.Drawing.Size(264, 235)
Me.Panel3.TabIndex = 26
Me.Panel3.Visible = False
'
'tbcntr
'
Me.tbcntr.Controls.Add(Me.tabDok)
Me.tbcntr.Controls.Add(Me.tabVZ)
Me.tbcntr.Dock = System.Windows.Forms.DockStyle.Fill
Me.tbcntr.Location = New System.Drawing.Point(0, 16)
Me.tbcntr.Name = "tbcntr"
Me.tbcntr.SelectedIndex = 0
Me.tbcntr.Size = New System.Drawing.Size(264, 219)
Me.tbcntr.TabIndex = 3
'
'tabDok
'
Me.tabDok.Controls.Add(Me.scanSonstiges)
Me.tabDok.Location = New System.Drawing.Point(4, 22)
Me.tabDok.Name = "tabDok"
Me.tabDok.Padding = New System.Windows.Forms.Padding(3)
Me.tabDok.Size = New System.Drawing.Size(256, 193)
Me.tabDok.TabIndex = 1
Me.tabDok.Text = "Bescheide/Anträge"
Me.tabDok.UseVisualStyleBackColor = True
'
'scanSonstiges
'
Me.scanSonstiges._DATENSERVER_KATEGORIE = "DOKUMENTE"
Me.scanSonstiges._DATENSERVER_ORDNER = "MDM"
Me.scanSonstiges._DATENSERVER_UOrdner1 = ""
Me.scanSonstiges._DATENSERVER_UOrdner2 = ""
Me.scanSonstiges._DATENSERVER_UOrdner3 = ""
Me.scanSonstiges._OPEN_ORIGINAL = False
Me.scanSonstiges._TYPE = "PDF"
Me.scanSonstiges.AllowDrop = True
Me.scanSonstiges.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.scanSonstiges.BackColor = System.Drawing.Color.White
Me.scanSonstiges.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.scanSonstiges.Cursor = System.Windows.Forms.Cursors.Hand
Me.scanSonstiges.Dock = System.Windows.Forms.DockStyle.Fill
Me.scanSonstiges.Location = New System.Drawing.Point(3, 3)
Me.scanSonstiges.Margin = New System.Windows.Forms.Padding(0)
Me.scanSonstiges.Name = "scanSonstiges"
Me.scanSonstiges.Size = New System.Drawing.Size(250, 187)
Me.scanSonstiges.TabIndex = 0
'
'Panel4
'
Me.Panel4.Controls.Add(Me.TabControl1)
Me.Panel4.Controls.Add(Me.scanLieferschein)
Me.Panel4.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel4.Location = New System.Drawing.Point(0, 0)
Me.Panel4.Name = "Panel4"
Me.Panel4.Size = New System.Drawing.Size(264, 16)
Me.Panel4.TabIndex = 26
'
'TabControl1
'
Me.TabControl1.Controls.Add(Me.TabPage1)
Me.TabControl1.Location = New System.Drawing.Point(39, 49)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(278, 239)
Me.TabControl1.TabIndex = 3
'
'TabPage1
'
Me.TabPage1.Controls.Add(Me.UsrcntlPDFScanList1)
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(270, 213)
Me.TabPage1.TabIndex = 1
Me.TabPage1.Text = "Dokumente"
Me.TabPage1.UseVisualStyleBackColor = True
'
'UsrcntlPDFScanList1
'
Me.UsrcntlPDFScanList1._DATENSERVER_KATEGORIE = "DOKUMENTE"
Me.UsrcntlPDFScanList1._DATENSERVER_ORDNER = "MDM"
Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner1 = ""
Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner2 = ""
Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner3 = ""
Me.UsrcntlPDFScanList1._OPEN_ORIGINAL = False
Me.UsrcntlPDFScanList1._TYPE = "PDF"
Me.UsrcntlPDFScanList1.AllowDrop = True
Me.UsrcntlPDFScanList1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.UsrcntlPDFScanList1.BackColor = System.Drawing.Color.White
Me.UsrcntlPDFScanList1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.UsrcntlPDFScanList1.Cursor = System.Windows.Forms.Cursors.Hand
Me.UsrcntlPDFScanList1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UsrcntlPDFScanList1.Location = New System.Drawing.Point(3, 3)
Me.UsrcntlPDFScanList1.Margin = New System.Windows.Forms.Padding(0)
Me.UsrcntlPDFScanList1.Name = "UsrcntlPDFScanList1"
Me.UsrcntlPDFScanList1.Size = New System.Drawing.Size(264, 207)
Me.UsrcntlPDFScanList1.TabIndex = 0
'
'scanLieferschein
'
Me.scanLieferschein._ARCHIV = True
Me.scanLieferschein._DATENSERVER_KATEGORIE = "DOKUMENTE"
Me.scanLieferschein._DATENSERVER_ORDNER = "MDM"
Me.scanLieferschein._DATENSERVER_UOrdner1 = Nothing
Me.scanLieferschein._DATENSERVER_UOrdner2 = Nothing
Me.scanLieferschein._DATENSERVER_UOrdner3 = Nothing
Me.scanLieferschein._MULTI_FILES = True
Me.scanLieferschein._TEXT_PDF = "XX Vollmacht"
Me.scanLieferschein.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.scanLieferschein.BackColor = System.Drawing.Color.White
Me.scanLieferschein.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.scanLieferschein.Cursor = System.Windows.Forms.Cursors.Default
Me.scanLieferschein.Location = New System.Drawing.Point(146, 3)
Me.scanLieferschein.Name = "scanLieferschein"
Me.scanLieferschein.Size = New System.Drawing.Size(111, 34)
Me.scanLieferschein.TabIndex = 2
Me.scanLieferschein.Visible = False
'
'scanUSTVVollmachten
'
Me.scanUSTVVollmachten._DATENSERVER_KATEGORIE = "DOKUMENTE"
Me.scanUSTVVollmachten._DATENSERVER_ORDNER = "MDM"
Me.scanUSTVVollmachten._DATENSERVER_UOrdner1 = ""
Me.scanUSTVVollmachten._DATENSERVER_UOrdner2 = ""
Me.scanUSTVVollmachten._DATENSERVER_UOrdner3 = ""
Me.scanUSTVVollmachten._OPEN_ORIGINAL = False
Me.scanUSTVVollmachten._TYPE = "PDF"
Me.scanUSTVVollmachten.AllowDrop = True
Me.scanUSTVVollmachten.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.scanUSTVVollmachten.BackColor = System.Drawing.Color.White
Me.scanUSTVVollmachten.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.scanUSTVVollmachten.Cursor = System.Windows.Forms.Cursors.Hand
Me.scanUSTVVollmachten.Dock = System.Windows.Forms.DockStyle.Fill
Me.scanUSTVVollmachten.Location = New System.Drawing.Point(3, 3)
Me.scanUSTVVollmachten.Margin = New System.Windows.Forms.Padding(0)
Me.scanUSTVVollmachten.Name = "scanUSTVVollmachten"
Me.scanUSTVVollmachten.Size = New System.Drawing.Size(250, 187)
Me.scanUSTVVollmachten.TabIndex = 1
'
'tabVZ
'
Me.tabVZ.Controls.Add(Me.scanUSTVVollmachten)
Me.tabVZ.Location = New System.Drawing.Point(4, 22)
Me.tabVZ.Name = "tabVZ"
Me.tabVZ.Padding = New System.Windows.Forms.Padding(3)
Me.tabVZ.Size = New System.Drawing.Size(256, 193)
Me.tabVZ.TabIndex = 2
Me.tabVZ.Text = "Vorauszahlungen"
Me.tabVZ.UseVisualStyleBackColor = True
'
'ustCntlUSTV_ErstattungPosition
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -630,12 +807,19 @@ Partial Class ustCntlUSTV_ErstattungPosition
Me.Controls.Add(Me.pnl)
Me.Controls.Add(Me.Panel2)
Me.Name = "ustCntlUSTV_ErstattungPosition"
Me.Size = New System.Drawing.Size(1300, 265)
Me.Size = New System.Drawing.Size(1307, 265)
Me.Panel2.ResumeLayout(False)
Me.Panel2.PerformLayout()
Me.pnl.ResumeLayout(False)
Me.pnl.PerformLayout()
Me.Panel1.ResumeLayout(False)
Me.Panel3.ResumeLayout(False)
Me.tbcntr.ResumeLayout(False)
Me.tabDok.ResumeLayout(False)
Me.Panel4.ResumeLayout(False)
Me.TabControl1.ResumeLayout(False)
Me.TabPage1.ResumeLayout(False)
Me.tabVZ.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
@@ -676,4 +860,15 @@ Partial Class ustCntlUSTV_ErstattungPosition
Friend WithEvents Label18 As Label
Friend WithEvents txtGuNr As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label19 As Label
Friend WithEvents Panel3 As Panel
Friend WithEvents tbcntr As TabControl
Friend WithEvents tabDok As TabPage
Friend WithEvents scanSonstiges As VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList
Friend WithEvents Panel4 As Panel
Friend WithEvents TabControl1 As TabControl
Friend WithEvents TabPage1 As TabPage
Friend WithEvents UsrcntlPDFScanList1 As VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList
Friend WithEvents scanLieferschein As VERAG_PROG_ALLGEMEIN.usrcntlPDFScan
Friend WithEvents tabVZ As TabPage
Friend WithEvents scanUSTVVollmachten As VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList
End Class

View File

@@ -97,13 +97,13 @@ Public Class ustCntlUSTV_ErstattungPosition
If txtUSTBetrag.Text <> "" Then
UStV_ERS.UStVEr_USteuerbetrag = txtUSTBetrag.Text.Replace(",", ".")
Else
save = False
'save = False
End If
If txtUSTBetragEUR.Text <> "" Then
UStV_ERS.UStVEr_USteuerbetragEUR = txtUSTBetragEUR.Text.Replace(",", ".")
Else
save = False
'save = False
End If
If txtGuDatum.Text <> "" Then
@@ -115,7 +115,7 @@ Public Class ustCntlUSTV_ErstattungPosition
UStV_ERS.UStVEr_Umrechnungskurs = txtUmrechnungskurs.Text.Replace(",", ".")
End If
Else
save = False
'save = False
End If
If txtGuDatum.Text <> "" Then
@@ -269,5 +269,7 @@ Public Class ustCntlUSTV_ErstattungPosition
End Sub
Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles Panel1.Paint
End Sub
End Class

View File

@@ -562,10 +562,10 @@ Public Class frmEssensbestellungenAdministration
If isReminder Then
Mail.Subject = "Essensgeld für "
DETextHTML &= "bitte diese Woche das Essensgeld " & IIf(kw <> "", "für " & kw, "") & " bezahlen.<br>"
DETextHTML &= "bitte diese Woche das Essensgeld " & IIf(kw <> "", "für " & kw, "") & " bezahlen.<br><br>"
Else
Mail.Subject = "Essensbestellung: "
DETextHTML &= "Anbei ist die Essensbestellung " & IIf(kw <> "", "für " & kw, "") & ".<br>"
DETextHTML &= "Anbei ist die Essensbestellung " & IIf(kw <> "", "für " & kw, "") & ".<br><br>"
End If
Mail.Subject &= IIf(kw <> "", kw, "") & " " & IIf(gebaeude <> "", gebaeude, "")
@@ -1124,6 +1124,10 @@ Public Class frmEssensbestellungenAdministration
Next
Dim TextHTMLtable = ""
TextHTMLtable &= "<table border=1>"
TextHTMLtable &= "<tr><td>Mitarbeiter</td><td>Betrag</td><td>Firma</td></tr>"
For Each row As DataRow In distinctDT.Rows
@@ -1137,6 +1141,14 @@ Public Class frmEssensbestellungenAdministration
If result IsNot Nothing AndAlso IsNumeric(result) Then
result = CDbl(result)
TextHTMLtable &= "<tr>"
TextHTMLtable &= "<td><b>" & mit.mit_username & "</b></td>"
TextHTMLtable &= "<td><b>" & result & "</b></td>"
TextHTMLtable &= "<td><b>" & mit.mit_firma & "</b></td>"
TextHTMLtable &= "</tr>"
Select Case mit.mit_abteilung
Case "MDM", "EDV" ' -> per Mail weil SDL keine Benachrichtigungen hat und EDV nicht ins AVISO schaut:
If mit.mit_email <> "" AndAlso Not emailEmpf.Contains(mit.mit_email) Then
@@ -1167,7 +1179,7 @@ Public Class frmEssensbestellungenAdministration
If emailEmpf <> "" Then
generateEmail(emailEmpf, kw, " - " & cboGebaeude._value, "", True)
generateEmail(emailEmpf, kw, " - " & cboGebaeude._value, TextHTMLtable, True)
End If

View File

@@ -56,6 +56,7 @@ Public Class frmdynMailvorlagen
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Sendung", "1"))
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Mahnung", "2"))
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("OP-Liste", "3"))
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("MDM-SR", "4"))
cbxTyp.changeItem("")

View File

@@ -27,7 +27,8 @@
Dim where = ""
Select Case FIRMA_TMP
Case "IMEX"
where = " WHERE [Offertenstamm].[OffertenNr] IN (1,2,3,4,5,6,7,8,9,10,26,27,29,50,51)"
' where = " WHERE [Offertenstamm].[OffertenNr] IN (1,2,3,4,5,6,7,8,9,10,26,27,29,50,51)"
where = " [Offertenstamm].[OffertenNr] IN (SELECT tblAbfertigungsartOffertenstamm.ao_OffertenNr FROM tblAbfertigungsartenFiliale inner join tblAbfertigungsartOffertenstamm on ao_Abfertigungsart=Abfertigungsart WHERE FilialenNr=5501 ) "
End Select
Dim SQLsrt = " SELECT (select case when COUNT(*)>0 then 1 else 0 end FROM Offerten where KundenNr=" & kdnr & " and [Offerten].[OffertenNr]=[Offertenstamm].[OffertenNr]) as vorhanden," &
" [Offertenstamm].[OffertenNr],[OffertenBez] FROM Offertenstamm " & where & " order by OffertenNr"

View File

@@ -1,6 +1,7 @@

Imports VERAG_PROG_ALLGEMEIN
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
Public Class usrCntlOfferte
@@ -166,8 +167,11 @@ Public Class usrCntlOfferte
cbxArchivierteOfferten.Items.Clear()
checkPermissions()
If dgvOfferteNew.RowCount > 0 Then
If dgvOfferteNew.SelectedRows.Count > 0 Then
rtbBesonderheiten.Text = cSqlDb.checkNullStr(dgvOfferteNew.SelectedRows(0).Cells("Besonderheiten").Value)
Else
rtbBesonderheiten.Text = cSqlDb.checkNullStr(dgvOfferteNew.Rows(0).Cells("Besonderheiten").Value)
End If
Else
btnStandardLaden.Visible = False
cbxArchivierteOfferten.Enabled = False
@@ -190,7 +194,7 @@ Public Class usrCntlOfferte
init(kdNr, isVerag360)
' sbLeistungAdd.initSearchBox(Me.FindForm, " [Code] ,[LeistungsNr],[LeistungsBez] FROM [Leistungen]", {"LeistungsNr", "LeistungsBez"}, " ", "LeistungsNr", "LeistungsNr", , "FMZOLL", , 400, 200)
cboLeistungenAdd.fillWithSQL("SELECT [LeistungsNr],[LeistungsBez] FROM [Leistungen] ORDER BY LeistungsNr", , "FMZOLL", True)
cboLeistungenAdd.fillWithSQL("SELECT [LeistungsNr],Replace([LeistungsBez],'P.P./', '') FROM [Leistungen] ORDER BY LeistungsNr", , "FMZOLL", True)
checkPermissions()
@@ -816,12 +820,13 @@ Public Class usrCntlOfferte
If True Then
Dim sqlKostenkalk = " Select OffertenNr, isnull(LeistungsNr,'') as LeistungsNr,isnull(LeistungsBez,'' ) as LeistungsBez,isnull(Preis,'') as Preis,isnull([Geändert am],[Eingegeben am]) as Datum
FROM [VERAG].[dbo].[Offertenpositionen] where KundenNr = " & kdNr & " and OffertenNr in (38, 1) and LeistungsNr in (340, 324, 348, 440)
order by cast([Eingegeben am] as date) desc, LeistungsNr, Preis desc"
Dim KD As New VERAG_PROG_ALLGEMEIN.cKunde(kdNr)
Dim ADR As New VERAG_PROG_ALLGEMEIN.cAdressen(kdNr)
Dim FIRMA_TMP = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale(KD.FilialenNr)
If dgvOfferteDetails.Rows.Count = 0 Then Exit Sub
Dim dtKostenkalk As DataTable = (New SQL).loadDgvBySql(sqlKostenkalk, "FMZOLL")
Dim dtKostenkalk As DataTable = cProgramFunctions.dgridViewTods(dgvOfferteDetails)
If dtKostenkalk.Rows.Count < 1 Then
MsgBox("keine Daten!")
@@ -840,15 +845,36 @@ Public Class usrCntlOfferte
Dim Blatt As Object 'Microsoft.Office.Interop.Excel.Worksheet 'As Object 'as Worksheet
exclApp = CreateObject("Excel.Application")
Dim ExcelBez = "Kostenkalkulation"
Dim offertenNr As Integer = dtKostenkalk.Rows(0).Item("OffertenNr")
If offertenNr = 26 Or offertenNr = 38 Then FIRMA_TMP = "CS"
Select Case FIRMA_TMP
Case "IMEX" : ExcelBez &= "_IMEX "
Case "VERAG" : ExcelBez &= "_AG "
Case Else : ExcelBez &= " "
End Select
With exclApp
.Visible = False
Try
Path = sPath & "Kostenkalkulation " & kdNr & " .xlsx"
Path = sPath & ExcelBez & kdNr & " .xlsx"
While System.IO.File.Exists(Path)
Path = sPath & "Kostenkalkulation " & kdNr & "_" & Now.ToString("ddMMyyyyHHmmss") & ".xlsx"
Path = sPath & ExcelBez & kdNr & "_" & Now.ToString("ddMMyyyyHHmmss") & ".xlsx"
End While
My.Computer.FileSystem.WriteAllBytes(Path, My.Resources.Kostenkalkulation, False)
Select Case FIRMA_TMP
Case "IMEX" : My.Computer.FileSystem.WriteAllBytes(Path, My.Resources.Kostenkalkulation_IMEX, False)
Case "VERAG" : My.Computer.FileSystem.WriteAllBytes(Path, My.Resources.Kostenkalkulation_AG, False)
Case Else : My.Computer.FileSystem.WriteAllBytes(Path, My.Resources.Kostenkalkulation, False)
End Select
Catch ex As System.Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Me.Cursor = Cursors.Default
@@ -859,23 +885,40 @@ Public Class usrCntlOfferte
Datei = .Workbooks.Open(Path) 'Anpassen
Blatt = Datei.Worksheets(1) 'Anpassen
Dim KD As New VERAG_PROG_ALLGEMEIN.cKunde(kdNr)
Dim ADR As New VERAG_PROG_ALLGEMEIN.cAdressen(kdNr)
Blatt.Range("B8").Value = ADR.Name_1
Blatt.Range("B9").Value = ADR.AdressenNr
Blatt.Range("H11").Value = "Tarif für " & Today().Year
Dim currentRow As Integer = 13
For Each row In dtKostenkalk.Rows
Dim dtkeineMdtKostenkalk_mitPreise As DataTable = dtKostenkalk.Select("Preis <> ''").CopyToDataTable
dtkeineMdtKostenkalk_mitPreise.Columns.Add("price_new", System.Type.GetType("System.Int32"))
Dim DatumDerZollabf As String = dtkeineMdtKostenkalk_mitPreise.Rows(0).Item("Geändert am")
If DatumDerZollabf = "" Then DatumDerZollabf = dtkeineMdtKostenkalk_mitPreise.Rows(0).Item("Eingegeben am")
If IsDate(DatumDerZollabf) Then Blatt.Range("B11").Value = "aktueller Tarif " & CDate(DatumDerZollabf).Year
For Each row In dtkeineMdtKostenkalk_mitPreise.Rows
row("price_new") = CDbl(row("Preis"))
Next
dtkeineMdtKostenkalk_mitPreise.DefaultView.Sort = "price_new desc"
dtkeineMdtKostenkalk_mitPreise = dtkeineMdtKostenkalk_mitPreise.DefaultView.ToTable
For Each row In dtkeineMdtKostenkalk_mitPreise.Rows
Blatt.Range("A" & currentRow).Value = row("LeistungsBez")
Blatt.Range("B" & currentRow).Value = row("Preis")
Blatt.Range("B" & currentRow).Value = CDbl(row("Preis"))
If IsDate(row("Datum")) Then
Select Case CDate(row("Datum")).Year
If IsDate(DatumDerZollabf) Then
Select Case CDate(DatumDerZollabf).Year
'Berechnungssätze laut Johanna Luxbauer
Case 2018 : Blatt.Range("D" & currentRow).Value = 0.3387
Case 2019 : Blatt.Range("D" & currentRow).Value = 0.3048

View File

@@ -42,6 +42,9 @@ Partial Class usrcntlKundeBearbeitenFull
Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.tbcntrDetails = New System.Windows.Forms.TabControl()
Me.tbAbfertigung = New System.Windows.Forms.TabPage()
Me.cbxVerzolltBeiExport = New System.Windows.Forms.CheckBox()
@@ -52,11 +55,9 @@ Partial Class usrcntlKundeBearbeitenFull
Me.cboFremdspedition = New System.Windows.Forms.ComboBox()
Me.cbxVerzolltBei = New System.Windows.Forms.CheckBox()
Me.cbxBesonderheitenNEU = New System.Windows.Forms.CheckBox()
Me.UsrCntlKundenBesonderheiten1 = New SDL.usrCntlKundenBesonderheiten()
Me.tbcntrAbf = New System.Windows.Forms.TabControl()
Me.TabPage4 = New System.Windows.Forms.TabPage()
Me.FlowLayoutPanel1 = New System.Windows.Forms.FlowLayoutPanel()
Me.UsrCntlKundenAvisoMailBenachrichtigung1 = New SDL.usrCntlKundenAvisoMailBenachrichtigung()
Me.rtbLKWFreigabeSenden = New System.Windows.Forms.RichTextBox()
Me.Label18 = New System.Windows.Forms.Label()
Me.TabPage3 = New System.Windows.Forms.TabPage()
@@ -70,7 +71,6 @@ Partial Class usrcntlKundeBearbeitenFull
Me.cboAbfVerb_Abfertigungsverbot = New System.Windows.Forms.CheckBox()
Me.txtAbfVerb_AbfertigungsverbotSeit = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.tbAufschub = New System.Windows.Forms.TabPage()
Me.usrCntlAufschubkonten = New SDL.usrCntlAufschubkonten()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.Label78 = New System.Windows.Forms.Label()
Me.cbxAbf_ZollVM = New System.Windows.Forms.CheckBox()
@@ -95,7 +95,6 @@ Partial Class usrcntlKundeBearbeitenFull
Me.rtbAbf_Besonderheiten = New System.Windows.Forms.RichTextBox()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.tbFiskal = New System.Windows.Forms.TabPage()
Me.UsrCntlKundeFiskaldaten1 = New SDL.usrCntlKundeFiskaldaten()
Me.tbVerrechnung = New System.Windows.Forms.TabPage()
Me.pnlverag360 = New System.Windows.Forms.Panel()
Me.txtAnmerkungAntraege = New VERAG_PROG_ALLGEMEIN.MyTextBox()
@@ -235,6 +234,8 @@ Partial Class usrcntlKundeBearbeitenFull
Me.Label22 = New System.Windows.Forms.Label()
Me.txtBank_Blz = New System.Windows.Forms.TextBox()
Me.tbUmsatzsteuer = New System.Windows.Forms.TabPage()
Me.btnMWSTspeichern = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.dgvMWST = New System.Windows.Forms.DataGridView()
Me.txtUStIDGeprueftAm = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtUStID = New System.Windows.Forms.TextBox()
Me.Button3 = New System.Windows.Forms.Button()
@@ -362,7 +363,6 @@ Partial Class usrcntlKundeBearbeitenFull
Me.tbKontakt = New System.Windows.Forms.TabControl()
Me.TabPage10 = New System.Windows.Forms.TabPage()
Me.TabPage11 = New System.Windows.Forms.TabPage()
Me.ucKundenKontakte = New SDL.usrCntlKundenKontakte()
Me.Label50 = New System.Windows.Forms.Label()
Me.Label68 = New System.Windows.Forms.Label()
Me.pnlNeukunde = New System.Windows.Forms.Panel()
@@ -388,6 +388,11 @@ Partial Class usrcntlKundeBearbeitenFull
Me.cboFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboAuswahl = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.ucKundenKontakte = New SDL.usrCntlKundenKontakte()
Me.UsrCntlKundenBesonderheiten1 = New SDL.usrCntlKundenBesonderheiten()
Me.UsrCntlKundenAvisoMailBenachrichtigung1 = New SDL.usrCntlKundenAvisoMailBenachrichtigung()
Me.usrCntlAufschubkonten = New SDL.usrCntlAufschubkonten()
Me.UsrCntlKundeFiskaldaten1 = New SDL.usrCntlKundeFiskaldaten()
Me.tbcntrDetails.SuspendLayout()
Me.tbAbfertigung.SuspendLayout()
Me.tbcntrAbf.SuspendLayout()
@@ -410,6 +415,7 @@ Partial Class usrcntlKundeBearbeitenFull
Me.GroupBox4.SuspendLayout()
CType(Me.dgvKreditkarten, System.ComponentModel.ISupportInitialize).BeginInit()
Me.tbUmsatzsteuer.SuspendLayout()
CType(Me.dgvMWST, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvUstv_LaenderUndSteuernummern, System.ComponentModel.ISupportInitialize).BeginInit()
Me.tbSonstiges.SuspendLayout()
CType(Me.dgvSonst_IDSKunden, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -571,16 +577,6 @@ Partial Class usrcntlKundeBearbeitenFull
Me.cbxBesonderheitenNEU.Text = "Besonderheiten NEU"
Me.cbxBesonderheitenNEU.UseVisualStyleBackColor = True
'
'UsrCntlKundenBesonderheiten1
'
Me.UsrCntlKundenBesonderheiten1.BackColor = System.Drawing.Color.White
Me.UsrCntlKundenBesonderheiten1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.UsrCntlKundenBesonderheiten1.Location = New System.Drawing.Point(6, 25)
Me.UsrCntlKundenBesonderheiten1.Name = "UsrCntlKundenBesonderheiten1"
Me.UsrCntlKundenBesonderheiten1.Size = New System.Drawing.Size(107, 52)
Me.UsrCntlKundenBesonderheiten1.TabIndex = 235
Me.UsrCntlKundenBesonderheiten1.Visible = False
'
'tbcntrAbf
'
Me.tbcntrAbf.Controls.Add(Me.TabPage4)
@@ -615,15 +611,6 @@ Partial Class usrcntlKundeBearbeitenFull
Me.FlowLayoutPanel1.Size = New System.Drawing.Size(200, 100)
Me.FlowLayoutPanel1.TabIndex = 7
'
'UsrCntlKundenAvisoMailBenachrichtigung1
'
Me.UsrCntlKundenAvisoMailBenachrichtigung1.AutoScroll = True
Me.UsrCntlKundenAvisoMailBenachrichtigung1.BackColor = System.Drawing.Color.White
Me.UsrCntlKundenAvisoMailBenachrichtigung1.Location = New System.Drawing.Point(0, 6)
Me.UsrCntlKundenAvisoMailBenachrichtigung1.Name = "UsrCntlKundenAvisoMailBenachrichtigung1"
Me.UsrCntlKundenAvisoMailBenachrichtigung1.Size = New System.Drawing.Size(479, 172)
Me.UsrCntlKundenAvisoMailBenachrichtigung1.TabIndex = 6
'
'rtbLKWFreigabeSenden
'
Me.rtbLKWFreigabeSenden.Location = New System.Drawing.Point(485, 33)
@@ -792,14 +779,6 @@ Partial Class usrcntlKundeBearbeitenFull
Me.tbAufschub.Text = "Aufschubkonten"
Me.tbAufschub.UseVisualStyleBackColor = True
'
'usrCntlAufschubkonten
'
Me.usrCntlAufschubkonten.Dock = System.Windows.Forms.DockStyle.Fill
Me.usrCntlAufschubkonten.Location = New System.Drawing.Point(3, 3)
Me.usrCntlAufschubkonten.Name = "usrCntlAufschubkonten"
Me.usrCntlAufschubkonten.Size = New System.Drawing.Size(652, 172)
Me.usrCntlAufschubkonten.TabIndex = 0
'
'TabPage1
'
Me.TabPage1.Controls.Add(Me.Label78)
@@ -1105,15 +1084,6 @@ Partial Class usrcntlKundeBearbeitenFull
Me.tbFiskal.Text = "Fiskal"
Me.tbFiskal.UseVisualStyleBackColor = True
'
'UsrCntlKundeFiskaldaten1
'
Me.UsrCntlKundeFiskaldaten1.BackColor = System.Drawing.Color.White
Me.UsrCntlKundeFiskaldaten1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UsrCntlKundeFiskaldaten1.Location = New System.Drawing.Point(0, 0)
Me.UsrCntlKundeFiskaldaten1.Name = "UsrCntlKundeFiskaldaten1"
Me.UsrCntlKundeFiskaldaten1.Size = New System.Drawing.Size(672, 495)
Me.UsrCntlKundeFiskaldaten1.TabIndex = 0
'
'tbVerrechnung
'
Me.tbVerrechnung.Controls.Add(Me.pnlverag360)
@@ -3345,6 +3315,8 @@ Partial Class usrcntlKundeBearbeitenFull
'
'tbUmsatzsteuer
'
Me.tbUmsatzsteuer.Controls.Add(Me.btnMWSTspeichern)
Me.tbUmsatzsteuer.Controls.Add(Me.dgvMWST)
Me.tbUmsatzsteuer.Controls.Add(Me.txtUStIDGeprueftAm)
Me.tbUmsatzsteuer.Controls.Add(Me.txtUStID)
Me.tbUmsatzsteuer.Controls.Add(Me.Button3)
@@ -3369,6 +3341,49 @@ Partial Class usrcntlKundeBearbeitenFull
Me.tbUmsatzsteuer.Text = "Umsatzsteuer"
Me.tbUmsatzsteuer.UseVisualStyleBackColor = True
'
'btnMWSTspeichern
'
Me.btnMWSTspeichern.allowBorder = False
Me.btnMWSTspeichern.Enabled = False
Me.btnMWSTspeichern.FlatAppearance.BorderSize = 0
Me.btnMWSTspeichern.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnMWSTspeichern.ForeColor = System.Drawing.Color.Black
Me.btnMWSTspeichern.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnMWSTspeichern.Location = New System.Drawing.Point(186, 458)
Me.btnMWSTspeichern.Name = "btnMWSTspeichern"
Me.btnMWSTspeichern.Size = New System.Drawing.Size(131, 23)
Me.btnMWSTspeichern.TabIndex = 17
Me.btnMWSTspeichern.Text = "Änderungen speichern"
Me.btnMWSTspeichern.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnMWSTspeichern.UseVisualStyleBackColor = True
'
'dgvMWST
'
DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvMWST.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
Me.dgvMWST.BackgroundColor = System.Drawing.Color.White
DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvMWST.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle9
Me.dgvMWST.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvMWST.DefaultCellStyle = DataGridViewCellStyle10
Me.dgvMWST.Location = New System.Drawing.Point(9, 359)
Me.dgvMWST.Name = "dgvMWST"
Me.dgvMWST.Size = New System.Drawing.Size(171, 125)
Me.dgvMWST.TabIndex = 16
'
'txtUStIDGeprueftAm
'
Me.txtUStIDGeprueftAm._DateTimeOnly = False
@@ -3430,7 +3445,7 @@ Partial Class usrcntlKundeBearbeitenFull
Me.Button11.Enabled = False
Me.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button11.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button11.Location = New System.Drawing.Point(9, 421)
Me.Button11.Location = New System.Drawing.Point(514, 359)
Me.Button11.Name = "Button11"
Me.Button11.Size = New System.Drawing.Size(152, 31)
Me.Button11.TabIndex = 14
@@ -3448,29 +3463,29 @@ Partial Class usrcntlKundeBearbeitenFull
'
'dgvUstv_LaenderUndSteuernummern
'
DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvUstv_LaenderUndSteuernummern.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvUstv_LaenderUndSteuernummern.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
Me.dgvUstv_LaenderUndSteuernummern.BackgroundColor = System.Drawing.Color.White
DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvUstv_LaenderUndSteuernummern.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle9
DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvUstv_LaenderUndSteuernummern.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle12
Me.dgvUstv_LaenderUndSteuernummern.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvUstv_LaenderUndSteuernummern.DefaultCellStyle = DataGridViewCellStyle10
DataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle13.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvUstv_LaenderUndSteuernummern.DefaultCellStyle = DataGridViewCellStyle13
Me.dgvUstv_LaenderUndSteuernummern.Location = New System.Drawing.Point(9, 94)
Me.dgvUstv_LaenderUndSteuernummern.Name = "dgvUstv_LaenderUndSteuernummern"
Me.dgvUstv_LaenderUndSteuernummern.Size = New System.Drawing.Size(657, 321)
Me.dgvUstv_LaenderUndSteuernummern.Size = New System.Drawing.Size(657, 259)
Me.dgvUstv_LaenderUndSteuernummern.TabIndex = 13
'
'Label90
@@ -3764,26 +3779,26 @@ Partial Class usrcntlKundeBearbeitenFull
'dgvSonst_IDSKunden
'
Me.dgvSonst_IDSKunden.AllowUserToResizeRows = False
DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvSonst_IDSKunden.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
DataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvSonst_IDSKunden.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14
Me.dgvSonst_IDSKunden.BackgroundColor = System.Drawing.Color.White
DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvSonst_IDSKunden.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle12
DataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvSonst_IDSKunden.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle15
Me.dgvSonst_IDSKunden.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle13.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvSonst_IDSKunden.DefaultCellStyle = DataGridViewCellStyle13
DataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvSonst_IDSKunden.DefaultCellStyle = DataGridViewCellStyle16
Me.dgvSonst_IDSKunden.Location = New System.Drawing.Point(9, 308)
Me.dgvSonst_IDSKunden.MultiSelect = False
Me.dgvSonst_IDSKunden.Name = "dgvSonst_IDSKunden"
@@ -4092,26 +4107,26 @@ Partial Class usrcntlKundeBearbeitenFull
'DataGridView1
'
Me.DataGridView1.AllowUserToResizeRows = False
DataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14
DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
Me.DataGridView1.BackgroundColor = System.Drawing.Color.White
DataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle15
DataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle18
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.DataGridView1.DefaultCellStyle = DataGridViewCellStyle16
DataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.DataGridView1.DefaultCellStyle = DataGridViewCellStyle19
Me.DataGridView1.Enabled = False
Me.DataGridView1.Location = New System.Drawing.Point(6, 111)
Me.DataGridView1.MultiSelect = False
@@ -4165,26 +4180,26 @@ Partial Class usrcntlKundeBearbeitenFull
'
Me.dgvBankverbindungen.AllowUserToDeleteRows = False
Me.dgvBankverbindungen.AllowUserToResizeRows = False
DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvBankverbindungen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
DataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvBankverbindungen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle20
Me.dgvBankverbindungen.BackgroundColor = System.Drawing.Color.White
DataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvBankverbindungen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle18
DataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle21.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvBankverbindungen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle21
Me.dgvBankverbindungen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvBankverbindungen.DefaultCellStyle = DataGridViewCellStyle19
DataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle22.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvBankverbindungen.DefaultCellStyle = DataGridViewCellStyle22
Me.dgvBankverbindungen.Location = New System.Drawing.Point(3, 40)
Me.dgvBankverbindungen.MultiSelect = False
Me.dgvBankverbindungen.Name = "dgvBankverbindungen"
@@ -5025,14 +5040,6 @@ Partial Class usrcntlKundeBearbeitenFull
Me.TabPage11.Text = "Spezifisch"
Me.TabPage11.UseVisualStyleBackColor = True
'
'ucKundenKontakte
'
Me.ucKundenKontakte.Dock = System.Windows.Forms.DockStyle.Fill
Me.ucKundenKontakte.Location = New System.Drawing.Point(3, 3)
Me.ucKundenKontakte.Name = "ucKundenKontakte"
Me.ucKundenKontakte.Size = New System.Drawing.Size(439, 169)
Me.ucKundenKontakte.TabIndex = 0
'
'Label50
'
Me.Label50.AutoSize = True
@@ -5313,6 +5320,50 @@ Partial Class usrcntlKundeBearbeitenFull
Me.DataGridViewTextBoxColumn2.HeaderText = "E-Mail"
Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2"
'
'ucKundenKontakte
'
Me.ucKundenKontakte.Dock = System.Windows.Forms.DockStyle.Fill
Me.ucKundenKontakte.Location = New System.Drawing.Point(3, 3)
Me.ucKundenKontakte.Name = "ucKundenKontakte"
Me.ucKundenKontakte.Size = New System.Drawing.Size(439, 169)
Me.ucKundenKontakte.TabIndex = 0
'
'UsrCntlKundenBesonderheiten1
'
Me.UsrCntlKundenBesonderheiten1.BackColor = System.Drawing.Color.White
Me.UsrCntlKundenBesonderheiten1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.UsrCntlKundenBesonderheiten1.Location = New System.Drawing.Point(6, 25)
Me.UsrCntlKundenBesonderheiten1.Name = "UsrCntlKundenBesonderheiten1"
Me.UsrCntlKundenBesonderheiten1.Size = New System.Drawing.Size(107, 52)
Me.UsrCntlKundenBesonderheiten1.TabIndex = 235
Me.UsrCntlKundenBesonderheiten1.Visible = False
'
'UsrCntlKundenAvisoMailBenachrichtigung1
'
Me.UsrCntlKundenAvisoMailBenachrichtigung1.AutoScroll = True
Me.UsrCntlKundenAvisoMailBenachrichtigung1.BackColor = System.Drawing.Color.White
Me.UsrCntlKundenAvisoMailBenachrichtigung1.Location = New System.Drawing.Point(0, 6)
Me.UsrCntlKundenAvisoMailBenachrichtigung1.Name = "UsrCntlKundenAvisoMailBenachrichtigung1"
Me.UsrCntlKundenAvisoMailBenachrichtigung1.Size = New System.Drawing.Size(479, 172)
Me.UsrCntlKundenAvisoMailBenachrichtigung1.TabIndex = 6
'
'usrCntlAufschubkonten
'
Me.usrCntlAufschubkonten.Dock = System.Windows.Forms.DockStyle.Fill
Me.usrCntlAufschubkonten.Location = New System.Drawing.Point(3, 3)
Me.usrCntlAufschubkonten.Name = "usrCntlAufschubkonten"
Me.usrCntlAufschubkonten.Size = New System.Drawing.Size(652, 172)
Me.usrCntlAufschubkonten.TabIndex = 0
'
'UsrCntlKundeFiskaldaten1
'
Me.UsrCntlKundeFiskaldaten1.BackColor = System.Drawing.Color.White
Me.UsrCntlKundeFiskaldaten1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UsrCntlKundeFiskaldaten1.Location = New System.Drawing.Point(0, 0)
Me.UsrCntlKundeFiskaldaten1.Name = "UsrCntlKundeFiskaldaten1"
Me.UsrCntlKundeFiskaldaten1.Size = New System.Drawing.Size(672, 495)
Me.UsrCntlKundeFiskaldaten1.TabIndex = 0
'
'usrcntlKundeBearbeitenFull
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -5384,6 +5435,7 @@ Partial Class usrcntlKundeBearbeitenFull
CType(Me.dgvKreditkarten, System.ComponentModel.ISupportInitialize).EndInit()
Me.tbUmsatzsteuer.ResumeLayout(False)
Me.tbUmsatzsteuer.PerformLayout()
CType(Me.dgvMWST, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.dgvUstv_LaenderUndSteuernummern, System.ComponentModel.ISupportInitialize).EndInit()
Me.tbSonstiges.ResumeLayout(False)
Me.tbSonstiges.PerformLayout()
@@ -5758,4 +5810,6 @@ Partial Class usrcntlKundeBearbeitenFull
Friend WithEvents txtVorauszahlung As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents cbxVorauszahlung As CheckBox
Friend WithEvents txtAnmerkungAntraege As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents dgvMWST As DataGridView
Friend WithEvents btnMWSTspeichern As VERAG_PROG_ALLGEMEIN.FlatButton
End Class

View File

@@ -981,6 +981,7 @@
Dim cBinding_dgvUStV As New cBinding("FMZOLL")
Dim cBinding_dgvSonst_IDSKunden As New cBinding("FMZOLL")
Dim cBinding_dgvBankverbindungen As New cBinding("FMZOLL")
Dim cBinding_dgvMWST As New cBinding("FMZOLL")
@@ -2053,6 +2054,57 @@
End Sub
Private Sub dgvinitMWST()
With dgvMWST
cBinding_dgvMWST.initBinding(" SELECT Id, KdNr,LandKz " &
" FROM [tblKundenMWST] " &
" WHERE KdNr = " & KUNDE.KundenNr, "tblKundenMWST")
AddHandler btnMWSTspeichern.Click,
Sub(send As Object, evnt As EventArgs)
If cBinding_dgvMWST.updateBinding() Then
send.Enabled = False
End If
End Sub
AddHandler cBinding_dgvMWST.bindingdataTable.ColumnChanged,
Sub(send As Object, evnt As EventArgs)
btnMWSTspeichern.Enabled = True
End Sub
AddHandler .UserDeletedRow,
Sub(send As Object, evnt As DataGridViewRowEventArgs)
btnMWSTspeichern.Enabled = True
End Sub
.DataSource = cBinding_dgvMWST.bindingdataTable
FUNC.dgvCellToCbo(dgvMWST, 2, "Land", "LandKz", "SELECT LandKz, LandBez FROM [Länderverzeichnis für die Außenhandelsstatistik] ORDER BY LandKz ", "FMZOLL")
.DataSource.Columns("KdNr").DefaultValue = KUNDE.KundenNr
.Columns(0).Visible = False
.Columns(1).Visible = False
.Columns(2).Width = 100
.Columns(2).HeaderText = "Land eig. MWST"
End With
End Sub
Private Sub initdgvIDSKunden()
With dgvSonst_IDSKunden
@@ -2204,6 +2256,7 @@
If tbcntrDetails.SelectedTab Is tbUmsatzsteuer Then
dgvinitLaenderUndSteuernummern()
dgvinitMWST()
End If
If tbcntrDetails.SelectedTab Is tbSonstiges Then
@@ -2241,4 +2294,6 @@
txtVorauszahlung.Enabled = cbxVorauszahlung.Checked
If Not cbxVorauszahlung.Checked Then txtVorauszahlung.Text = ""
End Sub
End Class

View File

@@ -24,6 +24,7 @@ Partial Class usrcntlFremdrechnungen
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.DetailsAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
Me.btnSDL_Alle = New System.Windows.Forms.Button()
@@ -54,6 +55,7 @@ Partial Class usrcntlFremdrechnungen
Me.Panel3 = New System.Windows.Forms.Panel()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.dgvLFRechnung = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.dgvDetails = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.Panel4 = New System.Windows.Forms.Panel()
Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
@@ -64,8 +66,10 @@ Partial Class usrcntlFremdrechnungen
Me.Panel3.SuspendLayout()
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer1.Panel1.SuspendLayout()
Me.SplitContainer1.Panel2.SuspendLayout()
Me.SplitContainer1.SuspendLayout()
CType(Me.dgvLFRechnung, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvDetails, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel4.SuspendLayout()
Me.cntxtExcel.SuspendLayout()
Me.SuspendLayout()
@@ -293,9 +297,9 @@ Partial Class usrcntlFremdrechnungen
Me.cbx.AutoSize = True
Me.cbx.Location = New System.Drawing.Point(8, 107)
Me.cbx.Name = "cbx"
Me.cbx.Size = New System.Drawing.Size(178, 17)
Me.cbx.Size = New System.Drawing.Size(169, 17)
Me.cbx.TabIndex = 52
Me.cbx.Text = "MWST-relevenate Rechnungen"
Me.cbx.Text = "Original-Rechnung an Kunden"
Me.cbx.UseVisualStyleBackColor = True
'
'Label4
@@ -388,7 +392,6 @@ Partial Class usrcntlFremdrechnungen
Me.Button4.Text = "Details" & Global.Microsoft.VisualBasic.ChrW(10) & "anzeigen"
Me.Button4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button4.UseVisualStyleBackColor = True
Me.Button4.Visible = False
'
'Button5
'
@@ -449,6 +452,10 @@ Partial Class usrcntlFremdrechnungen
'
Me.SplitContainer1.Panel1.AutoScroll = True
Me.SplitContainer1.Panel1.Controls.Add(Me.dgvLFRechnung)
'
'SplitContainer1.Panel2
'
Me.SplitContainer1.Panel2.Controls.Add(Me.dgvDetails)
Me.SplitContainer1.Panel2MinSize = 0
Me.SplitContainer1.Size = New System.Drawing.Size(1356, 799)
Me.SplitContainer1.SplitterDistance = 559
@@ -471,6 +478,23 @@ Partial Class usrcntlFremdrechnungen
Me.dgvLFRechnung.Size = New System.Drawing.Size(1354, 770)
Me.dgvLFRechnung.TabIndex = 29
'
'dgvDetails
'
Me.dgvDetails.AKTUALISIERUNGS_INTERVALL = 1000
Me.dgvDetails.AllowUserToAddRows = False
Me.dgvDetails.AllowUserToDeleteRows = False
Me.dgvDetails.AllowUserToResizeColumns = False
Me.dgvDetails.AllowUserToResizeRows = False
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvDetails.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
Me.dgvDetails.BackgroundColor = System.Drawing.Color.White
Me.dgvDetails.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvDetails.Location = New System.Drawing.Point(-1, 3)
Me.dgvDetails.Name = "dgvDetails"
Me.dgvDetails.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvDetails.Size = New System.Drawing.Size(1352, 228)
Me.dgvDetails.TabIndex = 30
'
'Panel4
'
Me.Panel4.BackColor = System.Drawing.Color.White
@@ -515,9 +539,11 @@ Partial Class usrcntlFremdrechnungen
Me.Panel1.PerformLayout()
Me.Panel3.ResumeLayout(False)
Me.SplitContainer1.Panel1.ResumeLayout(False)
Me.SplitContainer1.Panel2.ResumeLayout(False)
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer1.ResumeLayout(False)
CType(Me.dgvLFRechnung, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.dgvDetails, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel4.ResumeLayout(False)
Me.cntxtExcel.ResumeLayout(False)
Me.ResumeLayout(False)
@@ -557,4 +583,5 @@ Partial Class usrcntlFremdrechnungen
Friend WithEvents cbx As CheckBox
Friend WithEvents dat_Sum_Bis As DateTimePicker
Friend WithEvents dat_Sum_Von As DateTimePicker
Friend WithEvents dgvDetails As VERAG_PROG_ALLGEMEIN.MyDatagridview
End Class

View File

@@ -1,5 +1,6 @@
Imports System.Reflection
Imports Microsoft.Office.Interop
Imports VERAG_PROG_ALLGEMEIN
Public Class usrcntlFremdrechnungen
Dim KUNDE As New cKunden
@@ -10,9 +11,12 @@ Public Class usrcntlFremdrechnungen
Dim FUNC As New cProgramFunctions
Dim aktbtn As String = ""
Dim dgvInitWait As Boolean = False
Dim aktSDLNr As Integer = -1
Dim aktLieferant As String = "ALLE"
Dim fullyPainted = False
Dim dtkeineMWST As DataTable
Dim dtKundeMWST As DataTable
Private Sub usrCntlDaten_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -69,8 +73,13 @@ Public Class usrcntlFremdrechnungen
End If
KUNDE = kundenSQL.getKundeByKdNr(kdNr)
dtkeineMWST = (New SQL).loadDgvBySql("select Land, Erstattungsland, Lieferant from tblKeineMWSTErstattung", "FMZOLL")
SET_SDL(-1)
If KUNDE IsNot Nothing Then
dtKundeMWST = (New SQL).loadDgvBySql("select LandKz from tblKundenMWST where KdNr = " & KUNDE.KundenNr, "FMZOLL")
End If
SET_SDL("")
dgvInitWait = False
Panel3.Visible = True
@@ -195,7 +204,7 @@ Public Class usrcntlFremdrechnungen
Sub SET_SDL(SDLNrTmp)
aktSDLNr = SDLNrTmp
aktLieferant = SDLNrTmp
Dim anzahlTop = 1000
@@ -204,63 +213,63 @@ Public Class usrcntlFremdrechnungen
Select Case SDLNrTmp
'IDS
Case 100 : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
" [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer, CustomerCode as Kundennummer,[daId],[TransactionVolume] as Transaktionsmenge,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblIDSInvoicesNew WHERE [CustomerCode] in (SELECT distinct([CustomerCode]) FROM [VERAG].[dbo].[tbl_IDS_Kunden] WHERE 1 = 1 " & IIf(kdNr > 0, " AND [KdNrVERAG]=" & kdNr, "") & ") and [YearMonthDay] " & setSQLWhere(SDLNrTmp, "") & " order by [YearMonthDay] desc, [Invoicenumber]"
Case "IDS" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
" invoice_id, [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer, CustomerCode as Kundennummer,[daId],[TransactionVolume] as Transaktionsmenge,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblIDSInvoicesNew WHERE [CustomerCode] in (SELECT distinct([CustomerCode]) FROM [VERAG].[dbo].[tbl_IDS_Kunden] WHERE 1 = 1 " & IIf(kdNr > 0, " AND [KdNrVERAG]=" & kdNr, "") & ") and [YearMonthDay] " & setSQLWhere(SDLNrTmp, "") & " order by [YearMonthDay] desc, [Invoicenumber]"
'UTA
Case 212 : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
" [Rechnungsdatum],[Rechnungsnummer_pro_Lieferland] as Rechnungsnummer,Kundennummer,SUM(Gesamtbetrag_Brutto_in_Darstellwährung) as Bruttobetrag,SUM(Gesamtbetrag_Netto_in_Darstellwährung) as Nettobetrag, SUM(Gesamtbetrag_Umsatzsteuer_in_Darstellwährung) as MWSt,[daId],[Lieferland_ISO2] as Land, 'RE' as Art, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTAImportNew] inner join adressen on Kundennummer = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " AND [Rechnungsdatum] " & setSQLWhere(SDLNrTmp, "Land") & " group by [Rechnungsnummer_pro_Lieferland],[Rechnungsdatum],Kundennummer,[daId],[Lieferland_ISO2]"
Case "UTA" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
" [Rechnungsdatum],[Rechnungsnummer_pro_Lieferland] as Rechnungsnummer,Kundennummer,SUM(Gesamtbetrag_Brutto_in_Darstellwährung) as Bruttobetrag,SUM(Gesamtbetrag_Netto_in_Darstellwährung) as Nettobetrag, SUM(Gesamtbetrag_Umsatzsteuer_in_Darstellwährung) as MWSt,[daId],[Lieferland_ISO2] as Land, 'RE' as Art, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTAImportNew] inner join adressen on Kundennummer = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " AND [Rechnungsdatum] " & setSQLWhere(SDLNrTmp, "Lieferland_ISO2") & " group by [Rechnungsnummer_pro_Lieferland],[Rechnungsdatum],Kundennummer,[daId],[Lieferland_ISO2]"
SQL_STR &= " UNION ALL SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") & " [Datum], [RechnungsNr],[KundenNr],0,0,0,[daId],'',[DocumentTyp], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTADocuments] inner join adressen on KundenNr = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " and [Datum] " & setSQLWhere(SDLNrTmp, "") & " order by Rechnungsdatum desc"
SQL_STR &= " UNION ALL SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") & " [Datum], [RechnungsNr],[KundenNr],0,0,0,[daId],'',[DocumentTyp], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTADocuments] inner join adressen on KundenNr = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " and [Datum] " & setSQLWhere("_", "") & " order by Rechnungsdatum desc"
'PLOSE
Case 214 : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
Case "PLOSE" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
" [plInv_SupplierRechnungsDatum] as Rechnungsdatum, [plInv_SupplierRechnungsNr] as Rechnungsnummer,[plInv_PLOSEKundennummer] as Kundennummer,[plInv_Nettobetrag] as Nettobetrag,[plInv_MWSTBetrag] as MWST,[plInv_Bruttobetrag] as Bruttobetrag,[plInv_daId] as daId, [plInv_SupplierCountry] as Land, cast(case when [plInv_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblPLOSE_Inv_Data inner join Adressen on Adressen.PLOSEKundenNr = plInv_PLOSEKundennummer where 1 = 1 " & IIf(kdNr > 0, " AND Adressen.AdressenNr=" & kdNr, "") & " and [plInv_SupplierRechnungsDatum] " & setSQLWhere(SDLNrTmp, "plInv_SupplierCountry") & " Order by plInv_SupplierRechnungsDatum desc, [plInv_SupplierRechnungsNr]"
'MSE
Case 208 : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
Case "MSE" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
" [invoice_date] as Rechnungsdatum, [invoice_id] as Rechnungsnummer/*,[invoice_nr]*/,[customer_number] as Kundennummer, daId, [total_amount_euro] as Brutto_EUR ,[total_vat_amount_euro] as MWST,[country] as Land, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblMSEInvoices where customer_number in (select customer_id from tblMSECustomers where 1 = 1 " & IIf(kdNr > 0, " AND [partner_customer_number]=" & kdNr, "") & " and [invoice_date] " & setSQLWhere(SDLNrTmp, "country") & " ) order by invoice_date desc, invoice_id"
'VERAG
Case 502 : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
Case "VERAG" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
" tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer , tblTrdinInvoice.SteuerbetragLokal, 1 as daId, cast(1 as bit) as PDFvorhanden FROM tblTrdinInvoice WHERE 1 = 1 " & IIf(kdNr > 0, " AND tblTrdinInvoice.RechnungsKundenNr=" & kdNr, "") & " AND tblTrdinInvoice.FilialenNr = 4814 and tblTrdinInvoice.Rechnungsdatum " & setSQLWhere(SDLNrTmp, "'AT'") & " ORDER BY tblTrdinInvoice.Rechnungsdatum desc, tblTrdinInvoice.Rechnungsnummer"
'RMC
Case 999 : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
Case "RMC" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
"[rmc_reDatum] as Rechnungsdatum,[rmc_reNr] as Rechnungsnummer,rmc_kdNr as Kundennummer,[rmc_betragNetto] as Nettobetrag,[rmc_betragBrutto] as Bruttobetrag,[rmc_waehrung] as Währung ,[rmc_euroBrutto] as Brutto_EUR,[rmc_daId] as daId,[rmc_betragMWST] as MWST,rmc_landKZ as Land, cast(case when [rmc_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblRMCImport] inner join Adressen on Adressen.WölflKundenNr = rmc_kdNr where 1 = 1 " & IIf(kdNr > 0, " AND AdressenNr=" & kdNr, "") & " and [rmc_reDatum] " & setSQLWhere(SDLNrTmp, "rmc_landKZ") & " order by rmc_reDatum desc, rmc_reNr"
Case -1 : Dim anzahl As Integer = anzahlTop / 6 : SQL_STR = " select * from (SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") &
Case "ALLE" : Dim anzahl As Integer = anzahlTop / 6 : SQL_STR = " select * from (SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") &
"
--IDS
'IDS' as Lieferant, [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer,CustomerCode as Kundennummer,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt,'' as Land, 'RE' as Art,[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblIDSInvoicesNew WHERE [CustomerCode] = (SELECT TOP 1 [CustomerCode] FROM [VERAG].[dbo].[tbl_IDS_Kunden] WHERE 1 = 1 " & IIf(kdNr > 0, " AND [KdNrVERAG]=" & kdNr, "") & " ORDER BY Zeitstempel DESC) and [YearMonthDay] " & setSQLWhere(SDLNrTmp, "") & " order by [YearMonthDay], [Invoicenumber]
'IDS' as Lieferant,invoice_id, [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer,CustomerCode as Kundennummer,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt,'' as Land, 'RE' as Art,[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblIDSInvoicesNew WHERE [CustomerCode] = (SELECT TOP 1 [CustomerCode] FROM [VERAG].[dbo].[tbl_IDS_Kunden] WHERE 1 = 1 " & IIf(kdNr > 0, " AND [KdNrVERAG]=" & kdNr, "") & " ORDER BY Zeitstempel DESC) and [YearMonthDay] " & setSQLWhere("IDS", "") & " order by [YearMonthDay], [Invoicenumber]
UNION ALL
--MSE
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'MSE' as Lieferant, [invoice_date] as Rechnungsdatum, cast([invoice_id] as nvarchar) as Rechnungsnummer,[customer_number] as Kundennummer, [total_amount_euro] as Bruttobetrag ,(total_amount_euro - [total_vat_amount_euro]) as Nettobetrag ,[total_vat_amount_euro] as MWST,[country] as Land,'RE' as Art,daId, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblMSEInvoices where customer_number = (select top 1 customer_id from tblMSECustomers where 1 = 1 " & IIf(kdNr > 0, " AND [partner_customer_number]=" & kdNr, "") & " and [invoice_date] " & setSQLWhere(SDLNrTmp, "country") & " ) order by invoice_date, invoice_id
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'MSE' as Lieferant,-1 as invoice_id, [invoice_date] as Rechnungsdatum, cast([invoice_id] as nvarchar) as Rechnungsnummer,[customer_number] as Kundennummer, [total_amount_euro] as Bruttobetrag ,(total_amount_euro - [total_vat_amount_euro]) as Nettobetrag ,[total_vat_amount_euro] as MWST,[country] as Land,'RE' as Art,daId, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblMSEInvoices where customer_number = (select top 1 customer_id from tblMSECustomers where 1 = 1 " & IIf(kdNr > 0, " AND [partner_customer_number]=" & kdNr, "") & " and [invoice_date] " & setSQLWhere("MSE", "country") & " ) order by invoice_date, invoice_id
UNION ALL
--UTA
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'UTA' as Lieferant, [Rechnungsdatum],STR([Rechnungsnummer_pro_Lieferland]) as Rechnungsnummer,Kundennummer,SUM(Gesamtbetrag_Brutto_in_Darstellwährung) as Bruttobetrag,SUM(Gesamtbetrag_Netto_in_Darstellwährung) as Nettobetrag, SUM(Gesamtbetrag_Umsatzsteuer_in_Darstellwährung) as MWSt,[Lieferland_ISO2] as Land, 'RE' as Art,[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTAImportNew] inner join adressen on Kundennummer = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " and [Rechnungsdatum] " & setSQLWhere(SDLNrTmp, "Lieferland_ISO2") & " group by [Rechnungsnummer_pro_Lieferland],[Rechnungsdatum],Kundennummer,[daId],[Lieferland_ISO2] UNION ALL SELECT 'UTA', [Datum], cast([RechnungsNr] as nvarchar) ,[KundenNr],0,0,0,'',[DocumentTyp],[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTADocuments] inner join adressen on KundenNr = UTAKundenNr where AdressenNr = " & kdNr & " AND Datum " & setSQLWhere(SDLNrTmp, "") & " --order by Rechnungsnummer desc
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'UTA' as Lieferant,-1 as invoice_id, [Rechnungsdatum],STR([Rechnungsnummer_pro_Lieferland]) as Rechnungsnummer,Kundennummer,SUM(Gesamtbetrag_Brutto_in_Darstellwährung) as Bruttobetrag,SUM(Gesamtbetrag_Netto_in_Darstellwährung) as Nettobetrag, SUM(Gesamtbetrag_Umsatzsteuer_in_Darstellwährung) as MWSt,[Lieferland_ISO2] as Land, 'RE' as Art,[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTAImportNew] inner join adressen on Kundennummer = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " and [Rechnungsdatum] " & setSQLWhere("UTA", "Lieferland_ISO2") & " group by [Rechnungsnummer_pro_Lieferland],[Rechnungsdatum],Kundennummer,[daId],[Lieferland_ISO2] UNION ALL SELECT 'UTA',-1, [Datum], cast([RechnungsNr] as nvarchar) ,[KundenNr],0,0,0,'',[DocumentTyp],[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTADocuments] inner join adressen on KundenNr = UTAKundenNr where AdressenNr = " & kdNr & " AND Datum " & setSQLWhere("UTA_", "") & " --order by Rechnungsnummer desc
UNION ALL
--VERAG
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'VERAG' as Lieferant, tblTrdinInvoice.Rechnungsdatum, cast(tblTrdinInvoice.Rechnungsnummer as nvarchar) as Rechnungsnummer ,tblTrdinInvoice.KundenNrZentrale as Kundennummer, tblTrdinInvoice.SteuerpflichtigerBetragLokal + tblTrdinInvoice.SteuerfreierBetragLokal as Bruttobetrag ,tblTrdinInvoice.SteuerpflichtigerBetragLokal + tblTrdinInvoice.SteuerfreierBetragLokal - tblTrdinInvoice.SteuerbetragLokal as Nettobetrag ,tblTrdinInvoice.SteuerbetragLokal as MWST, 'AT' as Land, 'RE' as Art, 1 as daId, cast(1 as bit) PDFvorhanden FROM tblTrdinInvoice WHERE 1 = 1 " & IIf(kdNr > 0, " AND tblTrdinInvoice.RechnungsKundenNr=" & kdNr, "") & " and tblTrdinInvoice.Rechnungsdatum " & setSQLWhere(SDLNrTmp, "'AT'") & " AND tblTrdinInvoice.FilialenNr = 4814 ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'VERAG' as Lieferant,-1 as invoice_id, tblTrdinInvoice.Rechnungsdatum, cast(tblTrdinInvoice.Rechnungsnummer as nvarchar) as Rechnungsnummer ,tblTrdinInvoice.KundenNrZentrale as Kundennummer, tblTrdinInvoice.SteuerpflichtigerBetragLokal + tblTrdinInvoice.SteuerfreierBetragLokal as Bruttobetrag ,tblTrdinInvoice.SteuerpflichtigerBetragLokal + tblTrdinInvoice.SteuerfreierBetragLokal - tblTrdinInvoice.SteuerbetragLokal as Nettobetrag ,tblTrdinInvoice.SteuerbetragLokal as MWST, 'AT' as Land, 'RE' as Art, 1 as daId, cast(1 as bit) PDFvorhanden FROM tblTrdinInvoice WHERE 1 = 1 " & IIf(kdNr > 0, " AND tblTrdinInvoice.RechnungsKundenNr=" & kdNr, "") & " and tblTrdinInvoice.Rechnungsdatum " & setSQLWhere("VERAG", "'AT'") & " AND tblTrdinInvoice.FilialenNr = 4814 ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer
UNION ALL
--PLOSE
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'PLOSE' as Lieferant, [plInv_SupplierRechnungsDatum] as Rechnungsdatum, cast([plInv_SupplierRechnungsNr] as nvarchar) as Rechnungsnummer,[plInv_PLOSEKundennummer] as Kundennummer,[plInv_Bruttobetrag] as Bruttobetrag,[plInv_Nettobetrag] as Nettobetrag,[plInv_MWSTBetrag] as MWST, [plInv_SupplierCountry] as Land, 'RE' as Art,[plInv_daId] as daId, cast(case when [plInv_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblPLOSE_Inv_Data inner join Adressen on Adressen.PLOSEKundenNr = plInv_PLOSEKundennummer where 1 = 1 " & IIf(kdNr > 0, " AND Adressen.AdressenNr=" & kdNr, "") & " and [plInv_SupplierRechnungsDatum] " & setSQLWhere(SDLNrTmp, "plInv_SupplierCountry") & " Order by plInv_SupplierRechnungsDatum desc, [plInv_SupplierRechnungsNr]
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'PLOSE' as Lieferant,-1 as invoice_id, [plInv_SupplierRechnungsDatum] as Rechnungsdatum, cast([plInv_SupplierRechnungsNr] as nvarchar) as Rechnungsnummer,[plInv_PLOSEKundennummer] as Kundennummer,[plInv_Bruttobetrag] as Bruttobetrag,[plInv_Nettobetrag] as Nettobetrag,[plInv_MWSTBetrag] as MWST, [plInv_SupplierCountry] as Land, 'RE' as Art,[plInv_daId] as daId, cast(case when [plInv_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblPLOSE_Inv_Data inner join Adressen on Adressen.PLOSEKundenNr = plInv_PLOSEKundennummer where 1 = 1 " & IIf(kdNr > 0, " AND Adressen.AdressenNr=" & kdNr, "") & " and [plInv_SupplierRechnungsDatum] " & setSQLWhere("PLOSE", "plInv_SupplierCountry") & " Order by plInv_SupplierRechnungsDatum desc, [plInv_SupplierRechnungsNr]
UNION ALL
--RMC
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'RMC' as Lieferant, [rmc_reDatum] as Rechnungsdatum,cast([rmc_reNr] as nvarchar) as Rechnungsnummer,rmc_kdNr as Kundennummer ,[rmc_betragBrutto] as Bruttobetrag,[rmc_betragNetto] as Nettobetrag,[rmc_betragMWST] as MWST, rmc_landKZ as Land, 'RE' as Art, [rmc_daId] as daId, cast(case when [rmc_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblRMCImport] inner join Adressen on Adressen.WölflKundenNr = rmc_kdNr where 1 = 1 " & IIf(kdNr > 0, " AND AdressenNr=" & kdNr, "") & " and [rmc_reDatum] " & setSQLWhere(SDLNrTmp, "rmc_landKZ") & " order by rmc_reDatum, rmc_reNr
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'RMC' as Lieferant,-1 as invoice_id, [rmc_reDatum] as Rechnungsdatum,cast([rmc_reNr] as nvarchar) as Rechnungsnummer,rmc_kdNr as Kundennummer ,[rmc_betragBrutto] as Bruttobetrag,[rmc_betragNetto] as Nettobetrag,[rmc_betragMWST] as MWST, rmc_landKZ as Land, 'RE' as Art, [rmc_daId] as daId, cast(case when [rmc_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblRMCImport] inner join Adressen on Adressen.WölflKundenNr = rmc_kdNr where 1 = 1 " & IIf(kdNr > 0, " AND AdressenNr=" & kdNr, "") & " and [rmc_reDatum] " & setSQLWhere("RMC", "rmc_landKZ") & " order by rmc_reDatum, rmc_reNr
) as temp where 1=1 and temp.Rechnungsdatum" & setSQLWhere(SDLNrTmp, "temp.Land", True) & " order by Rechnungsdatum desc"
) as temp where 1=1 and temp.Rechnungsdatum" & setSQLWhere(SDLNrTmp, "temp.Land") & " order by Rechnungsdatum desc"
@@ -296,7 +305,12 @@ Public Class usrcntlFremdrechnungen
End If
If .Columns.Contains("invoice_id") Then
.Columns("invoice_id").Visible = False
End If
End If
End With
@@ -305,39 +319,82 @@ Public Class usrcntlFremdrechnungen
dgvLFRechnung.Width = 100
dgvLFRechnung.Height = 100
dgvLFRechnung.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
'dgvLFRechnung.Rows(0).Frozen = True
initDGVWidth() 'vor Filter, damit richtige Größe
setPDFImages()
End Sub
Private Function setSQLWhere(SDLNrTmp As Integer, land As String, Optional alle As Boolean = False) As String
Private Function setSQLWhere(aktLieferant As String, land As String) As String
Dim SQLWhere = " between '" & dat_Sum_Von.Value.ToShortDateString & "' and '" & dat_Sum_Bis.Value.ToShortDateString & "'"
If cbx.Checked AndAlso SDLNrTmp <> 100 AndAlso KUNDE IsNot Nothing Then
If cbx.Checked AndAlso aktLieferant <> "IDS" AndAlso KUNDE IsNot Nothing Then
Dim erw As New cKundenErweitert(KUNDE.KundenNr)
If erw.kde_keineMWSt Then Return SQLWhere
SQLWhere &= "AND ("
'ORIGINAL-RECHNUNG senden wenn:
'1. wenn die Rechnung in dem Land in dem er ansässig ist ausgestellt wurde (rumän. Kunde Rechnung ausgestellt in Rumänien = z.B. IDS in RO getankt…)
If land <> "" Then SQLWhere &= " AND " & land & " not in ('" & KUNDE.LandKz & "')"
'2. wenn die Rechnung die Summe NULL aufweist
Dim landKZiso2 = ""
If land <> "" Then 'LandKZ vom Kunden muss auf ISO2 konvertiert werden, weil da ein Misch-Masch in der Datenbank herrscht!
If KUNDE.LandKz <> "" Then
If KUNDE.LandKz.Length = 2 Then
landKZiso2 = KUNDE.LandKz
ElseIf KUNDE.LandKz.Length = 3 Then
landKZiso2 = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getISO2LandFromISO3Land(KUNDE.LandKz)
ElseIf KUNDE.LandKz.Length = 1 Then
landKZiso2 = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getISO2LandFromISO1Land(KUNDE.LandKz)
End If
SQLWhere &= " " & land & " in ('" & landKZiso2 & "')"
End If
End If
'2. wenn die Rechnung die MWST-SUMME 0 aufweist!!!
Select Case aktLieferant
Case "UTA" : SQLWhere &= " OR Gesamtbetrag_Umsatzsteuer_in_Darstellwährung = 0 " 'UTA bei UTA auch EPN ausblenden!
Case "PLOSE" : SQLWhere &= " OR plInv_MWSTBetrag = 0" 'PLOSE
Case "VERAG" : SQLWhere &= " OR tblTrdinInvoice.SteuerbetragLokal = 0" 'VERAG
Case "MSE" : SQLWhere &= " OR total_vat_amount_euro = 0" 'MSE
Case "RMC" : SQLWhere &= " OR rmc_betragMWST = 0" 'RMC
Case "ALLE" : SQLWhere &= " OR temp.MWSt = 0" 'ALLE
Case "UTA_" : SQLWhere &= " 1 <> 1"
Case Else : SQLWhere &= " 1 <> 1"
Select Case SDLNrTmp
Case 212 And Not alle : SQLWhere &= " AND Gesamtbetrag_Brutto_in_Darstellwährung <> 0" 'UTA
Case 214 And Not alle : SQLWhere &= " AND plInv_Bruttobetrag <> 0" 'PLOSE
Case 502 And Not alle : SQLWhere &= " AND (tblTrdinInvoice.SteuerpflichtigerBetragLokal + tblTrdinInvoice.SteuerfreierBetragLokal) <> 0" 'VERAG
Case 208 And Not alle : SQLWhere &= " AND total_amount_euro <> 0" 'MSE
Case 999 And Not alle : SQLWhere &= " AND rmc_betragBrutto <> 0" 'RMC
Case -1 And alle : SQLWhere &= " AND temp.Nettobetrag <> 0" 'ALLE
End Select
'3. Rechnungen der Länder in denen der Kunde keine MWST erstattet bekommt
If land <> "" AndAlso dtkeineMWST.Rows.Count > 0 Then
Dim dtkeineMWST_ohneContraint As DataTable = dtkeineMWST.Select("Lieferant <> 'IDS' AND Land = '" & landKZiso2 & "'").CopyToDataTable
Dim counter = 0
Dim landBez As String = ""
For Each row As DataRow In dtkeineMWST_ohneContraint.Rows
landBez &= "'" & row.Item("Erstattungsland") & "'"
counter = counter + 1
If (dtkeineMWST_ohneContraint.Rows.Count <> 0 And counter <> dtkeineMWST_ohneContraint.Rows.Count) Then landBez &= ","
Next
SQLWhere &= " OR " & land & " in (" & landBez & ")"
If aktLieferant = "ALLE" Then SQLWhere &= " OR " & land & " in ('')" 'damit IDS ohne Land nicht ausgeschlossen wird.
End If
'4. Rechnungen der Länder, in denen der Kunde selber MWST beantragt
If land <> "" AndAlso dtKundeMWST.Rows.Count > 0 Then
Dim counter = 0
Dim landBez As String = ""
For Each row As DataRow In dtKundeMWST.Rows
landBez &= "'" & row.Item("LandKz") & "'"
counter = counter + 1
If (dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count) Then landBez &= ","
Next
SQLWhere &= " OR " & land & " in (" & landBez & ")"
End If
SQLWhere &= ")"
'nicht NOTWENDIG!
@@ -353,68 +410,134 @@ Public Class usrcntlFremdrechnungen
End Function
Private Function setSQLDetailWhere(aktLieferant As String, land As String, Optional alle As Boolean = False) As String
Dim SQLWhere = ""
If cbx.Checked AndAlso KUNDE IsNot Nothing Then
Dim erw As New cKundenErweitert(KUNDE.KundenNr)
If erw.kde_keineMWSt Then Return SQLWhere
SQLWhere &= "AND ("
'ORIGINAL-RECHNUNG senden wenn:
'1. wenn die Rechnung in dem Land in dem er ansässig ist ausgestellt wurde (rumän. Kunde Rechnung ausgestellt in Rumänien = z.B. IDS in RO getankt…)
Dim landKZiso2 = ""
If KUNDE.LandKz <> "" Then
If KUNDE.LandKz.Length = 2 Then
landKZiso2 = KUNDE.LandKz
ElseIf KUNDE.LandKz.Length = 3 Then
landKZiso2 = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getISO2LandFromISO3Land(KUNDE.LandKz)
ElseIf KUNDE.LandKz.Length = 1 Then
landKZiso2 = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getISO2LandFromISO1Land(KUNDE.LandKz)
End If
If land <> "" Then SQLWhere &= " " & land & " in ('" & landKZiso2 & "')"
End If
'2. wenn die Rechnung die Summe NULL aufweist
Select Case aktLieferant
Case "IDS" : If Not alle Then SQLWhere &= " OR [AmminclVAT] = 0" 'IDS
End Select
'3. Rechnungen der Länder in denen der Kunde keine MWST erstattet bekommt (auch nicht auf Diesel -> IDS)
If land <> "" AndAlso dtkeineMWST.Rows.Count > 0 Then
Dim dtkeineMWST_IDS As DataTable = dtkeineMWST.Select("Lieferant = '' AND Land = '" & landKZiso2 & "'").CopyToDataTable
Dim counter = 0
Dim landBez As String = ""
For Each row As DataRow In dtkeineMWST_IDS.Rows
landBez &= "'" & row.Item("Erstattungsland") & "'"
counter = counter + 1
If (dtkeineMWST_IDS.Rows.Count <> 0 And counter <> dtkeineMWST_IDS.Rows.Count) Then landBez &= ","
Next
SQLWhere &= " OR " & land & " in (" & landBez & ")"
End If
'4. Rechnungen der Länder, in denen der Kunde selber MWST beantragt
If land <> "" AndAlso dtKundeMWST.Rows.Count > 0 Then
Dim counter = 0
Dim landBez As String = ""
For Each row As DataRow In dtKundeMWST.Rows
landBez &= "'" & row.Item("LandKz") & "'"
counter = counter + 1
If (dtKundeMWST.Rows.Count <> 0 And counter <> dtKundeMWST.Rows.Count) Then landBez &= ","
Next
SQLWhere &= " OR " & land & " in (" & landBez & ")"
End If
SQLWhere &= ")"
End If
Return SQLWhere
End Function
Function getSDLNrButton(SDLNrTmp) As Object
Select Case SDLNrTmp
Case 100 : Return btnSDL_IDS
Case 212 : Return btnSDL_UTA
Case 213 : Return btnSDL_Hugo
Case 214 : Return btnSDL_PLOSE
Case 208 : Return btnSDL_MautMSE
Case 207 : Return btnSDL_FREJUS
Case 502 : Return btnVERAGCardNew
Case 999 : Return btnSDL_RMC
Case "IDS" : Return btnSDL_IDS
Case "UTA" : Return btnSDL_UTA
Case "HUGO" : Return btnSDL_Hugo
Case "PLOSE" : Return btnSDL_PLOSE
Case "MSE" : Return btnSDL_MautMSE
Case "FREJUS" : Return btnSDL_FREJUS
Case "VERAG" : Return btnVERAGCardNew
Case "RMC" : Return btnSDL_RMC
Case Else : Return btnSDL_Alle
End Select
End Function
Private Sub btnSDL_Alle_Click(sender As Object, e As EventArgs) Handles btnSDL_Alle.Click
SET_SDL(-1)
SET_SDL("ALLE")
End Sub
Private Sub btnSDL_IDS_Click(sender As Object, e As EventArgs) Handles btnSDL_IDS.Click
SET_SDL(100)
SET_SDL("IDS")
End Sub
Private Sub btnSDL_UTA_Click(sender As Object, e As EventArgs) Handles btnSDL_UTA.Click
SET_SDL(212)
SET_SDL("UTA")
End Sub
Private Sub btnSDL_Hugo_Click(sender As Object, e As EventArgs) Handles btnSDL_Hugo.Click
SET_SDL(213)
SET_SDL("HUGO")
End Sub
Private Sub btnSDL_PLOSE_Click(sender As Object, e As EventArgs) Handles btnSDL_PLOSE.Click
SET_SDL(214)
SET_SDL("PLOSE")
End Sub
Private Sub btnSDL_MautMSE_Click(sender As Object, e As EventArgs) Handles btnSDL_MautMSE.Click
SET_SDL(208)
SET_SDL("MSE")
End Sub
Private Sub btnSDL_MotorWay_Click(sender As Object, e As EventArgs)
SET_SDL(205)
SET_SDL("MW")
End Sub
Private Sub btnSDL_FREJUS_Click(sender As Object, e As EventArgs) Handles btnSDL_FREJUS.Click
SET_SDL(207)
SET_SDL("FREJUS")
End Sub
Private Sub btnVERAGCardNew_Click(sender As Object, e As EventArgs) Handles btnVERAGCardNew.Click
SET_SDL(502)
SET_SDL("VERAG")
End Sub
Private Sub btnSDL_RMC_Click(sender As Object, e As EventArgs) Handles btnSDL_RMC.Click
SET_SDL(999)
SET_SDL("RMC")
End Sub
Sub newBinding(sdlNr As Integer, ByVal sql As String)
Sub newBinding(aktLieferant As String, ByVal sql As String)
dgvInitWait = True
' bindingSDL = Nothing
dgvLFRechnung.Columns.Clear()
@@ -429,7 +552,7 @@ Public Class usrcntlFremdrechnungen
dgvLFRechnung.LOAD()
lblEinträge.Text = dgvLFRechnung.RowCount & " Einträge"
If dgvLFRechnung.RowCount >= 200 Then lblEinträge.Text = dgvLFRechnung.RowCount & " Einträge " & IIf(cbxMax1000Eintrage.Checked, "(Anzeige auf 200 beschränkt)", "")
If dgvLFRechnung.RowCount >= 200 Then lblEinträge.Text = dgvLFRechnung.RowCount & " Einträge " & IIf(cbxMax1000Eintrage.Checked, "(Anzeige auf 1000 beschränkt)", "")
dgvInitWait = False
@@ -460,11 +583,11 @@ Public Class usrcntlFremdrechnungen
End Sub
Sub reClick()
getSDLNrButton(aktSDLNr).PerformClick()
getSDLNrButton(aktLieferant).PerformClick()
End Sub
Sub refreshDgv(kdNr, SDLNr, Optional Kfz = "", Optional History = "")
SET_SDL(aktSDLNr)
SET_SDL(aktLieferant)
dgvLFRechnung.ClearSelection()
If Kfz <> "" And History <> "" Then
@@ -505,7 +628,7 @@ Public Class usrcntlFremdrechnungen
End If
End Sub
Private Sub dgvSDL_SelectionChanged(sender As Object, e As EventArgs) Handles dgvLFRechnung.Click
'ReloadLeistung()
ReloadRechnungsdetails()
End Sub
@@ -517,7 +640,7 @@ Public Class usrcntlFremdrechnungen
Dim TextHTMLtable = ""
TextHTMLtable &= "<table border=1>"
TextHTMLtable &= "<tr><td>Lieferant</td><td>Land</td><td>Datum</td></tr>"
TextHTMLtable &= "<tr><td>Supplier</td><td>Country</td><td>Date</td></tr>"
Dim pdflist As New List(Of String)
For Each row In dgvLFRechnung.SelectedRows
@@ -528,15 +651,7 @@ Public Class usrcntlFremdrechnungen
If dgvLFRechnung.Columns.Contains("Lieferant") Then
Lieferant = row.Cells("Lieferant").Value
Else
Select Case aktSDLNr
Case 100 : Lieferant = "IDS"
Case 212 : Lieferant = "UTA"
Case 214 : Lieferant = "PLOSE"
Case 208 : Lieferant = "MSE"
Case 502 : Lieferant = "VERAG"
Case 999 : Lieferant = "RMC"
End Select
Lieferant = aktLieferant
End If
If Lieferant = "VERAG" Then
@@ -550,22 +665,53 @@ Public Class usrcntlFremdrechnungen
' cFakturierung.doRechnungsDruck_SRorER(da_id,, False, 3)
'End If
Else
'
If Lieferant = "IDS" Then
Dim dt As New DataTable
dt = initDGVRechnungsdetails(row.Cells("invoice_id").value, True)
For Each r As DataRow In dt.Rows
TextHTMLtable &= "<tr>"
TextHTMLtable &= "<td><b>" & IIf(dgvLFRechnung.Columns.Contains("Lieferant"), row.Cells("Lieferant").Value, Lieferant) & "</b></td>"
TextHTMLtable &= "<td><b>" & row.Cells("Land").Value & "</b></td>"
TextHTMLtable &= "<td><b>" & row.Cells("Rechnungsdatum").Value & "</b></td>"
TextHTMLtable &= "<td><b>" & Lieferant & "</b></td>"
TextHTMLtable &= "<td><b>" & r.Item("Land") & "</b></td>"
TextHTMLtable &= "<td><b>" & r.Item("Rechnungsdatum") & "</b></td>"
TextHTMLtable &= "</tr>"
Dim daId = row.Cells("daId").Value
Dim daId As Integer = IIf(IsDBNull(r.Item("daId")), -1, r.Item("daId"))
If daId > 0 Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(daId)
pdflist.Add(DS.GET_TOP1_PATH())
End If
Next
Else
TextHTMLtable &= "<tr>"
TextHTMLtable &= "<td><b>" & Lieferant & "</b></td>"
TextHTMLtable &= "<td><b>" & row.Cells("Land").Value & "</b></td>"
TextHTMLtable &= "<td><b>" & row.Cells("Rechnungsdatum").Value & "</b></td>"
TextHTMLtable &= "</tr>"
Dim daId As Integer = IIf(IsDBNull(row.Cells("daId").Value), -1, row.Cells("daId").Value)
If daId > 0 Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(daId)
pdflist.Add(DS.GET_TOP1_PATH())
End If
End If
End If
Next
@@ -689,7 +835,7 @@ Public Class usrcntlFremdrechnungen
Private Sub Button1_Click_2(sender As Object, e As EventArgs) Handles Button1.Click
SET_SDL(aktSDLNr)
SET_SDL(aktLieferant)
End Sub
@@ -717,8 +863,8 @@ Public Class usrcntlFremdrechnungen
Try
If e.RowIndex >= 0 AndAlso e.ColumnIndex >= 0 Then
Select Case aktSDLNr
Case 502 'VERAG
Select Case aktLieferant
Case "VERAG"
Dim ReDat = dgvLFRechnung.Rows(e.RowIndex).Cells("Rechnungsdatum").Value
Dim ReNr = dgvLFRechnung.Rows(e.RowIndex).Cells("Rechnungsnummer").Value
@@ -728,7 +874,7 @@ Public Class usrcntlFremdrechnungen
cFakturierung.doRechnungsDruck_SRorER(da_id,, False, 3)
End If
Case -1 'ALLE
Case "ALLE"
Dim Lieferant = dgvLFRechnung.Rows(e.RowIndex).Cells("Lieferant").Value
If Lieferant = "VERAG" Then
@@ -780,11 +926,11 @@ Public Class usrcntlFremdrechnungen
End Sub
Private Sub dat_Sum_Von_Leave(sender As Object, e As EventArgs) Handles dat_Sum_Von.Leave, dat_Sum_Bis.Leave
SET_SDL(aktSDLNr)
SET_SDL(aktLieferant)
End Sub
Private Sub cbx_CheckedChanged(sender As Object, e As EventArgs) Handles cbx.CheckedChanged
SET_SDL(aktSDLNr)
SET_SDL(aktLieferant)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs)
@@ -857,4 +1003,117 @@ Public Class usrcntlFremdrechnungen
End With
End Sub
Sub ReloadRechnungsdetails()
' MsgBox(dgvInitWait)
If Not dgvInitWait Then
Try
If dgvLFRechnung.SelectedRows.Count > 0 AndAlso (aktLieferant = "IDS" Or aktLieferant = "ALLE") Then
dgvDetails.Visible = True
If Not SplitContainer1.Panel2Collapsed Then
Select Case aktLieferant
Case "IDS" : initDGVRechnungsdetails(dgvLFRechnung.SelectedRows(0).Cells("invoice_id").Value)
Case "ALLE" : If dgvLFRechnung.Columns.Contains("Lieferant") AndAlso dgvLFRechnung.SelectedRows(0).Cells("Lieferant").Value = "IDS" Then initDGVRechnungsdetails(dgvLFRechnung.SelectedRows(0).Cells("invoice_id").Value)
End Select
Else
dgvDetails.Visible = False
End If
End If
Catch ex As Exception
'Neuer eintrag
MsgBox(ex.Message & ex.StackTrace)
End Try
End If
End Sub
Private Function initDGVRechnungsdetails(rechnugnsID As Integer, Optional setDatatable As Boolean = False) As DataTable
Dim sql = " select [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer, CustomerCode as Kundennummer,[daId],[TransactionVolume] as Transaktionsmenge,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt,
cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden,[Country] as Land
FROM [VERAG].[dbo].[tblIDSInvoicesNewSplittedByCountry] WHERE [TotalInvoiceId] = " & rechnugnsID & setSQLDetailWhere(aktLieferant, "Country")
If setDatatable Then
Dim dtRechnugnsdet As DataTable = (New SQL).loadDgvBySql(sql, "FMZOLL")
Return dtRechnugnsdet
End If
With dgvDetails
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
.SET_SQL(sql, "FMZOLL")
.LOAD()
.ClearSelection()
Dim c As New DataGridViewImageColumn
c.Name = "PDF" : c.HeaderText = "PDF"
c.DefaultCellStyle.NullValue = Nothing
c.ImageLayout = DataGridViewImageCellLayout.Zoom
c.Width = 40
c.DefaultCellStyle.Padding = New Padding(2)
c.DefaultCellStyle.BackColor = Color.White
c.Image = My.Resources.pdf_gray
If Not .Columns.Contains("PDF") Then .Columns.Add(c)
If .Columns.Count > 0 Then
For Each r As DataGridViewRow In .Rows
If IsDBNull(r.Cells("daId").Value) OrElse r.Cells("daId").Value = 0 Then
DirectCast(r.Cells("PDF"), DataGridViewImageCell).Value = My.Resources.pdf_gray
End If
If .Columns.Contains("daId") Then
If .Columns("daId") IsNot Nothing Then .Columns("daId").Visible = False
End If
Next
End If
End With
End Function
Private Sub dgvDetails_CellContentDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvDetails.CellContentDoubleClick
Try
If e.RowIndex >= 0 AndAlso e.ColumnIndex >= 0 Then
Dim daId = dgvDetails.Rows(e.RowIndex).Cells("daId").Value
If daId > 0 Then
Me.Cursor = Cursors.WaitCursor
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(daId)
DS.OPEN_SINGLE()
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Me.Cursor = Cursors.Default
End Try
Me.Cursor = Cursors.Default
End Sub
End Class

View File

@@ -173,6 +173,32 @@ Public Class usrcntlFakturierung
End If
'es sollen alle RE der letzen 3 Monate gesetzt werden (warum, weil das schon immer so war....)
'ok = SQL.doSQL("update [Rechnungsausgang] set Sachbearbeiter='" & Sachbearbeiter & "' where Sammelrechnung=6 and Firma_ID=19 and Abfertigungsdatum = '" & dtRechnungsdatum.Value & "'", "FMZOLL")
ok = SQL.doSQL("update [Rechnungsausgang] set Sachbearbeiter='" & Sachbearbeiter & "' where Firma_ID = 19 And Sammelrechnung = 6 And Abfertigungsdatum > DateAdd(Month, -3, GETDATE())", "FMZOLL")
showPic(ok, PictureBox1)
If Not ok Then Exit Sub
Dim rechnungenMitAbwAbfDat As Integer = CInt((New SQL).getValueTxtBySqlVarList("SELECT COUNT(*) FROM Rechnungsausgang
WHERE [Status] = 0 AND [Sammelrechnung] = 6 AND UPPER([Sachbearbeiter]) = '" & Sachbearbeiter & "' AND ([SteuerpflichtigerGesamtbetrag] <> 0 OR [SteuerfreierGesamtbetrag] <> 0) AND cast(Abfertigungsdatum as Date) <> '" & rechnungsdatum & "'", "FMZOLL",, 0))
If rechnungenMitAbwAbfDat > 0 Then
Dim res As MsgBoxResult
res = MsgBox("Es gibt noch " & rechnungenMitAbwAbfDat & " Rechnungen mit abweichenden Abfertigungsdatum (Abfertigungsdatum ist nicht " & rechnungsdatum & ")" & vbNewLine & "Möchten Sie fortfahren (Abfertigungsdatum wird autoamtisch auf " & rechnungsdatum & " gesetzt) ?", vbYesNoCancel)
Select Case res
Case MsgBoxResult.Yes : SQL.doSQL("update [Rechnungsausgang] set Abfertigungsdatum = '" & rechnungsdatum & "' WHERE [Status] = 0 AND [Sammelrechnung] = 6 AND UPPER([Sachbearbeiter]) = '" & Sachbearbeiter & "' AND ([SteuerpflichtigerGesamtbetrag] <> 0 OR [SteuerfreierGesamtbetrag] <> 0) AND cast(Abfertigungsdatum as Date) <> '" & rechnungsdatum & "'", "FMZOLL")
Case MsgBoxResult.No
Case MsgBoxResult.Cancel : Exit Sub
End Select
End If
Dim rechnungenMitGesamtmautanhantCSV As String = (New SQL).getValueTxtBySqlVarList("SELECT COUNT(*) FROM Rechnungsausgang
inner join RechnungsausgangAnhaenge on Rechnungsausgang.RK_ID = RechnungsausgangAnhaenge.RK_ID
@@ -200,25 +226,6 @@ Public Class usrcntlFakturierung
End If
'es sollen alle RE der letzen 3 Monate gesetzt werden (warum, weil das schon immer so war....)
'ok = SQL.doSQL("update [Rechnungsausgang] set Sachbearbeiter='" & Sachbearbeiter & "' where Sammelrechnung=6 and Firma_ID=19 and Abfertigungsdatum = '" & dtRechnungsdatum.Value & "'", "FMZOLL")
ok = SQL.doSQL("update [Rechnungsausgang] set Sachbearbeiter='" & Sachbearbeiter & "' where Firma_ID = 19 And Sammelrechnung = 6 And Abfertigungsdatum > DateAdd(Month, -3, GETDATE())", "FMZOLL")
showPic(ok, PictureBox1)
If Not ok Then Exit Sub
Dim rechnungenMitAbwAbfDat As Integer = CInt((New SQL).getValueTxtBySqlVarList("SELECT COUNT(*) FROM Rechnungsausgang
WHERE [Status] = 0 AND [Sammelrechnung] = 6 AND UPPER([Sachbearbeiter]) = '" & Sachbearbeiter & "' AND ([SteuerpflichtigerGesamtbetrag] <> 0 OR [SteuerfreierGesamtbetrag] <> 0) AND cast(Abfertigungsdatum as Date) <> '" & rechnungsdatum & "'", "FMZOLL",, 0))
If rechnungenMitAbwAbfDat > 0 Then
If Not vbYes = MsgBox("Es gibt noch " & rechnungenMitAbwAbfDat & " Rechnungen mit abweichenden Abfertigungsdatum (Abfertigungsdatum ist nicht " & rechnungsdatum & ")" & vbNewLine & "Möchten Sie trotzdem fortfahren?", vbYesNoCancel) Then Exit Sub
End If
Dim dtREGU As DataTable = SQL.loadDgvBySql("SELECT [Firma_ID], [Status], [Sammelrechnung], [Sachbearbeiter], [RechnungsKundenNr], [Währungscode], isnull([Steuersatz %],0) as [Steuersatz %], cast([Lastschrift] as bit) as Lastschrift, Sum([SteuerpflichtigerGesamtbetrag]+[SteuerfreierGesamtbetrag]) AS Sammelrechnungsbetrag
FROM Rechnungsausgang
WHERE [Status] = 0 AND [Sammelrechnung] = 6 AND UPPER([Sachbearbeiter]) = '" & Sachbearbeiter & "' AND ([SteuerpflichtigerGesamtbetrag] <> 0 OR [SteuerfreierGesamtbetrag] <> 0) AND cast(Abfertigungsdatum as Date) = '" & rechnungsdatum & "'
@@ -791,6 +798,7 @@ Public Class usrcntlFakturierung
Dim KundenNr = FileCSV.Name.ToString.Substring(0, 6)
If IsNumeric(KundenNr) Then
Dim RK_ID As Integer = dtSammelRechnugen.AsEnumerable().Where(Function(r) r.Field(Of Integer)("RechnungsKundenNr") = KundenNr).Select(Function(r) r.Field(Of Integer)("RK_ID")).FirstOrDefault()
If RK_ID > 0 Then
Dim RECHNUNG As New cRechnungsausgang(RK_ID)
attachmentIsSet = AddAttachementToRE(FileCSV.FullName, KundenNr, RECHNUNG, rechnungsdatum)
If attachmentIsSet Then counterCSV = counterCSV + 1
@@ -798,6 +806,8 @@ Public Class usrcntlFakturierung
End If
End If
ElseIf f.Contains("_Maut.pdf") Then
Dim FilePDF = New FileInfo(f)
@@ -805,10 +815,13 @@ Public Class usrcntlFakturierung
Dim KundenNr = FilePDF.Name.ToString.Substring(0, 6)
If IsNumeric(KundenNr) Then
Dim RK_ID As Integer = dtSammelRechnugen.AsEnumerable().Where(Function(r) r.Field(Of Integer)("RechnungsKundenNr") = CInt(KundenNr)).Select(Function(r) r.Field(Of Integer)("RK_ID")).FirstOrDefault()
If RK_ID > 0 Then
Dim RECHNUNG As New cRechnungsausgang(RK_ID)
attachmentIsSet = AddAttachementToRE(FilePDF.FullName, KundenNr, RECHNUNG, rechnungsdatum)
If attachmentIsSet Then counterPDF = counterPDF + 1
End If
End If
End If
End If
Next

View File

@@ -158,6 +158,7 @@ Public Class usrcntlPDFScanList
Private Sub DateiHochladenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem2.Click
If DS.uploadDataToDATENSERVERFileDialog_MULTI(, , , _TYPE) Then
initPdf()
RaiseEvent FileAdded(DS.da_id, DS.GET_TOP1_PATH, DS.da_name)
End If
'If DS.uploadDataToDATENSERVERFileDialog(, ".pdf", , "PDF") <> "" Then
' If DS.DATA_LIST.LIST.Count > 0 Then
@@ -376,7 +377,6 @@ Public Class usrcntlPDFScanList
ElseIf files.Count > 0 Then
If files(0) <> "" Then
Dim fio As New System.IO.FileInfo(files(0))
If DS.uploadDataToDATENSERVER(files(0), fio.Name, ".pdf") Then
RaiseEvent FileAdded(DS.da_id, DS.GET_TOP1_PATH, DS.da_name)
MsgBox("Dokument wurde hochgeladen.")

View File

@@ -301,6 +301,7 @@ Public Class cUStVPositionen
Property UStVPo_Sachbearbeiter As Object = Nothing ' NVARCHAR(15) NULL,
Property UStVPo_Zeitstempel As Object = Nothing ' DATETIME Default (getdate()) NULL,
Property UStVPo_daId As Object = Nothing
Property UStVPo_daId_loeschbar As Object = Nothing
Dim SQL As New SQL
@@ -399,6 +400,7 @@ Public Class cUStVPositionen
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_Sachbearbeiter", UStVPo_Sachbearbeiter))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_Zeitstempel", UStVPo_Zeitstempel))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_daId", UStVPo_daId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_daId_loeschbar", UStVPo_daId_loeschbar))
Return list
End Function
@@ -455,6 +457,7 @@ Public Class cUStVErstattungPositionen
Property UStVEr_USteuerbetragEUR As Object = Nothing
Property UStVEr_Sachbearbeiter As Object = Nothing
Property UStVEr_Zeitstempel As Object = Nothing
Property UStVEr_daId As Object = Nothing
Dim SQL As New SQL
@@ -477,6 +480,7 @@ Public Class cUStVErstattungPositionen
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVEr_USteuerbetragEUR", UStVEr_USteuerbetragEUR))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVEr_Sachbearbeiter", UStVEr_Sachbearbeiter))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVEr_Zeitstempel", UStVEr_Zeitstempel))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVEr_daId", UStVEr_daId))
Return list
End Function

View File

@@ -664,6 +664,173 @@ End Class
Public Class cIDSInvoiceSplittedByCountry
Property invoice_id As Integer
Property YearMonthDay As Object = Nothing
Property CustomerCode As Object = Nothing
Property TotalInvoiceId As Object = Nothing
Property Country As Object = Nothing
Property Invoicenumber As Object = Nothing
Property DocumentName As Object = Nothing
Property Zeitstempel As Object = Nothing
Property daid As Object = Nothing
Property archiv As Boolean
Property archiviertDatum As Object = Nothing
Public hasEntry = False
Dim SQL As New SQL
Sub New()
End Sub
Sub New(invoice_id)
Me.invoice_id = invoice_id
LOADID()
End Sub
Sub New(YearMonthDay, CustomerCode, Invoicenumber, Country)
Me.YearMonthDay = YearMonthDay
Me.Invoicenumber = Invoicenumber
Me.CustomerCode = CustomerCode
Me.Country = Country
LOAD()
End Sub
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("invoice_id", invoice_id,, True))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("YearMonthDay", YearMonthDay))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("TotalInvoiceId", TotalInvoiceId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("CustomerCode", CustomerCode))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Invoicenumber", Invoicenumber))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("DocumentName", DocumentName))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Country", Country))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Zeitstempel", Zeitstempel))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("daid", daid))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("archiv", archiv))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("archiviertDatum", archiviertDatum))
Return list
End Function
Public Function SAVE() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblIDSInvoicesNewSplittedByCountry WHERE YearMonthDay=@YearMonthDay AND CustomerCode=@CustomerCode AND Invoicenumber=@Invoicenumber AND Country=@Country) " &
" BEGIN " & getUpdateCmd() & " END " &
" Else " &
" BEGIN " & getInsertCmd() & " END " &
" commit tran "
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
End Function
Public Sub LOADID()
Try
hasEntry = False
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM tblIDSInvoicesNewSplittedByCountry WHERE invoice_id=@invoice_id ", conn)
cmd.Parameters.AddWithValue("@invoice_id", invoice_id)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each li In getParameterList()
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
If dr.Item(li.Text) Is DBNull.Value Then
propInfo.SetValue(Me, Nothing)
Else
propInfo.SetValue(Me, dr.Item(li.Text))
End If
Next
hasEntry = True
End If
dr.Close()
End Using
End Using
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Public Sub LOAD()
Try
hasEntry = False
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM tblIDSInvoicesNewSplittedByCountry WHERE YearMonthDay=@YearMonthDay AND CustomerCode=@CustomerCode AND Invoicenumber=@Invoicenumber AND Country=@Country", conn)
cmd.Parameters.AddWithValue("@YearMonthDay", YearMonthDay)
cmd.Parameters.AddWithValue("@Invoicenumber", Invoicenumber)
cmd.Parameters.AddWithValue("@CustomerCode", CustomerCode)
cmd.Parameters.AddWithValue("@Country", Country)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each li In getParameterList()
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
If dr.Item(li.Text) Is DBNull.Value Then
propInfo.SetValue(Me, Nothing)
Else
propInfo.SetValue(Me, dr.Item(li.Text))
End If
Next
hasEntry = True
End If
dr.Close()
End Using
End Using
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Public Function getUpdateCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [tblIDSInvoicesNewSplittedByCountry] SET " & str & " WHERE YearMonthDay=@YearMonthDay AND CustomerCode=@CustomerCode AND Invoicenumber=@Invoicenumber AND Country=@Country")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
Public Function getInsertCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
Dim values As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
values = values.Substring(0, values.Length - 1) 'wg. ','
Return (" INSERT INTO tblIDSInvoicesNewSplittedByCountry (" & str & ") VALUES(" & values & ") ")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
End Class

View File

@@ -240,6 +240,7 @@ Public Class cUTA
Property daId As Object
Property charged As Boolean = False
Property chargedDatetime As Object = Nothing
Property daIdgesetztDatum As Object = Nothing
Public hasEntry = False
@@ -345,6 +346,7 @@ Public Class cUTA
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("daId", daId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("charged", charged))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chargedDatetime", chargedDatetime))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("daIdgesetztDatum", daIdgesetztDatum))
Return list
End Function

View File

@@ -4,6 +4,7 @@ Imports System.Globalization
Imports System.Net
Imports io.konik.zugferd.entity
Imports System.Data.SqlClient
Imports System.Windows.Forms
' Definieren der Klasse, um die Daten zu repräsentieren
Public Class cTariffKN8
@@ -91,4 +92,114 @@ Public Class cTariffKN8_Interface
End Try
Return False
End Function
Public Shared Function UPDATE_KN8_DESTAT()
' URL zur Datei
Dim fileUrl As String = "https://www.destatis.de/DE/Methoden/Klassifikationen/Aussenhandel/sova-leitdatei.html"
'--> Manuell laden
Try
Dim openFileDialog As New OpenFileDialog()
openFileDialog.Title = "Wähle eine Textdatei"
openFileDialog.Filter = "Textdateien (*.txt)|*.txt|Alle Dateien (*.*)|*.*"
If openFileDialog.ShowDialog() = DialogResult.OK Then
Dim filePath As String = openFileDialog.FileName
If File.Exists(filePath) Then
Dim lines() As String = File.ReadAllLines(filePath)
' Verbindung zur Datenbank öffnen
Using connection As New SqlConnection(VERAG_PROG_ALLGEMEIN.SQL.GetFMZOLLConnectionString)
connection.Open()
Using command As New SqlCommand("DELETE tblEZTKN8_DE ", connection)
command.ExecuteNonQuery()
End Using
For Each line As String In lines
' Sicherstellen, dass die Zeile nicht leer ist
If Not String.IsNullOrWhiteSpace(line) Then
' Annahme: Der Code besteht aus den ersten 8 Zeichen, danach folgt die Beschreibung
Dim code As String = line.Substring(0, 8).Trim()
Dim description As String = line.Substring(9).Trim()
Using command As New SqlCommand("INSERT INTO tblEZTKN8_DE (code, description) VALUES (@code, @description )", connection)
command.Parameters.AddWithValue("@code", code.Trim().Replace("""", ""))
command.Parameters.AddWithValue("@description", description.Trim().Replace("""", ""))
command.ExecuteNonQuery()
End Using
' Entferne unnötige Leerzeichen aus der Beschreibung
description = System.Text.RegularExpressions.Regex.Replace(description, "\s{2,}", " ")
Console.WriteLine($"Code: {code}, Beschreibung: {description}")
End If
Next
End Using
Else
Console.WriteLine("Datei nicht gefunden!")
End If
End If
' WebClient verwenden, um die Datei direkt herunterzuladen
Using client As New WebClient()
Dim fileContent As String = client.DownloadString(fileUrl)
' Datei-Inhalt in Zeilen aufteilen
Dim lines As String() = fileContent.Split(New String() {Environment.NewLine}, StringSplitOptions.None)
' Verbindung zur Datenbank öffnen
Using connection As New SqlConnection(VERAG_PROG_ALLGEMEIN.SQL.GetFMZOLLConnectionString)
connection.Open()
Using command As New SqlCommand("DELETE tblEZTKN8_DE ", connection)
command.ExecuteNonQuery()
End Using
' Zeilen durchlaufen, Kopfzeile überspringen
For i As Integer = 1 To lines.Length - 1
Dim line As String = lines(i).Trim()
' Überspringen leerer Zeilen
If String.IsNullOrEmpty(line) Then Continue For
' Spalten trennen (Semikolon als Trennzeichen)
Dim columns As String() = line.Split(";")
' Sicherstellen, dass genügend Spalten vorhanden sind
If columns.Length >= 4 Then
' Daten in die Datenbank einfügen
Using command As New SqlCommand("INSERT INTO tblEZTKN8_DE (Ebene, EDV_Code, Code, Kurztitel) VALUES (@Spalte1, @Spalte2, @Spalte3, @Spalte4)", connection)
command.Parameters.AddWithValue("@Spalte1", columns(0).Trim().Replace("""", ""))
command.Parameters.AddWithValue("@Spalte2", columns(1).Trim().Replace("""", ""))
command.Parameters.AddWithValue("@Spalte3", columns(2).Trim().Replace("""", ""))
command.Parameters.AddWithValue("@Spalte4", columns(3).Trim().Replace("""", ""))
command.ExecuteNonQuery()
End Using
End If
Next
End Using
End Using
Return True
Console.WriteLine("Daten erfolgreich in die Datenbank geladen.")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
End Class

View File

@@ -553,6 +553,12 @@ BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, [Control], New Object(
End Function
Shared Function getISO2LandFromISO1Land(Iso1Land As String)
Dim sqlstr = "SELECT TOP 1 isnull([Länderverzeichnis für die Außenhandelsstatistik].LandKz,'') AS LandKzISO2 FROM [Länderverzeichnis für die Außenhandelsstatistik] LEFT JOIN Währungstabelle ON [Länderverzeichnis für die Außenhandelsstatistik].LandNr = Währungstabelle.Währungsschlüssel WHERE Währungstabelle.LandKz='" & Iso1Land & "' "
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Return SQL.getValueTxtBySql(sqlstr, "FMZOLL")
End Function
Shared Function getISO1Land(LandKz As String)
Dim sqlstr = "SELECT TOP 1 isnull(Währungstabelle.LandKz,'') AS LandKzISO1 FROM [Länderverzeichnis für die Außenhandelsstatistik] LEFT JOIN Währungstabelle ON [Länderverzeichnis für die Außenhandelsstatistik].LandNr = Währungstabelle.Währungsschlüssel WHERE [Länderverzeichnis für die Außenhandelsstatistik].LandKz='" & LandKz & "' "
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL