USTVA, Summenberechnung USTVA, , etc.

This commit is contained in:
2024-10-22 13:05:11 +02:00
parent f6de85f515
commit 4f7ac17921
10 changed files with 395 additions and 193 deletions

View File

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

View File

@@ -43,6 +43,7 @@ Partial Class frmUSTVoffeneAntraege
Me.Label3 = New System.Windows.Forms.Label()
Me.cbxAlleoffenen = New System.Windows.Forms.CheckBox()
Me.lblKunde = New System.Windows.Forms.Label()
Me.Button3 = New System.Windows.Forms.Button()
Me.FlowLayoutPanel.SuspendLayout()
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel4.SuspendLayout()
@@ -58,6 +59,7 @@ Partial Class frmUSTVoffeneAntraege
Me.FlowLayoutPanel.Controls.Add(Me.Button7)
Me.FlowLayoutPanel.Controls.Add(Me.Button1)
Me.FlowLayoutPanel.Controls.Add(Me.Button2)
Me.FlowLayoutPanel.Controls.Add(Me.Button3)
Me.FlowLayoutPanel.Location = New System.Drawing.Point(12, 29)
Me.FlowLayoutPanel.Name = "FlowLayoutPanel"
Me.FlowLayoutPanel.Size = New System.Drawing.Size(1409, 31)
@@ -124,7 +126,8 @@ Partial Class frmUSTVoffeneAntraege
Me.MyDatagridview1.AllowUserToDeleteRows = False
Me.MyDatagridview1.AllowUserToResizeColumns = False
Me.MyDatagridview1.AllowUserToResizeRows = False
Me.MyDatagridview1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
Me.MyDatagridview1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.MyDatagridview1.Location = New System.Drawing.Point(12, 98)
@@ -137,7 +140,7 @@ Partial Class frmUSTVoffeneAntraege
'
'Label2
'
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(1223, 639)
Me.Label2.Name = "Label2"
@@ -159,7 +162,7 @@ Partial Class frmUSTVoffeneAntraege
Me.txtAnzahl._value = ""
Me.txtAnzahl._Waehrung = False
Me.txtAnzahl._WaehrungZeichen = True
Me.txtAnzahl.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtAnzahl.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtAnzahl.ForeColor = System.Drawing.Color.Black
Me.txtAnzahl.Location = New System.Drawing.Point(1321, 636)
Me.txtAnzahl.MaxLineLength = -1
@@ -172,7 +175,7 @@ Partial Class frmUSTVoffeneAntraege
'
'Label1
'
Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(1225, 661)
Me.Label1.Name = "Label1"
@@ -194,7 +197,7 @@ Partial Class frmUSTVoffeneAntraege
Me.txtMWST._value = ""
Me.txtMWST._Waehrung = True
Me.txtMWST._WaehrungZeichen = True
Me.txtMWST.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtMWST.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtMWST.ForeColor = System.Drawing.Color.Black
Me.txtMWST.Location = New System.Drawing.Point(1321, 658)
Me.txtMWST.MaxLineLength = -1
@@ -207,6 +210,8 @@ Partial Class frmUSTVoffeneAntraege
'
'Panel4
'
Me.Panel4.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Panel4.Controls.Add(Me.Label46)
Me.Panel4.Controls.Add(Me.dat_Sum_Bis)
Me.Panel4.Controls.Add(Me.Label45)
@@ -288,6 +293,7 @@ Partial Class frmUSTVoffeneAntraege
'
'cbxAlleoffenen
'
Me.cbxAlleoffenen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cbxAlleoffenen.AutoSize = True
Me.cbxAlleoffenen.Location = New System.Drawing.Point(1137, 70)
Me.cbxAlleoffenen.Name = "cbxAlleoffenen"
@@ -300,11 +306,23 @@ Partial Class frmUSTVoffeneAntraege
'
Me.lblKunde.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.lblKunde.AutoSize = True
Me.lblKunde.Location = New System.Drawing.Point(464, 75)
Me.lblKunde.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblKunde.Location = New System.Drawing.Point(455, 74)
Me.lblKunde.Name = "lblKunde"
Me.lblKunde.Size = New System.Drawing.Size(0, 13)
Me.lblKunde.Size = New System.Drawing.Size(0, 16)
Me.lblKunde.TabIndex = 45
'
'Button3
'
Me.Button3.BackColor = System.Drawing.Color.FloralWhite
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.Location = New System.Drawing.Point(507, 3)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(120, 23)
Me.Button3.TabIndex = 4
Me.Button3.Text = "IDS"
Me.Button3.UseVisualStyleBackColor = False
'
'frmUSTVoffeneAntraege
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -353,4 +371,5 @@ Partial Class frmUSTVoffeneAntraege
Friend WithEvents Button2 As Button
Friend WithEvents cbxAlleoffenen As CheckBox
Friend WithEvents lblKunde As Label
Friend WithEvents Button3 As Button
End Class

View File

