diff --git a/SDL/Classes/cRKSV.vb b/SDL/Classes/cRKSV.vb index fddb9da6..15e165eb 100644 --- a/SDL/Classes/cRKSV.vb +++ b/SDL/Classes/cRKSV.vb @@ -1,6 +1,12 @@ -Imports SDL.RKSVServer -Imports System.Drawing.Printing +Imports System.Drawing.Printing +Imports com.sun.xml.internal.rngom.digested +Imports com.sun.xml.internal.ws.api.pipe +Imports com.sun.xml.internal.xsom.impl.WildcardImpl Imports GrapeCity.ActiveReports +Imports GrapeCity.DataVisualization.TypeScript +Imports GrapeCity.Documents.DX.DirectWrite +Imports SDL.RKSVServer +Imports sun.security.provider.certpath Imports VERAG_PROG_ALLGEMEIN.DSFinVKService Imports VERAG_PROG_ALLGEMEIN.TESTJSON @@ -2372,11 +2378,11 @@ Public Class cRKSV ' Buchung im EABeleg eintragen. '################ - 'If BelegSofortInFIBUverbuchten AndAlso BELEG.Beleg_TYP = "L" Then - ' Dim stapelbuchung As Boolean = True - ' 'createSyskaBuchung(RKSV_id, BELEG, stapelbuchung, KBEntry_List, KBEntryGB_List, KBEntryST_List) + If BelegSofortInFIBUverbuchten AndAlso BELEG.Beleg_TYP = "L" Then + Dim stapelbuchung As Boolean = False + 'createSyskaBuchung(RKSV_id, BELEG, stapelbuchung, KBEntry_List, KBEntryGB_List, KBEntryST_List) - 'End If + End If BELEG.gebucht = True BELEG.SAVE() @@ -2406,245 +2412,1055 @@ Public Class cRKSV Private Shared Function createSyskaBuchung(RKSV_id As Integer, beleg As EABeleg, Stapelbuchung As Boolean, KBEntry_list As List(Of cKassenbuch), KBEntryGB_list As List(Of cKassenbuch), KBEntryST_list As List(Of cKassenbuch)) As Boolean - Dim mandant As Integer = 7 'ATILLA - Dim Buchungstext As String = beleg.LKW_Kennzeichen + "_" + beleg.Frachtführer + "_" + beleg.Fahrer + "_" + beleg.Passnummer - Dim BuchungstextBemerkung As String = "" - If Buchungstext.ToString.Length > 48 Then - BuchungstextBemerkung = Buchungstext.Substring(49, Buchungstext.ToString.Length - 48) - Buchungstext = Buchungstext.Substring(0, 48) + If Not Stapelbuchung Then + + If beleg.Beleg_TYP = "L" Then + + + Dim VERAG_SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Dim MANDANT As Integer = 9 'ATILLA = 7 ' TEST = 9 + Dim Kassenkonto As Integer = 2700 + Dim BelegBuchungsKreis As String = "KE" + + Dim JAHR As Integer = Now.Year + Dim PERIODE As Integer = Now.Month + Dim BETRAG As Double = 0 + Dim TYP As String = "EINZAHLUNG" + + Dim Kontonummer As Integer = 0 + Dim Sollkonto As Integer = 0 + Dim Habenkonto As Integer = 0 + Dim Personenkonto As Integer = 0 + Dim kontenzaehler As Integer = 0 + + Dim Bestandskonto As Integer = 0 + Dim Erlöskonto As Integer = 0 + + If beleg.KundenNr > 0 Then + Habenkonto = beleg.KundenNr + Kontonummer = beleg.KundenNr + End If + + Personenkonto = Habenkonto '/* die ersten 2 Kontovoraussetzungen schaffen */ + + Dim dt_Verbuchungskonten As New DataTable + dt_Verbuchungskonten.Columns.Add("Nr", GetType(Integer)) + dt_Verbuchungskonten.Columns.Add("Konto", GetType(Integer)) + dt_Verbuchungskonten.Columns.Add("Soll", GetType(Double)) + dt_Verbuchungskonten.Columns.Add("Haben", GetType(Double)) + + 'ist immer nur 1 POSITION!!!!! + + For Each r In KBEntry_list + BETRAG = r.Betrag + Next + + 'Bestandkonto und Erlöskonto immer fix! + Dim Forderungskonto As String = VERAG_SQL.getValueTxtBySqlVarList("SELECT i_fordkto FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = " & beleg.KundenNr & " AND [FIBU2].dbo.fibu_konto.i_firm_refid = " & MANDANT, "FIBU",, "2000") + + For Each r In KBEntryGB_list + + Dim R1 As DataRow = dt_Verbuchungskonten.NewRow + R1("Nr") = 1 + R1("Konto") = Personenkonto + R1("Soll") = 0 + R1("Haben") = 0 + dt_Verbuchungskonten.Rows.Add(R1) + kontenzaehler += 1 + + Dim R2 As DataRow = dt_Verbuchungskonten.NewRow + R2("Nr") = kontenzaehler + R2("Konto") = Forderungskonto + R2("Soll") = 0 + R2("Haben") = 0 + dt_Verbuchungskonten.Rows.Add(R2) + kontenzaehler += 1 + + Dim R3 As DataRow = dt_Verbuchungskonten.NewRow + R3("Nr") = 1 + R3("Konto") = r.Konto + R3("Soll") = r.Soll + R3("Haben") = r.Haben + dt_Verbuchungskonten.Rows.Add(R3) + kontenzaehler += 1 + + If r.Buchungstext = "AUSZAHLUNG" Then + BelegBuchungsKreis = "KA" + TYP = r.Buchungstext + Else + TYP = r.Buchungstext + BelegBuchungsKreis = "KE" + End If + + Dim R4 As DataRow = dt_Verbuchungskonten.NewRow + R4("Nr") = kontenzaehler + R4("Konto") = Kassenkonto + R4("Soll") = r.Haben + R4("Haben") = r.Soll + dt_Verbuchungskonten.Rows.Add(R4) + kontenzaehler += 1 + + Next + + Dim Buchungstext As String = BelegBuchungsKreis & "_" & beleg.AbfertigungsNr & "_" & beleg.LKW_Kennzeichen & "_" & beleg.Frachtführer & "_" & beleg.Fahrer & "_" & beleg.Passnummer + Dim BuchungstextBemerkung As String = "" + If Buchungstext IsNot Nothing AndAlso Buchungstext.Length > 48 Then + BuchungstextBemerkung = Buchungstext.Substring(48) + Buchungstext = Buchungstext.Substring(0, 48) + End If + + + + Dim dt_Sollkonto As DataTable = VERAG_SQL.loadDgvBySql("SELECT top(1) isnull([FIBU2].dbo.fibu_konto.c_kontoart,'LE'), isnull([FIBU2].dbo.fibu_konto.i_kennung,0) FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = " & Sollkonto & " AND [FIBU2].dbo.fibu_konto.i_firm_refid = " & MANDANT, "FIBU") + If dt_Sollkonto.Rows.Count > 0 Then + Sollkonto = dt_Sollkonto.Rows(0).Item("i_kennung") + End If + Dim dt_Habenkonto As DataTable = VERAG_SQL.loadDgvBySql("SELECT TOP(1) isnull([FIBU2].dbo.fibu_konto.c_kontoart,'LE'), isnull([FIBU2].dbo.fibu_konto.i_kennung,0) FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = " & Habenkonto & " AND [FIBU2].dbo.fibu_konto.i_firm_refid = " & MANDANT, "FIBU") + If dt_Habenkonto.Rows.Count > 0 Then + Habenkonto = dt_Habenkonto.Rows(0).Item("i_kennung") + End If + 'STAPEL NICHT NOTWENDIG + Dim StapelAZK As String = VERAG_SQL.getValueTxtBySqlVarList("SELECT [FIBU2].dbo.fibu_stapelart.i_stapel_refid FROM [FIBU2].dbo.fibu_stapelart WHERE [FIBU2].dbo.fibu_stapelart.c_stapelname LIKE 'Auszahlungskasse 1' AND [FIBU2].dbo.fibu_stapelart.i_firm_refid = " & MANDANT, "FIBU",, "") + Dim Zaehler1 As String = VERAG_SQL.getValueTxtBySqlVarList("SELECT COUNT([FIBU2].dbo.fibu_stapel.i_lfdnr) FROM [FIBU2].dbo.fibu_stapel WHERE ISNULL([FIBU2].dbo.fibu_stapel.si_pruef, 0) > 0", "FIBU",, "0") + + If CInt(Zaehler1) > 0 Then + StapelAZK = VERAG_SQL.getValueTxtBySqlVarList("SELECT [FIBU2].dbo.fibu_stapelart.i_stapel_refid FROM [FIBU2].dbo.fibu_stapelart WHERE [FIBU2].dbo.fibu_stapelart.c_stapelname LIKE 'Auszahlungskasse 2' AND [FIBU2].dbo.fibu_stapelart.i_firm_refid = " & MANDANT, "FIBU",, "") + End If + Dim ZSBuchnr As String = "" + If StapelAZK <> "" Then ZSBuchnr = VERAG_SQL.getValueTxtBySqlVarList("SELECT MAX([FIBU2].dbo.fibu_stapel.i_lfdnr)+1 FROM [FIBU2].dbo.fibu_stapel WHERE [FIBU2].dbo.fibu_stapel.i_firm_refid = " & MANDANT & " AND [FIBU2].dbo.fibu_stapel.i_stapel_refid = " & StapelAZK, "FIBU",, "0") + Dim ZSBuchnrINT As Integer + If ZSBuchnr = "" Or ZSBuchnr = "0" Then + ZSBuchnrINT = 1 + Else + ZSBuchnrINT = CInt(ZSBuchnr) + End If + + If StapelAZK = "" Then StapelAZK = "0000" + + Dim timestamp As String = Now.ToString("dd HH:mm:ss") + Dim ProtokollID As String = StapelAZK.ToString() & "-" & ZSBuchnrINT.ToString("0000") & "-" & JAHR & "-" & PERIODE.ToString("N2") & "-" & timestamp + + Dim pruef As Integer = 0 + Dim ZSzeilenr As Integer = 0 + Dim Belegart As Integer = 1 + Dim Splitart As Integer = 0 + + '1. Belegssalden anlegen, falls nicht vorhanden! - erste Schleife (Schleifen1rec) + For Each konto As DataRow In dt_Verbuchungskonten.Rows + erstelleEBSalden(MANDANT, JAHR, konto.Item("Konto")) + Next + + Dim i_beleg_refid As String = (New VERAG_PROG_ALLGEMEIN.SQL).getValueTxtBySqlVarList("SELECT [FIBU2].dbo.fibu_nummern.i_nummer_refid + 1 From [FIBU2].dbo.fibu_nummern Where [FIBU2].dbo.fibu_nummern.i_firm_refid = " & MANDANT & " And [FIBU2].dbo.fibu_nummern.c_nummernart Like 'Buchungsnummer' ", "FIBU",, "0") + Dim Buchungstyp = "g" + Dim i_op_refid = "" + + If i_beleg_refid <> "" AndAlso IsNumeric(i_beleg_refid) Then + + i_op_refid = i_beleg_refid + + If BETRAG <> 0 AndAlso TYP = "EINZAHLUNG" Then + + VERAG_SQL.doSQL("UPDATE [FIBU2].dbo.fibu_nummern SET [FIBU2].dbo.fibu_nummern.i_nummer_refid = " & i_beleg_refid & " WHERE [FIBU2].dbo.fibu_nummern.i_firm_refid = " & MANDANT & " And [FIBU2].dbo.fibu_nummern.c_nummernart Like 'Buchungsnummer'", "FIBU") + + End If + + End If + + insertBelegskopf(MANDANT, JAHR, 1, i_beleg_refid, beleg.BelegDat.ToShortDateString, beleg.BelegNr, Belegart, Buchungstext, BETRAG, "EUR", Now().ToShortTimeString, "AUTO", ProtokollID) + + Dim ckennsoll2 = "KO" ' erste Buchungszeile + Dim SollHabenKZ = "S" + Dim sollkonto2 As Integer = 0 + Dim Habenkonto2 As Integer = 0 + + Dim SollSumme As Double = 0 + + Dim dec_sollsumme As Double = 0 + Dim dec_habensumme As Double = 0 + + ZSzeilenr += 1 + + If TYP = "EINZAHLUNG" Then + + If BETRAG <> 0 Then + + sollkonto2 = Bestandskonto + Habenkonto2 = Kontonummer '/* gilt für den ersten Datensatz der ersten Buchungszeile pro Artikel */ + + + Dim rows() As DataRow = dt_Verbuchungskonten.Select("Konto = '" & sollkonto2 & "'") + If rows.Length > 0 Then + Dim row As DataRow = rows(0) + If Not IsDBNull(row("Soll")) Then + dec_sollsumme = Convert.ToDecimal(row("Soll")) + End If + row("Soll") = dec_sollsumme + BETRAG + + End If + + End If + + + + ElseIf TYP = "AUSZAHLUNG" Then + + If BETRAG <> 0 Then + + sollkonto2 = Erlöskonto + Habenkonto2 = 0 + dec_sollsumme = 0 + + Dim rows() As DataRow = dt_Verbuchungskonten.Select("Konto = '" & sollkonto2 & "'") + If rows.Length > 0 Then + Dim row As DataRow = rows(0) + If Not IsDBNull(row("Soll")) Then + dec_sollsumme = Convert.ToDecimal(row("Soll")) + End If + row("Soll") = dec_sollsumme + BETRAG * (-1) + End If + + + End If + + End If + + '1. Belegszeile + insertBelegszeile(MANDANT, JAHR, PERIODE, i_beleg_refid, beleg.BelegDat, beleg.BelegNr, beleg.Belegart, Buchungstext, BETRAG, "EUR", ZSzeilenr, ckennsoll2, sollkonto2, Habenkonto2, SollHabenKZ) + + If TYP = "AUSZAHLUNG" Then + + If BETRAG <> 0 Then + + 'BEGIN /* bei Auszahlung die zweite Datenzeile zur ersten Bestandskontobuchung */ + + ZSzeilenr += 1 + + sollkonto2 = Bestandskonto + Habenkonto2 = 0 + ckennsoll2 = "KO" + SollHabenKZ = "H" + + + Dim rows() As DataRow = dt_Verbuchungskonten.Select("Konto = '" & sollkonto2 & "'") + If rows.Length > 0 Then + Dim row As DataRow = rows(0) + If Not IsDBNull(row("Haben")) Then + dec_habensumme = Convert.ToDecimal(row("Haben")) + End If + row("Haben") = dec_habensumme + BETRAG * (-1) + End If + + End If + + Else + + + End If + + '2. Belegszeile + insertBelegszeile(MANDANT, JAHR, PERIODE, i_beleg_refid, beleg.BelegDat, beleg.BelegNr, beleg.Belegart, Buchungstext, BETRAG, "EUR", ZSzeilenr, ckennsoll2, sollkonto2, Habenkonto2, SollHabenKZ) + + 'End /* Direktverbuchung der zweiten Datenzeile */ + 'End /* bei Auszahlung die zweite Datenzeile zur Bestandskontobuchung */ + + + 'BEGIN /* Direktverbuchung der Sammelkundenbuchung */ + + 'SET @c_sprache = (SELECT [FIBU2].dbo.fibu_konto.c_sprache FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = @Sollkonto2 And [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr) + + 'SET @c_ustidnr = (SELECT [FIBU2].dbo.fibu_konto.c_ustidnr FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = @Sollkonto2 And [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr) + + 'SET @c_zahlziel = (SELECT [FIBU2].dbo.fibu_konto.c_zahlziel FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = @Sollkonto2 And [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr) + + 'SET @Skontotage = (SELECT [FIBU2].dbo.fibu_zahlziel.si_tage FROM [FIBU2].dbo.fibu_zahlziel WHERE [FIBU2].dbo.fibu_zahlziel.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_zahlziel.c_zahlziel Like @c_zahlziel) + 'If @Skontotage Is NULL SET @Skontotage = 0 + + 'SET @Skonto = (SELECT [FIBU2].dbo.fibu_zahlziel.dec_skonto FROM [FIBU2].dbo.fibu_zahlziel WHERE [FIBU2].dbo.fibu_zahlziel.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_zahlziel.c_zahlziel Like @c_zahlziel) + 'If @Skonto Is NULL SET @Skonto = 0 + + 'SET @Nettotage = (SELECT [FIBU2].dbo.fibu_zahlziel.si_ntage FROM [FIBU2].dbo.fibu_zahlziel WHERE [FIBU2].dbo.fibu_zahlziel.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_zahlziel.c_zahlziel Like @c_zahlziel) + 'If @Nettotage Is NULL SET @Nettotage = 0 + + 'SET @Skontodatum = DATEADD(DAY, @Skontotage, @gDatumKurz) + 'SET @Nettodatum = DATEADD(DAY, @Nettotage, @gDatumKurz) + + If TYP = "EINZAHLUNG" Then + ZSzeilenr += 1 + If BETRAG > 0 Then + + 'BEGIN /* dritte Buchungszeile */ + sollkonto2 = Forderungskonto + Habenkonto2 = Bestandskonto + ckennsoll2 = "DB" + SollHabenKZ = "H" + + + sollkonto2 = Forderungskonto + Habenkonto2 = 0 + ckennsoll2 = "DB" + SollHabenKZ = "S" + + Dim rows() As DataRow = dt_Verbuchungskonten.Select("Konto = '" & sollkonto2 & "'") + If rows.Length > 0 Then + Dim row As DataRow = rows(0) + If Not IsDBNull(row("Soll")) Then + dec_habensumme = Convert.ToDecimal(row("Soll")) + End If + row("Soll") = dec_habensumme + BETRAG + End If + '3. Buchungszeile + insertBelegszeile(MANDANT, JAHR, PERIODE, i_beleg_refid, beleg.BelegDat, beleg.BelegNr, beleg.Belegart, Buchungstext, BETRAG, "EUR", ZSzeilenr, ckennsoll2, sollkonto2, Habenkonto2, SollHabenKZ) + + End If + + Else + ZSzeilenr += 1 + + If BETRAG > 0 Then + sollkonto2 = Forderungskonto + Habenkonto2 = 0 + ckennsoll2 = "DB" + SollHabenKZ = "S" + + + Dim rows() As DataRow = dt_Verbuchungskonten.Select("Konto = '" & sollkonto2 & "'") + If rows.Length > 0 Then + Dim row As DataRow = rows(0) + If Not IsDBNull(row("Soll")) Then + dec_habensumme = Convert.ToDecimal(row("Soll")) + End If + row("Soll") = dec_habensumme + BETRAG * (-1) + End If + + End If + + '4. Buchungszeile + insertBelegszeile(MANDANT, JAHR, PERIODE, i_beleg_refid, beleg.BelegDat, beleg.BelegNr, beleg.Belegart, Buchungstext, BETRAG, "EUR", ZSzeilenr, ckennsoll2, sollkonto2, Habenkonto2, SollHabenKZ) + End If + + ZSzeilenr += 1 + + + If TYP = "AUSZAHLUNG" Then + + If BETRAG > 0 Then + + 'BEGIN /* fünfte Buchungszeile bei Auszahlung und Direktverbuchung */ + + sollkonto2 = Erlöskonto + Habenkonto2 = 0 + ckennsoll2 = "KO" + SollHabenKZ = "H" + + 'SET @dec_habensumme = (SELECT OWNFIELD_Haben FROM OWNTABLE_Verbuchungskonten WHERE OWNFIELD_Konto = @Sollkonto2) + 'UPDATE OWNTABLE_Verbuchungskonten SET OWNFIELD_Haben = (@dec_habensumme + @B_Bruttobetrag * (-1)) WHERE OWNFIELD_Konto = @Sollkonto2 + + '5. Buchungszeile + insertBelegszeile(MANDANT, JAHR, PERIODE, i_beleg_refid, beleg.BelegDat, beleg.BelegNr, beleg.Belegart, Buchungstext, BETRAG, "EUR", ZSzeilenr, ckennsoll2, sollkonto2, Habenkonto2, SollHabenKZ) + + End If + End If + + 'BEGIN /* Fortsetzung bei Direktverbuchung */ + + 'SET @updatekonto = @i_fordkto + + 'SET @dec_aktuellersaldo = (SELECT [FIBU2].dbo.fibu_konto.dec_aktuellersaldo From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @dec_sollsumme = (SELECT [FIBU2].dbo.fibu_konto.dec_sollsumme From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @dec_habensumme = (SELECT [FIBU2].dbo.fibu_konto.dec_habensumme From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @eur_aktuellersaldo = (SELECT [FIBU2].dbo.fibu_konto.eur_aktuellersaldo From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'If @Einzahlungsbetrag <> 0 + 'BEGIN /* Einzahlung */ + 'SET @dec_aktuellersaldo = (@dec_aktuellersaldo - @B_Bruttobetrag) + 'SET @dec_sollsumme = (@dec_sollsumme - 0) + 'SET @dec_habensumme = (@dec_habensumme + @B_Bruttobetrag) + 'SET @eur_aktuellersaldo = (@eur_aktuellersaldo - @B_Bruttobetrag) + 'End /* Einzahlung */ + 'Else BEGIN /* Auszahlung */ + 'SET @dec_aktuellersaldo = (@dec_aktuellersaldo - @B_Bruttobetrag) + 'SET @dec_sollsumme = (@dec_sollsumme - @B_Bruttobetrag) + 'SET @dec_habensumme = (@dec_habensumme + 0) + 'SET @eur_aktuellersaldo = (@eur_aktuellersaldo - @B_Bruttobetrag) + 'End /* Auszahlung */ + + 'UPDATE [FIBU2].dbo.fibu_konto SET d_lebudat = @gDatumKurz, dec_aktuellersaldo = @dec_aktuellersaldo, dec_sollsumme = @dec_sollsumme, dec_habensumme = @dec_habensumme, eur_aktuellersaldo = @eur_aktuellersaldo WHERE [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto + + 'SET @updatekonto = CAST(@Bestandskonto AS INTEGER) + 'SET @i_Sachkonto = @updatekonto + + 'SET @dec_aktuellersaldo = (SELECT [FIBU2].dbo.fibu_konto.dec_aktuellersaldo From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @dec_sollsumme = (SELECT [FIBU2].dbo.fibu_konto.dec_sollsumme From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @dec_habensumme = (SELECT [FIBU2].dbo.fibu_konto.dec_habensumme From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @eur_aktuellersaldo = (SELECT [FIBU2].dbo.fibu_konto.eur_aktuellersaldo From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'If @Einzahlungsbetrag <> 0 + 'BEGIN /* Einzahlung */ + 'SET @dec_aktuellersaldo = (@dec_aktuellersaldo + @B_Bruttobetrag) + 'SET @dec_sollsumme = (@dec_sollsumme + @B_Bruttobetrag) + 'SET @dec_habensumme = (@dec_habensumme + 0) + 'SET @eur_aktuellersaldo = (@eur_aktuellersaldo + @B_Bruttobetrag) + 'End /* Einzahlung */ + 'Else BEGIN /* Auszahlung */ + 'SET @dec_aktuellersaldo = (@dec_aktuellersaldo + @B_Bruttobetrag) + 'SET @dec_sollsumme = (@dec_sollsumme - 0) + 'SET @dec_habensumme = (@dec_habensumme - @B_Bruttobetrag) + 'SET @eur_aktuellersaldo = (@eur_aktuellersaldo + @B_Bruttobetrag) + 'End /* Auszahlung */ + + 'UPDATE [FIBU2].dbo.fibu_konto SET d_lebudat = @gDatumKurz, dec_aktuellersaldo = @dec_aktuellersaldo, dec_sollsumme = @dec_sollsumme, dec_habensumme = @dec_habensumme, eur_aktuellersaldo = @eur_aktuellersaldo WHERE [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto + + 'If @Auszahlungsbetrag <> 0 + 'BEGIN /* Erlöskonto bei Auszahlung */ + + 'SET @updatekonto = CAST(@Erlöskonto AS INTEGER) + 'SET @i_Sachkonto = @updatekonto + + 'SET @dec_sollsumme = (SELECT [FIBU2].dbo.fibu_konto.dec_sollsumme From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @dec_habensumme = (SELECT [FIBU2].dbo.fibu_konto.dec_habensumme From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @dec_sollsumme = (@dec_sollsumme - @B_Bruttobetrag) + 'SET @dec_habensumme = (@dec_habensumme - @B_Bruttobetrag) + + 'UPDATE [FIBU2].dbo.fibu_konto SET d_lebudat = @gDatumKurz, dec_sollsumme = @dec_sollsumme, dec_habensumme = @dec_habensumme WHERE [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto + + 'End /* Erlöskonto bei Auszahlung */ + + 'SET @updatekonto = CAST(@Kontonummer AS INTEGER) + + 'SET @dec_aktuellersaldo = (SELECT [FIBU2].dbo.fibu_konto.dec_aktuellersaldo From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @dec_sollsumme = (SELECT [FIBU2].dbo.fibu_konto.dec_sollsumme From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @dec_habensumme = (SELECT [FIBU2].dbo.fibu_konto.dec_habensumme From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'SET @eur_aktuellersaldo = (SELECT [FIBU2].dbo.fibu_konto.eur_aktuellersaldo From [FIBU2].dbo.fibu_konto Where [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto) + + 'If @Einzahlungsbetrag <> 0 + 'BEGIN /* Einzahlung */ + 'SET @dec_aktuellersaldo = (@dec_aktuellersaldo - @B_Bruttobetrag) + 'SET @dec_sollsumme = (@dec_sollsumme + 0) + 'SET @dec_habensumme = (@dec_habensumme + @B_Bruttobetrag) + 'SET @eur_aktuellersaldo = (@eur_aktuellersaldo - @B_Bruttobetrag) + 'SET @opvorgangsbetrag = @B_Bruttobetrag * (-1) + 'End /* Einzahlung */ + 'Else BEGIN /* Auszahlung */ + 'SET @dec_aktuellersaldo = (@dec_aktuellersaldo - @B_Bruttobetrag) + 'SET @dec_sollsumme = (@dec_sollsumme - @B_Bruttobetrag) + 'SET @dec_habensumme = (@dec_habensumme - 0) + 'SET @eur_aktuellersaldo = (@eur_aktuellersaldo - @B_Bruttobetrag) + 'SET @opvorgangsbetrag = @B_Bruttobetrag * (-1) / CAST(2 AS FLOAT) + 'End /* Auszahlung */ + + 'UPDATE [FIBU2].dbo.fibu_konto SET d_lebudat = @gDatumKurz, dec_aktuellersaldo = @dec_aktuellersaldo, dec_sollsumme = @dec_sollsumme, dec_habensumme = @dec_habensumme, eur_aktuellersaldo = @eur_aktuellersaldo WHERE [FIBU2].dbo.fibu_konto.i_firm_refid = @MandantNr And [FIBU2].dbo.fibu_konto.i_konto = @updatekonto + + 'Saldenperioden! + For Each konto As DataRow In dt_Verbuchungskonten.Rows 'Schleifen2rec + If Not IsDBNull(konto("Soll")) AndAlso konto("Soll") <> 0 Or Not IsDBNull(konto("Haben")) AndAlso konto("Haben") <> 0 Then + periodenBuchungen(PERIODE, konto("Konto"), MANDANT, JAHR, konto("Soll"), konto("Haben")) + End If + Next + + createOP(MANDANT, JAHR, PERIODE, i_beleg_refid, beleg.BelegDat, beleg.BelegNr, beleg.Belegart, Buchungstext, BETRAG, "EUR", 1, ckennsoll2, sollkonto2, Habenkonto2, SollHabenKZ) + + End If + End If + + + + End Function + + Private Shared Sub erstelleEBSalden(mandant As String, Jahr As Integer, Konto As Integer) + + Dim Zaehler As String = (New VERAG_PROG_ALLGEMEIN.SQL).getValueTxtBySqlVarList("Select COUNT([FIBU2].dbo.fibu_periodensaldo.i_konto) FROM [FIBU2].dbo.fibu_periodensaldo WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = " & mandant & "And [FIBU2].dbo.fibu_periodensaldo.si_jahr =" & Jahr & " And [FIBU2].dbo.fibu_periodensaldo.i_konto = " & Konto, "FIBU",, "0") + Dim aktSAldo As String = (New VERAG_PROG_ALLGEMEIN.SQL).getValueTxtBySqlVarList("Select [FIBU2].dbo.fibu_konto.dec_aktuellersaldo FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_firm_refid = " & mandant & " And [FIBU2].dbo.fibu_konto.i_konto = " & Konto, "FIBU",, "0") + If Zaehler = "" Or Zaehler = "0" Then + + If aktSAldo = "" Then aktSAldo = "0" + aktSAldo = aktSAldo.Replace(",", ".") + + + + '• Für alle dort enthaltenen Konten stellt es sicher, dass es im aktuellen Jahr Periodensalden in fibu_periodensaldo gibt (falls nicht, werden Null-EBs angelegt)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + Dim SQL_UPATE As String = "INSERT INTO [FIBU2].dbo.fibu_periodensaldo ( + i_firm_refid, si_jahr, i_konto, i_perioden, + dec_eroeff, dec_abschluss, + dec_soll_1, dec_haben_1, dec_soll_2, dec_haben_2, dec_soll_3, dec_haben_3, + dec_soll_4, dec_haben_4, dec_soll_5, dec_haben_5, dec_soll_6, dec_haben_6, + dec_soll_7, dec_haben_7, dec_soll_8, dec_haben_8, dec_soll_9, dec_haben_9, + dec_soll_10, dec_haben_10, dec_soll_11, dec_haben_11, dec_soll_12, dec_haben_12, + dec_soll_13, dec_haben_13, + eur_eroeff, eur_abschluss, + eur_soll_1, eur_haben_1, eur_soll_2, eur_haben_2, eur_soll_3, eur_haben_3, + eur_soll_4, eur_haben_4, eur_soll_5, eur_haben_5, eur_soll_6, eur_haben_6, + eur_soll_7, eur_haben_7, eur_soll_8, eur_haben_8, eur_soll_9, eur_haben_9, + eur_soll_10, eur_haben_10, eur_soll_11, eur_haben_11, eur_soll_12, eur_haben_12, + eur_soll_13, eur_haben_13, i_buchungskreis + ) + VALUES('" & mandant & "', '" & Jahr & "', '" & Konto & "', 0, " & aktSAldo & ", 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, " & aktSAldo & ", 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1)" + + + Dim erstellt As Boolean = (New VERAG_PROG_ALLGEMEIN.SQL).doSQL(SQL_UPATE, "FIBU") + End If - Dim VERAG_SQL As New VERAG_PROG_ALLGEMEIN.SQL - - '2 - 'Default-Values - 'IF ISNULL(@Kassakonto, '') = '' SET @Kassakonto = '2700' - 'SET @Buchungsbelegkreis = 'KE' - 'If @Auszahlungsbetrag <> 0 SET @Buchungsbelegkreis = 'KA' - '3 - 'Anmerkung „Stornobuchung“, wenn Ein-/Auszahlung negativ. + End Sub - '4 - 'Ermittelt Debitoren-Personenkonto (@i_personenkonto = Kundenkonto) und Durchbuchungskonto @i_fordkto (default 2000). - - Dim Sollkonto As Integer = 0 - Dim Habenkonto As Integer = 0 - Dim kontenzaehler As Integer = 0 - - If beleg.KundenNr > 0 Then - Habenkonto = beleg.KundenNr - End If - - Dim Forderungskonto As String = VERAG_SQL.getValueTxtBySqlVarList("SELECT i_fordkto FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = " & Habenkonto & " AND [FIBU2].dbo.fibu_konto.i_firm_refid = " & mandant, "FIBU",, "2000") - - 'Baut eine temporäre Verbuchungskonten-Tabelle OWNTABLE_Verbuchungskonten: - - Dim dt_Verbuchungskonten As New DataTable - dt_Verbuchungskonten.Columns.Add("Nr", GetType(Integer)) - dt_Verbuchungskonten.Columns.Add("Konto", GetType(Integer)) - dt_Verbuchungskonten.Columns.Add("Soll", GetType(Double)) - dt_Verbuchungskonten.Columns.Add("Haben", GetType(Double)) - - 'Einträge für Personenkonto und Durchbuchungskonto (Spalten für kumuliertes Soll/Haben). - - Dim R1 As DataRow = dt_Verbuchungskonten.NewRow - R1("Nr") = 1 - R1("Konto") = Habenkonto - R1("Soll") = 1 - R1("Haben") = 1 - dt_Verbuchungskonten.Rows.Add(R1) - kontenzaehler += 1 - - Dim R2 As DataRow = dt_Verbuchungskonten.NewRow - R2("Nr") = 1 - R2("Konto") = CInt(Forderungskonto) - R2("Soll") = 1 - R2("Haben") = 1 - dt_Verbuchungskonten.Rows.Add(R2) - kontenzaehler += 1 - - Dim dt_Sollkonto As DataTable = VERAG_SQL.loadDgvBySql("SELECT top(1) isnull([FIBU2].dbo.fibu_konto.c_kontoart,'LE'), isnull([FIBU2].dbo.fibu_konto.i_kennung,0) FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = " & Sollkonto & " AND [FIBU2].dbo.fibu_konto.i_firm_refid = " & mandant, "FIBU") - Dim dt_Habenkonto As DataTable = VERAG_SQL.loadDgvBySql("SELECT TOP(1) isnull([FIBU2].dbo.fibu_konto.c_kontoart,'LE'), isnull([FIBU2].dbo.fibu_konto.i_kennung,0) FROM [FIBU2].dbo.fibu_konto WHERE [FIBU2].dbo.fibu_konto.i_konto = " & Habenkonto & " AND [FIBU2].dbo.fibu_konto.i_firm_refid = " & mandant, "FIBU") - - Dim StapelAZK As String = VERAG_SQL.getValueTxtBySqlVarList("SELECT [FIBU2].dbo.fibu_stapelart.i_stapel_refid FROM [FIBU2].dbo.fibu_stapelart WHERE [FIBU2].dbo.fibu_stapelart.c_stapelname LIKE 'Auszahlungskasse 1' AND [FIBU2].dbo.fibu_stapelart.i_firm_refid = " & mandant, "FIBU",, "") - Dim Zaehler1 As String = VERAG_SQL.getValueTxtBySqlVarList("SELECT COUNT([FIBU2].dbo.fibu_stapel.i_lfdnr) FROM [FIBU2].dbo.fibu_stapel WHERE ISNULL([FIBU2].dbo.fibu_stapel.si_pruef, 0) > 0", "FIBU",, "0") - - If CInt(Zaehler1) > 0 Then - StapelAZK = VERAG_SQL.getValueTxtBySqlVarList("SELECT [FIBU2].dbo.fibu_stapelart.i_stapel_refid FROM [FIBU2].dbo.fibu_stapelart WHERE [FIBU2].dbo.fibu_stapelart.c_stapelname LIKE 'Auszahlungskasse 2' AND [FIBU2].dbo.fibu_stapelart.i_firm_refid = " & mandant, "FIBU",, "") - End If - - Dim ZSBuchnr As String = VERAG_SQL.getValueTxtBySqlVarList("SELECT MAX([FIBU2].dbo.fibu_stapel.i_lfdnr)+1 FROM [FIBU2].dbo.fibu_stapel WHERE [FIBU2].dbo.fibu_stapel.i_firm_refid = " & mandant & " AND [FIBU2].dbo.fibu_stapel.i_stapel_refid = " & StapelAZK, "FIBU",, "0") - - If ZSBuchnr = "" Or ZSBuchnr = "0" Then - ZSBuchnr = "1" - End If - - Dim ProtokollID As String = "" - - '(CAST(@StapelAZK AS VARCHAR(4)) + '-' + CAST(@ZSBuchnr AS VARCHAR(4)) + '-' + @C_Anno + '-' + REPLICATE('0', 2-LEN(@C_Monat)) + @C_Monat + '-' + REPLICATE('0', 2-LEN(@C_Tag)) + @C_Tag + ' ' + REPLICATE('0', 2-LEN(@C_Stunde)) + @C_Stunde + ':' + REPLICATE('0', 2-LEN(@C_Minute)) + @C_Minute + ':' + REPLICATE('0', 2-LEN(@C_Sekunde)) + @C_Sekunde) - - Dim pruef As Integer = 0 - Dim ZSzeilenr As Integer = 0 - Dim Belegart As Integer = 1 - Dim Splitart As Integer = 0 + Private Shared Sub insertBelegskopf(mandant As Integer, Jahr As Integer, periode As Integer, beleg_ref_id As Integer, datumKurz As String, BelegNr As String, BelegArt As String, Buchungstext As String, Belegkopfbetrag As Double, Waehrung As String, creationDate As String, Benutzer As String, ProtokollID As String) - '• Für alle dort enthaltenen Konten stellt es sicher, dass es im aktuellen Jahr Periodensalden in fibu_periodensaldo gibt (falls nicht, werden Null-EBs angelegt)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + Dim SQL_Insert = "INSERT INTO [FIBU2].dbo.fibu_belegkopf (i_firm_refid, si_jahr, si_periode, i_beleg_refid, d_beleg, c_urbelegid, si_belegart, c_buchtext, dec_betrag, c_waehrung, dec_fremdbetrag, eur_betrag, i_auftragid, d_gebucht, c_benutzer, i_buchungskreis, i_quelle_modul, c_quelle_maske, si_manipulation, i_stapel_refid, c_protokoll_id) + VALUES('" & mandant & "', " & Jahr & ", " & periode & ", " & beleg_ref_id & ", '" & datumKurz & "', '" & BelegNr & "', '" & BelegArt & "', '" & Buchungstext & "', " & Belegkopfbetrag & ", '" & Waehrung & "', " & Belegkopfbetrag & ", " & Belegkopfbetrag & ", 0, '" & creationDate & "', '" & Benutzer & "', 1, 21, 'Fleximport', 0, 2, '" & ProtokollID.Replace(",", ".") & "');" - For Each p As EABelegPositionen In beleg.POS - - Dim dtBetraege = SQL.loadDgvBySql(" SELECT isnull(Sum(tblEABelegposition.Betrag),0) AS Nettobetrag, " & - " isnull(Sum(CASE WHEN [Steuerpflichtig]=1 THEN [Betrag] ELSE 0 END),0) AS SteuerpflichtigerBetrag, " & - " isnull(Sum(cast((CASE WHEN [Steuerpflichtig]=1 THEN [Betrag] ELSE 0 END)* [Steuersatz] as decimal(8,2))),0) AS SteuerBetrag, " & - " isnull(Sum(tblEABelegposition.Betrag+cast((CASE WHEN [Steuerpflichtig]=1 THEN [Betrag] ELSE 0 END)* [Steuersatz] as decimal(8,2))),0) AS Bruttobetrag " & - " FROM tblEABelegnummer INNER JOIN tblSteuersätze ON tblEABelegnummer.Steuerschlüssel = tblSteuersätze.Nr INNER JOIN tblEABelegposition INNER JOIN Leistungen ON tblEABelegposition.LeistungsNr = Leistungen.LeistungsNr ON tblEABelegnummer.Mandant = tblEABelegposition.Mandant AND tblEABelegnummer.Niederlassung = tblEABelegposition.Niederlassung AND tblEABelegnummer.Benutzer = tblEABelegposition.Benutzer AND tblEABelegnummer.BelegDat = tblEABelegposition.BelegDat AND tblEABelegnummer.BelegNr = tblEABelegposition.BelegNr " & - " WHERE tblEABelegposition.Mandant='" & beleg.Mandant & "' AND tblEABelegposition.Niederlassung='" & beleg.Niederlassung & "' AND tblEABelegposition.Benutzer='" & beleg.Benutzer & "' AND tblEABelegposition.BelegDat='" & beleg.BelegDat.ToShortDateString & "' AND tblEABelegposition.BelegNr='" & beleg.BelegNr & "'", "FMZOLL") - - Dim Bruttobetrag As Double = dtBetraege.Rows(0)("Bruttobetrag") - Dim Nettobetrag As Double = dtBetraege.Rows(0)("Nettobetrag") - Dim SteuerBetrag As Double = dtBetraege.Rows(0)("SteuerBetrag") - - '• Einzahlung (@B_Bruttobetrag >= 0) - ' o Erste Zeile: Soll = Bestandskonto(KO), Betrag = @P_Bruttobetrag * (-1) (Vorzeichentricks wegen Gutschriftlogik), Haben leer. - '• Auszahlung (@B_Bruttobetrag < 0) - ' o Erste Zeile: Soll = Erlöskonto(KO), Betrag = @P_Bruttobetrag (positiv), Haben leer. - ' o Zweite Zeile (nur bei Auszahlung): Haben = Bestandskonto(KO), Betrag = @P_Bruttobetrag. + Dim inserted As Boolean = (New VERAG_PROG_ALLGEMEIN.SQL).doSQL(SQL_Insert, "FIBU") + End Sub - kontenzaehler += 1 + Private Shared Sub insertBelegszeile(mandant As Integer, Jahr As Integer, periode As Integer, beleg_ref_id As Integer, datumKurz As String, BelegNr As String, BelegArt As String, Buchungstext As String, Buchungsbetrag As Double, Waehrung As String, ZeilenNr As Integer, ckennsoll2 As String, Sollkonto2 As Integer, Habenkonto2 As Integer, SollhabenKZ As String) - If Bruttobetrag >= 0 Then - Dim R_POS As DataRow = dt_Verbuchungskonten.NewRow - R_POS("Nr") = kontenzaehler - R_POS("Konto") = dtBetraege.Rows(0)("Gegenkonto") - R_POS("Soll") = 0 - R_POS("Haben") = 0 - dt_Verbuchungskonten.Rows.Add(R_POS) - Else - Dim R_POS As DataRow = dt_Verbuchungskonten.NewRow - R_POS("Nr") = kontenzaehler - R_POS("Konto") = dtBetraege.Rows(0)("Gegenkonto") - R_POS("Soll") = 0 - R_POS("Haben") = 0 - dt_Verbuchungskonten.Rows.Add(R_POS) + Dim SQL_Insert = "INSERT INTO [FIBU2].dbo.fibu_belegzeile (i_firm_refid, si_jahr, si_periode, si_rel_periode, i_beleg_refid, i_zeilen_refid, c_kennung, i_konto, c_sollhabenkz, i_steuer_refid, i_gegenkonto, dec_betrag, c_waehrung, dec_fremdbetrag, eur_betrag, d_beleg, d_gebucht, c_urbelegid, si_belegart, c_buchtext, i_buchungskreis) + VALUES('" & mandant & "', " & Jahr & ", " & periode & ", " & periode & ", " & beleg_ref_id & ", " & ZeilenNr & ", '" & ckennsoll2 & "', " & Sollkonto2 & ", '" & SollhabenKZ & "', 0, " & Habenkonto2 & ", " & Buchungsbetrag & ", '" & Waehrung & "', " & Buchungsbetrag & ", " & Buchungsbetrag & ", '" & datumKurz & "', '" & datumKurz & "', '" & BelegNr & "','" & BelegArt & "', '" & Buchungstext & "', 1);" + + Dim inserted As Boolean = (New VERAG_PROG_ALLGEMEIN.SQL).doSQL(SQL_Insert, "FIBU") + + + End Sub + + Private Shared Sub periodenBuchungen(periode As Integer, konto As Integer, Mandant As String, Jahr As Integer, Sollsumme As Double, HabenSumme As Double) + + If periode > 0 AndAlso periode < 13 Then + + Dim periodenSoll_SQL As String = "SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_" & periode & " From [FIBU2].dbo.fibu_periodensaldo Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = " & Mandant & " And [FIBU2].dbo.fibu_periodensaldo.si_jahr = " & Jahr & " And [FIBU2].dbo.fibu_periodensaldo.i_konto = " & konto + Dim periodenHaben_SQL As String = "SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_" & periode & " From [FIBU2].dbo.fibu_periodensaldo Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = " & Mandant & " And [FIBU2].dbo.fibu_periodensaldo.si_jahr = " & Jahr & " And [FIBU2].dbo.fibu_periodensaldo.i_konto = " & konto + + Dim periodenSoll = (New VERAG_PROG_ALLGEMEIN.SQL).getValueTxtBySqlVarList(periodenSoll_SQL, "FIBU") + Dim periodenHaben = (New VERAG_PROG_ALLGEMEIN.SQL).getValueTxtBySqlVarList(periodenHaben_SQL, "FIBU") + + Dim periodenSoll_DBl As Double = 0 + Dim periodenHaben_DBl As Double = 0 + + If periodenSoll <> "" AndAlso IsNumeric(periodenSoll) Then + periodenSoll_DBl = CDbl(periodenSoll) + End If + + If periodenHaben <> "" AndAlso IsNumeric(periodenHaben) Then + periodenHaben_DBl = CDbl(periodenHaben) + End If + + periodenSoll_DBl += Sollsumme + periodenHaben_DBl += HabenSumme + + Dim SQL_Update = "UPDATE [FIBU2].dbo.fibu_periodensaldo SET + [FIBU2].dbo.fibu_periodensaldo.dec_soll_" & periode & " = " & periodenSoll_DBl & ", + [FIBU2].dbo.fibu_periodensaldo.dec_haben_" & periode & " = " & periodenHaben_DBl & ", + [FIBU2].dbo.fibu_periodensaldo.eur_soll_" & periode & " = " & periodenSoll_DBl & ", + [FIBU2].dbo.fibu_periodensaldo.eur_haben_" & periode & " = " & periodenHaben_DBl & " + WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = " & Mandant & " + And [FIBU2].dbo.fibu_periodensaldo.si_jahr = " & Jahr & " + And [FIBU2].dbo.fibu_periodensaldo.i_konto = " & konto + + Dim updated As Boolean = (New VERAG_PROG_ALLGEMEIN.SQL).doSQL(SQL_Update, "FIBU") + + If konto = 2000 Then + Dim SQL_Update_2000 = "UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + [FIBU2].dbo.fibu_periodensaldodk.dec_soll_" & periode & " = " & periodenSoll_DBl & ", + [FIBU2].dbo.fibu_periodensaldodk.dec_haben_" & periode & " = " & periodenHaben_DBl & ", + [FIBU2].dbo.fibu_periodensaldodk.eur_soll_" & periode & " = " & periodenSoll_DBl & ", + [FIBU2].dbo.fibu_periodensaldodk.eur_haben_" & periode & " = " & periodenHaben_DBl & " + WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = " & Mandant & " + And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = " & Jahr & " + And [FIBU2].dbo.fibu_periodensaldodk.i_konto = " & konto + + Dim updated_2000 As Boolean = (New VERAG_PROG_ALLGEMEIN.SQL).doSQL(SQL_Update_2000, "FIBU") End If - Next + End If + + ' BEGIN /* 3 */ + + 'If @Periode = 1 + 'BEGIN + 'SET @periodensoll = + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_1 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + ' If @Periode = 2 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_2 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_2 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_2 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_2 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_2 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_2 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_2 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_2 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_2 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_2 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End - 'INSERT INTO OWNTABLE_Verbuchungskonten ( - 'OWNFIELD_Nr, - 'OWNFIELD_Konto, - 'OWNFIELD_Soll, - 'OWNFIELD_Haben) - 'VALUES ( - '@Kontenzähler, - '@BestandskontoInt, - '0, - '0) + ' If @Periode = 3 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_3 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) - 'SET @Kontenzähler = (@Kontenzähler + 1) + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_3 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) - 'INSERT INTO OWNTABLE_Verbuchungskonten ( - 'OWNFIELD_Nr, - 'OWNFIELD_Konto, - 'OWNFIELD_Soll, - 'OWNFIELD_Haben) - 'VALUES ( - '@Kontenzähler, - '@ErlöskontoInt, - '0, - '0) + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_3 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_3 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_3 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_3 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_3 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_3 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_3 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_3 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End - 'Cursor lc_ProjekteRec über alle Pos. (Typ 1, Barverkauf) mit Artikel-Konten: - 'o Fügt für jedes Bestandskonto und Erlöskonto je einen Eintrag in OWNTABLE_Verbuchungskonten hinzu. - 'o Cursor Schleifen1rec: Stellt sicher, dass in [FIBU2].dbo.fibu_periodensaldo (und ggf. …saldodk für 2000) Eröffnungszeilen existieren (bei Bedarf INSERT mit EB-Werten). + ' If @Periode = 4 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_4 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) - '5 - 'Baut @Buchungstext_orig = KE_/KA_ + Pos-Nr + _LKW_AuszFirma_Fahrer_Passnr, split in - 'o @Buchungstext (48 Zeichen, in die Zeile), - 'o @BuchungstextBemerkung (restliche 28 Zeichen, in Bemerk). + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_4 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) - 'Ermittelt Buchungsweg aus Benutzer.OWNFIELD_Buchungsweg: - '2 = Stapel, 3 = Direkt. - Boolean - 'Außerdem unterscheidet das Script zwei Fälle: - 'o Einzahlung (@Einzahlungsbetrag <> 0): Kasse/Bestand im Soll, Kunde im Haben. - 'o Auszahlung (@Auszahlungsbetrag <> 0): umgekehrte Logik, teils mit Vorzeichenwechseln. - '________________________________________ + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_4 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_4 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_4 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_4 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_4 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_4 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_4 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_4 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End + ' If @Periode = 5 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_5 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_5 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_5 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_5 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_5 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_5 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_5 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_5 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_5 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_5 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End + + ' If @Periode = 6 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_6 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_6 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_6 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_6 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_6 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_6 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_6 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_6 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_6 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_6 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End + ' If @Periode = 7 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_7 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) - 'If Stapelbuchung Then + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_7 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) - ' If beleg.Beleg_TYP = "L" Then '=Leihgeld + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_7 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_7 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_7 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_7 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto - ' Dim SQL_Insert As String = "INSERT INTO [FIBU2].dbo.fibu_stapel (i_firm_refid,i_stapel_refid,i_lfdnr,si_zeilenr,si_belegart,si_splitart,d_beleg,d_valuta,c_urbelegid,c_op_beleg,c_buchtext,si_jahr,si_periode,i_sollkonto,c_kennungsoll,i_kennungsoll,i_habenkonto,c_kennunghaben,i_kennunghaben,dec_betrag,c_waehrung,dec_eigenbetrag,eur_betrag,i_gegenkonto,i_steuerart_refid,i_steuer_refid,i_eg_gegenkonto,c_sollhabenkz,dec_steuer,dec_eigensteuer,eur_steuerbetrag,dec_steuerproz,i_auftragid,i_koart_refid,si_pruef,c_bemerk,i_buchungskreis,i_bank_flags,i_quelle_modul,c_quelle_maske,si_manipulation,dt_creation,c_protokoll_id) - ' VALUES( - ' '" & mandant & "', - ' @StapelAZK, - ' @ZSBuchnr, - ' @ZSzeilenr, - ' @Belegart, - ' @Splitart, - ' @belegdatum, - ' @belegdatum, - ' @belegnrtext, - ' @belegnrtext, - ' '" & Buchungstext & "', - ' @Jahr, - ' @Periode, - ' @Sollkonto2, - ' @ckennsoll2, - ' @kkennungsoll2, - ' @Habenkonto2, - ' @ckennhab2, - ' @kkennunghab2, - ' @Buchungsbetrag_P, - ' @Waehrung, - ' 0, - ' @Buchungsbetrag_P, - ' 0, - ' 0, - ' 0, - ' 0, - ' 'K', - ' 0, - ' 0, - ' 0, - ' @dec_steuerproz2, - ' 0, - ' 0, - ' @pruef, - ' " & BuchungstextBemerkung & ", - ' 1, - ' 0, - ' 21, - ' 'FlexImport', - ' 0, - ' '" & Now() & "', - ' @c_protokoll_id)" + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_7 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_7 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_7 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_7 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ - ' Else - - ' End If - - 'End If + 'End + ' If @Periode = 8 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_8 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_8 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_8 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_8 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_8 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_8 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_8 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_8 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_8 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_8 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End + ' If @Periode = 9 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_9 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_9 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_9 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_9 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_9 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_9 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_9 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_9 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_9 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_9 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End + + + ' If @Periode = 10 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_10 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_10 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_10 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_10 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_10 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_10 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_10 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_10 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_10 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_10 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End + + + ' If @Periode = 11 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_11 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_11 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_11 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_11 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_11 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_11 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_11 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_11 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_11 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_11 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End + + + ' If @Periode = 12 + 'BEGIN + 'SET @periodensoll = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_soll_12 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'SET @periodenhaben = (SELECT [FIBU2].dbo.fibu_periodensaldo.dec_haben_12 + 'From [FIBU2].dbo.fibu_periodensaldo + 'Where [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto) + + 'UPDATE [FIBU2].dbo.fibu_periodensaldo SET + '[FIBU2].dbo.fibu_periodensaldo.dec_soll_12 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.dec_haben_12 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_soll_12 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldo.eur_haben_12 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldo.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldo.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldo.i_konto = @Schleifenkonto + + 'If @Schleifenkonto = 2000 + 'BEGIN /* Debitorendurchbuchungskonto */ + 'UPDATE [FIBU2].dbo.fibu_periodensaldodk SET + '[FIBU2].dbo.fibu_periodensaldodk.dec_soll_12 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.dec_haben_12 = (@periodenhaben + @dec_habensumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_soll_12 = (@periodensoll + @dec_sollsumme), + '[FIBU2].dbo.fibu_periodensaldodk.eur_haben_12 = (@periodenhaben + @dec_habensumme) + 'WHERE [FIBU2].dbo.fibu_periodensaldodk.i_firm_refid = @MandantNr + 'And [FIBU2].dbo.fibu_periodensaldodk.si_jahr = @Jahr + 'And [FIBU2].dbo.fibu_periodensaldodk.i_konto = @Schleifenkonto + 'End /* Debitorendurchbuchungskonto */ + + 'End + + + End Sub + + Private Shared Sub createOP(mandant As Integer, Jahr As Integer, periode As Integer, beleg_ref_id As Integer, datumKurz As String, BelegNr As String, BelegArt As String, Buchungstext As String, Buchungsbetrag As Double, Waehrung As String, ZeilenNr As Integer, ckennsoll2 As String, Sollkonto2 As Integer, Habenkonto2 As Integer, SollhabenKZ As String) + + 'OPs + Dim SQL_Insert_DEBITOR '= "INSERT INTO [FIBU2].dbo.op_debitor (i_firm_refid, i_op_refid, c_urbelegid, i_personenkonto, i_forderungskonto, c_rechnungid, d_rechnung, d_valuta, c_typ, c_sprache, c_waehrung, dec_eigenbrutto, dec_fremdbrutto, eur_bruttobetrag, dec_skf_eigen, dec_skf_fremd, eur_skontierfaehig, dec_eigenzahlung, dec_fremdzahlung, eur_zahlung, c_zahlziel, dec_skonto, d_skonto, dec_skonto2, d_netto, si_mahnstufe, i_mahnlauf_refid, si_exportiert, i_stapel_refid, i_stapel_lfdnr, dec_stpl_ew_betrag, dec_stpl_ew_skonto, dec_stpl_fw_betrag, dec_stpl_fw_skonto, eur_stpl_betrag, eur_stpl_skonto, i_clearing, i_eigene_bank, si_bankeinzug, c_bemerkung, lc_anmerkungen, i_zessionstext, i_buchungskreis, c_ustidnr) + 'VALUES (" & mandant & ", @i_op_refid, @belegnrtext, " & personenkonto & "," & forderungskonto & ", @belegnrtext, " & datumKurz & ", " & datumKurz & ", @c_op_Typ, @c_sprache, @Waehrung, @B_Bruttobetrag * (-1), @B_Bruttobetrag * (-1), @B_Bruttobetrag * (-1), @B_Bruttobetrag * (-1), @B_Bruttobetrag * (-1), @B_Bruttobetrag * (-1), 0, 0, 0, @c_zahlziel, @Skonto, @Skontodatum, 0, @Nettodatum, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '" & Buchungstext & "', @Buchungstext_orig, 0, 1, @c_ustidnr);" + + + Dim insertedDEB As Boolean = (New VERAG_PROG_ALLGEMEIN.SQL).doSQL(SQL_Insert_DEBITOR, "FIBU") + + 'OP-Vorgänge + + Dim SQL_Insert_V_DEB = "INSERT INTO [FIBU2].dbo.op_vorgang_deb (i_firm_refid, i_personenkonto, i_op_refid, i_beleg_refid, c_vorgang, d_beleg, si_rel_periode, si_jahr, i_steuer_refid, dec_steuerproz, i_nne_az_konto, dec_nettobetrag, dec_steuerbetrag, eur_nettobetrag, eur_steuerbetrag, dec_fremdbetrag, si_skontierfaehig, si_zeilen_refid, c_bemerkung, dt_datum, c_benutzer, i_eg_konto, i_auftrag_refid, dec_naf_steuerbetr, eur_naf_steuerbetr) + VALUES (@MandantNr, @i_personenkonto, @i_op_refid, @i_beleg_refid, 'P', @gDatumKurz, @relPeriode, @Jahr, 0, 0, @i_Sachkonto, @opvorgangsbetrag, 0, @opvorgangsbetrag, 0, @opvorgangsbetrag, 1, 1, @Buchungstext, @dt_creation, @Benutzer, 0, 0, 0, 0);" + + + Dim insertedV_DEB As Boolean = (New VERAG_PROG_ALLGEMEIN.SQL).doSQL(SQL_Insert_V_DEB, "FIBU") + + 'if auszahlungsbetrag <> 0 THen + Dim SQL_Insert_V_DEB2 = "INSERT INTO [FIBU2].dbo.op_vorgang_deb (i_firm_refid, i_personenkonto, i_op_refid, i_beleg_refid, c_vorgang, d_beleg, si_rel_periode, si_jahr, i_steuer_refid, dec_steuerproz, i_nne_az_konto, dec_nettobetrag, dec_steuerbetrag, eur_nettobetrag, eur_steuerbetrag, dec_fremdbetrag, si_skontierfaehig, si_zeilen_refid, c_bemerkung, dt_datum, c_benutzer, i_eg_konto, i_auftrag_refid, dec_naf_steuerbetr, eur_naf_steuerbetr) + VALUES (@MandantNr, @i_personenkonto, @i_op_refid, @i_beleg_refid, 'P', @gDatumKurz, @relPeriode, @Jahr, 0, 0, @i_Sachkonto, @opvorgangsbetrag, 0, @opvorgangsbetrag, 0, @opvorgangsbetrag, 1, 5, @Buchungstext, @dt_creation, @Benutzer, 0, 0, 0, 0);" + + Dim insertedV_DEB2 As Boolean = (New VERAG_PROG_ALLGEMEIN.SQL).doSQL(SQL_Insert_V_DEB2, "FIBU") + + 'end if + + + End Sub + + Private Shared Function checkifgebucht(mandant As Integer, belegnrtext As String, PosText As String) As Boolean + + Dim checkDS As String = "Select Case COUNT(fbz.i_beleg_refid) From [FIBU2].dbo.fibu_belegzeile AS fbz Where fbz.i_firm_refid = " & mandant & " And fbz.c_urbelegid Like '" & belegnrtext & "' And fbz.c_buchtext Like ('%'" & PosText & "'%')" + + If checkDS <> "" AndAlso IsNumeric(checkDS) AndAlso CInt(checkDS) >= 3 Then + Return True + Else + Return False + + End If End Function End Class diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index 10ccecb1..3d9abd3f 100644 --- a/SDL/My Project/AssemblyInfo.vb +++ b/SDL/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/SDL/USTV/frmUSTVoffeneAntraege.vb b/SDL/USTV/frmUSTVoffeneAntraege.vb index cc395cdf..9caae6c6 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.vb @@ -195,7 +195,7 @@ Public Class frmUSTVoffeneAntraege 'Exit Sub 'MsgBox(.sql) Dim sqlstring = "Select " & top & " [rmc_kdNr], [rmc_kdName], [rmc_landKZ], [rmc_reDatum], [rmc_reNr], [rmc_waehrung], [rmc_betragMWST],rmc_daid as daId FROM [tblRMCImport] - INNER JOIN Adressen on WölflKundenNr=[rmc_kdNr] + INNER JOIN Adressen on WölflKundenNr=[rmc_kdNr] or weitereWölflKundenNr=[rmc_kdNr] where cast(rmc_reDatum As Date) between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' And rmc_archiv <> 1 " & sqlwhere & "group by rmc_reDatum, rmc_kdNr,[rmc_kdName], [rmc_landKZ],[rmc_reNr], [rmc_waehrung], [rmc_betragMWST], rmc_daid having [rmc_betragMWST] <> 0" @@ -758,7 +758,7 @@ Public Class frmUSTVoffeneAntraege [rmc_reDatum] AS Rechnungsdatum, [rmc_betragMWST] as MWST FROM [tblRMCImport] - INNER JOIN Adressen on WölflKundenNr= [rmc_kdNr] + INNER JOIN Adressen on WölflKundenNr= [rmc_kdNr] or weitereWölflKundenNr=[rmc_kdNr] where cast(rmc_reDatum As Date) between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' And UStVAn_ID is null " & sqlwhereRMC & " group by Adressen.AdressenNr,Adressen.[Name 1],Adressen.LandKz, [rmc_landKZ],[rmc_reNr], rmc_reDatum, [rmc_betragMWST] @@ -1093,7 +1093,7 @@ Public Class frmUSTVoffeneAntraege Dim SQLQuery As String = "" Select Case LIEFERANT.ToString.ToLower Case "plose" : SQLQuery = "select [plInv_SupplierRechnungsNr] as RechnungsNr,plInv_SupplierRechnungsDatum as Rechnungsdatum,Adressen.AdressenNr,Adressen.[Name 1] as Kunde from [tblPLOSE_Inv_Data] INNER JOIN Adressen on [plInv_PLOSEKundennummer]=Adressen.PLOSEKundenNr where [plInv_daId] is null and cast([plInv_SupplierRechnungsDatum] as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' group by plInv_SupplierRechnungsNr, Adressen.AdressenNr, Adressen.[Name 1], plInv_SupplierRechnungsDatum" - Case "rmc" : SQLQuery = "select rmc_reNr as RechnungsNr,rmc_reDatum AS Rechnungsdatum, Adressen.AdressenNr as KundenNr,Adressen.[Name 1] as Kunde from [tblRMCImport] INNER JOIN Adressen on WölflKundenNr= [rmc_kdNr] where rmc_daId is null and cast([rmc_reDatum] as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' group by rmc_reNr, Adressen.AdressenNr, Adressen.[Name 1],rmc_reDatum " + Case "rmc" : SQLQuery = "select rmc_reNr as RechnungsNr,rmc_reDatum AS Rechnungsdatum, Adressen.AdressenNr as KundenNr,Adressen.[Name 1] as Kunde from [tblRMCImport] INNER JOIN Adressen on WölflKundenNr=[rmc_kdNr] or weitereWölflKundenNr=[rmc_kdNr] where rmc_daId is null and cast([rmc_reDatum] as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' group by rmc_reNr, Adressen.AdressenNr, Adressen.[Name 1],rmc_reDatum " Case "mse" : SQLQuery = "select invoice_id as RechnungsNr,[invoice_date] as Rechnungsdatum, Adressen.AdressenNr as KundenNr,Adressen.[Name 1] as Kunde from tblMSEInvoices inner join [tblMSECustomers] on [customer_number] = [customer_id] INNER JOIN Adressen on Adressen.MSEKundenNr = [customer_number] where daId is null and cast(invoice_date as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' group by invoice_id, Adressen.AdressenNr, Adressen.[Name 1], invoice_date" Case "uta" : SQLQuery = "select tblUTAImportNew.Abrechnungsnummer as RechnungNr,[Rechnungsdatum] AS Rechnungsdatum ,Adressen.AdressenNr as KundenNr,Adressen.[Name 1] as Kunde from tblUTAImportNew INNER JOIN Adressen on Adressen.UTAKundenNr = tblUTAImportNew.Kundennummer where daId is null and cast([Rechnungsdatum] as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' and Lieferland <> 'ROM' and Steuerliches_Lieferland <> 'ROM' group by tblUTAImportNew.Abrechnungsnummer, Rechnungsdatum,Adressen.AdressenNr, Adressen.[Name 1] " Case "ids" : SQLQuery = "select Invoicenumber as RechnungsNr,YearMonthDay as Rechnungsdatum, Adressen.AdressenNr as KundenNr,Adressen.[Name 1] as Kunde from tblIDSInvoicesNew Inner join [tbl_IDS_Kunden] on [tbl_IDS_Kunden].CustomerCode =tblIDSInvoicesNew.CustomerCode and isnull([tbl_IDS_Kunden].KdNrAlt, 1) = 0 Inner join Adressen on Adressen.AdressenNr = [tbl_IDS_Kunden].KdNrVERAG where DocumentName is null and cast(YearMonthDay as Date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' group by Invoicenumber, Adressen.AdressenNr, Adressen.[Name 1], YearMonthDay" diff --git a/SDL/kassenbuch/frmNacherfassungLeihgeld.Designer.vb b/SDL/kassenbuch/frmNacherfassungLeihgeld.Designer.vb index d02b6dcb..4d2d496c 100644 --- a/SDL/kassenbuch/frmNacherfassungLeihgeld.Designer.vb +++ b/SDL/kassenbuch/frmNacherfassungLeihgeld.Designer.vb @@ -795,9 +795,9 @@ Partial Class frmNacherfassungLeihgeld Me.cbxOP_sofort_buchen.CheckState = System.Windows.Forms.CheckState.Checked Me.cbxOP_sofort_buchen.Location = New System.Drawing.Point(291, 290) Me.cbxOP_sofort_buchen.Name = "cbxOP_sofort_buchen" - Me.cbxOP_sofort_buchen.Size = New System.Drawing.Size(117, 17) + Me.cbxOP_sofort_buchen.Size = New System.Drawing.Size(145, 17) Me.cbxOP_sofort_buchen.TabIndex = 213 - Me.cbxOP_sofort_buchen.Text = "OP sofort erzeugen" + Me.cbxOP_sofort_buchen.Text = "Buchung sofort erzeugen" Me.cbxOP_sofort_buchen.UseVisualStyleBackColor = True ' 'frmNacherfassungLeihgeld diff --git a/SDL/kassenbuch/frmNacherfassungLeihgeld.vb b/SDL/kassenbuch/frmNacherfassungLeihgeld.vb index ecbedca5..4cd01c2e 100644 --- a/SDL/kassenbuch/frmNacherfassungLeihgeld.vb +++ b/SDL/kassenbuch/frmNacherfassungLeihgeld.vb @@ -87,7 +87,6 @@ Public Class frmNacherfassungLeihgeld Case "NKD" : stammfiliale = "5303" '"4801,4803,4806,5103,5003,5303" : stammfiliale = 4806 Case "SBG" : stammfiliale = "5003" '"4801,4803,4806,5103,5003,5303" : stammfiliale = 4806 Case "NEU" : stammfiliale = "4819" '"4801,4803,4806,5103,5003,5303" : stammfiliale = 4806 - ' Case Else : filialen = "4806" '"4801,4803,4806,5103,5003,5303" : stammfiliale = 4806 End Select End Select diff --git a/SDL/kunden/usrcntlKundeBearbeitenFull.Designer.vb b/SDL/kunden/usrcntlKundeBearbeitenFull.Designer.vb index d162ec93..1ce5d686 100644 --- a/SDL/kunden/usrcntlKundeBearbeitenFull.Designer.vb +++ b/SDL/kunden/usrcntlKundeBearbeitenFull.Designer.vb @@ -23,34 +23,34 @@ Partial Class usrcntlKundeBearbeitenFull Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle38 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle39 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle40 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle41 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle42 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle43 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle44 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle45 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle46 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle47 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle48 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle49 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle50 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle32 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle33 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle34 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle35 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle36 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle37 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle51 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle52 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle53 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle54 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle55 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle56 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle29 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle30 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle31 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + 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() + Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle25 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle26 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle27 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle28 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() @@ -61,9 +61,11 @@ 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() @@ -77,6 +79,7 @@ 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() @@ -101,6 +104,7 @@ 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.Panel2 = New System.Windows.Forms.Panel() Me.Label115 = New System.Windows.Forms.Label() @@ -271,11 +275,19 @@ Partial Class usrcntlKundeBearbeitenFull Me.txtUSt_GVAusgestelltAm = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtUSt_GVAngefordertAm = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.tbSonstiges = New System.Windows.Forms.TabPage() + Me.txtSonst_weitereKdNrWOELFL = New System.Windows.Forms.TextBox() + Me.lblIDS_Rabatte = New System.Windows.Forms.Label() + Me.PictureBox7 = New System.Windows.Forms.PictureBox() + Me.cbx_IDS_inaktiveeinblenden = New System.Windows.Forms.CheckBox() + Me.TabControl1 = New System.Windows.Forms.TabControl() + Me.Standard = New System.Windows.Forms.TabPage() + Me.dgvIDS_Standard = New System.Windows.Forms.DataGridView() + Me.Kunden = New System.Windows.Forms.TabPage() + Me.dgvIDS_Rabatte = New System.Windows.Forms.DataGridView() Me.cbxCSInsolvent = New System.Windows.Forms.CheckBox() Me.cbxCS_Added = New System.Windows.Forms.CheckBox() Me.Label113 = New System.Windows.Forms.Label() Me.Label112 = New System.Windows.Forms.Label() - Me.dgvIDS_Rabatte = New System.Windows.Forms.DataGridView() Me.txtSumVerag = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtSonst_KdNrVerag = New System.Windows.Forms.TextBox() Me.Label110 = New System.Windows.Forms.Label() @@ -387,6 +399,7 @@ 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() @@ -412,18 +425,6 @@ 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.TabControl1 = New System.Windows.Forms.TabControl() - Me.Standard = New System.Windows.Forms.TabPage() - Me.Kunden = New System.Windows.Forms.TabPage() - Me.dgvIDS_Standard = New System.Windows.Forms.DataGridView() - Me.cbx_IDS_inaktiveeinblenden = New System.Windows.Forms.CheckBox() - Me.PictureBox7 = New System.Windows.Forms.PictureBox() - 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.lblIDS_Rabatte = New System.Windows.Forms.Label() Me.tbcntrDetails.SuspendLayout() Me.tbAbfertigung.SuspendLayout() Me.tbcntrAbf.SuspendLayout() @@ -450,6 +451,11 @@ Partial Class usrcntlKundeBearbeitenFull CType(Me.dgvMWST, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvUstv_LaenderUndSteuernummern, System.ComponentModel.ISupportInitialize).BeginInit() Me.tbSonstiges.SuspendLayout() + CType(Me.PictureBox7, System.ComponentModel.ISupportInitialize).BeginInit() + Me.TabControl1.SuspendLayout() + Me.Standard.SuspendLayout() + CType(Me.dgvIDS_Standard, System.ComponentModel.ISupportInitialize).BeginInit() + Me.Kunden.SuspendLayout() CType(Me.dgvIDS_Rabatte, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvSonst_IDSKunden, System.ComponentModel.ISupportInitialize).BeginInit() Me.tbSchnittstellen.SuspendLayout() @@ -465,11 +471,6 @@ Partial Class usrcntlKundeBearbeitenFull Me.TabPage11.SuspendLayout() Me.pnlNeukunde.SuspendLayout() Me.cnsBankverbindungen.SuspendLayout() - Me.TabControl1.SuspendLayout() - Me.Standard.SuspendLayout() - Me.Kunden.SuspendLayout() - CType(Me.dgvIDS_Standard, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.PictureBox7, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'tbcntrDetails @@ -615,6 +616,16 @@ 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) @@ -649,6 +660,15 @@ 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) @@ -817,6 +837,14 @@ 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) @@ -1122,6 +1150,15 @@ 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.Panel2) @@ -3197,8 +3234,8 @@ Partial Class usrcntlKundeBearbeitenFull Me.dgvUmsatzbericht.AllowUserToDeleteRows = False Me.dgvUmsatzbericht.AllowUserToOrderColumns = True Me.dgvUmsatzbericht.AllowUserToResizeRows = False - DataGridViewCellStyle38.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvUmsatzbericht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle38 + DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvUmsatzbericht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1 Me.dgvUmsatzbericht.BackgroundColor = System.Drawing.Color.White Me.dgvUmsatzbericht.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvUmsatzbericht.Location = New System.Drawing.Point(6, 25) @@ -3297,8 +3334,8 @@ Partial Class usrcntlKundeBearbeitenFull Me.dgvOffenePosten.AllowUserToDeleteRows = False Me.dgvOffenePosten.AllowUserToOrderColumns = True Me.dgvOffenePosten.AllowUserToResizeRows = False - DataGridViewCellStyle39.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvOffenePosten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle39 + DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvOffenePosten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2 Me.dgvOffenePosten.BackgroundColor = System.Drawing.Color.White Me.dgvOffenePosten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvOffenePosten.Location = New System.Drawing.Point(6, 38) @@ -3473,40 +3510,40 @@ Partial Class usrcntlKundeBearbeitenFull Me.dgvKreditkarten.AllowUserToDeleteRows = False Me.dgvKreditkarten.AllowUserToOrderColumns = True Me.dgvKreditkarten.AllowUserToResizeRows = False - DataGridViewCellStyle40.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvKreditkarten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle40 + DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvKreditkarten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3 Me.dgvKreditkarten.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle41.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle41.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle41.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle41.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle41.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle41.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvKreditkarten.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle41 + DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvKreditkarten.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4 Me.dgvKreditkarten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle42.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle42.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle42.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle42.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle42.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvKreditkarten.DefaultCellStyle = DataGridViewCellStyle42 + DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.dgvKreditkarten.DefaultCellStyle = DataGridViewCellStyle5 Me.dgvKreditkarten.Location = New System.Drawing.Point(9, 20) Me.dgvKreditkarten.MultiSelect = False Me.dgvKreditkarten.Name = "dgvKreditkarten" - DataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle43.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle43.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle43.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle43.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle43.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvKreditkarten.RowHeadersDefaultCellStyle = DataGridViewCellStyle43 + DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvKreditkarten.RowHeadersDefaultCellStyle = DataGridViewCellStyle6 Me.dgvKreditkarten.RowHeadersVisible = False - DataGridViewCellStyle44.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.dgvKreditkarten.RowsDefaultCellStyle = DataGridViewCellStyle44 + DataGridViewCellStyle7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.dgvKreditkarten.RowsDefaultCellStyle = DataGridViewCellStyle7 Me.dgvKreditkarten.RowTemplate.DefaultCellStyle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.dgvKreditkarten.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect Me.dgvKreditkarten.Size = New System.Drawing.Size(642, 312) @@ -3586,26 +3623,26 @@ Partial Class usrcntlKundeBearbeitenFull ' 'dgvMWST ' - DataGridViewCellStyle45.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvMWST.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle45 + 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 - DataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle46.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle46.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle46.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle46.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle46.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle46.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvMWST.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle46 + 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 - DataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle47.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle47.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle47.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle47.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle47.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle47.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvMWST.DefaultCellStyle = DataGridViewCellStyle47 + 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) @@ -3690,26 +3727,26 @@ Partial Class usrcntlKundeBearbeitenFull ' 'dgvUstv_LaenderUndSteuernummern ' - DataGridViewCellStyle48.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvUstv_LaenderUndSteuernummern.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle48 + 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 - DataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle49.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle49.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle49.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle49.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle49.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle49.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvUstv_LaenderUndSteuernummern.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle49 + 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 - DataGridViewCellStyle50.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle50.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle50.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle50.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle50.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle50.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle50.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvUstv_LaenderUndSteuernummern.DefaultCellStyle = DataGridViewCellStyle50 + 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, 259) @@ -3845,6 +3882,7 @@ Partial Class usrcntlKundeBearbeitenFull ' 'tbSonstiges ' + Me.tbSonstiges.Controls.Add(Me.txtSonst_weitereKdNrWOELFL) Me.tbSonstiges.Controls.Add(Me.lblIDS_Rabatte) Me.tbSonstiges.Controls.Add(Me.PictureBox7) Me.tbSonstiges.Controls.Add(Me.cbx_IDS_inaktiveeinblenden) @@ -3894,6 +3932,139 @@ Partial Class usrcntlKundeBearbeitenFull Me.tbSonstiges.Text = "Sonstiges" Me.tbSonstiges.UseVisualStyleBackColor = True ' + 'txtSonst_weitereKdNrWOELFL + ' + Me.txtSonst_weitereKdNrWOELFL.Location = New System.Drawing.Point(179, 53) + Me.txtSonst_weitereKdNrWOELFL.Name = "txtSonst_weitereKdNrWOELFL" + Me.txtSonst_weitereKdNrWOELFL.Size = New System.Drawing.Size(50, 20) + Me.txtSonst_weitereKdNrWOELFL.TabIndex = 148 + ' + 'lblIDS_Rabatte + ' + Me.lblIDS_Rabatte.AutoSize = True + Me.lblIDS_Rabatte.Enabled = False + Me.lblIDS_Rabatte.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblIDS_Rabatte.Location = New System.Drawing.Point(10, 273) + Me.lblIDS_Rabatte.Name = "lblIDS_Rabatte" + Me.lblIDS_Rabatte.Size = New System.Drawing.Size(100, 13) + Me.lblIDS_Rabatte.TabIndex = 147 + Me.lblIDS_Rabatte.Text = "IDS-Rabatte/Preise" + Me.lblIDS_Rabatte.Visible = False + ' + 'PictureBox7 + ' + Me.PictureBox7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None + Me.PictureBox7.Image = Global.SDL.My.Resources.Resources.Excel_logo + Me.PictureBox7.Location = New System.Drawing.Point(645, 273) + Me.PictureBox7.Name = "PictureBox7" + Me.PictureBox7.Size = New System.Drawing.Size(20, 20) + Me.PictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom + Me.PictureBox7.TabIndex = 146 + Me.PictureBox7.TabStop = False + ' + 'cbx_IDS_inaktiveeinblenden + ' + Me.cbx_IDS_inaktiveeinblenden.AutoSize = True + Me.cbx_IDS_inaktiveeinblenden.Location = New System.Drawing.Point(9, 194) + Me.cbx_IDS_inaktiveeinblenden.Name = "cbx_IDS_inaktiveeinblenden" + Me.cbx_IDS_inaktiveeinblenden.Size = New System.Drawing.Size(15, 14) + Me.cbx_IDS_inaktiveeinblenden.TabIndex = 41 + Me.cbx_IDS_inaktiveeinblenden.UseVisualStyleBackColor = True + ' + 'TabControl1 + ' + Me.TabControl1.Controls.Add(Me.Standard) + Me.TabControl1.Controls.Add(Me.Kunden) + Me.TabControl1.Location = New System.Drawing.Point(6, 288) + Me.TabControl1.Name = "TabControl1" + Me.TabControl1.SelectedIndex = 0 + Me.TabControl1.Size = New System.Drawing.Size(659, 201) + Me.TabControl1.TabIndex = 40 + ' + 'Standard + ' + Me.Standard.Controls.Add(Me.dgvIDS_Standard) + Me.Standard.Location = New System.Drawing.Point(4, 22) + Me.Standard.Name = "Standard" + Me.Standard.Padding = New System.Windows.Forms.Padding(3) + Me.Standard.Size = New System.Drawing.Size(651, 175) + Me.Standard.TabIndex = 0 + Me.Standard.Text = "Standardpreise" + Me.Standard.UseVisualStyleBackColor = True + ' + 'dgvIDS_Standard + ' + Me.dgvIDS_Standard.AllowUserToAddRows = False + Me.dgvIDS_Standard.AllowUserToDeleteRows = False + Me.dgvIDS_Standard.AllowUserToResizeRows = False + DataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvIDS_Standard.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14 + Me.dgvIDS_Standard.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.dgvIDS_Standard.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle15 + Me.dgvIDS_Standard.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.dgvIDS_Standard.DefaultCellStyle = DataGridViewCellStyle16 + Me.dgvIDS_Standard.Dock = System.Windows.Forms.DockStyle.Fill + Me.dgvIDS_Standard.Location = New System.Drawing.Point(3, 3) + Me.dgvIDS_Standard.Name = "dgvIDS_Standard" + Me.dgvIDS_Standard.Size = New System.Drawing.Size(645, 169) + Me.dgvIDS_Standard.TabIndex = 35 + ' + 'Kunden + ' + Me.Kunden.Controls.Add(Me.dgvIDS_Rabatte) + Me.Kunden.Location = New System.Drawing.Point(4, 22) + Me.Kunden.Name = "Kunden" + Me.Kunden.Padding = New System.Windows.Forms.Padding(3) + Me.Kunden.Size = New System.Drawing.Size(651, 175) + Me.Kunden.TabIndex = 1 + Me.Kunden.Text = "Kundenpreise" + Me.Kunden.UseVisualStyleBackColor = True + ' + 'dgvIDS_Rabatte + ' + Me.dgvIDS_Rabatte.AllowUserToAddRows = False + Me.dgvIDS_Rabatte.AllowUserToDeleteRows = False + Me.dgvIDS_Rabatte.AllowUserToResizeRows = False + DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvIDS_Rabatte.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17 + Me.dgvIDS_Rabatte.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.dgvIDS_Rabatte.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle18 + Me.dgvIDS_Rabatte.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.dgvIDS_Rabatte.DefaultCellStyle = DataGridViewCellStyle19 + Me.dgvIDS_Rabatte.Dock = System.Windows.Forms.DockStyle.Fill + Me.dgvIDS_Rabatte.Location = New System.Drawing.Point(3, 3) + Me.dgvIDS_Rabatte.Name = "dgvIDS_Rabatte" + Me.dgvIDS_Rabatte.Size = New System.Drawing.Size(645, 169) + Me.dgvIDS_Rabatte.TabIndex = 34 + ' 'cbxCSInsolvent ' Me.cbxCSInsolvent.AutoSize = True @@ -3935,37 +4106,6 @@ Partial Class usrcntlKundeBearbeitenFull Me.Label112.TabIndex = 35 Me.Label112.Text = "CSV-Daten bereitstellen" ' - 'dgvIDS_Rabatte - ' - Me.dgvIDS_Rabatte.AllowUserToAddRows = False - Me.dgvIDS_Rabatte.AllowUserToDeleteRows = False - Me.dgvIDS_Rabatte.AllowUserToResizeRows = False - DataGridViewCellStyle32.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvIDS_Rabatte.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle32 - Me.dgvIDS_Rabatte.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle33.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle33.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle33.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle33.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle33.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle33.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvIDS_Rabatte.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle33 - Me.dgvIDS_Rabatte.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle34.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle34.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle34.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle34.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle34.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle34.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvIDS_Rabatte.DefaultCellStyle = DataGridViewCellStyle34 - Me.dgvIDS_Rabatte.Dock = System.Windows.Forms.DockStyle.Fill - Me.dgvIDS_Rabatte.Location = New System.Drawing.Point(3, 3) - Me.dgvIDS_Rabatte.Name = "dgvIDS_Rabatte" - Me.dgvIDS_Rabatte.Size = New System.Drawing.Size(645, 169) - Me.dgvIDS_Rabatte.TabIndex = 34 - ' 'txtSumVerag ' Me.txtSumVerag._DateTimeOnly = False @@ -3981,7 +4121,7 @@ Partial Class usrcntlKundeBearbeitenFull Me.txtSumVerag._Waehrung = False Me.txtSumVerag._WaehrungZeichen = True Me.txtSumVerag.ForeColor = System.Drawing.Color.Black - Me.txtSumVerag.Location = New System.Drawing.Point(258, 163) + Me.txtSumVerag.Location = New System.Drawing.Point(246, 160) Me.txtSumVerag.MaxLineLength = -1 Me.txtSumVerag.MaxLines_Warning = "" Me.txtSumVerag.MaxLines_Warning_Label = Nothing @@ -3994,7 +4134,7 @@ Partial Class usrcntlKundeBearbeitenFull Me.txtSonst_KdNrVerag.Location = New System.Drawing.Point(123, 164) Me.txtSonst_KdNrVerag.MaxLength = 20 Me.txtSonst_KdNrVerag.Name = "txtSonst_KdNrVerag" - Me.txtSonst_KdNrVerag.Size = New System.Drawing.Size(122, 20) + Me.txtSonst_KdNrVerag.Size = New System.Drawing.Size(106, 20) Me.txtSonst_KdNrVerag.TabIndex = 31 ' 'Label110 @@ -4012,7 +4152,7 @@ Partial Class usrcntlKundeBearbeitenFull ' Me.Label109.AutoSize = True Me.Label109.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label109.Location = New System.Drawing.Point(262, 9) + Me.Label109.Location = New System.Drawing.Point(250, 6) Me.Label109.Name = "Label109" Me.Label109.Size = New System.Drawing.Size(94, 13) Me.Label109.TabIndex = 25 @@ -4061,7 +4201,7 @@ Partial Class usrcntlKundeBearbeitenFull Me.txtSonst_KdNrPLOSE.Enabled = False Me.txtSonst_KdNrPLOSE.Location = New System.Drawing.Point(123, 134) Me.txtSonst_KdNrPLOSE.Name = "txtSonst_KdNrPLOSE" - Me.txtSonst_KdNrPLOSE.Size = New System.Drawing.Size(122, 20) + Me.txtSonst_KdNrPLOSE.Size = New System.Drawing.Size(106, 20) Me.txtSonst_KdNrPLOSE.TabIndex = 20 ' 'Label83 @@ -4090,26 +4230,26 @@ Partial Class usrcntlKundeBearbeitenFull Me.dgvSonst_IDSKunden.AllowUserToAddRows = False Me.dgvSonst_IDSKunden.AllowUserToDeleteRows = False Me.dgvSonst_IDSKunden.AllowUserToResizeRows = False - DataGridViewCellStyle35.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvSonst_IDSKunden.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle35 + DataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvSonst_IDSKunden.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle20 Me.dgvSonst_IDSKunden.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle36.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle36.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle36.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle36.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle36.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvSonst_IDSKunden.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle36 + 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.dgvSonst_IDSKunden.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle21 Me.dgvSonst_IDSKunden.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle37.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle37.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle37.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle37.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle37.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvSonst_IDSKunden.DefaultCellStyle = DataGridViewCellStyle37 + 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.dgvSonst_IDSKunden.DefaultCellStyle = DataGridViewCellStyle22 Me.dgvSonst_IDSKunden.Location = New System.Drawing.Point(9, 214) Me.dgvSonst_IDSKunden.MultiSelect = False Me.dgvSonst_IDSKunden.Name = "dgvSonst_IDSKunden" @@ -4160,7 +4300,7 @@ Partial Class usrcntlKundeBearbeitenFull ' Me.txtSonst_KdNrUTA.Location = New System.Drawing.Point(123, 108) Me.txtSonst_KdNrUTA.Name = "txtSonst_KdNrUTA" - Me.txtSonst_KdNrUTA.Size = New System.Drawing.Size(122, 20) + Me.txtSonst_KdNrUTA.Size = New System.Drawing.Size(106, 20) Me.txtSonst_KdNrUTA.TabIndex = 13 ' 'Label75 @@ -4194,7 +4334,7 @@ Partial Class usrcntlKundeBearbeitenFull ' Me.txtSonst_KdNrMSE.Location = New System.Drawing.Point(123, 79) Me.txtSonst_KdNrMSE.Name = "txtSonst_KdNrMSE" - Me.txtSonst_KdNrMSE.Size = New System.Drawing.Size(122, 20) + Me.txtSonst_KdNrMSE.Size = New System.Drawing.Size(106, 20) Me.txtSonst_KdNrMSE.TabIndex = 8 ' 'Label73 @@ -4211,7 +4351,7 @@ Partial Class usrcntlKundeBearbeitenFull ' Me.txtSonst_KdNrWOELFL.Location = New System.Drawing.Point(123, 53) Me.txtSonst_KdNrWOELFL.Name = "txtSonst_KdNrWOELFL" - Me.txtSonst_KdNrWOELFL.Size = New System.Drawing.Size(122, 20) + Me.txtSonst_KdNrWOELFL.Size = New System.Drawing.Size(50, 20) Me.txtSonst_KdNrWOELFL.TabIndex = 6 ' 'Label72 @@ -4270,7 +4410,7 @@ Partial Class usrcntlKundeBearbeitenFull Me.txtSumPLOSE._Waehrung = False Me.txtSumPLOSE._WaehrungZeichen = True Me.txtSumPLOSE.ForeColor = System.Drawing.Color.Black - Me.txtSumPLOSE.Location = New System.Drawing.Point(258, 134) + Me.txtSumPLOSE.Location = New System.Drawing.Point(246, 131) Me.txtSumPLOSE.MaxLineLength = -1 Me.txtSumPLOSE.MaxLines_Warning = "" Me.txtSumPLOSE.MaxLines_Warning_Label = Nothing @@ -4293,7 +4433,7 @@ Partial Class usrcntlKundeBearbeitenFull Me.txtSumUTA._Waehrung = False Me.txtSumUTA._WaehrungZeichen = True Me.txtSumUTA.ForeColor = System.Drawing.Color.Black - Me.txtSumUTA.Location = New System.Drawing.Point(258, 111) + Me.txtSumUTA.Location = New System.Drawing.Point(246, 108) Me.txtSumUTA.MaxLineLength = -1 Me.txtSumUTA.MaxLines_Warning = "" Me.txtSumUTA.MaxLines_Warning_Label = Nothing @@ -4316,7 +4456,7 @@ Partial Class usrcntlKundeBearbeitenFull Me.txtSumMSE._Waehrung = False Me.txtSumMSE._WaehrungZeichen = True Me.txtSumMSE.ForeColor = System.Drawing.Color.Black - Me.txtSumMSE.Location = New System.Drawing.Point(258, 79) + Me.txtSumMSE.Location = New System.Drawing.Point(246, 76) Me.txtSumMSE.MaxLineLength = -1 Me.txtSumMSE.MaxLines_Warning = "" Me.txtSumMSE.MaxLines_Warning_Label = Nothing @@ -4339,7 +4479,7 @@ Partial Class usrcntlKundeBearbeitenFull Me.txtSumIDS._Waehrung = False Me.txtSumIDS._WaehrungZeichen = True Me.txtSumIDS.ForeColor = System.Drawing.Color.Black - Me.txtSumIDS.Location = New System.Drawing.Point(256, 31) + Me.txtSumIDS.Location = New System.Drawing.Point(244, 28) Me.txtSumIDS.MaxLineLength = -1 Me.txtSumIDS.MaxLines_Warning = "" Me.txtSumIDS.MaxLines_Warning_Label = Nothing @@ -4371,7 +4511,7 @@ Partial Class usrcntlKundeBearbeitenFull Me.cboSonst_Rechnungsdruck.FormattingEnabled = True Me.cboSonst_Rechnungsdruck.Location = New System.Drawing.Point(119, 6) Me.cboSonst_Rechnungsdruck.Name = "cboSonst_Rechnungsdruck" - Me.cboSonst_Rechnungsdruck.Size = New System.Drawing.Size(122, 21) + Me.cboSonst_Rechnungsdruck.Size = New System.Drawing.Size(110, 21) Me.cboSonst_Rechnungsdruck.TabIndex = 1 ' 'tbSchnittstellen @@ -4420,26 +4560,26 @@ Partial Class usrcntlKundeBearbeitenFull 'DataGridView1 ' Me.DataGridView1.AllowUserToResizeRows = False - DataGridViewCellStyle51.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle51 + DataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle23 Me.DataGridView1.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle52.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle52.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle52.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle52.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle52.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle52.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle52.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.DataGridView1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle52 + DataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle24.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.DataGridView1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle24 Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle53.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle53.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle53.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle53.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle53.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle53.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle53.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.DataGridView1.DefaultCellStyle = DataGridViewCellStyle53 + DataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle25.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.DataGridView1.DefaultCellStyle = DataGridViewCellStyle25 Me.DataGridView1.Enabled = False Me.DataGridView1.Location = New System.Drawing.Point(6, 111) Me.DataGridView1.MultiSelect = False @@ -4506,26 +4646,26 @@ Partial Class usrcntlKundeBearbeitenFull ' Me.dgvBankverbindungen.AllowUserToDeleteRows = False Me.dgvBankverbindungen.AllowUserToResizeRows = False - DataGridViewCellStyle54.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvBankverbindungen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle54 + DataGridViewCellStyle26.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvBankverbindungen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle26 Me.dgvBankverbindungen.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle55.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle55.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle55.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle55.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle55.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle55.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle55.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvBankverbindungen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle55 + DataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle27.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle27.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle27.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle27.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle27.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvBankverbindungen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle27 Me.dgvBankverbindungen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle56.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle56.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle56.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle56.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle56.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle56.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle56.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvBankverbindungen.DefaultCellStyle = DataGridViewCellStyle56 + DataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle28.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle28.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle28.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle28.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle28.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.dgvBankverbindungen.DefaultCellStyle = DataGridViewCellStyle28 Me.dgvBankverbindungen.Location = New System.Drawing.Point(3, 40) Me.dgvBankverbindungen.MultiSelect = False Me.dgvBankverbindungen.Name = "dgvBankverbindungen" @@ -5366,6 +5506,14 @@ 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 @@ -5646,145 +5794,6 @@ Partial Class usrcntlKundeBearbeitenFull Me.DataGridViewTextBoxColumn2.HeaderText = "E-Mail" Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2" ' - 'TabControl1 - ' - Me.TabControl1.Controls.Add(Me.Standard) - Me.TabControl1.Controls.Add(Me.Kunden) - Me.TabControl1.Location = New System.Drawing.Point(6, 288) - Me.TabControl1.Name = "TabControl1" - Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(659, 201) - Me.TabControl1.TabIndex = 40 - ' - 'Standard - ' - Me.Standard.Controls.Add(Me.dgvIDS_Standard) - Me.Standard.Location = New System.Drawing.Point(4, 22) - Me.Standard.Name = "Standard" - Me.Standard.Padding = New System.Windows.Forms.Padding(3) - Me.Standard.Size = New System.Drawing.Size(651, 175) - Me.Standard.TabIndex = 0 - Me.Standard.Text = "Standardpreise" - Me.Standard.UseVisualStyleBackColor = True - ' - 'Kunden - ' - Me.Kunden.Controls.Add(Me.dgvIDS_Rabatte) - Me.Kunden.Location = New System.Drawing.Point(4, 22) - Me.Kunden.Name = "Kunden" - Me.Kunden.Padding = New System.Windows.Forms.Padding(3) - Me.Kunden.Size = New System.Drawing.Size(651, 175) - Me.Kunden.TabIndex = 1 - Me.Kunden.Text = "Kundenpreise" - Me.Kunden.UseVisualStyleBackColor = True - ' - 'dgvIDS_Standard - ' - Me.dgvIDS_Standard.AllowUserToAddRows = False - Me.dgvIDS_Standard.AllowUserToDeleteRows = False - Me.dgvIDS_Standard.AllowUserToResizeRows = False - DataGridViewCellStyle29.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvIDS_Standard.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle29 - Me.dgvIDS_Standard.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle30.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle30.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle30.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle30.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle30.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvIDS_Standard.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle30 - Me.dgvIDS_Standard.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle31.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle31.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle31.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle31.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle31.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle31.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvIDS_Standard.DefaultCellStyle = DataGridViewCellStyle31 - Me.dgvIDS_Standard.Dock = System.Windows.Forms.DockStyle.Fill - Me.dgvIDS_Standard.Location = New System.Drawing.Point(3, 3) - Me.dgvIDS_Standard.Name = "dgvIDS_Standard" - Me.dgvIDS_Standard.Size = New System.Drawing.Size(645, 169) - Me.dgvIDS_Standard.TabIndex = 35 - ' - 'cbx_IDS_inaktiveeinblenden - ' - Me.cbx_IDS_inaktiveeinblenden.AutoSize = True - Me.cbx_IDS_inaktiveeinblenden.Location = New System.Drawing.Point(9, 194) - Me.cbx_IDS_inaktiveeinblenden.Name = "cbx_IDS_inaktiveeinblenden" - Me.cbx_IDS_inaktiveeinblenden.Size = New System.Drawing.Size(15, 14) - Me.cbx_IDS_inaktiveeinblenden.TabIndex = 41 - Me.cbx_IDS_inaktiveeinblenden.UseVisualStyleBackColor = True - ' - 'PictureBox7 - ' - Me.PictureBox7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None - Me.PictureBox7.Image = Global.SDL.My.Resources.Resources.Excel_logo - Me.PictureBox7.Location = New System.Drawing.Point(645, 273) - Me.PictureBox7.Name = "PictureBox7" - Me.PictureBox7.Size = New System.Drawing.Size(20, 20) - Me.PictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom - Me.PictureBox7.TabIndex = 146 - Me.PictureBox7.TabStop = False - ' - '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 - ' - 'lblIDS_Rabatte - ' - Me.lblIDS_Rabatte.AutoSize = True - Me.lblIDS_Rabatte.Enabled = False - Me.lblIDS_Rabatte.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblIDS_Rabatte.Location = New System.Drawing.Point(10, 273) - Me.lblIDS_Rabatte.Name = "lblIDS_Rabatte" - Me.lblIDS_Rabatte.Size = New System.Drawing.Size(100, 13) - Me.lblIDS_Rabatte.TabIndex = 147 - Me.lblIDS_Rabatte.Text = "IDS-Rabatte/Preise" - Me.lblIDS_Rabatte.Visible = False - ' 'usrcntlKundeBearbeitenFull ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -5862,6 +5871,11 @@ Partial Class usrcntlKundeBearbeitenFull CType(Me.dgvUstv_LaenderUndSteuernummern, System.ComponentModel.ISupportInitialize).EndInit() Me.tbSonstiges.ResumeLayout(False) Me.tbSonstiges.PerformLayout() + CType(Me.PictureBox7, System.ComponentModel.ISupportInitialize).EndInit() + Me.TabControl1.ResumeLayout(False) + Me.Standard.ResumeLayout(False) + CType(Me.dgvIDS_Standard, System.ComponentModel.ISupportInitialize).EndInit() + Me.Kunden.ResumeLayout(False) CType(Me.dgvIDS_Rabatte, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dgvSonst_IDSKunden, System.ComponentModel.ISupportInitialize).EndInit() Me.tbSchnittstellen.ResumeLayout(False) @@ -5884,11 +5898,6 @@ Partial Class usrcntlKundeBearbeitenFull Me.pnlNeukunde.ResumeLayout(False) Me.pnlNeukunde.PerformLayout() Me.cnsBankverbindungen.ResumeLayout(False) - Me.TabControl1.ResumeLayout(False) - Me.Standard.ResumeLayout(False) - Me.Kunden.ResumeLayout(False) - CType(Me.dgvIDS_Standard, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.PictureBox7, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -6266,4 +6275,5 @@ Partial Class usrcntlKundeBearbeitenFull Friend WithEvents cbx_IDS_inaktiveeinblenden As CheckBox Friend WithEvents PictureBox7 As PictureBox Friend WithEvents lblIDS_Rabatte As Label + Friend WithEvents txtSonst_weitereKdNrWOELFL As TextBox End Class diff --git a/SDL/kunden/usrcntlKundeBearbeitenFull.vb b/SDL/kunden/usrcntlKundeBearbeitenFull.vb index b78addd4..879624b7 100644 --- a/SDL/kunden/usrcntlKundeBearbeitenFull.vb +++ b/SDL/kunden/usrcntlKundeBearbeitenFull.vb @@ -367,6 +367,7 @@ Public Class usrcntlKundeBearbeitenFull cboSonst_Rechnungsdruck._value = loadValue(ADRESSE.Rechnungsdruck, "") txtSonst_KdNrIDS.Text = loadValue(ADRESSE.IDSKundenNr, "") txtSonst_KdNrWOELFL.Text = loadValue(ADRESSE.WölflKundenNr, "") + txtSonst_weitereKdNrWOELFL.Text = loadValue(ADRESSE.weitereWölflKundenNr, "") txtSonst_KdNrMSE.Text = loadValue(ADRESSE.MSEKundenNr, "") txtSonst_KdNrTelepass.Text = loadValue(ADRESSE.TELEPASS_Kd_Nr, "") txtSonst_KdNrPLOSE.Text = loadValue(ADRESSE.PLOSEKundenNr, "") @@ -813,6 +814,7 @@ Public Class usrcntlKundeBearbeitenFull ADRESSE.Rechnungsdruck = isLeerNothing(cboSonst_Rechnungsdruck._value) ADRESSE.IDSKundenNr = isLeerNothing(txtSonst_KdNrIDS.Text) ADRESSE.WölflKundenNr = isLeerNothing(txtSonst_KdNrWOELFL.Text) + ADRESSE.weitereWölflKundenNr = isLeerNothing(txtSonst_weitereKdNrWOELFL.Text) ADRESSE.MSEKundenNr = isLeerNothing(txtSonst_KdNrMSE.Text) ADRESSE.TELEPASS_Kd_Nr = isLeerNothing(txtSonst_KdNrTelepass.Text) ADRESSE.PLOSEKundenNr = isLeerNothing(txtSonst_KdNrPLOSE.Text) @@ -2234,7 +2236,7 @@ Public Class usrcntlKundeBearbeitenFull Dim dt_IDS_Rabatte As DataTable = sql.loadDgvBySql("SELECT P.ProductDescription, C.OutletCountry, S.OutletName, RW.Rechenwert, Kz, RW.KategorieNr as KatNr FROM [VERAG].[dbo].[tbl_IDS_Rechenwerte] as RW left join [VERAG].[dbo].[tbl_IDS_Produkte] as P on P.ProductTypeCode = RW.ProductTypeCode left join [VERAG].[dbo].[tbl_IDS_Länder] as C on C.OutletCountryCode = RW.OutletCountryCode - left join [VERAG].[dbo].[tbl_IDS_Stationen] as S on S.[OutletCode] = RW.OutletCode where CustomerCode =" & KUNDE.KundenNr & " order by Kz", "FMZOLL") + left join [VERAG].[dbo].[tbl_IDS_Stationen] as S on S.[OutletCode] = RW.OutletCode and S.OutletCountryCode = RW.OutletCountryCode where CustomerCode =" & KUNDE.KundenNr & " order by Kz", "FMZOLL") With dgvIDS_Rabatte @@ -2265,7 +2267,7 @@ Public Class usrcntlKundeBearbeitenFull Dim dt_IDS As DataTable = sql.loadDgvBySql("SELECT P.ProductDescription, C.OutletCountry, S.OutletName, RW.Rechenwert, Kz, RW.KategorieNr as KatNr FROM [VERAG].[dbo].[tbl_IDS_Rechenwerte] as RW left join [VERAG].[dbo].[tbl_IDS_Produkte] as P on P.ProductTypeCode = RW.ProductTypeCode left join [VERAG].[dbo].[tbl_IDS_Länder] as C on C.OutletCountryCode = RW.OutletCountryCode - left join [VERAG].[dbo].[tbl_IDS_Stationen] as S on S.[OutletCode] = RW.OutletCode where CustomerCode is null order by KZ", "FMZOLL") + left join [VERAG].[dbo].[tbl_IDS_Stationen] as S on S.[OutletCode] = RW.OutletCode and S.OutletCountryCode = RW.OutletCountryCode where CustomerCode is null order by KZ", "FMZOLL") With dgvIDS_Standard .DataSource = dt_IDS diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cAdressen.vb b/VERAG_PROG_ALLGEMEIN/Classes/cAdressen.vb index b723416e..fb25e4cb 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cAdressen.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cAdressen.vb @@ -45,6 +45,8 @@ Public Class cAdressen Property MWSTVorauszahlung As Object = Nothing Property PLOSEKundenNr As Object = Nothing + Property weitereWölflKundenNr As Object = Nothing + Public hasEntry = False Shared SQL As New SQL @@ -139,6 +141,7 @@ Public Class cAdressen ' list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("SSMA_TimeStamp", SSMA_TimeStamp)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("MWSTVorauszahlung", MWSTVorauszahlung)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("PLOSEKundenNr", PLOSEKundenNr)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("weitereWölflKundenNr", weitereWölflKundenNr)) Return list End Function @@ -311,7 +314,7 @@ Public Class cAdressen Try Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL(False) - Using cmd As New SqlCommand("Select TOP(1) * FROM Adressen WHERE (UstIdKz + UstIdNr='" & UIDNr & "' or Steuernummer ='" & UIDNr & "') AND WölflKundenNr = " & woelflKdNr, conn) + Using cmd As New SqlCommand("Select TOP(1) * FROM Adressen WHERE (UstIdKz + UstIdNr='" & UIDNr & "' or Steuernummer ='" & UIDNr & "') AND WölflKundenNr = " & woelflKdNr & " OR weitereWölflKundenNr " & woelflKdNr, conn) Dim dr = cmd.ExecuteReader() If dr.Read Then diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cRMC.vb b/VERAG_PROG_ALLGEMEIN/Classes/cRMC.vb index 709ce01a..5baed19c 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cRMC.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cRMC.vb @@ -1,6 +1,5 @@  Imports System.Data.SqlClient -Imports System.IO Imports System.Reflection Public Class cRMC @@ -177,7 +176,7 @@ Public Class cRMC Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() Using cmd As New SqlCommand(" SELECT rmc_reDatum,rmc_kdNr,[rmc_reNr],sum([rmc_betragNetto])[rmc_betragNetto],sum([rmc_betragMWST])[rmc_betragMWST] ,sum([rmc_betragBrutto] )[rmc_betragBrutto], [rmc_waehrung], sum([rmc_euroBrutto])[rmc_euroBrutto], rmc_daId, isnull(rmc_daId_InvAtt,0) as rmc_daId_InvAtt FROM [tblRMCImport] - INNER JOIN Adressen as adr on rmc_kdNr=adr.[WölflKundenNr] + INNER JOIN Adressen as adr on rmc_kdNr=adr.[WölflKundenNr] or rmc_kdNr=adr.[weitereWölflKundenNr] where cast(rmc_reDatum as date) between @von and @bis and AdressenNr=@AdressenNr AND rmc_landKZ ='" & LandKZ & "'" & IIf(Not Archiv, " And rmc_archiv = 0 ", "") & " group by rmc_reDatum,rmc_kdNr,[rmc_reNr],[rmc_waehrung], rmc_daId, isnull(rmc_daId_InvAtt,0)