Creditsafe - UIDNr Übernahme, Ausertungen SDL, Nettobetrag in Belegsebene bei ASFINAG
This commit is contained in:
246
SDL/buchhaltung/usrCntlBH.Designer.vb
generated
246
SDL/buchhaltung/usrCntlBH.Designer.vb
generated
@@ -25,6 +25,15 @@ Partial Class usrCntlBH
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.TabPage1 = New System.Windows.Forms.TabPage()
|
||||
Me.Label37 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox9 = New System.Windows.Forms.GroupBox()
|
||||
Me.Label41 = New System.Windows.Forms.Label()
|
||||
Me.Button11 = New System.Windows.Forms.Button()
|
||||
Me.Label40 = New System.Windows.Forms.Label()
|
||||
Me.Button10 = New System.Windows.Forms.Button()
|
||||
Me.Label39 = New System.Windows.Forms.Label()
|
||||
Me.Label38 = New System.Windows.Forms.Label()
|
||||
Me.Button9 = New System.Windows.Forms.Button()
|
||||
Me.Label34 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox8 = New System.Windows.Forms.GroupBox()
|
||||
Me.Label36 = New System.Windows.Forms.Label()
|
||||
@@ -97,15 +106,6 @@ Partial Class usrCntlBH
|
||||
Me.Label30 = New System.Windows.Forms.Label()
|
||||
Me.Label29 = New System.Windows.Forms.Label()
|
||||
Me.Button7 = New System.Windows.Forms.Button()
|
||||
Me.Label37 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox9 = New System.Windows.Forms.GroupBox()
|
||||
Me.Label38 = New System.Windows.Forms.Label()
|
||||
Me.Button9 = New System.Windows.Forms.Button()
|
||||
Me.Label39 = New System.Windows.Forms.Label()
|
||||
Me.Label40 = New System.Windows.Forms.Label()
|
||||
Me.Button10 = New System.Windows.Forms.Button()
|
||||
Me.Label41 = New System.Windows.Forms.Label()
|
||||
Me.Button11 = New System.Windows.Forms.Button()
|
||||
Me.txtStichtag = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.cboAbfVerbFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.MyListBox1 = New VERAG_PROG_ALLGEMEIN.MyListBox()
|
||||
@@ -123,6 +123,7 @@ Partial Class usrCntlBH
|
||||
Me.txtOPKdName = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
Me.GroupBox9.SuspendLayout()
|
||||
Me.GroupBox8.SuspendLayout()
|
||||
Me.GroupBox7.SuspendLayout()
|
||||
Me.GroupBox5.SuspendLayout()
|
||||
@@ -136,7 +137,6 @@ Partial Class usrCntlBH
|
||||
Me.tbcntr.SuspendLayout()
|
||||
Me.TabPage5.SuspendLayout()
|
||||
Me.GroupBox6.SuspendLayout()
|
||||
Me.GroupBox9.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label6
|
||||
@@ -185,6 +185,117 @@ Partial Class usrCntlBH
|
||||
Me.TabPage1.Text = "Allgemein"
|
||||
Me.TabPage1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label37
|
||||
'
|
||||
Me.Label37.AutoSize = True
|
||||
Me.Label37.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label37.ForeColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.Label37.Location = New System.Drawing.Point(13, 640)
|
||||
Me.Label37.Name = "Label37"
|
||||
Me.Label37.Size = New System.Drawing.Size(136, 17)
|
||||
Me.Label37.TabIndex = 16
|
||||
Me.Label37.Text = "Kontoabstimmung"
|
||||
'
|
||||
'GroupBox9
|
||||
'
|
||||
Me.GroupBox9.Controls.Add(Me.Label41)
|
||||
Me.GroupBox9.Controls.Add(Me.Button11)
|
||||
Me.GroupBox9.Controls.Add(Me.Label40)
|
||||
Me.GroupBox9.Controls.Add(Me.Button10)
|
||||
Me.GroupBox9.Controls.Add(Me.txtStichtag)
|
||||
Me.GroupBox9.Controls.Add(Me.Label39)
|
||||
Me.GroupBox9.Controls.Add(Me.Label38)
|
||||
Me.GroupBox9.Controls.Add(Me.Button9)
|
||||
Me.GroupBox9.Location = New System.Drawing.Point(14, 660)
|
||||
Me.GroupBox9.Name = "GroupBox9"
|
||||
Me.GroupBox9.Size = New System.Drawing.Size(847, 67)
|
||||
Me.GroupBox9.TabIndex = 17
|
||||
Me.GroupBox9.TabStop = False
|
||||
'
|
||||
'Label41
|
||||
'
|
||||
Me.Label41.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label41.AutoSize = True
|
||||
Me.Label41.Location = New System.Drawing.Point(720, 39)
|
||||
Me.Label41.Name = "Label41"
|
||||
Me.Label41.Size = New System.Drawing.Size(81, 13)
|
||||
Me.Label41.TabIndex = 25
|
||||
Me.Label41.Text = "VZ RMC (2865)"
|
||||
'
|
||||
'Button11
|
||||
'
|
||||
Me.Button11.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button11.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button11.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button11.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button11.Location = New System.Drawing.Point(583, 30)
|
||||
Me.Button11.Name = "Button11"
|
||||
Me.Button11.Size = New System.Drawing.Size(121, 31)
|
||||
Me.Button11.TabIndex = 26
|
||||
Me.Button11.Text = " Excel"
|
||||
Me.Button11.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label40
|
||||
'
|
||||
Me.Label40.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label40.AutoSize = True
|
||||
Me.Label40.Location = New System.Drawing.Point(424, 39)
|
||||
Me.Label40.Name = "Label40"
|
||||
Me.Label40.Size = New System.Drawing.Size(100, 13)
|
||||
Me.Label40.TabIndex = 23
|
||||
Me.Label40.Text = "VZ Verag (2866-68)"
|
||||
'
|
||||
'Button10
|
||||
'
|
||||
Me.Button10.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button10.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button10.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button10.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button10.Location = New System.Drawing.Point(287, 30)
|
||||
Me.Button10.Name = "Button10"
|
||||
Me.Button10.Size = New System.Drawing.Size(121, 31)
|
||||
Me.Button10.TabIndex = 24
|
||||
Me.Button10.Text = " Excel"
|
||||
Me.Button10.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label39
|
||||
'
|
||||
Me.Label39.AutoSize = True
|
||||
Me.Label39.Location = New System.Drawing.Point(4, 13)
|
||||
Me.Label39.Name = "Label39"
|
||||
Me.Label39.Size = New System.Drawing.Size(49, 13)
|
||||
Me.Label39.TabIndex = 22
|
||||
Me.Label39.Text = "Stichtag:"
|
||||
'
|
||||
'Label38
|
||||
'
|
||||
Me.Label38.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label38.AutoSize = True
|
||||
Me.Label38.Location = New System.Drawing.Point(143, 39)
|
||||
Me.Label38.Name = "Label38"
|
||||
Me.Label38.Size = New System.Drawing.Size(81, 13)
|
||||
Me.Label38.TabIndex = 2
|
||||
Me.Label38.Text = "Sicherheit 3470"
|
||||
'
|
||||
'Button9
|
||||
'
|
||||
Me.Button9.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button9.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button9.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button9.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button9.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button9.Location = New System.Drawing.Point(6, 30)
|
||||
Me.Button9.Name = "Button9"
|
||||
Me.Button9.Size = New System.Drawing.Size(121, 31)
|
||||
Me.Button9.TabIndex = 7
|
||||
Me.Button9.Text = " Excel"
|
||||
Me.Button9.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label34
|
||||
'
|
||||
Me.Label34.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
@@ -992,117 +1103,6 @@ Partial Class usrCntlBH
|
||||
Me.Button7.Text = "Importieren"
|
||||
Me.Button7.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label37
|
||||
'
|
||||
Me.Label37.AutoSize = True
|
||||
Me.Label37.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label37.ForeColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.Label37.Location = New System.Drawing.Point(13, 640)
|
||||
Me.Label37.Name = "Label37"
|
||||
Me.Label37.Size = New System.Drawing.Size(144, 17)
|
||||
Me.Label37.TabIndex = 16
|
||||
Me.Label37.Text = "USt-Voranmeldung"
|
||||
'
|
||||
'GroupBox9
|
||||
'
|
||||
Me.GroupBox9.Controls.Add(Me.Label41)
|
||||
Me.GroupBox9.Controls.Add(Me.Button11)
|
||||
Me.GroupBox9.Controls.Add(Me.Label40)
|
||||
Me.GroupBox9.Controls.Add(Me.Button10)
|
||||
Me.GroupBox9.Controls.Add(Me.txtStichtag)
|
||||
Me.GroupBox9.Controls.Add(Me.Label39)
|
||||
Me.GroupBox9.Controls.Add(Me.Label38)
|
||||
Me.GroupBox9.Controls.Add(Me.Button9)
|
||||
Me.GroupBox9.Location = New System.Drawing.Point(14, 660)
|
||||
Me.GroupBox9.Name = "GroupBox9"
|
||||
Me.GroupBox9.Size = New System.Drawing.Size(847, 67)
|
||||
Me.GroupBox9.TabIndex = 17
|
||||
Me.GroupBox9.TabStop = False
|
||||
'
|
||||
'Label38
|
||||
'
|
||||
Me.Label38.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label38.AutoSize = True
|
||||
Me.Label38.Location = New System.Drawing.Point(143, 39)
|
||||
Me.Label38.Name = "Label38"
|
||||
Me.Label38.Size = New System.Drawing.Size(81, 13)
|
||||
Me.Label38.TabIndex = 2
|
||||
Me.Label38.Text = "Sicherheit 3470"
|
||||
'
|
||||
'Button9
|
||||
'
|
||||
Me.Button9.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button9.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button9.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button9.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button9.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button9.Location = New System.Drawing.Point(6, 30)
|
||||
Me.Button9.Name = "Button9"
|
||||
Me.Button9.Size = New System.Drawing.Size(121, 31)
|
||||
Me.Button9.TabIndex = 7
|
||||
Me.Button9.Text = " Excel"
|
||||
Me.Button9.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label39
|
||||
'
|
||||
Me.Label39.AutoSize = True
|
||||
Me.Label39.Location = New System.Drawing.Point(4, 13)
|
||||
Me.Label39.Name = "Label39"
|
||||
Me.Label39.Size = New System.Drawing.Size(49, 13)
|
||||
Me.Label39.TabIndex = 22
|
||||
Me.Label39.Text = "Stichtag:"
|
||||
'
|
||||
'Label40
|
||||
'
|
||||
Me.Label40.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label40.AutoSize = True
|
||||
Me.Label40.Location = New System.Drawing.Point(424, 39)
|
||||
Me.Label40.Name = "Label40"
|
||||
Me.Label40.Size = New System.Drawing.Size(100, 13)
|
||||
Me.Label40.TabIndex = 23
|
||||
Me.Label40.Text = "VZ Verag (2866-68)"
|
||||
'
|
||||
'Button10
|
||||
'
|
||||
Me.Button10.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button10.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button10.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button10.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button10.Location = New System.Drawing.Point(287, 30)
|
||||
Me.Button10.Name = "Button10"
|
||||
Me.Button10.Size = New System.Drawing.Size(121, 31)
|
||||
Me.Button10.TabIndex = 24
|
||||
Me.Button10.Text = " Excel"
|
||||
Me.Button10.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label41
|
||||
'
|
||||
Me.Label41.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label41.AutoSize = True
|
||||
Me.Label41.Location = New System.Drawing.Point(720, 39)
|
||||
Me.Label41.Name = "Label41"
|
||||
Me.Label41.Size = New System.Drawing.Size(81, 13)
|
||||
Me.Label41.TabIndex = 25
|
||||
Me.Label41.Text = "VZ RMC (2865)"
|
||||
'
|
||||
'Button11
|
||||
'
|
||||
Me.Button11.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button11.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button11.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button11.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button11.Location = New System.Drawing.Point(583, 30)
|
||||
Me.Button11.Name = "Button11"
|
||||
Me.Button11.Size = New System.Drawing.Size(121, 31)
|
||||
Me.Button11.TabIndex = 26
|
||||
Me.Button11.Text = " Excel"
|
||||
Me.Button11.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtStichtag
|
||||
'
|
||||
Me.txtStichtag._DateTimeOnly = False
|
||||
@@ -1422,6 +1422,8 @@ Partial Class usrCntlBH
|
||||
Me.pnl.PerformLayout()
|
||||
Me.TabPage1.ResumeLayout(False)
|
||||
Me.TabPage1.PerformLayout()
|
||||
Me.GroupBox9.ResumeLayout(False)
|
||||
Me.GroupBox9.PerformLayout()
|
||||
Me.GroupBox8.ResumeLayout(False)
|
||||
Me.GroupBox8.PerformLayout()
|
||||
Me.GroupBox7.ResumeLayout(False)
|
||||
@@ -1446,8 +1448,6 @@ Partial Class usrCntlBH
|
||||
Me.TabPage5.PerformLayout()
|
||||
Me.GroupBox6.ResumeLayout(False)
|
||||
Me.GroupBox6.PerformLayout()
|
||||
Me.GroupBox9.ResumeLayout(False)
|
||||
Me.GroupBox9.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -701,18 +701,18 @@ Public Class usrCntlBH
|
||||
If txtStichtag.Text <> "" Then
|
||||
Try : DateTime.ParseExact(txtStichtag._value, "dd.MM.yyyy", culture)
|
||||
Catch ex As Exception : MsgBox("Stichtag nicht korrekt!") : Exit Sub : End Try
|
||||
SQLStichtag = "And (UStVAn_ReDatVon <='" & txtStichtag._value & "' and tblUStVAntrag.UStVAn_ReDatBis >= '" & txtStichtag._value & "')"
|
||||
SQLStichtag = " And (UStVAn_ReDatVon <='" & txtStichtag._value & "' and tblUStVAntrag.UStVAn_ReDatBis <= '" & txtStichtag._value & "')"
|
||||
End If
|
||||
|
||||
Dim sqlStr = "SELECT tblUStVAntrag.UStVAn_ID, tblUStVAntrag.UStVAn_KuNr, tblUStVAntrag.UStVAn_ReDatVon, tblUStVAntrag.UStVAn_ReDatBis, tblUStVAntrag.UStVAn_Ausstellungsdatum, tblUStVAntrag.UStVAn_LandNr, tblUStVAntrag.UStVAn_3470, Adressen.Ordnungsbegriff, Adressen.LandKz
|
||||
Dim sqlStr = "SELECT tblUStVAntrag.UStVAn_KuNr as Kunde, Adressen.Ordnungsbegriff as Bezeichnung, sum(tblUStVAntrag.UStVAn_3470) as Betrag
|
||||
FROM tblUStVAntrag
|
||||
INNER JOIN Adressen ON tblUStVAntrag.UStVAn_KuNr = Adressen.AdressenNr
|
||||
WHERE tblUStVAntrag.UStVAn_3470 Is Not Null" & SQLStichtag
|
||||
WHERE tblUStVAntrag.UStVAn_3470 Is Not Null" & SQLStichtag & " Group by tblUStVAntrag.UStVAn_KuNr, Adressen.Ordnungsbegriff"
|
||||
|
||||
|
||||
Dim dt = SQL.loadDgvBySql(sqlStr, "FMZOLL")
|
||||
|
||||
cProgramFunctions.genExcelFromDT_NEW(dt, {"G1:G" & (dt.Rows.Count + 1)})
|
||||
cProgramFunctions.genExcelFromDT_NEW(dt, {"C1:C" & (dt.Rows.Count + 1)})
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
@@ -732,22 +732,25 @@ Public Class usrCntlBH
|
||||
If txtStichtag.Text <> "" Then
|
||||
Try : DateTime.ParseExact(txtStichtag._value, "dd.MM.yyyy", culture)
|
||||
Catch ex As Exception : MsgBox("Stichtag nicht korrekt!") : Exit Sub : End Try
|
||||
SQLStichtag = " And (UStVAn_ReDatVon <='" & txtStichtag._value & "' and tblUStVAntrag.UStVAn_ReDatBis >= '" & txtStichtag._value & "')"
|
||||
SQLStichtag = " And (UStVAn_ReDatVon <='" & txtStichtag._value & "' and tblUStVAntrag.UStVAn_ReDatBis <= '" & txtStichtag._value & "')"
|
||||
End If
|
||||
|
||||
Dim sqlStr = "SELECT tblUStVAntrag.UStVAn_ID, tblUStVAntrag.UStVAn_KuNr, tblUStVAntrag.UStVAn_ReDatVon, tblUStVAntrag.UStVAn_ReDatBis, tblUStVAntrag.UStVAn_Ausstellungsdatum,
|
||||
tblUStVAntrag.UStVAn_LandNr, tblUStVAntrag.UStVAn_VZDatum, tblUStVAntrag.UStVAn_VZBetrag, tblUStVAntrag.UStVAn_RZBetragVZ, Adressen.Ordnungsbegriff, Adressen.LandKz,
|
||||
isnull([UStVEr_USteuerbetragEUR],0) AS Erstattungsbetrag,
|
||||
case when ([UStVAn_VZBetrag]-isnull([UStVAn_RZBetragVZ],0)-isnull([UStVEr_USteuerbetragEUR],0))>0 then (([UStVAn_VZBetrag]-isnull([UStVAn_RZBetragVZ],0))-isnull([UStVEr_USteuerbetragEUR],0)) else 0 End AS UStVAn_VZBetragAktuell
|
||||
FROM tblUStVAntrag
|
||||
INNER JOIN [tblUStVErstattung] ON [tblUStVErstattung].[UStVAn_ID] = tblUStVAntrag .[UStVAn_ID]
|
||||
INNER JOIN Adressen ON tblUStVAntrag.UStVAn_KuNr = Adressen.AdressenNr
|
||||
WHERE tblUStVAntrag.UStVAn_VZBetrag Is Not Null" & SQLStichtag & SQLKdNr
|
||||
Dim sqlStr = "SELECT
|
||||
tblUStVAntrag.UStVAn_KuNr as Kunde, Adressen.Ordnungsbegriff as Kundenbezeichnung,
|
||||
sum(tblUStVAntrag.UStVAn_VZBetrag) as VZges,
|
||||
sum(isnull([UStVEr_USteuerbetragEUR],0)) AS Erstattungsbetrag,
|
||||
case when (sum([UStVAn_VZBetrag])-sum(isnull([UStVAn_RZBetragVZ],0))-sum(isnull([UStVEr_USteuerbetragEUR],0)))>0
|
||||
then sum((([UStVAn_VZBetrag]-isnull([UStVAn_RZBetragVZ],0))-isnull([UStVEr_USteuerbetragEUR],0)))
|
||||
else 0 End AS VZBetragAktuell
|
||||
FROM tblUStVAntrag
|
||||
INNER JOIN [tblUStVErstattung] ON [tblUStVErstattung].[UStVAn_ID] = tblUStVAntrag .[UStVAn_ID]
|
||||
INNER JOIN Adressen ON tblUStVAntrag.UStVAn_KuNr = Adressen.AdressenNr
|
||||
WHERE tblUStVAntrag.UStVAn_VZBetrag Is Not Null" & SQLStichtag & SQLKdNr & " Group by tblUStVAntrag.UStVAn_KuNr, Adressen.Ordnungsbegriff"
|
||||
|
||||
|
||||
Dim dt = SQL.loadDgvBySql(sqlStr, "FMZOLL")
|
||||
|
||||
cProgramFunctions.genExcelFromDT_NEW(dt, {"H1:H" & (dt.Rows.Count + 1), "I1:I" & (dt.Rows.Count + 1), "L1:L" & (dt.Rows.Count + 1), "M1:M" & (dt.Rows.Count + 1)})
|
||||
cProgramFunctions.genExcelFromDT_NEW(dt, {"C1:C" & (dt.Rows.Count + 1), "D1:D" & (dt.Rows.Count + 1), "E1:E" & (dt.Rows.Count + 1)})
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
|
||||
Reference in New Issue
Block a user