@@ -1,6 +1,4 @@
Imports GrapeCity.DataVisualization.TypeScript
Public Class frmUSTVoffeneAntraege
Public Class frmUSTVoffeneAntraege
Public LIEFERANT = ""
Dim datumBis As Date = Nothing
@@ -304,12 +302,75 @@ Public Class frmUSTVoffeneAntraege
End Sub
Sub initDgv_IDS(anz As Integer, Optional kdnr As Integer = -1)
Dim top = ""
If anz > 0 Then top = "TOP (" & anz & ")"
Dim sqlwhere = ""
If kdnr > 0 Then
sqlwhere &= " and Kundennummer = " & kdnr
End If
MsgBox(LIEFERANT & " nocht nicht implementiert!")
'With MyDatagridview1
' .Columns.Clear()
' 'Exit Sub
' 'MsgBox(.sql)
' Dim sqlstring = "Select " & top & " [Kundennummer], [Lieferland_ISO2], [Rechnungsdatum], [Abrechnungsnummer], sum([Gesamtbetrag_Brutto_in_Darstellwährung]) as [Gesamtbetrag_Brutto_in_Darstellwährung], sum([Gesamtbetrag_Umsatzsteuer_in_Darstellwährung]) as [Gesamtbetrag_Umsatzsteuer_in_Darstellwährung], daId FROM [tblUTAImportNew]
' where cast([Rechnungsdatum] As Date) between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' And [archiv] <> 1 " & sqlwhere &
' "group by [Rechnungsdatum], Kundennummer, [Lieferland_ISO2], [Abrechnungsnummer], daId "
' .SET_SQL(sqlstring, "FMZOLL")
' .LOAD()
' If .Columns.Count > 0 Then
' .Columns("Kundennummer").HeaderText = "KdNr"
' .Columns("Lieferland_ISO2").HeaderText = "Land"
' .Columns("Rechnungsdatum").HeaderText = "RE-Datum"
' .Columns("Abrechnungsnummer").HeaderText = "RE-Nr"
' .Columns("Gesamtbetrag_Brutto_in_Darstellwährung").HeaderText = "Gesamtsumme Euro"
' .Columns("Gesamtbetrag_Umsatzsteuer_in_Darstellwährung").HeaderText = "MWSt Euro"
' .Columns("daId").Visible = False
' .Columns("Kundennummer").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
' .AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
' End If
' Dim sumMwSt As Double = 0
' Dim c As New DataGridViewImageColumn
' c.Name = "clmnPDF" : c.HeaderText = "RE"
' ' c.Image = Nothing
' c.DefaultCellStyle.NullValue = Nothing
' c.ImageLayout = DataGridViewImageCellLayout.Zoom
' c.Width = 40 : c.DefaultCellStyle.Padding = New Padding(2) : c.DefaultCellStyle.BackColor = Color.White
' 'c.DefaultCellStyle.Tag = "Therefore anzeigen"
' .Columns.Add(c)
' For Each r As DataGridViewRow In .Rows
' sumMwSt += If(IsNumeric(r.Cells("Gesamtbetrag_Umsatzsteuer_in_Darstellwährung").Value), CDbl(r.Cells("Gesamtbetrag_Umsatzsteuer_in_Darstellwährung").Value), 0)
' If Not IsDBNull(r.Cells("daId").Value) AndAlso r.Cells("daId").Value > 0 Then DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = My.Resources.pdf
' Next
' txtAnzahl.Text = .Rows.Count
' txtMWST.Text = sumMwSt
'End With
End Sub
Sub init()
Select Case LIEFERANT.ToString.ToLower
Case "plose" : initDgv_PLOSE(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
Case "rmc" : initDgv_RMC(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
Case "mse" : initDgv_MSE(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
Case "uta" : initDgv_UTA(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
Case "ids" : initDgv_IDS(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
End Select
End Sub
@@ -324,8 +385,13 @@ Public Class frmUSTVoffeneAntraege
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
initLieferant("MSE", sender)
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
initLieferant("IDS", sender)
End Sub
Private Sub cbxAlleoffenen_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAlleoffenen.CheckedChanged
init()
End Sub
End Class

View File

@@ -28,10 +28,16 @@ Partial Class usrCntlUSTV
Me.dgvUSTV = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.Label1 = New System.Windows.Forms.Label()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.txtSumDiff = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.btnKundendatenaktualisieren = New System.Windows.Forms.Button()
Me.txtSumErst = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtSumUst = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtVZBetrag = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.txt3470Betrag = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.txtVorschaubetrGes = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label6 = New System.Windows.Forms.Label()
@@ -49,18 +55,13 @@ Partial Class usrCntlUSTV
Me.FlatButton2 = New System.Windows.Forms.Button()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.Panel3 = New System.Windows.Forms.Panel()
Me.txtSumDiff = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtSumErst = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtSumUst = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.btnMail = New System.Windows.Forms.Button()
Me.btnPLOSEAlle = New System.Windows.Forms.Button()
Me.Button5 = New System.Windows.Forms.Button()
Me.Button8 = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.Label9 = New System.Windows.Forms.Label()
CType(Me.dgvUSTV, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
Me.Panel2.SuspendLayout()
@@ -72,7 +73,7 @@ Partial Class usrCntlUSTV
Me.pnlFilter.BackColor = System.Drawing.Color.White
Me.pnlFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pnlFilter.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pnlFilter.Location = New System.Drawing.Point(0, 53)
Me.pnlFilter.Location = New System.Drawing.Point(0, 77)
Me.pnlFilter.Name = "pnlFilter"
Me.pnlFilter.Size = New System.Drawing.Size(1627, 31)
Me.pnlFilter.TabIndex = 6
@@ -86,12 +87,12 @@ Partial Class usrCntlUSTV
Me.dgvUSTV.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
Me.dgvUSTV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvUSTV.Dock = System.Windows.Forms.DockStyle.Fill
Me.dgvUSTV.Location = New System.Drawing.Point(0, 84)
Me.dgvUSTV.Location = New System.Drawing.Point(0, 108)
Me.dgvUSTV.MultiSelect = False
Me.dgvUSTV.Name = "dgvUSTV"
Me.dgvUSTV.ReadOnly = True
Me.dgvUSTV.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvUSTV.Size = New System.Drawing.Size(1627, 455)
Me.dgvUSTV.Size = New System.Drawing.Size(1627, 431)
Me.dgvUSTV.TabIndex = 1
'
'Label1
@@ -108,10 +109,17 @@ Partial Class usrCntlUSTV
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.Panel1.Controls.Add(Me.Label9)
Me.Panel1.Controls.Add(Me.txtSumDiff)
Me.Panel1.Controls.Add(Me.btnKundendatenaktualisieren)
Me.Panel1.Controls.Add(Me.txtSumErst)
Me.Panel1.Controls.Add(Me.txtSumUst)
Me.Panel1.Controls.Add(Me.txtVZBetrag)
Me.Panel1.Controls.Add(Me.Label5)
Me.Panel1.Controls.Add(Me.Label8)
Me.Panel1.Controls.Add(Me.Label4)
Me.Panel1.Controls.Add(Me.txt3470Betrag)
Me.Panel1.Controls.Add(Me.Label3)
Me.Panel1.Controls.Add(Me.Label7)
Me.Panel1.Controls.Add(Me.txtVorschaubetrGes)
Me.Panel1.Controls.Add(Me.Label6)
@@ -129,11 +137,37 @@ Partial Class usrCntlUSTV
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(1627, 84)
Me.Panel1.Size = New System.Drawing.Size(1627, 108)
Me.Panel1.TabIndex = 0
'
'txtSumDiff
'
Me.txtSumDiff._DateTimeOnly = False
Me.txtSumDiff._numbersOnly = False
Me.txtSumDiff._numbersOnlyKommastellen = ""
Me.txtSumDiff._numbersOnlyTrennzeichen = True
Me.txtSumDiff._Prozent = False
Me.txtSumDiff._ShortDateNew = False
Me.txtSumDiff._ShortDateOnly = False
Me.txtSumDiff._TimeOnly = False
Me.txtSumDiff._TimeOnly_Seconds = False
Me.txtSumDiff._value = ""
Me.txtSumDiff._Waehrung = True
Me.txtSumDiff._WaehrungZeichen = True
Me.txtSumDiff.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtSumDiff.ForeColor = System.Drawing.Color.Black
Me.txtSumDiff.Location = New System.Drawing.Point(1321, 45)
Me.txtSumDiff.MaxLineLength = -1
Me.txtSumDiff.MaxLines_Warning = ""
Me.txtSumDiff.MaxLines_Warning_Label = Nothing
Me.txtSumDiff.Name = "txtSumDiff"
Me.txtSumDiff.ReadOnly = True
Me.txtSumDiff.Size = New System.Drawing.Size(107, 20)
Me.txtSumDiff.TabIndex = 32
'
'btnKundendatenaktualisieren
'
Me.btnKundendatenaktualisieren.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnKundendatenaktualisieren.Enabled = False
Me.btnKundendatenaktualisieren.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnKundendatenaktualisieren.ForeColor = System.Drawing.Color.Black
@@ -142,9 +176,59 @@ Partial Class usrCntlUSTV
Me.btnKundendatenaktualisieren.Name = "btnKundendatenaktualisieren"
Me.btnKundendatenaktualisieren.Size = New System.Drawing.Size(127, 39)
Me.btnKundendatenaktualisieren.TabIndex = 33
Me.btnKundendatenaktualisieren.Text = "Kundendaten aktualisieren"
Me.btnKundendatenaktualisieren.Text = "Kundendaten aktualisieren*"
Me.btnKundendatenaktualisieren.UseVisualStyleBackColor = True
'
'txtSumErst
'
Me.txtSumErst._DateTimeOnly = False
Me.txtSumErst._numbersOnly = False
Me.txtSumErst._numbersOnlyKommastellen = ""
Me.txtSumErst._numbersOnlyTrennzeichen = True
Me.txtSumErst._Prozent = False
Me.txtSumErst._ShortDateNew = False
Me.txtSumErst._ShortDateOnly = False
Me.txtSumErst._TimeOnly = False
Me.txtSumErst._TimeOnly_Seconds = False
Me.txtSumErst._value = ""
Me.txtSumErst._Waehrung = True
Me.txtSumErst._WaehrungZeichen = True
Me.txtSumErst.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtSumErst.ForeColor = System.Drawing.Color.Black
Me.txtSumErst.Location = New System.Drawing.Point(1321, 25)
Me.txtSumErst.MaxLineLength = -1
Me.txtSumErst.MaxLines_Warning = ""
Me.txtSumErst.MaxLines_Warning_Label = Nothing
Me.txtSumErst.Name = "txtSumErst"
Me.txtSumErst.ReadOnly = True
Me.txtSumErst.Size = New System.Drawing.Size(107, 20)
Me.txtSumErst.TabIndex = 31
'
'txtSumUst
'
Me.txtSumUst._DateTimeOnly = False
Me.txtSumUst._numbersOnly = False
Me.txtSumUst._numbersOnlyKommastellen = ""
Me.txtSumUst._numbersOnlyTrennzeichen = True
Me.txtSumUst._Prozent = False
Me.txtSumUst._ShortDateNew = False
Me.txtSumUst._ShortDateOnly = False
Me.txtSumUst._TimeOnly = False
Me.txtSumUst._TimeOnly_Seconds = False
Me.txtSumUst._value = ""
Me.txtSumUst._Waehrung = True
Me.txtSumUst._WaehrungZeichen = True
Me.txtSumUst.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtSumUst.ForeColor = System.Drawing.Color.Black
Me.txtSumUst.Location = New System.Drawing.Point(1321, 5)
Me.txtSumUst.MaxLineLength = -1
Me.txtSumUst.MaxLines_Warning = ""
Me.txtSumUst.MaxLines_Warning_Label = Nothing
Me.txtSumUst.Name = "txtSumUst"
Me.txtSumUst.ReadOnly = True
Me.txtSumUst.Size = New System.Drawing.Size(107, 20)
Me.txtSumUst.TabIndex = 30
'
'txtVZBetrag
'
Me.txtVZBetrag._DateTimeOnly = False
@@ -161,7 +245,7 @@ Partial Class usrCntlUSTV
Me.txtVZBetrag._WaehrungZeichen = True
Me.txtVZBetrag.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtVZBetrag.ForeColor = System.Drawing.Color.Black
Me.txtVZBetrag.Location = New System.Drawing.Point(1290, 6)
Me.txtVZBetrag.Location = New System.Drawing.Point(1093, 45)
Me.txtVZBetrag.MaxLineLength = -1
Me.txtVZBetrag.MaxLines_Warning = ""
Me.txtVZBetrag.MaxLines_Warning_Label = Nothing
@@ -170,16 +254,36 @@ Partial Class usrCntlUSTV
Me.txtVZBetrag.Size = New System.Drawing.Size(107, 20)
Me.txtVZBetrag.TabIndex = 51
'
'Label5
'
Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(1216, 48)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(79, 13)
Me.Label5.TabIndex = 29
Me.Label5.Text = "Differenzbetrag"
'
'Label8
'
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(1229, 11)
Me.Label8.Location = New System.Drawing.Point(1032, 48)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(55, 13)
Me.Label8.TabIndex = 50
Me.Label8.Text = "VZ-Betrag"
'
'Label4
'
Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(1216, 28)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(90, 13)
Me.Label4.TabIndex = 28
Me.Label4.Text = "Erstattungsbetrag"
'
'txt3470Betrag
'
Me.txt3470Betrag._DateTimeOnly = False
@@ -196,7 +300,7 @@ Partial Class usrCntlUSTV
Me.txt3470Betrag._WaehrungZeichen = True
Me.txt3470Betrag.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txt3470Betrag.ForeColor = System.Drawing.Color.Black
Me.txt3470Betrag.Location = New System.Drawing.Point(1102, 5)
Me.txt3470Betrag.Location = New System.Drawing.Point(1093, 25)
Me.txt3470Betrag.MaxLineLength = -1
Me.txt3470Betrag.MaxLines_Warning = ""
Me.txt3470Betrag.MaxLines_Warning_Label = Nothing
@@ -205,11 +309,21 @@ Partial Class usrCntlUSTV
Me.txt3470Betrag.Size = New System.Drawing.Size(107, 20)
Me.txt3470Betrag.TabIndex = 49
'
'Label3
'
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.Location = New System.Drawing.Point(1216, 7)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(59, 13)
Me.Label3.TabIndex = 27
Me.Label3.Text = "USt-Betrag"
'
'Label7
'
Me.Label7.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label7.AutoSize = True
Me.Label7.Location = New System.Drawing.Point(1065, 10)
Me.Label7.Location = New System.Drawing.Point(1056, 28)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(31, 13)
Me.Label7.TabIndex = 48
@@ -231,7 +345,7 @@ Partial Class usrCntlUSTV
Me.txtVorschaubetrGes._WaehrungZeichen = True
Me.txtVorschaubetrGes.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtVorschaubetrGes.ForeColor = System.Drawing.Color.Black
Me.txtVorschaubetrGes.Location = New System.Drawing.Point(940, 5)
Me.txtVorschaubetrGes.Location = New System.Drawing.Point(1093, 4)
Me.txtVorschaubetrGes.MaxLineLength = -1
Me.txtVorschaubetrGes.MaxLines_Warning = ""
Me.txtVorschaubetrGes.MaxLines_Warning_Label = Nothing
@@ -244,7 +358,7 @@ Partial Class usrCntlUSTV
'
Me.Label6.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(813, 9)
Me.Label6.Location = New System.Drawing.Point(969, 7)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(121, 13)
Me.Label6.TabIndex = 33
@@ -441,12 +555,6 @@ Partial Class usrCntlUSTV
'Panel3
'
Me.Panel3.AutoSize = True
Me.Panel3.Controls.Add(Me.txtSumDiff)
Me.Panel3.Controls.Add(Me.txtSumErst)
Me.Panel3.Controls.Add(Me.txtSumUst)
Me.Panel3.Controls.Add(Me.Label5)
Me.Panel3.Controls.Add(Me.Label4)
Me.Panel3.Controls.Add(Me.Label3)
Me.Panel3.Controls.Add(Me.btnMail)
Me.Panel3.Controls.Add(Me.btnPLOSEAlle)
Me.Panel3.Controls.Add(Me.Button5)
@@ -460,119 +568,15 @@ Partial Class usrCntlUSTV
Me.Panel3.Size = New System.Drawing.Size(1627, 77)
Me.Panel3.TabIndex = 0
'
'txtSumDiff
'
Me.txtSumDiff._DateTimeOnly = False
Me.txtSumDiff._numbersOnly = False
Me.txtSumDiff._numbersOnlyKommastellen = ""
Me.txtSumDiff._numbersOnlyTrennzeichen = True
Me.txtSumDiff._Prozent = False
Me.txtSumDiff._ShortDateNew = False
Me.txtSumDiff._ShortDateOnly = False
Me.txtSumDiff._TimeOnly = False
Me.txtSumDiff._TimeOnly_Seconds = False
Me.txtSumDiff._value = ""
Me.txtSumDiff._Waehrung = True
Me.txtSumDiff._WaehrungZeichen = True
Me.txtSumDiff.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtSumDiff.ForeColor = System.Drawing.Color.Black
Me.txtSumDiff.Location = New System.Drawing.Point(1179, 46)
Me.txtSumDiff.MaxLineLength = -1
Me.txtSumDiff.MaxLines_Warning = ""
Me.txtSumDiff.MaxLines_Warning_Label = Nothing
Me.txtSumDiff.Name = "txtSumDiff"
Me.txtSumDiff.ReadOnly = True
Me.txtSumDiff.Size = New System.Drawing.Size(107, 20)
Me.txtSumDiff.TabIndex = 32
'
'txtSumErst
'
Me.txtSumErst._DateTimeOnly = False
Me.txtSumErst._numbersOnly = False
Me.txtSumErst._numbersOnlyKommastellen = ""
Me.txtSumErst._numbersOnlyTrennzeichen = True
Me.txtSumErst._Prozent = False
Me.txtSumErst._ShortDateNew = False
Me.txtSumErst._ShortDateOnly = False
Me.txtSumErst._TimeOnly = False
Me.txtSumErst._TimeOnly_Seconds = False
Me.txtSumErst._value = ""
Me.txtSumErst._Waehrung = True
Me.txtSumErst._WaehrungZeichen = True
Me.txtSumErst.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtSumErst.ForeColor = System.Drawing.Color.Black
Me.txtSumErst.Location = New System.Drawing.Point(1179, 26)
Me.txtSumErst.MaxLineLength = -1
Me.txtSumErst.MaxLines_Warning = ""
Me.txtSumErst.MaxLines_Warning_Label = Nothing
Me.txtSumErst.Name = "txtSumErst"
Me.txtSumErst.ReadOnly = True
Me.txtSumErst.Size = New System.Drawing.Size(107, 20)
Me.txtSumErst.TabIndex = 31
'
'txtSumUst
'
Me.txtSumUst._DateTimeOnly = False
Me.txtSumUst._numbersOnly = False
Me.txtSumUst._numbersOnlyKommastellen = ""
Me.txtSumUst._numbersOnlyTrennzeichen = True
Me.txtSumUst._Prozent = False
Me.txtSumUst._ShortDateNew = False
Me.txtSumUst._ShortDateOnly = False
Me.txtSumUst._TimeOnly = False
Me.txtSumUst._TimeOnly_Seconds = False
Me.txtSumUst._value = ""
Me.txtSumUst._Waehrung = True
Me.txtSumUst._WaehrungZeichen = True
Me.txtSumUst.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtSumUst.ForeColor = System.Drawing.Color.Black
Me.txtSumUst.Location = New System.Drawing.Point(1179, 6)
Me.txtSumUst.MaxLineLength = -1
Me.txtSumUst.MaxLines_Warning = ""
Me.txtSumUst.MaxLines_Warning_Label = Nothing
Me.txtSumUst.Name = "txtSumUst"
Me.txtSumUst.ReadOnly = True
Me.txtSumUst.Size = New System.Drawing.Size(107, 20)
Me.txtSumUst.TabIndex = 30
'
'Label5
'
Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(1074, 49)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(79, 13)
Me.Label5.TabIndex = 29
Me.Label5.Text = "Differenzbetrag"
'
'Label4
'
Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(1074, 29)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(90, 13)
Me.Label4.TabIndex = 28
Me.Label4.Text = "Erstattungsbetrag"
'
'Label3
'
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.Location = New System.Drawing.Point(1074, 8)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(59, 13)
Me.Label3.TabIndex = 27
Me.Label3.Text = "USt-Betrag"
'
'btnMail
'
Me.btnMail.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnMail.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnMail.ForeColor = System.Drawing.Color.Black
Me.btnMail.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnMail.Location = New System.Drawing.Point(972, 5)
Me.btnMail.Location = New System.Drawing.Point(1288, 5)
Me.btnMail.Name = "btnMail"
Me.btnMail.Size = New System.Drawing.Size(75, 39)
Me.btnMail.Size = New System.Drawing.Size(92, 39)
Me.btnMail.TabIndex = 25
Me.btnMail.Text = "Anträge"
Me.btnMail.UseVisualStyleBackColor = True
@@ -630,6 +634,16 @@ Partial Class usrCntlUSTV
Me.ContextMenuStrip2.Name = "ContextMenuStrip1"
Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4)
'
'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(1483, 52)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(102, 13)
Me.Label9.TabIndex = 52
Me.Label9.Text = "*bis 30.06 -> Vorjahr"
'
'usrCntlUSTV
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -645,7 +659,6 @@ Partial Class usrCntlUSTV
Me.Panel2.ResumeLayout(False)
Me.Panel2.PerformLayout()
Me.Panel3.ResumeLayout(False)
Me.Panel3.PerformLayout()
Me.ResumeLayout(False)
End Sub
@@ -686,4 +699,5 @@ Partial Class usrCntlUSTV
Friend WithEvents Label7 As Label
Friend WithEvents ContextMenuStrip2 As ContextMenuStrip
Friend WithEvents btnKundendatenaktualisieren As Button
Friend WithEvents Label9 As Label
End Class

View File

@@ -19,12 +19,12 @@ Public Class usrCntlUSTV
Sub init(Optional kdNr = -1)
pnlFilter.AutoScroll = False
btnKundendatenaktualisieren.Enabled = False
' MsgBox(kdNr)
If kdNr > 0 Then
Me.kdNr = kdNr
KdSearchBox1.KdNr = kdNr
KdSearchBox1.Enabled = False
'btnKundendatenaktualisieren.Enabled = True
End If
btnPLOSEAlle.Enabled = KdSearchBox1.KdNr > 0
@@ -54,8 +54,14 @@ Public Class usrCntlUSTV
.AllowUserToOrderColumns = False
.AllowUserToResizeRows = False
btnKundendatenaktualisieren.Enabled = KdSearchBox1.KdNr > 0 AndAlso .RowCount > 0
If .Columns.Count > 0 Then
Dim DataGridViewCellStyleDate = New DataGridViewCellStyle()
DataGridViewCellStyleDate.Format = "MM/yyyy"
@@ -144,16 +150,35 @@ Public Class usrCntlUSTV
Dim GesamtUSteuer As Double = 0
Dim GesamtErstattung As Double = 0
Dim Differnezbetrag As Double = 0
Dim Gesamt3470 As Double = 0
Dim GesamtVZBetrag As Double = 0
Dim VorschaubetrGes As Double = 0
If KdSearchBox1.KdNr > 0 Then
GesamtUSteuer = SQL.DLookup("isnull(sum(UStVAn_USteuerbetragEUR),0)", "tblUStVAntrag", "UStVAn_KuNr='" & KdSearchBox1.KdNr & "'", "FMZOLL", "0")
GesamtErstattung = SQL.DLookup("isnull(sum(UStVAn_ErstattungsbetragEUR),0)", "tblUStVAntrag", "UStVAn_KuNr='" & KdSearchBox1.KdNr & "'", "FMZOLL", "0")
Dim dt As New DataTable
dt = SQL.loadDgvBySql("SELECT Kunden.KundenNr as KundenNr, Kunden.UStV_SummeUmsatzsteuerbetragEUR, Kunden.UStV_SummeErstattungsbetragEUR, Kunden.UStV_Summe3470BetragEUR, Kunden.UStV_SummeVZBetragEUR, Kunden.UStV_SummeVorschaubetragEUR
FROM Kunden
WHERE Kunden.KundenNr = " & KdSearchBox1.KdNr, "FMZOLL")
Gesamt3470 = SQL.DLookup("isnull(sum(UStVAn_3470),0)", "tblUStVAntrag", "UStVAn_KuNr='" & KdSearchBox1.KdNr & "'", "FMZOLL", "0")
GesamtVZBetrag = SQL.DLookup("isnull(sum(UStVAn_VZBetrag),0)", "tblUStVAntrag", "UStVAn_KuNr='" & KdSearchBox1.KdNr & "'", "FMZOLL", "0")
If dt.Rows.Count = 1 Then
GesamtUSteuer = dt.Rows(0).Item("UStV_SummeUmsatzsteuerbetragEUR")
GesamtErstattung = dt.Rows(0).Item("UStV_SummeErstattungsbetragEUR")
Gesamt3470 = dt.Rows(0).Item("UStV_Summe3470BetragEUR")
GesamtVZBetrag = dt.Rows(0).Item("UStV_SummeVZBetragEUR")
VorschaubetrGes = dt.Rows(0).Item("UStV_SummeVorschaubetragEUR")
Else
GesamtUSteuer = 0
GesamtErstattung = 0
Gesamt3470 = 0
GesamtVZBetrag = 0
VorschaubetrGes = 0
End If
'GesamtUSteuer = SQL.DLookup("isnull(sum(UStVAn_USteuerbetragEUR),0)", "tblUStVAntrag", "UStVAn_KuNr='" & KdSearchBox1.KdNr & "'", "FMZOLL", "0")
'GesamtErstattung = SQL.DLookup("isnull(sum(UStVAn_ErstattungsbetragEUR),0)", "tblUStVAntrag", "UStVAn_KuNr='" & KdSearchBox1.KdNr & "'", "FMZOLL", "0")
'Gesamt3470 = SQL.DLookup("isnull(sum(UStVAn_3470),0)", "tblUStVAntrag", "UStVAn_KuNr='" & KdSearchBox1.KdNr & "'", "FMZOLL", "0")
'GesamtVZBetrag = SQL.DLookup("isnull(sum(UStVAn_VZBetrag),0)", "tblUStVAntrag", "UStVAn_KuNr='" & KdSearchBox1.KdNr & "'", "FMZOLL", "0")
Else
For Each rows As DataGridViewRow In .Rows
@@ -162,6 +187,7 @@ Public Class usrCntlUSTV
If IsNumeric(rows.Cells("UStVAn_3470").Value) Then Gesamt3470 += rows.Cells("UStVAn_3470").Value
If IsNumeric(rows.Cells("UStVAn_VZBetrag").Value) Then GesamtVZBetrag += rows.Cells("UStVAn_VZBetrag").Value
Next
VorschaubetrGes = 0
End If
@@ -172,6 +198,7 @@ Public Class usrCntlUSTV
txtSumDiff.Text = Differnezbetrag.ToString("C2")
txt3470Betrag.Text = Gesamt3470.ToString("C2")
txtVZBetrag.Text = GesamtVZBetrag.ToString("C2")
txtVorschaubetrGes.Text = VorschaubetrGes.ToString("C2")
End With
@@ -583,15 +610,17 @@ Public Class usrCntlUSTV
Me.Cursor = Cursors.WaitCursor
Try
If VERAG_PROG_ALLGEMEIN.cMDMFunctionsAllgemein.Update_UStVASummenNeuBerechnen(kdNr) Then
ok = VERAG_PROG_ALLGEMEIN.cMDMFunctionsAllgemein.UStVAKunden_SummenNeuBerechnen(kdNr)
If VERAG_PROG_ALLGEMEIN.cMDMFunctionsAllgemein.Update_UStVASummenNeuBerechnen(KdSearchBox1.KdNr) Then
ok = VERAG_PROG_ALLGEMEIN.cMDMFunctionsAllgemein.UStVAKunden_SummenNeuBerechnen(KdSearchBox1.KdNr)
End If
Catch ex As Exception
Me.Cursor = Cursors.Default
End Try
If ok Then MsgBox("Kundendaten wurden aktualisiert!")
If ok Then
'MsgBox("Kundendaten wurden aktualisiert!")
init()
End If
Me.Cursor = Cursors.Default
End Sub
End Class

View File

@@ -314,7 +314,7 @@ Partial Class frmKundenblatt
Me.tbcntrMain.Margin = New System.Windows.Forms.Padding(0)
Me.tbcntrMain.Name = "tbcntrMain"
Me.tbcntrMain.SelectedIndex = 0
Me.tbcntrMain.Size = New System.Drawing.Size(1638, 1045)
Me.tbcntrMain.Size = New System.Drawing.Size(1638, 1062)
Me.tbcntrMain.TabIndex = 3
'
'tbAllgemein
@@ -355,7 +355,7 @@ Partial Class frmKundenblatt
Me.tbAllgemein.Margin = New System.Windows.Forms.Padding(0)
Me.tbAllgemein.Name = "tbAllgemein"
Me.tbAllgemein.Padding = New System.Windows.Forms.Padding(3)
Me.tbAllgemein.Size = New System.Drawing.Size(1630, 1016)
Me.tbAllgemein.Size = New System.Drawing.Size(1630, 1033)
Me.tbAllgemein.TabIndex = 0
Me.tbAllgemein.Text = "Allgemein"
'
@@ -465,7 +465,7 @@ Partial Class frmKundenblatt
Me.dgvOffenePosten.RowHeadersDefaultCellStyle = DataGridViewCellStyle4
Me.dgvOffenePosten.RowHeadersVisible = False
Me.dgvOffenePosten.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvOffenePosten.Size = New System.Drawing.Size(714, 417)
Me.dgvOffenePosten.Size = New System.Drawing.Size(714, 434)
Me.dgvOffenePosten.TabIndex = 175
'
'btnOP
@@ -805,7 +805,7 @@ Partial Class frmKundenblatt
Me.dgvSperrliste.Name = "dgvSperrliste"
Me.dgvSperrliste.ReadOnly = True
Me.dgvSperrliste.RowHeadersDefaultCellStyle = DataGridViewCellStyle7
Me.dgvSperrliste.Size = New System.Drawing.Size(432, 972)
Me.dgvSperrliste.Size = New System.Drawing.Size(432, 989)
Me.dgvSperrliste.TabIndex = 23
'
'PictureBox2
@@ -2241,7 +2241,7 @@ Partial Class frmKundenblatt
'
Me.cntxtCntxtMDM.ImageScalingSize = New System.Drawing.Size(24, 24)
Me.cntxtCntxtMDM.Name = "cntxtCntxtMDM"
Me.cntxtCntxtMDM.OwnerItem = Me.ToolStripMenuItem8
Me.cntxtCntxtMDM.OwnerItem = Me.ToolStripMenuItem4
Me.cntxtCntxtMDM.Size = New System.Drawing.Size(61, 4)
Me.cntxtCntxtMDM.Text = "cntxtMDM"
'
@@ -2381,7 +2381,7 @@ Partial Class frmKundenblatt
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.AutoScroll = True
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(1595, 1174)
Me.ClientSize = New System.Drawing.Size(1595, 1191)
Me.Controls.Add(Me.lblAbfVerb)
Me.Controls.Add(Me.btnAbfVerb)
Me.Controls.Add(Me.tbcntrMain)

View File

@@ -1812,7 +1812,7 @@ Public Class frmKundenblatt
.DataSource = SQL.loadDgvBySql("SELECT [KundenNr] as KdNr,[Datum] as Datum,[Rechnung] as Nummer,[Saldo] as Betrag,'-' as [OP-Saldo],'EUR' as Währung ,'-' as [KumSaldoEUR],[Buchungstext] " &
" FROM [Offene_Posten_DVO] " &
" WHERE KundenNr='" & KUNDE.KundenNrZentrale & "' " & where & " order BY datum, [OP_ID] DESC", "FMZOLL")
" WHERE KundenNr='" & KUNDE.KundenNrZentrale & "' " & where & " order BY datum DESC, [OP_ID] DESC", "FMZOLL")
If .Columns.Count > 0 Then
.Columns("KdNr").Visible = False
@@ -1896,14 +1896,18 @@ Public Class frmKundenblatt
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_FirmenDatenAnzeige Is Nothing Then Exit Sub
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_FirmenDatenAnzeige = "" Then Exit Sub
Dim where = ""
Dim sort = "OP_ID DESC /*, Belegdatum DESC*/"
If cboFirmaFMZOLL._value <> "" Then
where = " AND Firma_ID=" & cboFirmaFMZOLL._value
If cboFirmaFMZOLL._value = "19" Then
sort = "Belegdatum ASC"
End If
Else
where = If(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_FirmenDatenAnzeige.contains("A"), "", " AND Firma_ID IN(" & VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_FirmenDatenAnzeige & ")")
End If
.DataSource = SQL.loadDgvBySql("SELECT [Kontonummer] as KdNr,[Belegdatum] as Datum,[Belegnummer] as Nummer,[Bruttobetrag] as Betrag,[Gesamtausstand] as [OP-Saldo],[Waehrung] as 'Währ.',[KumSaldoEUR],[Mahnstufe] as M, [Fälligkeitsdatum] as 'fällig am' ,[Buchungstext] as Referenz " &
" FROM [Offene Posten] " &
" WHERE [Kontonummer]='" & KUNDE.KundenNrZentrale & "' " & where & " ORDER BY OP_ID DESC /*, Belegdatum DESC*/", "FMZOLL")
" WHERE [Kontonummer]='" & KUNDE.KundenNrZentrale & "' " & where & " ORDER BY " & sort, "FMZOLL")
If .DataSource Is Nothing Then Exit Sub