Messenger Bugfix, Mahnungen für Verag360, etc.
This commit is contained in:
35
SDL/buchhaltung/frmBU_Mahnlauf.Designer.vb
generated
35
SDL/buchhaltung/frmBU_Mahnlauf.Designer.vb
generated
@@ -77,7 +77,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(1107, 127)
|
||||
Me.Panel1.Size = New System.Drawing.Size(1287, 127)
|
||||
Me.Panel1.TabIndex = 0
|
||||
'
|
||||
'cbxNurFaellig
|
||||
@@ -86,7 +86,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(565, 63)
|
||||
Me.cbxNurFaellig.Location = New System.Drawing.Point(568, 63)
|
||||
Me.cbxNurFaellig.Name = "cbxNurFaellig"
|
||||
Me.cbxNurFaellig.Size = New System.Drawing.Size(94, 17)
|
||||
Me.cbxNurFaellig.TabIndex = 38
|
||||
@@ -124,6 +124,7 @@ Partial Class frmBU_Mahnlauf
|
||||
Me.KdSearchBox1._displayWoelflKd = False
|
||||
Me.KdSearchBox1._hideIfListEmpty = True
|
||||
Me.KdSearchBox1._loadKdData = False
|
||||
Me.KdSearchBox1._searchName1 = True
|
||||
Me.KdSearchBox1._UseFIRMA = ""
|
||||
Me.KdSearchBox1._ValueKdAndName = True
|
||||
Me.KdSearchBox1.dgvpos = "LEFT"
|
||||
@@ -156,7 +157,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(912, 56)
|
||||
Me.btnSuche.Location = New System.Drawing.Point(1092, 56)
|
||||
Me.btnSuche.Name = "btnSuche"
|
||||
Me.btnSuche.Size = New System.Drawing.Size(162, 52)
|
||||
Me.btnSuche.TabIndex = 29
|
||||
@@ -188,6 +189,7 @@ Partial Class frmBU_Mahnlauf
|
||||
Me.MyTextBox1._DateTimeOnly = False
|
||||
Me.MyTextBox1._numbersOnly = False
|
||||
Me.MyTextBox1._numbersOnlyKommastellen = ""
|
||||
Me.MyTextBox1._numbersOnlyTrennzeichen = True
|
||||
Me.MyTextBox1._Prozent = False
|
||||
Me.MyTextBox1._ShortDateNew = False
|
||||
Me.MyTextBox1._ShortDateOnly = False
|
||||
@@ -223,7 +225,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(1107, 48)
|
||||
Me.pnlTop.Size = New System.Drawing.Size(1287, 48)
|
||||
Me.pnlTop.TabIndex = 4
|
||||
'
|
||||
'Label4
|
||||
@@ -243,7 +245,7 @@ Partial Class frmBU_Mahnlauf
|
||||
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Panel2.Location = New System.Drawing.Point(0, 127)
|
||||
Me.Panel2.Name = "Panel2"
|
||||
Me.Panel2.Size = New System.Drawing.Size(1107, 572)
|
||||
Me.Panel2.Size = New System.Drawing.Size(1287, 572)
|
||||
Me.Panel2.TabIndex = 1
|
||||
'
|
||||
'MyDatagridview1
|
||||
@@ -259,7 +261,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(1107, 572)
|
||||
Me.MyDatagridview1.Size = New System.Drawing.Size(1287, 572)
|
||||
Me.MyDatagridview1.TabIndex = 0
|
||||
'
|
||||
'Panel3
|
||||
@@ -281,7 +283,7 @@ Partial Class frmBU_Mahnlauf
|
||||
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel3.Location = New System.Drawing.Point(0, 699)
|
||||
Me.Panel3.Name = "Panel3"
|
||||
Me.Panel3.Size = New System.Drawing.Size(1107, 147)
|
||||
Me.Panel3.Size = New System.Drawing.Size(1287, 147)
|
||||
Me.Panel3.TabIndex = 1
|
||||
'
|
||||
'cbxMahnstufeErh
|
||||
@@ -290,7 +292,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(900, 11)
|
||||
Me.cbxMahnstufeErh.Location = New System.Drawing.Point(1080, 11)
|
||||
Me.cbxMahnstufeErh.Name = "cbxMahnstufeErh"
|
||||
Me.cbxMahnstufeErh.Size = New System.Drawing.Size(118, 17)
|
||||
Me.cbxMahnstufeErh.TabIndex = 44
|
||||
@@ -301,7 +303,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(789, 121)
|
||||
Me.Label8.Location = New System.Drawing.Point(969, 121)
|
||||
Me.Label8.Name = "Label8"
|
||||
Me.Label8.Size = New System.Drawing.Size(81, 13)
|
||||
Me.Label8.TabIndex = 42
|
||||
@@ -313,7 +315,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(792, 81)
|
||||
Me.Button6.Location = New System.Drawing.Point(972, 81)
|
||||
Me.Button6.Name = "Button6"
|
||||
Me.Button6.Size = New System.Drawing.Size(222, 38)
|
||||
Me.Button6.TabIndex = 40
|
||||
@@ -326,7 +328,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(1033, 30)
|
||||
Me.btnExcel.Location = New System.Drawing.Point(1213, 30)
|
||||
Me.btnExcel.Name = "btnExcel"
|
||||
Me.btnExcel.Size = New System.Drawing.Size(41, 34)
|
||||
Me.btnExcel.TabIndex = 39
|
||||
@@ -385,7 +387,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(565, 119)
|
||||
Me.CheckBox1.Location = New System.Drawing.Point(745, 119)
|
||||
Me.CheckBox1.Name = "CheckBox1"
|
||||
Me.CheckBox1.Size = New System.Drawing.Size(147, 17)
|
||||
Me.CheckBox1.TabIndex = 33
|
||||
@@ -398,7 +400,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(789, 14)
|
||||
Me.Label3.Location = New System.Drawing.Point(969, 14)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(101, 13)
|
||||
Me.Label3.TabIndex = 30
|
||||
@@ -423,7 +425,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(792, 30)
|
||||
Me.Button2.Location = New System.Drawing.Point(972, 30)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(222, 45)
|
||||
Me.Button2.TabIndex = 31
|
||||
@@ -448,6 +450,7 @@ Partial Class frmBU_Mahnlauf
|
||||
Me.MyTextBox2._DateTimeOnly = False
|
||||
Me.MyTextBox2._numbersOnly = False
|
||||
Me.MyTextBox2._numbersOnlyKommastellen = ""
|
||||
Me.MyTextBox2._numbersOnlyTrennzeichen = True
|
||||
Me.MyTextBox2._Prozent = False
|
||||
Me.MyTextBox2._ShortDateNew = True
|
||||
Me.MyTextBox2._ShortDateOnly = False
|
||||
@@ -458,7 +461,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(876, 118)
|
||||
Me.MyTextBox2.Location = New System.Drawing.Point(1056, 118)
|
||||
Me.MyTextBox2.MaxLength = 10
|
||||
Me.MyTextBox2.MaxLineLength = -1
|
||||
Me.MyTextBox2.MaxLines_Warning = ""
|
||||
@@ -473,7 +476,7 @@ Partial Class 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(1107, 846)
|
||||
Me.ClientSize = New System.Drawing.Size(1287, 846)
|
||||
Me.Controls.Add(Me.Panel2)
|
||||
Me.Controls.Add(Me.Panel3)
|
||||
Me.Controls.Add(Me.Panel1)
|
||||
|
||||
@@ -26,10 +26,10 @@ Public Class frmBU_Mahnlauf
|
||||
|
||||
|
||||
'Dim sqlStr = "SELECT i_personenkonto Konto,KTO.c_name, KTO.c_landid Land,KTO.c_plz + ' ' + KTO.c_ort Ort,isnull(KTO.c_email,'') Email, count(*) Anzahl, sum(eur_bruttobetrag+eur_zahlung) Ausstand ,min(op.d_netto) Faelligkeit,max(si_mahnstufe) Mahnstufe, cast(MAX(d_mahnung)as date) Mahndatum
|
||||
Dim sqlStr = "SELECT i_personenkonto Konto,KTO.c_name, KTO.c_landid Land,KTO.c_plz + ' ' + KTO.c_ort Ort,/*isnull(KTO.c_email,'') Email, */
|
||||
isnull(( SELECT TOP 1 [kkd_Email] FROM [FMZOLL\SQLFMZOLL].[VERAG].[dbo].[tblKundenKontakt] where kkd_kkaId=10 and kkd_KundenNr=i_personenkonto ) ,'') Email,
|
||||
count(*) Anzahl, sum(eur_bruttobetrag+eur_zahlung) Ausstand ,min(op.d_netto) Faelligkeit,max(si_mahnstufe) Mahnstufe, cast(MAX(d_mahnung)as date) Mahndatum
|
||||
" & If(cbxNurFaellig.Checked, "", ",SUM(CASE WHEN op.d_netto<getDATE() THEN (eur_bruttobetrag+eur_zahlung) ELSE 0 END) Summe_Faellig") & "
|
||||
Dim sqlStr = "SELECT i_personenkonto Konto,KTO.c_name, KTO.c_landid Land,KTO.c_plz + ' ' + KTO.c_ort Ort,/*isnull(KTO.c_email,'') Email, */ " &
|
||||
"isnull(( SELECT TOP 1 [kkd_Email] FROM [FMZOLL\SQLFMZOLL].[VERAG].[dbo].[tblKundenKontakt] where kkd_kkaId=10 and kkd_KundenNr=i_personenkonto ) ,'') Email," &
|
||||
"count(*) Anzahl, sum(eur_bruttobetrag+eur_zahlung) Ausstand ,min(op.d_netto) Faelligkeit,max(si_mahnstufe) Mahnstufe, cast(MAX(d_mahnung)as date) Mahndatum" &
|
||||
If(cbxNurFaellig.Checked, "", ",SUM(CASE WHEN op.d_netto<getDATE() THEN (eur_bruttobetrag+eur_zahlung) ELSE 0 END) Summe_Faellig") & "
|
||||
FROM op_debitor OP
|
||||
RIGHT join fibu_konto KTO on i_personenkonto=i_konto AND KTO.i_firm_refid=OP.i_firm_refid
|
||||
WHERE (OP.i_firm_refid = '" & Firma_ID & "') AND (dt_geloescht IS NULL)
|
||||
@@ -40,8 +40,33 @@ Public Class frmBU_Mahnlauf
|
||||
HAVING sum(eur_bruttobetrag+eur_zahlung)>'" & MyTextBox1._value & "'
|
||||
" & If(MyComboBox1._value > 0, " and max(si_mahnstufe)>='" & MyComboBox1._value & "'", "") & "
|
||||
ORDER BY KTO.c_name"
|
||||
|
||||
Dim sqlStringVerag360 = "SELECT i_personenkonto Konto,KTO.c_name, KTO.c_landid Land,/*KTO.c_plz + ' ' + KTO.c_ort Ort,isnull(KTO.c_email,'') Email, */ " &
|
||||
"isnull(( SELECT TOP 1 [Zahlungsinformationen] FROM [FMZOLL\SQLFMZOLL].[VERAG].[dbo].Kunden where KundenNr=i_personenkonto ) ,'') Zahlungsinfo, cast(min (OWNFIELD_Belegdatum)as date) as 'ältesteRg'," &
|
||||
"count(*) Anzahl, sum(eur_bruttobetrag+eur_zahlung) Ausstand ,min(op.d_netto) Faelligkeit,max(si_mahnstufe) Mahnstufe, cast(MAX(d_mahnung)as date) Mahndatum, max(replace(KTO.c_zahlziel,'0/0/','')) ZZ,
|
||||
|
||||
case
|
||||
when max(si_mahnstufe) = 1 and max((replace(KTO.c_zahlziel,'0/0/',''))) = 20 Then 'telefonisch'
|
||||
when max(si_mahnstufe) = 1 and max((replace(KTO.c_zahlziel,'0/0/',''))) = 30 Then 'ZZ 30 Tage'
|
||||
when max(si_mahnstufe) = 1 and cast(MAX(d_mahnung)as date) < (GETDATE()- 60) Then 'Sperre Donnerstag'
|
||||
when max(si_mahnstufe) = 2 and max((replace(KTO.c_zahlziel,'0/0/',''))) = 20 Then 'Sperre Freitag'
|
||||
when max(si_mahnstufe) = 2 and max((replace(KTO.c_zahlziel,'0/0/',''))) = 30 Then 'ZZ 30 Tage'
|
||||
when max(si_mahnstufe) >= 3 Then 'Sperre Donnerstag'
|
||||
else '-'
|
||||
End as sperre" & If(cbxNurFaellig.Checked, "", ",SUM(CASE WHEN op.d_netto<getDATE() THEN (eur_bruttobetrag+eur_zahlung) ELSE 0 END) Summe_Faellig") & "
|
||||
FROM op_debitor OP
|
||||
RIGHT join fibu_konto KTO on i_personenkonto=i_konto AND KTO.i_firm_refid=OP.i_firm_refid
|
||||
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(KdTxt <> "", " AND KTO.c_name LIKE '" & KdTxt.Replace("*", "%") & "'", "") & "
|
||||
group by i_personenkonto ,KTO.c_name,KTO.c_landid,KTO.c_ort,KTO.c_plz,KTO.c_email
|
||||
HAVING sum(eur_bruttobetrag+eur_zahlung)>'" & MyTextBox1._value & "'
|
||||
" & If(MyComboBox1._value > 0, " and max(si_mahnstufe)>='" & MyComboBox1._value & "'", "") & "
|
||||
ORDER BY KTO.c_name"
|
||||
|
||||
'MsgBox(sqlStr)
|
||||
Dim dt_OP As DataTable = SQL.loadDgvBySql(sqlStr, "FIBU")
|
||||
Dim dt_OP As DataTable = SQL.loadDgvBySql(If(Firma_ID = 19, sqlStringVerag360, sqlStr), "FIBU")
|
||||
|
||||
.DataSource = dt_OP
|
||||
If .Columns.Count = 0 Then Exit Sub
|
||||
@@ -50,9 +75,18 @@ Public Class frmBU_Mahnlauf
|
||||
.Columns("c_name").AutoSizeMode = DataGridViewAutoSizeColumnsMode.Fill
|
||||
|
||||
.Columns("Land").Width = 40
|
||||
.Columns("Ort").Width = 150
|
||||
|
||||
.Columns("Anzahl").Width = 40
|
||||
.Columns("Email").Width = 150
|
||||
|
||||
If Firma_ID = 19 Then
|
||||
.Columns("Zahlungsinfo").Width = 300
|
||||
.Columns("ältesteRg").Width = 75
|
||||
Else
|
||||
.Columns("Email").Width = 150
|
||||
.Columns("Ort").Width = 150
|
||||
|
||||
End If
|
||||
|
||||
|
||||
.Columns("Faelligkeit").Width = 75
|
||||
.Columns("Faelligkeit").HeaderText = "Fälligkeit"
|
||||
|
||||
Reference in New Issue
Block a user