Mahnlauf, Kundenblatt, etc.

This commit is contained in:
2025-11-21 17:25:05 +01:00
parent 2c1b1c41f8
commit 20d6bb7004
9 changed files with 327 additions and 191 deletions

View File

@@ -62,6 +62,8 @@ Partial Class frmBU_Mahnlauf
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.cboBetreuer = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.lblBetreuer = New System.Windows.Forms.Label()
Me.Panel1.SuspendLayout()
Me.pnlTop.SuspendLayout()
Me.Panel2.SuspendLayout()
@@ -71,6 +73,8 @@ Partial Class frmBU_Mahnlauf
'
'Panel1
'
Me.Panel1.Controls.Add(Me.lblBetreuer)
Me.Panel1.Controls.Add(Me.cboBetreuer)
Me.Panel1.Controls.Add(Me.cbxKontotyp)
Me.Panel1.Controls.Add(Me.txtZahlEingaenge)
Me.Panel1.Controls.Add(Me.cbxZahlungseingaenge)
@@ -88,7 +92,7 @@ Partial Class frmBU_Mahnlauf
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(1427, 127)
Me.Panel1.Size = New System.Drawing.Size(1514, 132)
Me.Panel1.TabIndex = 0
'
'cbxKontotyp
@@ -98,7 +102,7 @@ Partial Class frmBU_Mahnlauf
Me.cbxKontotyp._value = ""
Me.cbxKontotyp.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cbxKontotyp.FormattingEnabled = True
Me.cbxKontotyp.Location = New System.Drawing.Point(529, 96)
Me.cbxKontotyp.Location = New System.Drawing.Point(544, 96)
Me.cbxKontotyp.Name = "cbxKontotyp"
Me.cbxKontotyp.Size = New System.Drawing.Size(97, 21)
Me.cbxKontotyp.TabIndex = 48
@@ -120,7 +124,7 @@ Partial Class frmBU_Mahnlauf
Me.txtZahlEingaenge._WaehrungZeichen = False
Me.txtZahlEingaenge.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtZahlEingaenge.ForeColor = System.Drawing.Color.Black
Me.txtZahlEingaenge.Location = New System.Drawing.Point(675, 78)
Me.txtZahlEingaenge.Location = New System.Drawing.Point(690, 78)
Me.txtZahlEingaenge.MaxLength = 10
Me.txtZahlEingaenge.MaxLineLength = -1
Me.txtZahlEingaenge.MaxLines_Warning = ""
@@ -135,7 +139,7 @@ Partial Class frmBU_Mahnlauf
'
Me.cbxZahlungseingaenge.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cbxZahlungseingaenge.AutoSize = True
Me.cbxZahlungseingaenge.Location = New System.Drawing.Point(529, 80)
Me.cbxZahlungseingaenge.Location = New System.Drawing.Point(544, 80)
Me.cbxZahlungseingaenge.Name = "cbxZahlungseingaenge"
Me.cbxZahlungseingaenge.Size = New System.Drawing.Size(140, 17)
Me.cbxZahlungseingaenge.TabIndex = 39
@@ -148,7 +152,7 @@ Partial Class frmBU_Mahnlauf
Me.cbxNurFaellig.AutoSize = True
Me.cbxNurFaellig.Checked = True
Me.cbxNurFaellig.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxNurFaellig.Location = New System.Drawing.Point(529, 56)
Me.cbxNurFaellig.Location = New System.Drawing.Point(544, 56)
Me.cbxNurFaellig.Name = "cbxNurFaellig"
Me.cbxNurFaellig.Size = New System.Drawing.Size(94, 17)
Me.cbxNurFaellig.TabIndex = 38
@@ -219,7 +223,7 @@ Partial Class frmBU_Mahnlauf
Me.btnSuche.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnSuche.Image = Global.SDL.My.Resources.Resources.search
Me.btnSuche.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnSuche.Location = New System.Drawing.Point(1232, 56)
Me.btnSuche.Location = New System.Drawing.Point(1319, 56)
Me.btnSuche.Name = "btnSuche"
Me.btnSuche.Size = New System.Drawing.Size(162, 52)
Me.btnSuche.TabIndex = 29
@@ -287,7 +291,7 @@ Partial Class frmBU_Mahnlauf
Me.pnlTop.Dock = System.Windows.Forms.DockStyle.Top
Me.pnlTop.Location = New System.Drawing.Point(0, 0)
Me.pnlTop.Name = "pnlTop"
Me.pnlTop.Size = New System.Drawing.Size(1427, 48)
Me.pnlTop.Size = New System.Drawing.Size(1514, 48)
Me.pnlTop.TabIndex = 4
'
'Label4
@@ -305,9 +309,9 @@ Partial Class frmBU_Mahnlauf
'
Me.Panel2.Controls.Add(Me.MyDatagridview1)
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Panel2.Location = New System.Drawing.Point(0, 127)
Me.Panel2.Location = New System.Drawing.Point(0, 132)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(1427, 562)
Me.Panel2.Size = New System.Drawing.Size(1514, 557)
Me.Panel2.TabIndex = 1
'
'MyDatagridview1
@@ -323,7 +327,7 @@ Partial Class frmBU_Mahnlauf
Me.MyDatagridview1.ReadOnly = True
Me.MyDatagridview1.RowHeadersVisible = False
Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.MyDatagridview1.Size = New System.Drawing.Size(1427, 562)
Me.MyDatagridview1.Size = New System.Drawing.Size(1514, 557)
Me.MyDatagridview1.TabIndex = 0
'
'Panel3
@@ -350,14 +354,14 @@ Partial Class frmBU_Mahnlauf
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel3.Location = New System.Drawing.Point(0, 689)
Me.Panel3.Name = "Panel3"
Me.Panel3.Size = New System.Drawing.Size(1427, 166)
Me.Panel3.Size = New System.Drawing.Size(1514, 166)
Me.Panel3.TabIndex = 1
'
'Label9
'
Me.Label9.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label9.AutoSize = True
Me.Label9.Location = New System.Drawing.Point(1109, 144)
Me.Label9.Location = New System.Drawing.Point(1196, 144)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(234, 13)
Me.Label9.TabIndex = 50
@@ -367,7 +371,7 @@ Partial Class frmBU_Mahnlauf
'
Me.cbxMahnsperre.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cbxMahnsperre.AutoSize = True
Me.cbxMahnsperre.Location = New System.Drawing.Point(1337, 11)
Me.cbxMahnsperre.Location = New System.Drawing.Point(1424, 11)
Me.cbxMahnsperre.Name = "cbxMahnsperre"
Me.cbxMahnsperre.Size = New System.Drawing.Size(86, 17)
Me.cbxMahnsperre.TabIndex = 49
@@ -380,7 +384,7 @@ Partial Class frmBU_Mahnlauf
Me.btnMail_Intern.BackgroundImage = Global.SDL.My.Resources.Resources.email_big1
Me.btnMail_Intern.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnMail_Intern.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnMail_Intern.Location = New System.Drawing.Point(1353, 83)
Me.btnMail_Intern.Location = New System.Drawing.Point(1440, 83)
Me.btnMail_Intern.Name = "btnMail_Intern"
Me.btnMail_Intern.Size = New System.Drawing.Size(41, 34)
Me.btnMail_Intern.TabIndex = 48
@@ -419,7 +423,7 @@ Partial Class frmBU_Mahnlauf
Me.cbxMahnstufeErh.AutoSize = True
Me.cbxMahnstufeErh.Checked = True
Me.cbxMahnstufeErh.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxMahnstufeErh.Location = New System.Drawing.Point(1216, 11)
Me.cbxMahnstufeErh.Location = New System.Drawing.Point(1303, 11)
Me.cbxMahnstufeErh.Name = "cbxMahnstufeErh"
Me.cbxMahnstufeErh.Size = New System.Drawing.Size(118, 17)
Me.cbxMahnstufeErh.TabIndex = 44
@@ -430,7 +434,7 @@ Partial Class frmBU_Mahnlauf
'
Me.Label8.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label8.AutoSize = True
Me.Label8.Location = New System.Drawing.Point(1109, 121)
Me.Label8.Location = New System.Drawing.Point(1196, 121)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(81, 13)
Me.Label8.TabIndex = 42
@@ -442,7 +446,7 @@ Partial Class frmBU_Mahnlauf
Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button6.Location = New System.Drawing.Point(1112, 81)
Me.Button6.Location = New System.Drawing.Point(1199, 81)
Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(222, 38)
Me.Button6.TabIndex = 40
@@ -455,7 +459,7 @@ Partial Class frmBU_Mahnlauf
Me.btnExcel.BackgroundImage = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnExcel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnExcel.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnExcel.Location = New System.Drawing.Point(1353, 30)
Me.btnExcel.Location = New System.Drawing.Point(1440, 30)
Me.btnExcel.Name = "btnExcel"
Me.btnExcel.Size = New System.Drawing.Size(41, 34)
Me.btnExcel.TabIndex = 39
@@ -514,7 +518,7 @@ Partial Class frmBU_Mahnlauf
'
Me.CheckBox1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Location = New System.Drawing.Point(628, 113)
Me.CheckBox1.Location = New System.Drawing.Point(715, 113)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(147, 17)
Me.CheckBox1.TabIndex = 33
@@ -527,7 +531,7 @@ Partial Class frmBU_Mahnlauf
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(1109, 14)
Me.Label3.Location = New System.Drawing.Point(1196, 14)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(101, 13)
Me.Label3.TabIndex = 30
@@ -552,7 +556,7 @@ Partial Class frmBU_Mahnlauf
Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button2.Image = Global.SDL.My.Resources.Resources.mahn
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button2.Location = New System.Drawing.Point(1112, 30)
Me.Button2.Location = New System.Drawing.Point(1199, 30)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(222, 45)
Me.Button2.TabIndex = 31
@@ -588,7 +592,7 @@ Partial Class frmBU_Mahnlauf
Me.MyTextBox2._WaehrungZeichen = False
Me.MyTextBox2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.MyTextBox2.ForeColor = System.Drawing.Color.Black
Me.MyTextBox2.Location = New System.Drawing.Point(1196, 118)
Me.MyTextBox2.Location = New System.Drawing.Point(1283, 118)
Me.MyTextBox2.MaxLength = 10
Me.MyTextBox2.MaxLineLength = -1
Me.MyTextBox2.MaxLines_Warning = ""
@@ -598,12 +602,34 @@ Partial Class frmBU_Mahnlauf
Me.MyTextBox2.TabIndex = 39
Me.MyTextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
'
'cboBetreuer
'
Me.cboBetreuer._allowedValuesFreiText = Nothing
Me.cboBetreuer._allowFreiText = False
Me.cboBetreuer._value = ""
Me.cboBetreuer.FormattingEnabled = True
Me.cboBetreuer.Location = New System.Drawing.Point(410, 111)
Me.cboBetreuer.Name = "cboBetreuer"
Me.cboBetreuer.Size = New System.Drawing.Size(97, 21)
Me.cboBetreuer.TabIndex = 49
Me.cboBetreuer.Visible = False
'
'lblBetreuer
'
Me.lblBetreuer.AutoSize = True
Me.lblBetreuer.Location = New System.Drawing.Point(329, 114)
Me.lblBetreuer.Name = "lblBetreuer"
Me.lblBetreuer.Size = New System.Drawing.Size(50, 13)
Me.lblBetreuer.TabIndex = 50
Me.lblBetreuer.Text = "Betreuer:"
Me.lblBetreuer.Visible = False
'
'frmBU_Mahnlauf
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(1427, 855)
Me.ClientSize = New System.Drawing.Size(1514, 855)
Me.Controls.Add(Me.Panel2)
Me.Controls.Add(Me.Panel3)
Me.Controls.Add(Me.Panel1)
@@ -661,4 +687,6 @@ Partial Class frmBU_Mahnlauf
Friend WithEvents cbxKontotyp As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents cbxMahnsperre As CheckBox
Friend WithEvents Label9 As Label
Friend WithEvents lblBetreuer As Label
Friend WithEvents cboBetreuer As VERAG_PROG_ALLGEMEIN.MyComboBox
End Class

