ustva, MSE, FIBU, etc.
This commit is contained in:
80
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
80
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
@@ -56,6 +56,8 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.cbxLand = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.lblLand = New System.Windows.Forms.Label()
|
||||
Me.Panel8 = New System.Windows.Forms.Panel()
|
||||
Me.btnSortNachLeist = New System.Windows.Forms.Button()
|
||||
Me.cbxInterneNr = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxSicherheit = New System.Windows.Forms.CheckBox()
|
||||
Me.Label16 = New System.Windows.Forms.Label()
|
||||
Me.txtRZam = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
@@ -118,6 +120,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.pnlAntragsPosDetails = New System.Windows.Forms.Panel()
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||
Me.Panel4 = New System.Windows.Forms.Panel()
|
||||
Me.cbxKIUploaddelete = New System.Windows.Forms.CheckBox()
|
||||
Me.scanUSTVA = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
|
||||
@@ -128,6 +131,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||
Me.dgvErstattungspositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.pnlErstattungsdetails = New System.Windows.Forms.Panel()
|
||||
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
@@ -144,9 +148,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.FakturiertToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cbxInterneNr = New System.Windows.Forms.CheckBox()
|
||||
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
|
||||
Me.pnlBottom.SuspendLayout()
|
||||
CType(Me.pbXMLExport, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.pbMail, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -604,6 +605,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
'
|
||||
Me.Panel8.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.Panel8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Panel8.Controls.Add(Me.btnSortNachLeist)
|
||||
Me.Panel8.Controls.Add(Me.cbxInterneNr)
|
||||
Me.Panel8.Controls.Add(Me.cbxSicherheit)
|
||||
Me.Panel8.Controls.Add(Me.Label16)
|
||||
@@ -642,6 +644,32 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel8.Size = New System.Drawing.Size(963, 115)
|
||||
Me.Panel8.TabIndex = 19
|
||||
'
|
||||
'btnSortNachLeist
|
||||
'
|
||||
Me.btnSortNachLeist.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnSortNachLeist.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnSortNachLeist.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnSortNachLeist.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnSortNachLeist.Location = New System.Drawing.Point(210, 86)
|
||||
Me.btnSortNachLeist.Name = "btnSortNachLeist"
|
||||
Me.btnSortNachLeist.Size = New System.Drawing.Size(117, 25)
|
||||
Me.btnSortNachLeist.TabIndex = 58
|
||||
Me.btnSortNachLeist.Text = "Sort. nach Leistendem"
|
||||
Me.btnSortNachLeist.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cbxInterneNr
|
||||
'
|
||||
Me.cbxInterneNr.AutoSize = True
|
||||
Me.cbxInterneNr.BackColor = System.Drawing.Color.Transparent
|
||||
Me.cbxInterneNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.cbxInterneNr.ForeColor = System.Drawing.Color.Black
|
||||
Me.cbxInterneNr.Location = New System.Drawing.Point(11, 88)
|
||||
Me.cbxInterneNr.Name = "cbxInterneNr"
|
||||
Me.cbxInterneNr.Size = New System.Drawing.Size(141, 20)
|
||||
Me.cbxInterneNr.TabIndex = 57
|
||||
Me.cbxInterneNr.Text = "interne Nr anzeigen"
|
||||
Me.cbxInterneNr.UseVisualStyleBackColor = False
|
||||
'
|
||||
'cbxSicherheit
|
||||
'
|
||||
Me.cbxSicherheit.AutoSize = True
|
||||
@@ -1599,6 +1627,14 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel2.Size = New System.Drawing.Size(1428, 263)
|
||||
Me.Panel2.TabIndex = 1
|
||||
'
|
||||
'UstCntlUSTV_AntragPosition1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(154, 0)
|
||||
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
|
||||
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1272, 261)
|
||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
||||
'
|
||||
'Panel4
|
||||
'
|
||||
Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
@@ -1744,6 +1780,14 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.pnlErstattungsdetails.Size = New System.Drawing.Size(1426, 261)
|
||||
Me.pnlErstattungsdetails.TabIndex = 0
|
||||
'
|
||||
'UstCntlUSTV_AntragErstattungen1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Location = New System.Drawing.Point(154, 0)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Name = "UstCntlUSTV_AntragErstattungen1"
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1270, 259)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
@@ -1862,35 +1906,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.FakturiertToolStripMenuItem.Text = "Fakturiert zurücksetzen"
|
||||
Me.FakturiertToolStripMenuItem.Visible = False
|
||||
'
|
||||
'cbxInterneNr
|
||||
'
|
||||
Me.cbxInterneNr.AutoSize = True
|
||||
Me.cbxInterneNr.BackColor = System.Drawing.Color.Transparent
|
||||
Me.cbxInterneNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.cbxInterneNr.ForeColor = System.Drawing.Color.Black
|
||||
Me.cbxInterneNr.Location = New System.Drawing.Point(15, 91)
|
||||
Me.cbxInterneNr.Name = "cbxInterneNr"
|
||||
Me.cbxInterneNr.Size = New System.Drawing.Size(141, 20)
|
||||
Me.cbxInterneNr.TabIndex = 57
|
||||
Me.cbxInterneNr.Text = "interne Nr anzeigen"
|
||||
Me.cbxInterneNr.UseVisualStyleBackColor = False
|
||||
'
|
||||
'UstCntlUSTV_AntragPosition1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(154, 0)
|
||||
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
|
||||
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1272, 261)
|
||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
||||
'
|
||||
'UstCntlUSTV_AntragErstattungen1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Location = New System.Drawing.Point(154, 0)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Name = "UstCntlUSTV_AntragErstattungen1"
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1270, 259)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
|
||||
'
|
||||
'frmMDM_USTVAntrag
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -2062,4 +2077,5 @@ Partial Class frmMDM_USTVAntrag
|
||||
Friend WithEvents btnRMCQuartal As Button
|
||||
Friend WithEvents pbXMLExport As PictureBox
|
||||
Friend WithEvents cbxInterneNr As CheckBox
|
||||
Friend WithEvents btnSortNachLeist As Button
|
||||
End Class
|
||||
|
||||
@@ -67,6 +67,7 @@ Public Class frmMDM_USTVAntrag
|
||||
UstCntlUSTV_AntragPosition1.Enabled = Not UStVAn_ID <= 0
|
||||
cbxLand.Visible = UStVAn_ID <= 0
|
||||
|
||||
|
||||
With dgvUSTVPositionen
|
||||
.ClearSelection()
|
||||
|
||||
@@ -198,6 +199,12 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Next
|
||||
|
||||
If .Columns.Count > 1 Then
|
||||
btnSortNachLeist.Visible = True
|
||||
Else
|
||||
btnSortNachLeist.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End With
|
||||
@@ -560,7 +567,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
|
||||
Else
|
||||
Dim sqlWhere As String = ""
|
||||
Dim sqlWhere As String = ""
|
||||
'neuer USTVA-Antrag
|
||||
KdSearchBox1.Visible = True
|
||||
cbxWahrung.Enabled = True
|
||||
@@ -4299,7 +4306,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
|
||||
|
||||
Dim goods As New GoodsDescription With {.GoodsItem = New List(Of GoodsItem)}
|
||||
Dim goods As New GoodsDescription With {.GoodsItem = New List(Of GoodsItem)}
|
||||
|
||||
If diesel Then
|
||||
goods.GoodsItem.Add(New GoodsItem With {.Code = 1, .SubCode = "1.1.2", .FreeText = ""})
|
||||
@@ -4394,22 +4401,22 @@ Public Class frmMDM_USTVAntrag
|
||||
If list.Count > 0 Then
|
||||
|
||||
If list.Count > 1 Then
|
||||
Dim pathPDF = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("RG_" & Now.ToString("ddMMyyyyHHmmss") & ".pdf", ".pdf", False, False)
|
||||
If FormularManagerNEU.MergePdfFiles(list, pathPDF) Then
|
||||
pdfPathfinished = pathPDF
|
||||
Dim pathPDF = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("RG_" & Now.ToString("ddMMyyyyHHmmss") & ".pdf", ".pdf", False, False)
|
||||
If FormularManagerNEU.MergePdfFiles(list, pathPDF) Then
|
||||
pdfPathfinished = pathPDF
|
||||
End If
|
||||
Else
|
||||
|
||||
pdfPathfinished = list(0)
|
||||
|
||||
End If
|
||||
Else
|
||||
|
||||
pdfPathfinished = list(0)
|
||||
Dim fileNamePDFAttZIP As String = "RG_" & Antrag_LandKz & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatVon).Month & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatBis).Month & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatBis).Year & ".zip"
|
||||
|
||||
End If
|
||||
|
||||
Dim fileNamePDFAttZIP As String = "RG_" & Antrag_LandKz & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatVon).Month & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatBis).Month & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatBis).Year & ".zip"
|
||||
|
||||
fileNamePDFAttZIP = directoryPath & "\" & fileNamePDFAttZIP
|
||||
fileNamePDFAttZIP = directoryPath & "\" & fileNamePDFAttZIP
|
||||
|
||||
|
||||
Dim fileZipped As Boolean = True
|
||||
Dim fileZipped As Boolean = True
|
||||
If pdfPathfinished <> "" Then
|
||||
|
||||
' Falls ZIP schon existiert → löschen
|
||||
@@ -4528,22 +4535,16 @@ Public Class frmMDM_USTVAntrag
|
||||
init()
|
||||
End Sub
|
||||
|
||||
Private Function setXMLExportVisible(ISOLand As String)
|
||||
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles btnSortNachLeist.Click
|
||||
|
||||
Dim valid As Boolean = True
|
||||
If rearangePosNrByLeistender(UStVAn_ID) Then
|
||||
|
||||
If ISOLand = "" Then Return valid
|
||||
If dgvUSTVPositionen.SelectedRows.Count > 0 Then
|
||||
initPosition(dgvUSTVPositionen.SelectedRows(0).Cells("UStVPo_ID").Value)
|
||||
End If
|
||||
End If
|
||||
|
||||
Select Case ISOLand
|
||||
Case "RO" : valid = True
|
||||
Case Else : valid = False
|
||||
|
||||
End Select
|
||||
|
||||
Return valid
|
||||
|
||||
|
||||
End Function
|
||||
End Sub
|
||||
|
||||
Private Function lookFields(look As Boolean)
|
||||
|
||||
@@ -4557,4 +4558,45 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function rearangePosNrByLeistender(UStVAn_ID As Integer)
|
||||
|
||||
If UStVAn_ID > 0 Then
|
||||
|
||||
Dim SQLString = "WITH Ordered AS (
|
||||
SELECT
|
||||
[UStVAn_ID],
|
||||
[UStVPo_ID],
|
||||
ROW_NUMBER() OVER (
|
||||
ORDER BY [UStVPo_Leistender],
|
||||
[UStVPo_ReDat],
|
||||
[UStVPo_ReNr]
|
||||
) AS NewPosNr
|
||||
FROM [tblUStVPositionen]
|
||||
WHERE [UStVAn_ID] = " & UStVAn_ID & "
|
||||
)
|
||||
|
||||
-- Temporär verschieben
|
||||
UPDATE t
|
||||
SET [UStVPo_ID] = o.NewPosNr + 1000
|
||||
FROM [tblUStVPositionen] t
|
||||
JOIN Ordered o
|
||||
ON t.[UStVAn_ID] = o.[UStVAn_ID]
|
||||
AND t.[UStVPo_ID] = o.[UStVPo_ID];
|
||||
|
||||
-- Endgültige Nummern
|
||||
UPDATE [tblUStVPositionen]
|
||||
SET [UStVPo_ID] = [UStVPo_ID] - 1000
|
||||
WHERE [UStVAn_ID] = " & UStVAn_ID & ";"
|
||||
|
||||
If (New SQL).doSQL(SQLString, "FMZOLL") Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
310
SDL/buchhaltung/usrCntlBH.Designer.vb
generated
310
SDL/buchhaltung/usrCntlBH.Designer.vb
generated
@@ -76,6 +76,9 @@ Partial Class usrCntlBH
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.btnWord = New System.Windows.Forms.Button()
|
||||
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||
Me.txtMonateSyskavergleich = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label61 = New System.Windows.Forms.Label()
|
||||
Me.Button15 = New System.Windows.Forms.Button()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
@@ -150,6 +153,12 @@ Partial Class usrCntlBH
|
||||
Me.Label29 = New System.Windows.Forms.Label()
|
||||
Me.Button7 = New System.Windows.Forms.Button()
|
||||
Me.TabPage2 = New System.Windows.Forms.TabPage()
|
||||
Me.GroupBox14 = New System.Windows.Forms.GroupBox()
|
||||
Me.txtJahr_FIBU = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Button18 = New System.Windows.Forms.Button()
|
||||
Me.Button17 = New System.Windows.Forms.Button()
|
||||
Me.Button16 = New System.Windows.Forms.Button()
|
||||
Me.Label62 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox11 = New System.Windows.Forms.GroupBox()
|
||||
Me.Label57 = New System.Windows.Forms.Label()
|
||||
Me.btnDel_ = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
@@ -174,9 +183,12 @@ Partial Class usrCntlBH
|
||||
Me.txtZRvon = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtZRbis = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label51 = New System.Windows.Forms.Label()
|
||||
Me.Button15 = New System.Windows.Forms.Button()
|
||||
Me.Label61 = New System.Windows.Forms.Label()
|
||||
Me.txtMonateSyskavergleich = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label64 = New System.Windows.Forms.Label()
|
||||
Me.txtKundeNrVon = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtKundeNrBis = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label65 = New System.Windows.Forms.Label()
|
||||
Me.txtLand = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label66 = New System.Windows.Forms.Label()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
Me.GroupBox13.SuspendLayout()
|
||||
@@ -197,6 +209,7 @@ Partial Class usrCntlBH
|
||||
Me.GroupBox9.SuspendLayout()
|
||||
Me.GroupBox6.SuspendLayout()
|
||||
Me.TabPage2.SuspendLayout()
|
||||
Me.GroupBox14.SuspendLayout()
|
||||
Me.GroupBox11.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -886,6 +899,55 @@ Partial Class usrCntlBH
|
||||
Me.GroupBox2.TabIndex = 4
|
||||
Me.GroupBox2.TabStop = False
|
||||
'
|
||||
'txtMonateSyskavergleich
|
||||
'
|
||||
Me.txtMonateSyskavergleich._DateTimeOnly = False
|
||||
Me.txtMonateSyskavergleich._numbersOnly = True
|
||||
Me.txtMonateSyskavergleich._numbersOnlyKommastellen = ""
|
||||
Me.txtMonateSyskavergleich._numbersOnlyTrennzeichen = False
|
||||
Me.txtMonateSyskavergleich._Prozent = False
|
||||
Me.txtMonateSyskavergleich._ShortDateNew = False
|
||||
Me.txtMonateSyskavergleich._ShortDateOnly = False
|
||||
Me.txtMonateSyskavergleich._TimeOnly = False
|
||||
Me.txtMonateSyskavergleich._TimeOnly_Seconds = False
|
||||
Me.txtMonateSyskavergleich._value = ""
|
||||
Me.txtMonateSyskavergleich._Waehrung = False
|
||||
Me.txtMonateSyskavergleich._WaehrungZeichen = False
|
||||
Me.txtMonateSyskavergleich.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtMonateSyskavergleich.Location = New System.Drawing.Point(383, 58)
|
||||
Me.txtMonateSyskavergleich.MaxLength = 2
|
||||
Me.txtMonateSyskavergleich.MaxLineLength = -1
|
||||
Me.txtMonateSyskavergleich.MaxLines_Warning = ""
|
||||
Me.txtMonateSyskavergleich.MaxLines_Warning_Label = Nothing
|
||||
Me.txtMonateSyskavergleich.Name = "txtMonateSyskavergleich"
|
||||
Me.txtMonateSyskavergleich.Size = New System.Drawing.Size(24, 20)
|
||||
Me.txtMonateSyskavergleich.TabIndex = 43
|
||||
Me.txtMonateSyskavergleich.Text = "3"
|
||||
Me.txtMonateSyskavergleich.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'Label61
|
||||
'
|
||||
Me.Label61.AutoSize = True
|
||||
Me.Label61.Location = New System.Drawing.Point(145, 61)
|
||||
Me.Label61.Name = "Label61"
|
||||
Me.Label61.Size = New System.Drawing.Size(226, 13)
|
||||
Me.Label61.TabIndex = 30
|
||||
Me.Label61.Text = "Kunden ohne FIBU-Filiale der letzten x Monate"
|
||||
'
|
||||
'Button15
|
||||
'
|
||||
Me.Button15.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button15.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button15.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button15.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button15.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button15.Location = New System.Drawing.Point(6, 49)
|
||||
Me.Button15.Name = "Button15"
|
||||
Me.Button15.Size = New System.Drawing.Size(121, 31)
|
||||
Me.Button15.TabIndex = 29
|
||||
Me.Button15.Text = " Excel"
|
||||
Me.Button15.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
@@ -1866,8 +1928,11 @@ Partial Class usrCntlBH
|
||||
'
|
||||
'TabPage2
|
||||
'
|
||||
Me.TabPage2.Controls.Add(Me.GroupBox14)
|
||||
Me.TabPage2.Controls.Add(Me.Label62)
|
||||
Me.TabPage2.Controls.Add(Me.GroupBox11)
|
||||
Me.TabPage2.Controls.Add(Me.Label51)
|
||||
Me.TabPage2.Controls.Add(Me.txtJahr_FIBU)
|
||||
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage2.Name = "TabPage2"
|
||||
Me.TabPage2.Size = New System.Drawing.Size(956, 879)
|
||||
@@ -1875,6 +1940,97 @@ Partial Class usrCntlBH
|
||||
Me.TabPage2.Text = "MDM"
|
||||
Me.TabPage2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GroupBox14
|
||||
'
|
||||
Me.GroupBox14.Controls.Add(Me.Label66)
|
||||
Me.GroupBox14.Controls.Add(Me.txtLand)
|
||||
Me.GroupBox14.Controls.Add(Me.Label64)
|
||||
Me.GroupBox14.Controls.Add(Me.txtKundeNrVon)
|
||||
Me.GroupBox14.Controls.Add(Me.txtKundeNrBis)
|
||||
Me.GroupBox14.Controls.Add(Me.Label65)
|
||||
Me.GroupBox14.Controls.Add(Me.Button18)
|
||||
Me.GroupBox14.Controls.Add(Me.Button17)
|
||||
Me.GroupBox14.Controls.Add(Me.Button16)
|
||||
Me.GroupBox14.Location = New System.Drawing.Point(20, 153)
|
||||
Me.GroupBox14.Name = "GroupBox14"
|
||||
Me.GroupBox14.Size = New System.Drawing.Size(841, 123)
|
||||
Me.GroupBox14.TabIndex = 38
|
||||
Me.GroupBox14.TabStop = False
|
||||
'
|
||||
'txtJahr_FIBU
|
||||
'
|
||||
Me.txtJahr_FIBU._DateTimeOnly = False
|
||||
Me.txtJahr_FIBU._numbersOnly = False
|
||||
Me.txtJahr_FIBU._numbersOnlyKommastellen = ""
|
||||
Me.txtJahr_FIBU._numbersOnlyTrennzeichen = True
|
||||
Me.txtJahr_FIBU._Prozent = False
|
||||
Me.txtJahr_FIBU._ShortDateNew = False
|
||||
Me.txtJahr_FIBU._ShortDateOnly = False
|
||||
Me.txtJahr_FIBU._TimeOnly = False
|
||||
Me.txtJahr_FIBU._TimeOnly_Seconds = False
|
||||
Me.txtJahr_FIBU._value = "0"
|
||||
Me.txtJahr_FIBU._Waehrung = False
|
||||
Me.txtJahr_FIBU._WaehrungZeichen = True
|
||||
Me.txtJahr_FIBU.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtJahr_FIBU.Location = New System.Drawing.Point(175, 133)
|
||||
Me.txtJahr_FIBU.MaxLineLength = -1
|
||||
Me.txtJahr_FIBU.MaxLines_Warning = ""
|
||||
Me.txtJahr_FIBU.MaxLines_Warning_Label = Nothing
|
||||
Me.txtJahr_FIBU.Name = "txtJahr_FIBU"
|
||||
Me.txtJahr_FIBU.Size = New System.Drawing.Size(57, 20)
|
||||
Me.txtJahr_FIBU.TabIndex = 76
|
||||
Me.txtJahr_FIBU.Text = "0"
|
||||
'
|
||||
'Button18
|
||||
'
|
||||
Me.Button18.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button18.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button18.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button18.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button18.Location = New System.Drawing.Point(23, 88)
|
||||
Me.Button18.Name = "Button18"
|
||||
Me.Button18.Size = New System.Drawing.Size(105, 29)
|
||||
Me.Button18.TabIndex = 78
|
||||
Me.Button18.Text = "Zahlungsverhalten"
|
||||
Me.Button18.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button17
|
||||
'
|
||||
Me.Button17.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button17.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button17.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button17.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button17.Location = New System.Drawing.Point(23, 54)
|
||||
Me.Button17.Name = "Button17"
|
||||
Me.Button17.Size = New System.Drawing.Size(105, 29)
|
||||
Me.Button17.TabIndex = 77
|
||||
Me.Button17.Text = "Länder"
|
||||
Me.Button17.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button16
|
||||
'
|
||||
Me.Button16.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button16.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button16.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button16.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button16.Location = New System.Drawing.Point(23, 19)
|
||||
Me.Button16.Name = "Button16"
|
||||
Me.Button16.Size = New System.Drawing.Size(105, 29)
|
||||
Me.Button16.TabIndex = 76
|
||||
Me.Button16.Text = "Erlöskonten"
|
||||
Me.Button16.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label62
|
||||
'
|
||||
Me.Label62.AutoSize = True
|
||||
Me.Label62.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label62.ForeColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.Label62.Location = New System.Drawing.Point(17, 133)
|
||||
Me.Label62.Name = "Label62"
|
||||
Me.Label62.Size = New System.Drawing.Size(145, 17)
|
||||
Me.Label62.TabIndex = 37
|
||||
Me.Label62.Text = "FIBU-Auswerungen"
|
||||
'
|
||||
'GroupBox11
|
||||
'
|
||||
Me.GroupBox11.Controls.Add(Me.Label57)
|
||||
@@ -2258,54 +2414,102 @@ Partial Class usrCntlBH
|
||||
Me.Label51.TabIndex = 36
|
||||
Me.Label51.Text = "Zinsnachberechnung"
|
||||
'
|
||||
'Button15
|
||||
'Label64
|
||||
'
|
||||
Me.Button15.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button15.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button15.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button15.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button15.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button15.Location = New System.Drawing.Point(6, 49)
|
||||
Me.Button15.Name = "Button15"
|
||||
Me.Button15.Size = New System.Drawing.Size(121, 31)
|
||||
Me.Button15.TabIndex = 29
|
||||
Me.Button15.Text = " Excel"
|
||||
Me.Button15.UseVisualStyleBackColor = True
|
||||
Me.Label64.AutoSize = True
|
||||
Me.Label64.Location = New System.Drawing.Point(154, 96)
|
||||
Me.Label64.Name = "Label64"
|
||||
Me.Label64.Size = New System.Drawing.Size(82, 13)
|
||||
Me.Label64.TabIndex = 76
|
||||
Me.Label64.Text = "Kunden-Nr von:"
|
||||
'
|
||||
'Label61
|
||||
'txtKundeNrVon
|
||||
'
|
||||
Me.Label61.AutoSize = True
|
||||
Me.Label61.Location = New System.Drawing.Point(145, 61)
|
||||
Me.Label61.Name = "Label61"
|
||||
Me.Label61.Size = New System.Drawing.Size(226, 13)
|
||||
Me.Label61.TabIndex = 30
|
||||
Me.Label61.Text = "Kunden ohne FIBU-Filiale der letzten x Monate"
|
||||
Me.txtKundeNrVon._DateTimeOnly = False
|
||||
Me.txtKundeNrVon._numbersOnly = False
|
||||
Me.txtKundeNrVon._numbersOnlyKommastellen = ""
|
||||
Me.txtKundeNrVon._numbersOnlyTrennzeichen = True
|
||||
Me.txtKundeNrVon._Prozent = False
|
||||
Me.txtKundeNrVon._ShortDateNew = False
|
||||
Me.txtKundeNrVon._ShortDateOnly = False
|
||||
Me.txtKundeNrVon._TimeOnly = False
|
||||
Me.txtKundeNrVon._TimeOnly_Seconds = False
|
||||
Me.txtKundeNrVon._value = Nothing
|
||||
Me.txtKundeNrVon._Waehrung = False
|
||||
Me.txtKundeNrVon._WaehrungZeichen = True
|
||||
Me.txtKundeNrVon.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtKundeNrVon.Location = New System.Drawing.Point(239, 93)
|
||||
Me.txtKundeNrVon.MaxLineLength = -1
|
||||
Me.txtKundeNrVon.MaxLines_Warning = ""
|
||||
Me.txtKundeNrVon.MaxLines_Warning_Label = Nothing
|
||||
Me.txtKundeNrVon.Name = "txtKundeNrVon"
|
||||
Me.txtKundeNrVon.Size = New System.Drawing.Size(70, 20)
|
||||
Me.txtKundeNrVon.TabIndex = 78
|
||||
'
|
||||
'txtMonateSyskavergleich
|
||||
'txtKundeNrBis
|
||||
'
|
||||
Me.txtMonateSyskavergleich._DateTimeOnly = False
|
||||
Me.txtMonateSyskavergleich._numbersOnly = True
|
||||
Me.txtMonateSyskavergleich._numbersOnlyKommastellen = ""
|
||||
Me.txtMonateSyskavergleich._numbersOnlyTrennzeichen = False
|
||||
Me.txtMonateSyskavergleich._Prozent = False
|
||||
Me.txtMonateSyskavergleich._ShortDateNew = False
|
||||
Me.txtMonateSyskavergleich._ShortDateOnly = False
|
||||
Me.txtMonateSyskavergleich._TimeOnly = False
|
||||
Me.txtMonateSyskavergleich._TimeOnly_Seconds = False
|
||||
Me.txtMonateSyskavergleich._value = ""
|
||||
Me.txtMonateSyskavergleich._Waehrung = False
|
||||
Me.txtMonateSyskavergleich._WaehrungZeichen = False
|
||||
Me.txtMonateSyskavergleich.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtMonateSyskavergleich.Location = New System.Drawing.Point(383, 58)
|
||||
Me.txtMonateSyskavergleich.MaxLength = 2
|
||||
Me.txtMonateSyskavergleich.MaxLineLength = -1
|
||||
Me.txtMonateSyskavergleich.MaxLines_Warning = ""
|
||||
Me.txtMonateSyskavergleich.MaxLines_Warning_Label = Nothing
|
||||
Me.txtMonateSyskavergleich.Name = "txtMonateSyskavergleich"
|
||||
Me.txtMonateSyskavergleich.Size = New System.Drawing.Size(24, 20)
|
||||
Me.txtMonateSyskavergleich.TabIndex = 43
|
||||
Me.txtMonateSyskavergleich.Text = "3"
|
||||
Me.txtMonateSyskavergleich.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
Me.txtKundeNrBis._DateTimeOnly = False
|
||||
Me.txtKundeNrBis._numbersOnly = False
|
||||
Me.txtKundeNrBis._numbersOnlyKommastellen = ""
|
||||
Me.txtKundeNrBis._numbersOnlyTrennzeichen = True
|
||||
Me.txtKundeNrBis._Prozent = False
|
||||
Me.txtKundeNrBis._ShortDateNew = False
|
||||
Me.txtKundeNrBis._ShortDateOnly = False
|
||||
Me.txtKundeNrBis._TimeOnly = False
|
||||
Me.txtKundeNrBis._TimeOnly_Seconds = False
|
||||
Me.txtKundeNrBis._value = Nothing
|
||||
Me.txtKundeNrBis._Waehrung = False
|
||||
Me.txtKundeNrBis._WaehrungZeichen = True
|
||||
Me.txtKundeNrBis.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtKundeNrBis.Location = New System.Drawing.Point(347, 93)
|
||||
Me.txtKundeNrBis.MaxLineLength = -1
|
||||
Me.txtKundeNrBis.MaxLines_Warning = ""
|
||||
Me.txtKundeNrBis.MaxLines_Warning_Label = Nothing
|
||||
Me.txtKundeNrBis.Name = "txtKundeNrBis"
|
||||
Me.txtKundeNrBis.Size = New System.Drawing.Size(70, 20)
|
||||
Me.txtKundeNrBis.TabIndex = 79
|
||||
'
|
||||
'Label65
|
||||
'
|
||||
Me.Label65.AutoSize = True
|
||||
Me.Label65.Location = New System.Drawing.Point(318, 96)
|
||||
Me.Label65.Name = "Label65"
|
||||
Me.Label65.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label65.TabIndex = 77
|
||||
Me.Label65.Text = "bis:"
|
||||
'
|
||||
'txtLand
|
||||
'
|
||||
Me.txtLand._DateTimeOnly = False
|
||||
Me.txtLand._numbersOnly = False
|
||||
Me.txtLand._numbersOnlyKommastellen = ""
|
||||
Me.txtLand._numbersOnlyTrennzeichen = False
|
||||
Me.txtLand._Prozent = False
|
||||
Me.txtLand._ShortDateNew = False
|
||||
Me.txtLand._ShortDateOnly = False
|
||||
Me.txtLand._TimeOnly = False
|
||||
Me.txtLand._TimeOnly_Seconds = False
|
||||
Me.txtLand._value = ""
|
||||
Me.txtLand._Waehrung = False
|
||||
Me.txtLand._WaehrungZeichen = False
|
||||
Me.txtLand.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtLand.Location = New System.Drawing.Point(238, 59)
|
||||
Me.txtLand.MaxLength = 10
|
||||
Me.txtLand.MaxLineLength = -1
|
||||
Me.txtLand.MaxLines_Warning = ""
|
||||
Me.txtLand.MaxLines_Warning_Label = Nothing
|
||||
Me.txtLand.Name = "txtLand"
|
||||
Me.txtLand.Size = New System.Drawing.Size(70, 20)
|
||||
Me.txtLand.TabIndex = 76
|
||||
'
|
||||
'Label66
|
||||
'
|
||||
Me.Label66.AutoSize = True
|
||||
Me.Label66.Location = New System.Drawing.Point(153, 62)
|
||||
Me.Label66.Name = "Label66"
|
||||
Me.Label66.Size = New System.Drawing.Size(34, 13)
|
||||
Me.Label66.TabIndex = 80
|
||||
Me.Label66.Text = "Land:"
|
||||
'
|
||||
'usrCntlBH
|
||||
'
|
||||
@@ -2354,6 +2558,8 @@ Partial Class usrCntlBH
|
||||
Me.GroupBox6.PerformLayout()
|
||||
Me.TabPage2.ResumeLayout(False)
|
||||
Me.TabPage2.PerformLayout()
|
||||
Me.GroupBox14.ResumeLayout(False)
|
||||
Me.GroupBox14.PerformLayout()
|
||||
Me.GroupBox11.ResumeLayout(False)
|
||||
Me.GroupBox11.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
@@ -2514,4 +2720,16 @@ Partial Class usrCntlBH
|
||||
Friend WithEvents txtMonateSyskavergleich As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label61 As Label
|
||||
Friend WithEvents Button15 As Button
|
||||
Friend WithEvents GroupBox14 As GroupBox
|
||||
Friend WithEvents Label62 As Label
|
||||
Friend WithEvents txtJahr_FIBU As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Button18 As Button
|
||||
Friend WithEvents Button17 As Button
|
||||
Friend WithEvents Button16 As Button
|
||||
Friend WithEvents Label66 As Label
|
||||
Friend WithEvents txtLand As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label64 As Label
|
||||
Friend WithEvents txtKundeNrVon As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents txtKundeNrBis As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label65 As Label
|
||||
End Class
|
||||
|
||||
@@ -44,6 +44,7 @@ Public Class usrCntlBH
|
||||
|
||||
txtUID_Jahr.Text = Now().Year
|
||||
txtUID_Monat.Text = Now().Month
|
||||
txtJahr_FIBU.Text = Now().Year
|
||||
|
||||
MyComboBox1.fillWithSQL(" SELECT Währungstabelle.LandKz, [Länderverzeichnis für die Außenhandelsstatistik].LandKz + ' - ' + [Länderverzeichnis für die Außenhandelsstatistik].LandBez AS LandKzISO2 " &
|
||||
" FROM [Länderverzeichnis für die Außenhandelsstatistik] LEFT JOIN Währungstabelle ON [Länderverzeichnis für die Außenhandelsstatistik].LandNr = Währungstabelle.Währungsschlüssel " &
|
||||
@@ -1620,5 +1621,216 @@ Public Class usrCntlBH
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button16_Click(sender As Object, e As EventArgs) Handles Button16.Click, Button17.Click, Button18.Click
|
||||
|
||||
If txtJahr_FIBU.Text <> "" AndAlso IsNumeric(txtJahr_FIBU.Text) AndAlso txtJahr_FIBU.TextLength = 4 Then
|
||||
|
||||
Dim SQLString = ""
|
||||
Dim Bezeichnung As String = ""
|
||||
|
||||
Select Case sender.Name
|
||||
Case "Button16"
|
||||
|
||||
Bezeichnung = "Erlöskontenstatistik " & txtJahr_FIBU.Text
|
||||
SQLString = "declare @Jahr as Integer = " & txtJahr_FIBU.Text & "; WITH Daten AS (SELECT bz.i_konto,k.c_name,YEAR(bz.d_beleg) AS Jahr,MONTH(bz.d_beleg) AS Monat, CASE WHEN bz.c_sollhabenkz = 'S' THEN bz.eur_betrag * -1 ELSE bz.eur_betrag END AS Betrag
|
||||
FROM FIBU2.dbo.fibu_belegzeile bz
|
||||
INNER JOIN FIBU2.dbo.fibu_konto k ON bz.i_konto = k.i_konto
|
||||
WHERE bz.i_firm_refid = 19 AND k.i_firm_refid = 19 AND bz.eur_betrag <> 0 AND bz.c_kennung = 'KO' AND bz.i_konto BETWEEN 4000 AND 4999 AND YEAR(bz.d_beleg) IN (@Jahr,@Jahr - 1)), Summen AS
|
||||
(SELECT i_konto,c_name,Jahr,Monat,SUM(Betrag) AS Betrag
|
||||
FROM Daten
|
||||
GROUP BY i_konto,c_name,Jahr,Monat)
|
||||
|
||||
--SELECT * FROM Summen ORDER BY i_konto, Jahr, Monat;
|
||||
|
||||
SELECT i_konto as Konto, c_name as Bezeichnung,Jahr,[1] AS Jan,[2] AS Feb,[3] AS Mär,[4] AS Apr,[5] AS Mai,[6] AS Jun,[7] AS Jul,[8] AS Aug,[9] AS Sep,[10] AS Okt,[11] AS Nov,[12] AS Dez FROM Summen PIVOT (SUM(Betrag) FOR Monat IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) p"
|
||||
|
||||
Case "Button17"
|
||||
|
||||
Bezeichnung = "Länderstatistik " & txtJahr_FIBU.Text
|
||||
SQLString = "declare @Jahr as Integer = " & txtJahr_FIBU.Text & "
|
||||
declare @VJ_Jahr as Integer = @Jahr - 1
|
||||
declare @c_landid as NVARCHAR = '" & txtLand.Text & "';
|
||||
|
||||
WITH Base AS (SELECT k.c_landid,o.eur_bruttobetrag,YEAR(o.d_rechnung) AS jahr,MONTH(o.d_rechnung) AS monat FROM [FIBU2].dbo.op_debitor o JOIN [FIBU2].dbo.fibu_konto k ON o.i_personenkonto = k.i_konto
|
||||
WHERE o.i_firm_refid = 19 AND k.i_firm_refid = 19 AND ISNULL(o.eur_bruttobetrag, 0) <> 0 " & IIf(txtLand.Text <> "", " AND k.c_landid = '" & txtLand.Text & "'", "") & " AND Year(o.d_rechnung) = @Jahr
|
||||
), Long AS ( SELECT c_landid, CONCAT(jahr, '_', monat) AS periode,jahr,monat,eur_bruttobetrag FROM Base
|
||||
), Agg AS (SELECT c_landid, jahr, monat, SUM(eur_bruttobetrag) AS betrag FROM Long GROUP BY c_landid, jahr, monat ) ,
|
||||
PivotMonate AS ( SELECT * FROM Agg PIVOT (
|
||||
SUM(betrag)
|
||||
FOR monat IN (
|
||||
[1],[2],[3],[4],[5],[6],
|
||||
[7],[8],[9],[10],[11],[12]
|
||||
)
|
||||
) p ), Final AS ( SELECT c_landid,
|
||||
|
||||
-- aktuelles Jahr
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([1],0) ELSE 0 END) AS akt_Jan,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([2],0) ELSE 0 END) AS akt_Feb,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([3],0) ELSE 0 END) AS akt_Mär,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([4],0) ELSE 0 END) AS akt_Apr,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([5],0) ELSE 0 END) AS akt_Mai,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([6],0) ELSE 0 END) AS akt_Jun,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([7],0) ELSE 0 END) AS akt_Jul,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([8],0) ELSE 0 END) AS akt_Aug,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([9],0) ELSE 0 END) AS akt_Sep,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([10],0) ELSE 0 END) AS akt_Okt,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([11],0) ELSE 0 END) AS akt_Nov,
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([12],0) ELSE 0 END) AS akt_Dez,
|
||||
|
||||
SUM(CASE WHEN jahr = @Jahr THEN ISNULL([1],0)+ISNULL([2],0)+ISNULL([3],0)+ISNULL([4],0)+
|
||||
ISNULL([5],0)+ISNULL([6],0)+ISNULL([7],0)+ISNULL([8],0)+
|
||||
ISNULL([9],0)+ISNULL([10],0)+ISNULL([11],0)+ISNULL([12],0)
|
||||
ELSE 0 END) AS akt_jahr,
|
||||
|
||||
-- Vorjahr
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([1],0) ELSE 0 END) AS vj_Jan,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([2],0) ELSE 0 END) AS vj_Feb,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([3],0) ELSE 0 END) AS vj_Mär,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([4],0) ELSE 0 END) AS vj_Apr,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([5],0) ELSE 0 END) AS vj_Mai,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([6],0) ELSE 0 END) AS vj_Jun,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([7],0) ELSE 0 END) AS vj_Jul,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([8],0) ELSE 0 END) AS vj_Aug,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([9],0) ELSE 0 END) AS vj_Sep,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([10],0) ELSE 0 END) AS vj_Okt,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([11],0) ELSE 0 END) AS vj_Nov,
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([12],0) ELSE 0 END) AS vj_Dez,
|
||||
|
||||
SUM(CASE WHEN jahr = @VJ_Jahr THEN ISNULL([1],0)+ISNULL([2],0)+ISNULL([3],0)+ISNULL([4],0)+
|
||||
ISNULL([5],0)+ISNULL([6],0)+ISNULL([7],0)+ISNULL([8],0)+
|
||||
ISNULL([9],0)+ISNULL([10],0)+ISNULL([11],0)+ISNULL([12],0)
|
||||
ELSE 0 END) AS vj_jahr
|
||||
|
||||
FROM PivotMonate
|
||||
GROUP BY c_landid
|
||||
) SELECT
|
||||
c_landid,
|
||||
|
||||
akt_Jan,
|
||||
vj_Jan,
|
||||
CASE WHEN vj_Jan = 0 THEN 100 ELSE akt_Jan * 100.0 / vj_Jan END AS 'Jan_%',
|
||||
|
||||
akt_Feb,
|
||||
vj_Feb,
|
||||
CASE WHEN vj_Feb = 0 THEN 100 ELSE akt_Feb * 100.0 / vj_Feb END AS 'Feb_%',
|
||||
|
||||
akt_Mär,
|
||||
vj_Mär,
|
||||
CASE WHEN vj_Mär = 0 THEN 100 ELSE akt_Mär * 100.0 / vj_Mär END AS 'Mär_%',
|
||||
|
||||
akt_Apr,
|
||||
vj_Apr,
|
||||
CASE WHEN vj_Apr = 0 THEN 100 ELSE akt_Apr * 100.0 / vj_Apr END AS 'Apr_%',
|
||||
|
||||
akt_Mai,
|
||||
vj_Mai,
|
||||
CASE WHEN vj_Mai = 0 THEN 100 ELSE akt_Mai * 100.0 / vj_Mai END AS 'Mai_%',
|
||||
|
||||
akt_Jun,
|
||||
vj_Jun,
|
||||
CASE WHEN vj_Jun = 0 THEN 100 ELSE akt_Jun * 100.0 / vj_Jun END AS 'Jun_%',
|
||||
|
||||
akt_Jul,
|
||||
vj_Jul,
|
||||
CASE WHEN vj_Jul = 0 THEN 100 ELSE akt_Jul * 100.0 / vj_Jul END AS 'Jul_%',
|
||||
|
||||
akt_Aug,
|
||||
vj_Aug,
|
||||
CASE WHEN vj_Aug = 0 THEN 100 ELSE akt_Aug * 100.0 / vj_Aug END AS 'Aug_%',
|
||||
|
||||
akt_Sep,
|
||||
vj_Sep,
|
||||
CASE WHEN vj_Sep = 0 THEN 100 ELSE akt_Sep * 100.0 / vj_Sep END AS 'Sep_%',
|
||||
|
||||
akt_Okt,
|
||||
vj_Okt,
|
||||
CASE WHEN vj_Okt = 0 THEN 100 ELSE akt_Okt * 100.0 / vj_Okt END AS 'Okt_%',
|
||||
|
||||
akt_Nov,
|
||||
vj_Nov,
|
||||
CASE WHEN vj_Nov = 0 THEN 100 ELSE akt_Nov * 100.0 / vj_Nov END AS 'Nov_%',
|
||||
|
||||
akt_Dez,
|
||||
vj_Dez,
|
||||
CASE WHEN vj_Dez = 0 THEN 100 ELSE akt_Dez * 100.0 / vj_Dez END AS 'Dez_%',
|
||||
|
||||
akt_jahr,
|
||||
vj_jahr,
|
||||
CASE WHEN vj_jahr = 0 THEN 100 ELSE akt_jahr * 100.0 / vj_jahr END AS 'Jahr_%'
|
||||
FROM Final
|
||||
ORDER BY c_landid;"
|
||||
|
||||
|
||||
|
||||
Case "Button18"
|
||||
Bezeichnung = "Zahlungsverhalten " & txtJahr_FIBU.Text & " von " & txtKundeNrVon.Text & " - " & txtKundeNrBis.Text
|
||||
SQLString = "declare @Jahr as Integer = " & txtJahr_FIBU.Text & "; WITH BaseData AS (
|
||||
SELECT o.i_personenkonto, o.d_rechnung, o.d_netto, o.d_zahlung,ISNULL(o.eur_zahlung, 0) AS eur_zahlung,DATEDIFF(DAY, o.d_rechnung, o.d_netto) AS ZZ_Tage,DATEDIFF(DAY, o.d_rechnung, o.d_zahlung) AS ZOP_Tage, MONTH(o.d_zahlung) AS Monat
|
||||
FROM [FIBU2].dbo.op_debitor o
|
||||
INNER JOIN [FIBU2].dbo.fibu_konto k ON o.i_personenkonto = k.i_konto
|
||||
WHERE o.i_firm_refid = 19 AND k.i_firm_refid = 19 AND ISNULL(o.eur_zahlung, 0) <> 0 " & IIf(txtKundeNrVon.Text <> "" AndAlso IsNumeric(txtKundeNrVon.Text) AndAlso txtKundeNrBis.Text <> "" AndAlso IsNumeric(txtKundeNrBis.Text), " AND o.i_personenkonto BETWEEN " & txtKundeNrVon.Text & " AND " & txtKundeNrBis.Text, "") & " AND Year(o.d_zahlung) = @Jahr " & IIf(txtLand.Text <> "", " AND ISNULL(k.c_landid, '') = '" & txtLand.Text & "'", "") & "), Agg AS (
|
||||
SELECT Monat,i_personenkonto as Konto,COUNT(*) AS Anzahl,SUM(-eur_zahlung) AS Zahlung,SUM(ZZ_Tage) AS ZZ_Tage,SUM(ZOP_Tage) AS ZOP_Tage
|
||||
FROM BaseData
|
||||
GROUP BY Monat, i_personenkonto
|
||||
) SELECT Kennzahl,i_personenkonto as Konto,[1] AS Jan,[2] AS Feb,[3] AS Mär,[4] AS Apr,[5] AS Mai,[6] AS Jun,[7] AS Jul,[8] AS Aug,[9] AS Sep,[10] AS Okt,[11] AS Nov,[12] AS Dez
|
||||
FROM (
|
||||
SELECT Monat, 'Zahlung' AS Kennzahl,i_personenkonto, SUM(-eur_zahlung) AS Wert
|
||||
FROM BaseData GROUP BY Monat,i_personenkonto
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT Monat, 'Anzahl',i_personenkonto, COUNT(*)
|
||||
FROM BaseData GROUP BY Monat,i_personenkonto
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT Monat, 'ZZ_Tage',i_personenkonto, SUM(ZZ_Tage)
|
||||
FROM BaseData GROUP BY Monat,i_personenkonto
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT Monat, 'ZOP_Tage',i_personenkonto, SUM(ZOP_Tage)
|
||||
FROM BaseData GROUP BY Monat,i_personenkonto
|
||||
) x
|
||||
PIVOT (
|
||||
SUM(Wert) FOR Monat IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])
|
||||
) p;"
|
||||
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
If SQLString <> "" Then
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim dt_RE As DataTable = SQL.loadDgvBySql(SQLString, "FIBU")
|
||||
|
||||
If dt_RE.Rows.Count > 0 Then
|
||||
cProgramFunctions.genExcelFromDT_NEW(dt_RE,,, Bezeichnung,,, True)
|
||||
Me.Cursor = Cursors.Default
|
||||
Else
|
||||
MsgBox("keine Daten für den ausgewählten Zeitraum!")
|
||||
Me.Cursor = Cursors.Default
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button17_Click(sender As Object, e As EventArgs) Handles Button17.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button18_Click(sender As Object, e As EventArgs) Handles Button18.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GroupBox14_Enter(sender As Object, e As EventArgs) Handles GroupBox14.Enter
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -237,7 +237,7 @@ Public Class cMSEAPI
|
||||
Return "FEHLER im TransaktionArray"
|
||||
End If
|
||||
|
||||
If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver"), onlyBilledTransactions, savedTrans)
|
||||
If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver"), savedTrans,, onlyBilledTransactions)
|
||||
|
||||
|
||||
Catch ex As WebException
|
||||
|
||||
Reference in New Issue
Block a user