Fremdrechnungen, faktMail, Abrechnung, USTVA
This commit is contained in:
@@ -384,41 +384,45 @@ Public Class frmFaktEmail
|
|||||||
|
|
||||||
If Not SR Then
|
If Not SR Then
|
||||||
|
|
||||||
If RECHNUNG.VermittlerKundenNr = 150000 Then
|
|
||||||
replaceKZ("nichtRMC", TextHTML)
|
|
||||||
TextHTML = TextHTML.ToString.Replace("%RMC:", "") : TextHTML = TextHTML.ToString.Replace("RMC%", "")
|
|
||||||
Else
|
|
||||||
replaceKZ("RMC", TextHTML)
|
|
||||||
TextHTML = TextHTML.ToString.Replace("%nichtRMC:", "") : TextHTML = TextHTML.ToString.Replace("nichtRMC%", "")
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If RECHNUNG.FilialenNr = 4817 And Firma_ID = 19 AndAlso RECHNUNG.ErfassungsNr IsNot Nothing Then
|
If RECHNUNG.FilialenNr = 4817 And Firma_ID = 19 AndAlso RECHNUNG.ErfassungsNr IsNot Nothing Then
|
||||||
Dim SPEDBUCH = New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch(RECHNUNG.FilialenNr, RECHNUNG.AbfertigungsNr, RECHNUNG.UnterNr)
|
Dim SPEDBUCH = New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch(RECHNUNG.FilialenNr, RECHNUNG.AbfertigungsNr, RECHNUNG.UnterNr)
|
||||||
If SPEDBUCH.hasEntry AndAlso (SPEDBUCH.Abfertigungsart = 114 Or SPEDBUCH.Abfertigungsart = 115 Or SPEDBUCH.Abfertigungsart = 10) Then
|
If SPEDBUCH.hasEntry AndAlso (SPEDBUCH.Abfertigungsart = 114 Or SPEDBUCH.Abfertigungsart = 115 Or SPEDBUCH.Abfertigungsart = 10) Then
|
||||||
Dim USTV_ANTRAG As New cUSTVAntrag(RECHNUNG.ErfassungsNr)
|
Dim USTV_ANTRAG As New cUSTVAntrag(RECHNUNG.ErfassungsNr)
|
||||||
If USTV_ANTRAG.UStVAn_Sicherheit Then
|
|
||||||
replaceKZ("KZ1", TextHTML)
|
|
||||||
TextHTML = TextHTML.ToString.Replace("%KZ4:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
|
||||||
|
|
||||||
ElseIf KUNDE_ERW.kde_Erstattungsart = 4 Then
|
If RECHNUNG.VermittlerKundenNr = 150000 Or RECHNUNG.VermittlerKundenNr = 140000 Then
|
||||||
replaceKZ("KZ1", TextHTML)
|
|
||||||
TextHTML = TextHTML.ToString.Replace("%KZ4:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
|
||||||
|
|
||||||
ElseIf KUNDE_ERW.kde_Erstattungsart = 1 Then
|
replaceKZ("nichtRMC", TextHTML)
|
||||||
replaceKZ("KZ4", TextHTML)
|
TextHTML = TextHTML.ToString.Replace("%RMC:", "") : TextHTML = TextHTML.ToString.Replace("RMC%", "")
|
||||||
TextHTML = TextHTML.ToString.Replace("%KZ1:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
|
||||||
|
|
||||||
Else
|
|
||||||
replaceKZ("KZ1", TextHTML)
|
replaceKZ("KZ1", TextHTML)
|
||||||
replaceKZ("KZ4", TextHTML)
|
replaceKZ("KZ4", TextHTML)
|
||||||
TextHTML = TextHTML.ToString.Replace("%", "")
|
TextHTML = TextHTML.ToString.Replace("%", "")
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
replaceKZ("RMC", TextHTML)
|
||||||
|
TextHTML = TextHTML.ToString.Replace("%nichtRMC:", "") : TextHTML = TextHTML.ToString.Replace("nichtRMC%", "")
|
||||||
|
|
||||||
|
If USTV_ANTRAG.UStVAn_Sicherheit Then
|
||||||
|
replaceKZ("KZ1", TextHTML)
|
||||||
|
TextHTML = TextHTML.ToString.Replace("%KZ4:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
||||||
|
|
||||||
|
ElseIf KUNDE_ERW.kde_Erstattungsart = 4 Then
|
||||||
|
replaceKZ("KZ1", TextHTML)
|
||||||
|
TextHTML = TextHTML.ToString.Replace("%KZ4:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
||||||
|
|
||||||
|
ElseIf KUNDE_ERW.kde_Erstattungsart = 1 Then
|
||||||
|
replaceKZ("KZ4", TextHTML)
|
||||||
|
TextHTML = TextHTML.ToString.Replace("%KZ1:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
||||||
|
|
||||||
|
Else
|
||||||
|
replaceKZ("KZ1", TextHTML)
|
||||||
|
replaceKZ("KZ4", TextHTML)
|
||||||
|
TextHTML = TextHTML.ToString.Replace("%", "")
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If mailText <> "" Then TextHTML &= mailText & vbNewLine
|
If mailText <> "" Then TextHTML &= mailText & vbNewLine
|
||||||
'TextHTML &= "<br><br><br>" & cFakturierung.getSignature(RechnungsLandKz, Firma_ID)
|
'TextHTML &= "<br><br><br>" & cFakturierung.getSignature(RechnungsLandKz, Firma_ID)
|
||||||
|
|
||||||
@@ -782,17 +786,24 @@ Public Class frmFaktEmail
|
|||||||
|
|
||||||
Dim USTV_ANTRAG As New cUSTVAntrag(RECHNUNG.ErfassungsNr)
|
Dim USTV_ANTRAG As New cUSTVAntrag(RECHNUNG.ErfassungsNr)
|
||||||
|
|
||||||
'aktuell noch deaktivieren, muss erst getestet werden und soll aktiviert werden, wenn alles passt/Rechnungsbetrag - Bearbeitungsbebühr!!!.
|
Dim bearbGeb As Double = 0
|
||||||
|
|
||||||
'Dim ANTR_ERSTATTUNG As New VERAG_PROG_ALLGEMEIN.cUStVErstattungPositionen(USTV_ANTRAG.UStVAn_ID, RECHNUNG.UnterNr)
|
For Each r As cRechnungsausgangPositionen In RECHNUNG.POSITIONEN
|
||||||
'If Not ANTR_ERSTATTUNG.hasEntry Then
|
|
||||||
' ANTR_ERSTATTUNG.GutschriftsDatum = RECHNUNG.RechnungsDatum
|
If r.BerechnungsartNr = 8 AndAlso (r.LeistungsBez.ToLower.Contains("mwst") Or r.LeistungsBez.ToLower.Contains("moest")) Then bearbGeb += r.Preis
|
||||||
' ANTR_ERSTATTUNG.GutschriftsNr = RECHNUNG.RechnungsNr
|
|
||||||
' ANTR_ERSTATTUNG.UStVEr_Umrechnungskurs = 1
|
Next
|
||||||
' ANTR_ERSTATTUNG.UStVEr_USteuerbetrag = RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag
|
|
||||||
' ANTR_ERSTATTUNG.UStVEr_USteuerbetragEUR = RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag
|
|
||||||
' ANTR_ERSTATTUNG.SAVE()
|
Dim ANTR_ERSTATTUNG As New VERAG_PROG_ALLGEMEIN.cUStVErstattungPositionen(USTV_ANTRAG.UStVAn_ID, RECHNUNG.UnterNr + 1)
|
||||||
'End If
|
If Not ANTR_ERSTATTUNG.hasEntry Then
|
||||||
|
ANTR_ERSTATTUNG.GutschriftsDatum = RECHNUNG.RechnungsDatum
|
||||||
|
ANTR_ERSTATTUNG.GutschriftsNr = RECHNUNG.RechnungsNr
|
||||||
|
ANTR_ERSTATTUNG.UStVEr_Umrechnungskurs = 1
|
||||||
|
ANTR_ERSTATTUNG.UStVEr_USteuerbetrag = bearbGeb
|
||||||
|
ANTR_ERSTATTUNG.UStVEr_USteuerbetragEUR = bearbGeb
|
||||||
|
ANTR_ERSTATTUNG.SAVE()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim hasVZ As Boolean = False
|
Dim hasVZ As Boolean = False
|
||||||
|
|||||||
@@ -1387,6 +1387,7 @@ Public Class usrCntlFaktAbrechnung
|
|||||||
|
|
||||||
|
|
||||||
Private Sub dgvOfferteDetailsUebersicht_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles dgvOfferteDetailsUebersicht.CellValueChanged
|
Private Sub dgvOfferteDetailsUebersicht_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles dgvOfferteDetailsUebersicht.CellValueChanged
|
||||||
|
|
||||||
If Not loaded Then Exit Sub
|
If Not loaded Then Exit Sub
|
||||||
|
|
||||||
If FIRMA IsNot Nothing AndAlso FIRMA.Firma_ID = 19 AndAlso SPEDBUCH IsNot Nothing AndAlso SPEDBUCH.FilialenNr = 4817 AndAlso RECHNUNG.DruckDatumZeit Is Nothing AndAlso e.ColumnIndex = 3 Then
|
If FIRMA IsNot Nothing AndAlso FIRMA.Firma_ID = 19 AndAlso SPEDBUCH IsNot Nothing AndAlso SPEDBUCH.FilialenNr = 4817 AndAlso RECHNUNG.DruckDatumZeit Is Nothing AndAlso e.ColumnIndex = 3 Then
|
||||||
@@ -2735,8 +2736,8 @@ Public Class usrCntlFaktAbrechnung
|
|||||||
If curBearbPreis <> row.Cells("Preis").Value Then row.Cells("Preis").Value = curBGebBetrag / 2
|
If curBearbPreis <> row.Cells("Preis").Value Then row.Cells("Preis").Value = curBGebBetrag / 2
|
||||||
ElseIf curBearbPreis <> curBGebBetrag * 2 AndAlso summeRMCBearb <> curBearbPreis AndAlso (minBetragRMCUsed OrElse isRMC OrElse isFREMD) AndAlso summeRMCBearb > curBGebMinBetrag Then 'wenn RMCPOS und Summe der berechneten Bearb > Mindestbetrag --> berechnetBearb verrechnet!
|
ElseIf curBearbPreis <> curBGebBetrag * 2 AndAlso summeRMCBearb <> curBearbPreis AndAlso (minBetragRMCUsed OrElse isRMC OrElse isFREMD) AndAlso summeRMCBearb > curBGebMinBetrag Then 'wenn RMCPOS und Summe der berechneten Bearb > Mindestbetrag --> berechnetBearb verrechnet!
|
||||||
|
|
||||||
If summeRMCBearb <> row.Cells("Preis").Value Then
|
If summeRMCBearb > row.Cells("Preis").Value Then
|
||||||
If Math.abs(row.Cells("Preis").Value - summeRMCBearb) > 0.5 Then 'Rundungsdifferenzen ignorieren (weil sonst Deadloop)
|
If Math.Abs(row.Cells("Preis").Value - summeRMCBearb) > 0.5 Then 'Rundungsdifferenzen ignorieren (weil sonst Deadloop)
|
||||||
row.Cells("Preis").Value = summeRMCBearb
|
row.Cells("Preis").Value = summeRMCBearb
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3925,7 +3926,7 @@ Nächste_Textzeile_lesen:
|
|||||||
UST_ID = CInt(SQL.getValueTxtBySql("SELECT [UStVAn_ID] FROM [tblUStVPositionen] WHERE [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) =" & RECHNUNG.RK_ID, "FMZOLL",,, 0))
|
UST_ID = CInt(SQL.getValueTxtBySql("SELECT [UStVAn_ID] FROM [tblUStVPositionen] WHERE [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) =" & RECHNUNG.RK_ID, "FMZOLL",,, 0))
|
||||||
If UST_ID > 0 Then
|
If UST_ID > 0 Then
|
||||||
SQL.doSQL("UPDATE [tblUStVPositionen] SET UStVPo_VZ_RKID = NULL WHERE [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) =" & RECHNUNG.RK_ID, "FMZOLL")
|
SQL.doSQL("UPDATE [tblUStVPositionen] SET UStVPo_VZ_RKID = NULL WHERE [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) =" & RECHNUNG.RK_ID, "FMZOLL")
|
||||||
SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 0 WHERE [UStVAn_ID] IN (SELECT [UStVAn_ID] FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0 AND [UStVAn_ID] = " & UST_ID & " )", "FMZOLL")
|
SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1 WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0 AND [UStVAn_ID] = " & UST_ID & " )", "FMZOLL")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4864,7 +4865,12 @@ Nächste_Textzeile_lesen:
|
|||||||
'MsgBox("Test1")
|
'MsgBox("Test1")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If OFFERT_LAND = LandISO2 AndAlso (OFFERT_LeistungsBez.ToString.ToLower.StartsWith(antrag.UStVAn_AntragArt.ToString.ToLower) Or OFFERT_LeistungsBez.ToString.ToLower.StartsWith(USTV_EN) Or OFFERT_LeistungsBez.ToString.ToLower.StartsWith(MÖST_EN) Or OFFERT_LeistungsBez.ToString.ToLower.StartsWith(MÖST_DE) Or OFFERT_LeistungsBez.ToString.ToLower.StartsWith(USTV_RO) Or OFFERT_LeistungsBez.ToString.ToLower.StartsWith(MÖST_RO)) Then
|
If OFFERT_LAND = LandISO2 AndAlso (OFFERT_LeistungsBez.ToString.ToLower.StartsWith(antrag.UStVAn_AntragArt.ToString.ToLower) Or
|
||||||
|
OFFERT_LeistungsBez.ToString.ToLower.StartsWith(USTV_EN) Or
|
||||||
|
OFFERT_LeistungsBez.ToString.ToLower.StartsWith(MÖST_EN) Or
|
||||||
|
OFFERT_LeistungsBez.ToString.ToLower.StartsWith(MÖST_DE) Or
|
||||||
|
OFFERT_LeistungsBez.ToString.ToLower.StartsWith(USTV_RO) Or
|
||||||
|
OFFERT_LeistungsBez.ToString.ToLower.StartsWith(MÖST_RO)) Then
|
||||||
|
|
||||||
'wenn RMC, dann ebenfalls unterscheiden!
|
'wenn RMC, dann ebenfalls unterscheiden!
|
||||||
|
|
||||||
|
|||||||
54
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
54
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
@@ -24,8 +24,8 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.components = New System.ComponentModel.Container()
|
Me.components = New System.ComponentModel.Container()
|
||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMDM_USTVAntrag))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMDM_USTVAntrag))
|
||||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Me.pnlBottom = New System.Windows.Forms.Panel()
|
Me.pnlBottom = New System.Windows.Forms.Panel()
|
||||||
Me.pb_Beleg = New System.Windows.Forms.PictureBox()
|
Me.pb_Beleg = New System.Windows.Forms.PictureBox()
|
||||||
Me.Button5 = New System.Windows.Forms.Button()
|
Me.Button5 = New System.Windows.Forms.Button()
|
||||||
@@ -113,7 +113,6 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||||
Me.pnlAntragsPosDetails = New System.Windows.Forms.Panel()
|
Me.pnlAntragsPosDetails = New System.Windows.Forms.Panel()
|
||||||
Me.Panel2 = 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.Panel4 = New System.Windows.Forms.Panel()
|
||||||
Me.cbxKIUploaddelete = New System.Windows.Forms.CheckBox()
|
Me.cbxKIUploaddelete = New System.Windows.Forms.CheckBox()
|
||||||
Me.scanUSTVA = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
|
Me.scanUSTVA = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
|
||||||
@@ -124,7 +123,6 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||||
Me.dgvErstattungspositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
Me.dgvErstattungspositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||||
Me.pnlErstattungsdetails = New System.Windows.Forms.Panel()
|
Me.pnlErstattungsdetails = New System.Windows.Forms.Panel()
|
||||||
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
|
|
||||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
Me.Button2 = New System.Windows.Forms.Button()
|
Me.Button2 = New System.Windows.Forms.Button()
|
||||||
Me.Button3 = New System.Windows.Forms.Button()
|
Me.Button3 = New System.Windows.Forms.Button()
|
||||||
@@ -139,6 +137,8 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||||
|
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
|
||||||
Me.pnlBottom.SuspendLayout()
|
Me.pnlBottom.SuspendLayout()
|
||||||
CType(Me.pb_Beleg, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.pb_Beleg, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
@@ -681,7 +681,7 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.txtVZam.MaxLines_Warning_Label = Nothing
|
Me.txtVZam.MaxLines_Warning_Label = Nothing
|
||||||
Me.txtVZam.Name = "txtVZam"
|
Me.txtVZam.Name = "txtVZam"
|
||||||
Me.txtVZam.Size = New System.Drawing.Size(100, 23)
|
Me.txtVZam.Size = New System.Drawing.Size(100, 23)
|
||||||
Me.txtVZam.TabIndex = 52
|
Me.txtVZam.TabIndex = 21
|
||||||
'
|
'
|
||||||
'btnAbfertigungsNrVergeben
|
'btnAbfertigungsNrVergeben
|
||||||
'
|
'
|
||||||
@@ -1478,8 +1478,8 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.dgvUSTVPositionen.AKTUALISIERUNGS_INTERVALL = 500
|
Me.dgvUSTVPositionen.AKTUALISIERUNGS_INTERVALL = 500
|
||||||
Me.dgvUSTVPositionen.AllowUserToAddRows = False
|
Me.dgvUSTVPositionen.AllowUserToAddRows = False
|
||||||
Me.dgvUSTVPositionen.AllowUserToDeleteRows = False
|
Me.dgvUSTVPositionen.AllowUserToDeleteRows = False
|
||||||
DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||||
Me.dgvUSTVPositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
|
Me.dgvUSTVPositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||||
Me.dgvUSTVPositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
Me.dgvUSTVPositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
@@ -1515,14 +1515,6 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.Panel2.Size = New System.Drawing.Size(1438, 263)
|
Me.Panel2.Size = New System.Drawing.Size(1438, 263)
|
||||||
Me.Panel2.TabIndex = 1
|
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(1282, 261)
|
|
||||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
|
||||||
'
|
|
||||||
'Panel4
|
'Panel4
|
||||||
'
|
'
|
||||||
Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke
|
Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke
|
||||||
@@ -1640,8 +1632,8 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.dgvErstattungspositionen.AKTUALISIERUNGS_INTERVALL = 500
|
Me.dgvErstattungspositionen.AKTUALISIERUNGS_INTERVALL = 500
|
||||||
Me.dgvErstattungspositionen.AllowUserToAddRows = False
|
Me.dgvErstattungspositionen.AllowUserToAddRows = False
|
||||||
Me.dgvErstattungspositionen.AllowUserToDeleteRows = False
|
Me.dgvErstattungspositionen.AllowUserToDeleteRows = False
|
||||||
DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||||
Me.dgvErstattungspositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
|
Me.dgvErstattungspositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
|
||||||
Me.dgvErstattungspositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
Me.dgvErstattungspositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
@@ -1668,14 +1660,6 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.pnlErstattungsdetails.Size = New System.Drawing.Size(1436, 261)
|
Me.pnlErstattungsdetails.Size = New System.Drawing.Size(1436, 261)
|
||||||
Me.pnlErstattungsdetails.TabIndex = 0
|
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(1280, 259)
|
|
||||||
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
|
|
||||||
'
|
|
||||||
'Panel1
|
'Panel1
|
||||||
'
|
'
|
||||||
Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke
|
Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke
|
||||||
@@ -1747,13 +1731,13 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
'AktivierenToolStripMenuItem
|
'AktivierenToolStripMenuItem
|
||||||
'
|
'
|
||||||
Me.AktivierenToolStripMenuItem.Name = "AktivierenToolStripMenuItem"
|
Me.AktivierenToolStripMenuItem.Name = "AktivierenToolStripMenuItem"
|
||||||
Me.AktivierenToolStripMenuItem.Size = New System.Drawing.Size(138, 22)
|
Me.AktivierenToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||||
Me.AktivierenToolStripMenuItem.Text = "aktivieren"
|
Me.AktivierenToolStripMenuItem.Text = "aktivieren"
|
||||||
'
|
'
|
||||||
'DeaktivierenToolStripMenuItem
|
'DeaktivierenToolStripMenuItem
|
||||||
'
|
'
|
||||||
Me.DeaktivierenToolStripMenuItem.Name = "DeaktivierenToolStripMenuItem"
|
Me.DeaktivierenToolStripMenuItem.Name = "DeaktivierenToolStripMenuItem"
|
||||||
Me.DeaktivierenToolStripMenuItem.Size = New System.Drawing.Size(138, 22)
|
Me.DeaktivierenToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||||
Me.DeaktivierenToolStripMenuItem.Text = "deaktivieren"
|
Me.DeaktivierenToolStripMenuItem.Text = "deaktivieren"
|
||||||
'
|
'
|
||||||
'ncs_Belege
|
'ncs_Belege
|
||||||
@@ -1781,6 +1765,22 @@ Partial Class frmMDM_USTVAntrag
|
|||||||
Me.ToolStripMenuItem3.Size = New System.Drawing.Size(138, 22)
|
Me.ToolStripMenuItem3.Size = New System.Drawing.Size(138, 22)
|
||||||
Me.ToolStripMenuItem3.Text = "deaktivieren"
|
Me.ToolStripMenuItem3.Text = "deaktivieren"
|
||||||
'
|
'
|
||||||
|
'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(1282, 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(1280, 259)
|
||||||
|
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
|
||||||
|
'
|
||||||
'frmMDM_USTVAntrag
|
'frmMDM_USTVAntrag
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
|||||||
@@ -3453,7 +3453,7 @@ Public Class frmMDM_USTVAntrag
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1 WHERE [UStVAn_ID] IN (SELECT [UStVAn_ID] FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL")
|
SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1 WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung
|
||||||
|
|
||||||
init()
|
init()
|
||||||
End If
|
End If
|
||||||
@@ -3481,8 +3481,6 @@ Public Class frmMDM_USTVAntrag
|
|||||||
'würde prüfung nochmals für alle machen, performance allerdings nicht gut....
|
'würde prüfung nochmals für alle machen, performance allerdings nicht gut....
|
||||||
'SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 0 WHERE [UStVAn_ID] IN (SELECT [UStVAn_ID] FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZDatetime],0) = 0 )")
|
'SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 0 WHERE [UStVAn_ID] IN (SELECT [UStVAn_ID] FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZDatetime],0) = 0 )")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim count_nichtAbgerVZ As Integer = -1
|
Dim count_nichtAbgerVZ As Integer = -1
|
||||||
count_nichtAbgerVZ = CInt(SQL.getValueTxtBySql("SELECT COUNT(*) FROM [tblUStVPositionen] WHERE [UStVAn_ID] = " & USTV_ANTRAG.UStVAn_ID & " and [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) = 0", "FMZOLL"))
|
count_nichtAbgerVZ = CInt(SQL.getValueTxtBySql("SELECT COUNT(*) FROM [tblUStVPositionen] WHERE [UStVAn_ID] = " & USTV_ANTRAG.UStVAn_ID & " and [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) = 0", "FMZOLL"))
|
||||||
If count_nichtAbgerVZ = 0 Then
|
If count_nichtAbgerVZ = 0 Then
|
||||||
@@ -3547,6 +3545,7 @@ Public Class frmMDM_USTVAntrag
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub mnuItemBelegeOpenPDF_Clicked(sender As Object, e As EventArgs)
|
Private Sub mnuItemBelegeOpenPDF_Clicked(sender As Object, e As EventArgs)
|
||||||
ncs_Belege.Hide()
|
ncs_Belege.Hide()
|
||||||
Dim item As ToolStripMenuItem = TryCast(sender, ToolStripMenuItem)
|
Dim item As ToolStripMenuItem = TryCast(sender, ToolStripMenuItem)
|
||||||
|
|||||||
38
SDL/mdm/usrcntlFremdrechnungen.Designer.vb
generated
38
SDL/mdm/usrcntlFremdrechnungen.Designer.vb
generated
@@ -23,8 +23,8 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
<System.Diagnostics.DebuggerStepThrough()>
|
<System.Diagnostics.DebuggerStepThrough()>
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.components = New System.ComponentModel.Container()
|
Me.components = New System.ComponentModel.Container()
|
||||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Me.DetailsAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.DetailsAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
|
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
|
||||||
Me.btnSDL_Alle = New System.Windows.Forms.Button()
|
Me.btnSDL_Alle = New System.Windows.Forms.Button()
|
||||||
@@ -39,6 +39,7 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
Me.KundenblattAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.KundenblattAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
|
Me.cbxPDFhinterlegt = New System.Windows.Forms.CheckBox()
|
||||||
Me.cbx = New System.Windows.Forms.CheckBox()
|
Me.cbx = New System.Windows.Forms.CheckBox()
|
||||||
Me.Label4 = New System.Windows.Forms.Label()
|
Me.Label4 = New System.Windows.Forms.Label()
|
||||||
Me.Label2 = New System.Windows.Forms.Label()
|
Me.Label2 = New System.Windows.Forms.Label()
|
||||||
@@ -273,6 +274,7 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.Panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
Me.Panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||||
Me.Panel1.BackColor = System.Drawing.SystemColors.ControlLightLight
|
Me.Panel1.BackColor = System.Drawing.SystemColors.ControlLightLight
|
||||||
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||||
|
Me.Panel1.Controls.Add(Me.cbxPDFhinterlegt)
|
||||||
Me.Panel1.Controls.Add(Me.cbx)
|
Me.Panel1.Controls.Add(Me.cbx)
|
||||||
Me.Panel1.Controls.Add(Me.Label4)
|
Me.Panel1.Controls.Add(Me.Label4)
|
||||||
Me.Panel1.Controls.Add(Me.Label2)
|
Me.Panel1.Controls.Add(Me.Label2)
|
||||||
@@ -292,6 +294,19 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.Panel1.Size = New System.Drawing.Size(260, 907)
|
Me.Panel1.Size = New System.Drawing.Size(260, 907)
|
||||||
Me.Panel1.TabIndex = 23
|
Me.Panel1.TabIndex = 23
|
||||||
'
|
'
|
||||||
|
'cbxPDFhinterlegt
|
||||||
|
'
|
||||||
|
Me.cbxPDFhinterlegt.AutoSize = True
|
||||||
|
Me.cbxPDFhinterlegt.Checked = True
|
||||||
|
Me.cbxPDFhinterlegt.CheckState = System.Windows.Forms.CheckState.Indeterminate
|
||||||
|
Me.cbxPDFhinterlegt.Location = New System.Drawing.Point(8, 125)
|
||||||
|
Me.cbxPDFhinterlegt.Name = "cbxPDFhinterlegt"
|
||||||
|
Me.cbxPDFhinterlegt.Size = New System.Drawing.Size(101, 17)
|
||||||
|
Me.cbxPDFhinterlegt.TabIndex = 53
|
||||||
|
Me.cbxPDFhinterlegt.Text = "PDF vorhanden"
|
||||||
|
Me.cbxPDFhinterlegt.ThreeState = True
|
||||||
|
Me.cbxPDFhinterlegt.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'cbx
|
'cbx
|
||||||
'
|
'
|
||||||
Me.cbx.AutoSize = True
|
Me.cbx.AutoSize = True
|
||||||
@@ -351,7 +366,7 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.Button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
|
Me.Button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
|
||||||
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
Me.Button1.Location = New System.Drawing.Point(200, 203)
|
Me.Button1.Location = New System.Drawing.Point(200, 218)
|
||||||
Me.Button1.Name = "Button1"
|
Me.Button1.Name = "Button1"
|
||||||
Me.Button1.Size = New System.Drawing.Size(50, 44)
|
Me.Button1.Size = New System.Drawing.Size(50, 44)
|
||||||
Me.Button1.TabIndex = 45
|
Me.Button1.TabIndex = 45
|
||||||
@@ -363,7 +378,7 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.cbxMax1000Eintrage.AutoSize = True
|
Me.cbxMax1000Eintrage.AutoSize = True
|
||||||
Me.cbxMax1000Eintrage.Checked = True
|
Me.cbxMax1000Eintrage.Checked = True
|
||||||
Me.cbxMax1000Eintrage.CheckState = System.Windows.Forms.CheckState.Checked
|
Me.cbxMax1000Eintrage.CheckState = System.Windows.Forms.CheckState.Checked
|
||||||
Me.cbxMax1000Eintrage.Location = New System.Drawing.Point(8, 130)
|
Me.cbxMax1000Eintrage.Location = New System.Drawing.Point(8, 145)
|
||||||
Me.cbxMax1000Eintrage.Name = "cbxMax1000Eintrage"
|
Me.cbxMax1000Eintrage.Name = "cbxMax1000Eintrage"
|
||||||
Me.cbxMax1000Eintrage.Size = New System.Drawing.Size(117, 17)
|
Me.cbxMax1000Eintrage.Size = New System.Drawing.Size(117, 17)
|
||||||
Me.cbxMax1000Eintrage.TabIndex = 41
|
Me.cbxMax1000Eintrage.TabIndex = 41
|
||||||
@@ -385,7 +400,7 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.Button4.Image = Global.SDL.My.Resources.Resources.checklist
|
Me.Button4.Image = Global.SDL.My.Resources.Resources.checklist
|
||||||
Me.Button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.Button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
Me.Button4.Location = New System.Drawing.Point(8, 203)
|
Me.Button4.Location = New System.Drawing.Point(8, 218)
|
||||||
Me.Button4.Name = "Button4"
|
Me.Button4.Name = "Button4"
|
||||||
Me.Button4.Size = New System.Drawing.Size(118, 44)
|
Me.Button4.Size = New System.Drawing.Size(118, 44)
|
||||||
Me.Button4.TabIndex = 21
|
Me.Button4.TabIndex = 21
|
||||||
@@ -398,7 +413,7 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.Button5.Image = Global.SDL.My.Resources.Resources.email_big1
|
Me.Button5.Image = Global.SDL.My.Resources.Resources.email_big1
|
||||||
Me.Button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.Button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
Me.Button5.Location = New System.Drawing.Point(8, 153)
|
Me.Button5.Location = New System.Drawing.Point(8, 168)
|
||||||
Me.Button5.Name = "Button5"
|
Me.Button5.Name = "Button5"
|
||||||
Me.Button5.Size = New System.Drawing.Size(118, 44)
|
Me.Button5.Size = New System.Drawing.Size(118, 44)
|
||||||
Me.Button5.TabIndex = 22
|
Me.Button5.TabIndex = 22
|
||||||
@@ -420,7 +435,7 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.Button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.Button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.Button8.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
Me.Button8.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||||
Me.Button8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.Button8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
Me.Button8.Location = New System.Drawing.Point(132, 153)
|
Me.Button8.Location = New System.Drawing.Point(132, 168)
|
||||||
Me.Button8.Name = "Button8"
|
Me.Button8.Name = "Button8"
|
||||||
Me.Button8.Size = New System.Drawing.Size(118, 44)
|
Me.Button8.Size = New System.Drawing.Size(118, 44)
|
||||||
Me.Button8.TabIndex = 31
|
Me.Button8.TabIndex = 31
|
||||||
@@ -468,8 +483,8 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.dgvLFRechnung.AllowUserToDeleteRows = False
|
Me.dgvLFRechnung.AllowUserToDeleteRows = False
|
||||||
Me.dgvLFRechnung.AllowUserToResizeColumns = False
|
Me.dgvLFRechnung.AllowUserToResizeColumns = False
|
||||||
Me.dgvLFRechnung.AllowUserToResizeRows = False
|
Me.dgvLFRechnung.AllowUserToResizeRows = False
|
||||||
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||||
Me.dgvLFRechnung.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
Me.dgvLFRechnung.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
|
||||||
Me.dgvLFRechnung.BackgroundColor = System.Drawing.Color.White
|
Me.dgvLFRechnung.BackgroundColor = System.Drawing.Color.White
|
||||||
Me.dgvLFRechnung.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
Me.dgvLFRechnung.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||||
Me.dgvLFRechnung.Location = New System.Drawing.Point(4, 3)
|
Me.dgvLFRechnung.Location = New System.Drawing.Point(4, 3)
|
||||||
@@ -485,8 +500,8 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Me.dgvDetails.AllowUserToDeleteRows = False
|
Me.dgvDetails.AllowUserToDeleteRows = False
|
||||||
Me.dgvDetails.AllowUserToResizeColumns = False
|
Me.dgvDetails.AllowUserToResizeColumns = False
|
||||||
Me.dgvDetails.AllowUserToResizeRows = False
|
Me.dgvDetails.AllowUserToResizeRows = False
|
||||||
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||||
Me.dgvDetails.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
|
Me.dgvDetails.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
|
||||||
Me.dgvDetails.BackgroundColor = System.Drawing.Color.White
|
Me.dgvDetails.BackgroundColor = System.Drawing.Color.White
|
||||||
Me.dgvDetails.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
Me.dgvDetails.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||||
Me.dgvDetails.Location = New System.Drawing.Point(-1, 3)
|
Me.dgvDetails.Location = New System.Drawing.Point(-1, 3)
|
||||||
@@ -584,4 +599,5 @@ Partial Class usrcntlFremdrechnungen
|
|||||||
Friend WithEvents dat_Sum_Bis As DateTimePicker
|
Friend WithEvents dat_Sum_Bis As DateTimePicker
|
||||||
Friend WithEvents dat_Sum_Von As DateTimePicker
|
Friend WithEvents dat_Sum_Von As DateTimePicker
|
||||||
Friend WithEvents dgvDetails As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
Friend WithEvents dgvDetails As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
||||||
|
Friend WithEvents cbxPDFhinterlegt As CheckBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -208,50 +208,62 @@ Public Class usrcntlFremdrechnungen
|
|||||||
|
|
||||||
|
|
||||||
Dim anzahlTop = 1000
|
Dim anzahlTop = 1000
|
||||||
|
Dim sqlfehlendePDF As String = ""
|
||||||
|
Dim sqlfehlendePDF_PLOSE As String = ""
|
||||||
|
Dim sqlfehlendePDF_RMC As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
Select Case cbxPDFhinterlegt.CheckState
|
||||||
|
Case CheckState.Unchecked : sqlfehlendePDF = " AND [daId] is null" : sqlfehlendePDF_PLOSE = " AND plInv_daId is null" : sqlfehlendePDF_RMC = " AND rmc_daId is null"
|
||||||
|
Case CheckState.Checked : sqlfehlendePDF = " AND not [daId] is null" : sqlfehlendePDF_PLOSE = " AND plInv_daId is not null" : sqlfehlendePDF_RMC = " AND rmc_daId is not null"
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim SQL_STR = ""
|
Dim SQL_STR = ""
|
||||||
Select Case SDLNrTmp
|
Select Case SDLNrTmp
|
||||||
|
|
||||||
'IDS
|
'IDS
|
||||||
Case "IDS" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
Case "IDS" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
||||||
" invoice_id, [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer, CustomerCode as Kundennummer,[daId],[TransactionVolume] as Transaktionsmenge,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblIDSInvoicesNew WHERE [CustomerCode] in (SELECT distinct([CustomerCode]) FROM [VERAG].[dbo].[tbl_IDS_Kunden] WHERE 1 = 1 AND isnull([tbl_IDS_Kunden].KdNrAlt, 0) = 0 " & IIf(kdNr > 0, " AND [KdNrVERAG]=" & kdNr, "") & ") and [YearMonthDay] " & setSQLWhere(SDLNrTmp, "") & " order by [YearMonthDay] desc, [Invoicenumber]"
|
" invoice_id, [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer, CustomerCode as Kundennummer,[daId],[TransactionVolume] as Transaktionsmenge,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblIDSInvoicesNew WHERE [CustomerCode] in (SELECT distinct([CustomerCode]) FROM [VERAG].[dbo].[tbl_IDS_Kunden] WHERE 1 = 1 AND isnull([tbl_IDS_Kunden].KdNrAlt, 0) = 0 " & sqlfehlendePDF & IIf(kdNr > 0, " AND [KdNrVERAG]=" & kdNr, "") & ") and [YearMonthDay] " & setSQLWhere(SDLNrTmp, "") & " order by [YearMonthDay] desc, [Invoicenumber]"
|
||||||
|
|
||||||
'UTA
|
'UTA
|
||||||
Case "UTA" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
Case "UTA" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
||||||
" Adressen.AdressenNr, Adressen.[Name 1], [Rechnungsdatum],[Rechnungsnummer_pro_Lieferland] as Rechnungsnummer,Kundennummer,SUM(Gesamtbetrag_Brutto_in_Darstellwährung) as Bruttobetrag,SUM(Gesamtbetrag_Netto_in_Darstellwährung) as Nettobetrag, SUM(Gesamtbetrag_Umsatzsteuer_in_Darstellwährung) as MWSt,[daId],[Lieferland_ISO2] as Land, 'RE' as Art, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden, cast(archiv as bit) as archiv FROM [VERAG].[dbo].[tblUTAImportNew] inner join adressen on Kundennummer = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " AND [Rechnungsdatum] " & setSQLWhere(SDLNrTmp, "Lieferland_ISO2") & " group by Adressen.AdressenNr, Adressen.[Name 1],[Rechnungsnummer_pro_Lieferland],[Rechnungsdatum],Kundennummer,[daId],[Lieferland_ISO2], archiv"
|
" Adressen.AdressenNr, Adressen.[Name 1], [Rechnungsdatum],[Rechnungsnummer_pro_Lieferland] as Rechnungsnummer,Kundennummer,SUM(Gesamtbetrag_Brutto_in_Darstellwährung) as Bruttobetrag,SUM(Gesamtbetrag_Netto_in_Darstellwährung) as Nettobetrag, SUM(Gesamtbetrag_Umsatzsteuer_in_Darstellwährung) as MWSt,[daId],[Lieferland_ISO2] as Land, 'RE' as Art, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden, cast(archiv as bit) as archiv FROM [VERAG].[dbo].[tblUTAImportNew] inner join adressen on Kundennummer = UTAKundenNr where 1 = 1 " & sqlfehlendePDF & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " AND [Rechnungsdatum] " & setSQLWhere(SDLNrTmp, "Lieferland_ISO2") & " group by Adressen.AdressenNr, Adressen.[Name 1],[Rechnungsnummer_pro_Lieferland],[Rechnungsdatum],Kundennummer,[daId],[Lieferland_ISO2], archiv"
|
||||||
|
|
||||||
SQL_STR &= " UNION ALL SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") & " Adressen.AdressenNr, Adressen.[Name 1],[Datum], [RechnungsNr],[KundenNr],0,0,0,[daId],'',[DocumentTyp], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden, cast(0 as bit) as archiv FROM [VERAG].[dbo].[tblUTADocuments] inner join adressen on KundenNr = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " and [Datum] " & setSQLWhere("_", "") & " order by Rechnungsdatum desc"
|
SQL_STR &= " UNION ALL SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") & " Adressen.AdressenNr, Adressen.[Name 1],[Datum], [RechnungsNr],[KundenNr],0,0,0,[daId],'',[DocumentTyp], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden, cast(0 as bit) as archiv FROM [VERAG].[dbo].[tblUTADocuments] inner join adressen on KundenNr = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " and [Datum] " & setSQLWhere("_", "") & " order by Rechnungsdatum desc"
|
||||||
|
|
||||||
'PLOSE
|
'PLOSE
|
||||||
Case "PLOSE" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
Case "PLOSE" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
||||||
" Adressen.AdressenNr, Adressen.[Name 1],[plInv_SupplierRechnungsDatum] as Rechnungsdatum, [plInv_SupplierRechnungsNr] as Rechnungsnummer,[plInv_PLOSEKundennummer] as Kundennummer,[plInv_Nettobetrag] as Nettobetrag,[plInv_MWSTBetrag] as MWST,[plInv_Bruttobetrag] as Bruttobetrag,[plInv_daId] as daId, [plInv_SupplierCountry] as Land, cast(case when [plInv_daId] is not null then 1 else 0 end as bit) as PDFvorhanden, plInv_Archiv as archiv FROM tblPLOSE_Inv_Data inner join Adressen on Adressen.PLOSEKundenNr = plInv_PLOSEKundennummer where 1 = 1 " & IIf(kdNr > 0, " AND Adressen.AdressenNr=" & kdNr, "") & " and [plInv_SupplierRechnungsDatum] " & setSQLWhere(SDLNrTmp, "plInv_SupplierCountry") & " Order by plInv_SupplierRechnungsDatum desc, [plInv_SupplierRechnungsNr]"
|
" Adressen.AdressenNr, Adressen.[Name 1],[plInv_SupplierRechnungsDatum] as Rechnungsdatum, [plInv_SupplierRechnungsNr] as Rechnungsnummer,[plInv_PLOSEKundennummer] as Kundennummer,[plInv_Nettobetrag] as Nettobetrag,[plInv_MWSTBetrag] as MWST,[plInv_Bruttobetrag] as Bruttobetrag,[plInv_daId] as daId, [plInv_SupplierCountry] as Land, cast(case when [plInv_daId] is not null then 1 else 0 end as bit) as PDFvorhanden, plInv_Archiv as archiv FROM tblPLOSE_Inv_Data inner join Adressen on Adressen.PLOSEKundenNr = plInv_PLOSEKundennummer where 1 = 1 " & sqlfehlendePDF_PLOSE & IIf(kdNr > 0, " AND Adressen.AdressenNr=" & kdNr, "") & " and [plInv_SupplierRechnungsDatum] " & setSQLWhere(SDLNrTmp, "plInv_SupplierCountry") & " Order by plInv_SupplierRechnungsDatum desc, [plInv_SupplierRechnungsNr]"
|
||||||
|
|
||||||
'MSE
|
'MSE
|
||||||
Case "MSE" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
Case "MSE" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
||||||
" partner_customer_number as AdressenNr, customer_name as [Name 1], [invoice_date] as Rechnungsdatum, [invoice_id] as Rechnungsnummer/*,[invoice_nr]*/,[customer_number] as Kundennummer, daId, [total_amount_euro] as Brutto_EUR ,[total_vat_amount_euro] as MWST,[country] as Land, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden, archiv FROM tblMSEInvoices inner join tblMSECustomers on customer_id = [customer_number] where 1 = 1 " & IIf(kdNr > 0, " AND [partner_customer_number]=" & kdNr, "") & " and [invoice_date] " & setSQLWhere(SDLNrTmp, "country") & " order by invoice_date desc, invoice_id"
|
" partner_customer_number as AdressenNr, customer_name as [Name 1], [invoice_date] as Rechnungsdatum, [invoice_id] as Rechnungsnummer/*,[invoice_nr]*/,[customer_number] as Kundennummer, daId, [total_amount_euro] as Brutto_EUR ,[total_vat_amount_euro] as MWST,[country] as Land, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden, archiv FROM tblMSEInvoices inner join tblMSECustomers on customer_id = [customer_number] where 1 = 1 " & sqlfehlendePDF & IIf(kdNr > 0, " AND [partner_customer_number]=" & kdNr, "") & " and [invoice_date] " & setSQLWhere(SDLNrTmp, "country") & " order by invoice_date desc, invoice_id"
|
||||||
|
|
||||||
'VERAG
|
'VERAG
|
||||||
Case "VERAG" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
Case "VERAG" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
||||||
" Adressen.AdressenNr, Adressen.[Name 1], tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer , tblTrdinInvoice.SteuerbetragLokal, 1 as daId, cast(1 as bit) as PDFvorhanden FROM tblTrdinInvoice inner join Adressen on KundenNrZentrale = AdressenNr WHERE 1 = 1 " & IIf(kdNr > 0, " AND tblTrdinInvoice.RechnungsKundenNr=" & kdNr, "") & " AND tblTrdinInvoice.FilialenNr = 4814 and tblTrdinInvoice.Rechnungsdatum " & setSQLWhere(SDLNrTmp, "'AT'") & " ORDER BY tblTrdinInvoice.Rechnungsdatum desc, tblTrdinInvoice.Rechnungsnummer"
|
" Adressen.AdressenNr, Adressen.[Name 1], tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer , tblTrdinInvoice.SteuerbetragLokal, 1 as daId, cast(1 as bit) as PDFvorhanden FROM tblTrdinInvoice inner join Adressen on KundenNrZentrale = AdressenNr WHERE 1 = 1 " & IIf(kdNr > 0, " AND tblTrdinInvoice.RechnungsKundenNr=" & kdNr, "") & " AND tblTrdinInvoice.FilialenNr = 4814 and tblTrdinInvoice.Rechnungsdatum " & setSQLWhere(SDLNrTmp, "'AT'") & " ORDER BY tblTrdinInvoice.Rechnungsdatum desc, tblTrdinInvoice.Rechnungsnummer"
|
||||||
'RMC
|
'RMC
|
||||||
Case "RMC" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
Case "RMC" : SQL_STR = "SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahlTop, "") &
|
||||||
"Adressen.AdressenNr, Adressen.[Name 1],[rmc_reDatum] as Rechnungsdatum,[rmc_reNr] as Rechnungsnummer,rmc_kdNr as Kundennummer,[rmc_betragNetto] as Nettobetrag,[rmc_betragBrutto] as Bruttobetrag,[rmc_waehrung] as Währung ,[rmc_euroBrutto] as Brutto_EUR,[rmc_daId] as daId,[rmc_betragMWST] as MWST,rmc_landKZ as Land, cast(case when [rmc_daId] is not null then 1 else 0 end as bit) as PDFvorhanden, rmc_archiv as archiv FROM [VERAG].[dbo].[tblRMCImport] inner join Adressen on Adressen.WölflKundenNr = rmc_kdNr where 1 = 1 " & IIf(kdNr > 0, " AND AdressenNr=" & kdNr, "") & " and [rmc_reDatum] " & setSQLWhere(SDLNrTmp, "rmc_landKZ") & " order by rmc_reDatum desc, rmc_reNr"
|
"Adressen.AdressenNr, Adressen.[Name 1],[rmc_reDatum] as Rechnungsdatum,[rmc_reNr] as Rechnungsnummer,rmc_kdNr as Kundennummer,[rmc_betragNetto] as Nettobetrag,[rmc_betragBrutto] as Bruttobetrag,[rmc_waehrung] as Währung ,[rmc_euroBrutto] as Brutto_EUR,[rmc_daId] as daId,[rmc_betragMWST] as MWST,rmc_landKZ as Land, cast(case when [rmc_daId] is not null then 1 else 0 end as bit) as PDFvorhanden, rmc_archiv as archiv FROM [VERAG].[dbo].[tblRMCImport] inner join Adressen on Adressen.WölflKundenNr = rmc_kdNr where 1 = 1 " & sqlfehlendePDF_RMC & IIf(kdNr > 0, " AND AdressenNr=" & kdNr, "") & " and [rmc_reDatum] " & setSQLWhere(SDLNrTmp, "rmc_landKZ") & " order by rmc_reDatum desc, rmc_reNr"
|
||||||
|
|
||||||
Case "ALLE" : Dim anzahl As Integer = anzahlTop / 6 : SQL_STR = " select * from (SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") &
|
Case "ALLE" : Dim anzahl As Integer = anzahlTop / 6 : SQL_STR = " select * from (SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") &
|
||||||
"
|
"
|
||||||
--IDS
|
--IDS
|
||||||
'IDS' as Lieferant,invoice_id, [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer,CustomerCode as Kundennummer,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt,'' as Land, 'RE' as Art,[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblIDSInvoicesNew WHERE [CustomerCode] in (SELECT [CustomerCode] FROM [VERAG].[dbo].[tbl_IDS_Kunden] WHERE 1 = 1 and isnull([tbl_IDS_Kunden].KdNrAlt, 1) = 0 " & IIf(kdNr > 0, " AND [KdNrVERAG]=" & kdNr, "") & " ) and [YearMonthDay] " & setSQLWhere("IDS", "") & " -- order by [YearMonthDay], [Invoicenumber]
|
'IDS' as Lieferant,invoice_id, [YearMonthDay] as Rechnungsdatum,[Invoicenumber] as Rechnungsnummer,CustomerCode as Kundennummer,[AmminclVAT] as Bruttobetrag,[TotalNetAmount] as Nettobetrag,[VATAmount] as MWSt,'' as Land, 'RE' as Art,[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblIDSInvoicesNew WHERE [CustomerCode] in (SELECT [CustomerCode] FROM [VERAG].[dbo].[tbl_IDS_Kunden] WHERE 1 = 1 and isnull([tbl_IDS_Kunden].KdNrAlt, 1) = 0 " & sqlfehlendePDF & IIf(kdNr > 0, " AND [KdNrVERAG]=" & kdNr, "") & " ) and [YearMonthDay] " & setSQLWhere("IDS", "") & " -- order by [YearMonthDay], [Invoicenumber]
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
|
|
||||||
--MSE
|
--MSE
|
||||||
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'MSE' as Lieferant,-1 as invoice_id, [invoice_date] as Rechnungsdatum, cast([invoice_id] as nvarchar) as Rechnungsnummer,[customer_number] as Kundennummer, [total_amount_euro] as Bruttobetrag ,(total_amount_euro - [total_vat_amount_euro]) as Nettobetrag ,[total_vat_amount_euro] as MWST,[country] as Land,'RE' as Art,daId, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblMSEInvoices inner join tblMSECustomers on customer_id = [customer_number] where 1 = 1 " & IIf(kdNr > 0, " AND [partner_customer_number]=" & kdNr, "") & " and [invoice_date] " & setSQLWhere("MSE", "country") & " --order by invoice_date, invoice_id
|
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'MSE' as Lieferant,-1 as invoice_id, [invoice_date] as Rechnungsdatum, cast([invoice_id] as nvarchar) as Rechnungsnummer,[customer_number] as Kundennummer, [total_amount_euro] as Bruttobetrag ,(total_amount_euro - [total_vat_amount_euro]) as Nettobetrag ,[total_vat_amount_euro] as MWST,[country] as Land,'RE' as Art,daId, cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblMSEInvoices inner join tblMSECustomers on customer_id = [customer_number] where 1 = 1 " & sqlfehlendePDF & IIf(kdNr > 0, " AND [partner_customer_number]=" & kdNr, "") & " and [invoice_date] " & setSQLWhere("MSE", "country") & " --order by invoice_date, invoice_id
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
--UTA
|
--UTA
|
||||||
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'UTA' as Lieferant,-1 as invoice_id, [Rechnungsdatum],STR([Rechnungsnummer_pro_Lieferland]) as Rechnungsnummer,Kundennummer,SUM(Gesamtbetrag_Brutto_in_Darstellwährung) as Bruttobetrag,SUM(Gesamtbetrag_Netto_in_Darstellwährung) as Nettobetrag, SUM(Gesamtbetrag_Umsatzsteuer_in_Darstellwährung) as MWSt,[Lieferland_ISO2] as Land, 'RE' as Art,[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTAImportNew] inner join adressen on Kundennummer = UTAKundenNr where 1 = 1 " & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " and [Rechnungsdatum] " & setSQLWhere("UTA", "Lieferland_ISO2") & " group by [Rechnungsnummer_pro_Lieferland],[Rechnungsdatum],Kundennummer,[daId],[Lieferland_ISO2] UNION ALL SELECT 'UTA',-1, [Datum], cast([RechnungsNr] as nvarchar) ,[KundenNr],0,0,0,'',[DocumentTyp],[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTADocuments] inner join adressen on KundenNr = UTAKundenNr where AdressenNr = " & kdNr & " AND Datum " & setSQLWhere("UTA_", "") & " --order by Rechnungsnummer desc
|
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'UTA' as Lieferant,-1 as invoice_id, [Rechnungsdatum],STR([Rechnungsnummer_pro_Lieferland]) as Rechnungsnummer,Kundennummer,SUM(Gesamtbetrag_Brutto_in_Darstellwährung) as Bruttobetrag,SUM(Gesamtbetrag_Netto_in_Darstellwährung) as Nettobetrag, SUM(Gesamtbetrag_Umsatzsteuer_in_Darstellwährung) as MWSt,[Lieferland_ISO2] as Land, 'RE' as Art,[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTAImportNew] inner join adressen on Kundennummer = UTAKundenNr where 1 = 1 " & sqlfehlendePDF & IIf(kdNr > 0, " AND [AdressenNr]=" & kdNr, "") & " and [Rechnungsdatum] " & setSQLWhere("UTA", "Lieferland_ISO2") & " group by [Rechnungsnummer_pro_Lieferland],[Rechnungsdatum],Kundennummer,[daId],[Lieferland_ISO2] UNION ALL SELECT 'UTA',-1, [Datum], cast([RechnungsNr] as nvarchar) ,[KundenNr],0,0,0,'',[DocumentTyp],[daId], cast(case when [daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblUTADocuments] inner join adressen on KundenNr = UTAKundenNr where AdressenNr = " & kdNr & " AND Datum " & setSQLWhere("UTA_", "") & " --order by Rechnungsnummer desc
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
--VERAG
|
--VERAG
|
||||||
@@ -262,12 +274,12 @@ Public Class usrcntlFremdrechnungen
|
|||||||
UNION ALL
|
UNION ALL
|
||||||
--PLOSE
|
--PLOSE
|
||||||
|
|
||||||
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'PLOSE' as Lieferant,-1 as invoice_id, [plInv_SupplierRechnungsDatum] as Rechnungsdatum, cast([plInv_SupplierRechnungsNr] as nvarchar) as Rechnungsnummer,[plInv_PLOSEKundennummer] as Kundennummer,[plInv_Bruttobetrag] as Bruttobetrag,[plInv_Nettobetrag] as Nettobetrag,[plInv_MWSTBetrag] as MWST, [plInv_SupplierCountry] as Land, 'RE' as Art,[plInv_daId] as daId, cast(case when [plInv_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblPLOSE_Inv_Data inner join Adressen on Adressen.PLOSEKundenNr = plInv_PLOSEKundennummer where 1 = 1 " & IIf(kdNr > 0, " AND Adressen.AdressenNr=" & kdNr, "") & " and [plInv_SupplierRechnungsDatum] " & setSQLWhere("PLOSE", "plInv_SupplierCountry") & "-- Order by plInv_SupplierRechnungsDatum desc, [plInv_SupplierRechnungsNr]
|
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'PLOSE' as Lieferant,-1 as invoice_id, [plInv_SupplierRechnungsDatum] as Rechnungsdatum, cast([plInv_SupplierRechnungsNr] as nvarchar) as Rechnungsnummer,[plInv_PLOSEKundennummer] as Kundennummer,[plInv_Bruttobetrag] as Bruttobetrag,[plInv_Nettobetrag] as Nettobetrag,[plInv_MWSTBetrag] as MWST, [plInv_SupplierCountry] as Land, 'RE' as Art,[plInv_daId] as daId, cast(case when [plInv_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM tblPLOSE_Inv_Data inner join Adressen on Adressen.PLOSEKundenNr = plInv_PLOSEKundennummer where 1 = 1 " & sqlfehlendePDF_PLOSE & IIf(kdNr > 0, " AND Adressen.AdressenNr=" & kdNr, "") & " and [plInv_SupplierRechnungsDatum] " & setSQLWhere("PLOSE", "plInv_SupplierCountry") & "-- Order by plInv_SupplierRechnungsDatum desc, [plInv_SupplierRechnungsNr]
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
--RMC
|
--RMC
|
||||||
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'RMC' as Lieferant,-1 as invoice_id, [rmc_reDatum] as Rechnungsdatum,cast([rmc_reNr] as nvarchar) as Rechnungsnummer,rmc_kdNr as Kundennummer ,[rmc_betragBrutto] as Bruttobetrag,[rmc_betragNetto] as Nettobetrag,[rmc_betragMWST] as MWST, rmc_landKZ as Land, 'RE' as Art, [rmc_daId] as daId, cast(case when [rmc_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblRMCImport] inner join Adressen on Adressen.WölflKundenNr = rmc_kdNr where 1 = 1 " & IIf(kdNr > 0, " AND AdressenNr=" & kdNr, "") & " and [rmc_reDatum] " & setSQLWhere("RMC", "rmc_landKZ") & "-- order by rmc_reDatum, rmc_reNr
|
SELECT " & IIf(cbxMax1000Eintrage.Checked, " top " & anzahl, "") & " 'RMC' as Lieferant,-1 as invoice_id, [rmc_reDatum] as Rechnungsdatum,cast([rmc_reNr] as nvarchar) as Rechnungsnummer,rmc_kdNr as Kundennummer ,[rmc_betragBrutto] as Bruttobetrag,[rmc_betragNetto] as Nettobetrag,[rmc_betragMWST] as MWST, rmc_landKZ as Land, 'RE' as Art, [rmc_daId] as daId, cast(case when [rmc_daId] is not null then 1 else 0 end as bit) as PDFvorhanden FROM [VERAG].[dbo].[tblRMCImport] inner join Adressen on Adressen.WölflKundenNr = rmc_kdNr where 1 = 1 " & sqlfehlendePDF_RMC & IIf(kdNr > 0, " AND AdressenNr=" & kdNr, "") & " and [rmc_reDatum] " & setSQLWhere("RMC", "rmc_landKZ") & "-- order by rmc_reDatum, rmc_reNr
|
||||||
|
|
||||||
) as temp where 1=1 and temp.Rechnungsdatum" & setSQLWhere(SDLNrTmp, "temp.Land") & " order by Rechnungsdatum desc"
|
) as temp where 1=1 and temp.Rechnungsdatum" & setSQLWhere(SDLNrTmp, "temp.Land") & " order by Rechnungsdatum desc"
|
||||||
|
|
||||||
@@ -1134,4 +1146,13 @@ Public Class usrcntlFremdrechnungen
|
|||||||
Me.Cursor = Cursors.Default
|
Me.Cursor = Cursors.Default
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub cbxMax1000Eintrage_CheckedChanged(sender As Object, e As EventArgs) Handles cbxMax1000Eintrage.CheckedChanged
|
||||||
|
SET_SDL(aktLieferant)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub chxfehlendePDFs_CheckedChanged(sender As Object, e As EventArgs) Handles cbxPDFhinterlegt.CheckStateChanged
|
||||||
|
|
||||||
|
SET_SDL(aktLieferant)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user