View File

@@ -60,16 +60,18 @@ Public Class frmBU_Mahnlauf
when max(si_mahnstufe) >= 5 Then 'gesperrt'
else '-'
End as Sperre " & If(cbxNurFaellig.Checked, "", ",SUM(CASE WHEN op.d_netto<getDATE() THEN (eur_bruttobetrag+eur_zahlung) ELSE 0 END) Summe_Faellig") &
", tblKundenKontakt.[kkd_Email] as Email , cast(isnull(si_mahnung,0) as bit) as mahnbar " &
", tblKundenKontakt.[kkd_Email] as Email, isnull(kde_betreuer,'') as Betreuer , cast(isnull(si_mahnung,0) as bit) as mahnbar " &
"FROM op_debitor OP
RIGHT join fibu_konto KTO on i_personenkonto=i_konto AND KTO.i_firm_refid=OP.i_firm_refid
inner join [FMZOLL\SQLFMZOLL].[VERAG].[dbo].[Kunden] on Kunden.KundenNr = i_personenkonto
inner join [FMZOLL\SQLFMZOLL].[VERAG].[dbo].[tblKundenErweitert] on tblKundenErweitert.kde_KundenNr = Kunden.KundenNr
left join [FMZOLL\SQLFMZOLL].[VERAG].[dbo].[tblKundenKontakt] on kkd_kkaId=10 and kkd_KundenNr=i_personenkonto
WHERE (OP.i_firm_refid = '" & Firma_ID & "') AND (dt_geloescht IS NULL)
" & If(cbxNurFaellig.Checked, " and op.d_netto<=getdate() and isnull(si_mahnflags,0) <>(1) ", "") & "
" & If(KdNr > 0, " AND i_personenkonto ='" & KdNr & "'", "") & "
" & If(cboBetreuer.Text <> "", " AND kde_betreuer ='" & cboBetreuer.Text & "'", "") & "
" & If(KdTxt <> "", " AND KTO.c_name LIKE '" & KdTxt.Replace("*", "%") & "'", "") & "
group by i_personenkonto ,KTO.c_name,KTO.c_landid,KTO.c_ort,KTO.c_plz,[tblKundenKontakt].kkd_Email, Kunden.Abfertigungsverbot, isnull(si_mahnung,0)
group by i_personenkonto ,KTO.c_name,KTO.c_landid,KTO.c_ort,KTO.c_plz,[tblKundenKontakt].kkd_Email, Kunden.Abfertigungsverbot, isnull(si_mahnung,0), isnull([tblKundenErweitert].kde_betreuer,'')
HAVING sum(eur_bruttobetrag+eur_zahlung)>'" & MyTextBox1._value & "'
" & If(MyComboBox1._value > 0, " and max(si_mahnstufe)>='" & MyComboBox1._value & "'", "") & "
ORDER BY KTO.c_name"
@@ -226,6 +228,9 @@ Public Class frmBU_Mahnlauf
'cbxKontotyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Sachkonten", "KO"))
cbxKontotyp.changeItem("Alle")
cboBetreuer.Items.Clear()
cboBetreuer.fillWithSQL("select mit_id, mit_nname FROM [ADMIN].[dbo].[tblMitarbeiter] where tblMitarbeiter.mit_Funktion = 'VK' and mit_gekuendigt = 0 and mit_abteilung = 'MDM'", False, "ADMIN", True)
MyTextBox2._value = Now.ToShortDateString
End Sub
@@ -1501,10 +1506,14 @@ Public Class frmBU_Mahnlauf
Private Sub cboFirma_SelectedValueChanged(sender As Object, e As EventArgs) Handles cboFirma.SelectedValueChanged
If cboFirma._value <> "" AndAlso cboFirma._value = 19 Then
cbxZahlungseingaenge.Visible = True
cboBetreuer.Visible = True
lblBetreuer.Visible = True
Else
cbxZahlungseingaenge.Visible = False
cbxZahlungseingaenge.Checked = False
cboBetreuer.Visible = False
lblBetreuer.Visible = False
End If
End Sub