neu
This commit is contained in:
22
SDL/mdm/frmMDMDatenverarbetiung.Designer.vb
generated
22
SDL/mdm/frmMDMDatenverarbetiung.Designer.vb
generated
@@ -60,6 +60,7 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.lblProzPruef = New System.Windows.Forms.Label()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.FlowLayoutPanel.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
@@ -170,12 +171,13 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Me.lbl.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lbl.Location = New System.Drawing.Point(13, 13)
|
||||
Me.lbl.Name = "lbl"
|
||||
Me.lbl.Size = New System.Drawing.Size(183, 17)
|
||||
Me.lbl.Size = New System.Drawing.Size(246, 25)
|
||||
Me.lbl.TabIndex = 0
|
||||
Me.lbl.Text = "MDM Datenverarbeitung"
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.Add(Me.lblProzPruef)
|
||||
Me.Panel1.Controls.Add(Me.PictureBox1)
|
||||
Me.Panel1.Controls.Add(Me.pic)
|
||||
Me.Panel1.Controls.Add(Me.Panel3)
|
||||
@@ -289,6 +291,7 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Me.txtPruefsummeBrutto._DateTimeOnly = False
|
||||
Me.txtPruefsummeBrutto._numbersOnly = False
|
||||
Me.txtPruefsummeBrutto._numbersOnlyKommastellen = ""
|
||||
Me.txtPruefsummeBrutto._numbersOnlyTrennzeichen = True
|
||||
Me.txtPruefsummeBrutto._Prozent = False
|
||||
Me.txtPruefsummeBrutto._ShortDateNew = False
|
||||
Me.txtPruefsummeBrutto._ShortDateOnly = False
|
||||
@@ -313,7 +316,7 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Me.cbx.AutoSize = True
|
||||
Me.cbx.Location = New System.Drawing.Point(13, 73)
|
||||
Me.cbx.Name = "cbx"
|
||||
Me.cbx.Size = New System.Drawing.Size(103, 17)
|
||||
Me.cbx.Size = New System.Drawing.Size(110, 21)
|
||||
Me.cbx.TabIndex = 42
|
||||
Me.cbx.Text = "Prüfergebnis OK"
|
||||
Me.cbx.UseVisualStyleBackColor = True
|
||||
@@ -409,6 +412,7 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Me.txtPruefsummeNetto._DateTimeOnly = False
|
||||
Me.txtPruefsummeNetto._numbersOnly = False
|
||||
Me.txtPruefsummeNetto._numbersOnlyKommastellen = ""
|
||||
Me.txtPruefsummeNetto._numbersOnlyTrennzeichen = True
|
||||
Me.txtPruefsummeNetto._Prozent = False
|
||||
Me.txtPruefsummeNetto._ShortDateNew = False
|
||||
Me.txtPruefsummeNetto._ShortDateOnly = False
|
||||
@@ -443,6 +447,7 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Me.txtAnzahl._DateTimeOnly = False
|
||||
Me.txtAnzahl._numbersOnly = False
|
||||
Me.txtAnzahl._numbersOnlyKommastellen = ""
|
||||
Me.txtAnzahl._numbersOnlyTrennzeichen = True
|
||||
Me.txtAnzahl._Prozent = False
|
||||
Me.txtAnzahl._ShortDateNew = False
|
||||
Me.txtAnzahl._ShortDateOnly = False
|
||||
@@ -494,10 +499,20 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Me.MyDatagridview1.Location = New System.Drawing.Point(0, 100)
|
||||
Me.MyDatagridview1.Name = "MyDatagridview1"
|
||||
Me.MyDatagridview1.ReadOnly = True
|
||||
Me.MyDatagridview1.RowHeadersWidth = 62
|
||||
Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.MyDatagridview1.Size = New System.Drawing.Size(1163, 577)
|
||||
Me.MyDatagridview1.TabIndex = 0
|
||||
'
|
||||
'lblProzPruef
|
||||
'
|
||||
Me.lblProzPruef.Location = New System.Drawing.Point(63, 92)
|
||||
Me.lblProzPruef.Name = "lblProzPruef"
|
||||
Me.lblProzPruef.Size = New System.Drawing.Size(69, 13)
|
||||
Me.lblProzPruef.TabIndex = 41
|
||||
Me.lblProzPruef.Text = "0%"
|
||||
Me.lblProzPruef.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'frmMDMDatenverarbetiung
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -510,7 +525,7 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmMDMDatenverarbetiung"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Datenverarbetiung"
|
||||
Me.Text = "Datenverarbeitung"
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
Me.FlowLayoutPanel.ResumeLayout(False)
|
||||
@@ -562,4 +577,5 @@ Partial Class frmMDMDatenverarbetiung
|
||||
Friend WithEvents PictureBox1 As PictureBox
|
||||
Friend WithEvents pic As PictureBox
|
||||
Friend WithEvents Button6 As Button
|
||||
Friend WithEvents lblProzPruef As Label
|
||||
End Class
|
||||
|
||||
@@ -179,10 +179,11 @@ Public Class frmMDMDatenverarbetiung
|
||||
FROM tblPLOSE_Details
|
||||
WHERE 1 = 1
|
||||
And plose_DatumTransaktion between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "'
|
||||
AND plose_Fakturiert=0
|
||||
AND plose_Fakturiert=1
|
||||
group by plose_POLSEKundennummer,plose_ProduktCode
|
||||
order by plose_POLSEKundennummer,plose_ProduktCode", "FMZOLL")
|
||||
.LOAD()
|
||||
'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
|
||||
If .Columns.Count > 0 Then
|
||||
|
||||
.Columns("plose_POLSEKundennummer").HeaderText = "PLOSE KdNr"
|
||||
@@ -846,6 +847,10 @@ Public Class frmMDMDatenverarbetiung
|
||||
|
||||
allPlosePos(RG, OFFERTE, LeistungsNr, NettoBetrag, BruttoBetrag)
|
||||
|
||||
'Rückvergütung Consortio !!
|
||||
If r("plp_LeistungsNr") = "190" Then '(PRODUCTCODE=301; VERAG-LEISTUNGSNR=190!!
|
||||
rabattPlosePos(RG, OFFERTE, LeistungsNr, NettoBetrag, BruttoBetrag)
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
@@ -890,8 +895,6 @@ Public Class frmMDMDatenverarbetiung
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Function allPlosePos(ByRef RG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, OFFERTE As VERAG_PROG_ALLGEMEIN.cOfferte, LeistungsNr As Integer, NettoBetrag As Double, BruttoBetrag As Double)
|
||||
Try
|
||||
|
||||
@@ -937,6 +940,37 @@ Public Class frmMDMDatenverarbetiung
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
Function rabattPlosePos(ByRef RG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, OFFERTE As VERAG_PROG_ALLGEMEIN.cOfferte, LeistungsNr As Integer, NettoBetrag As Double, BruttoBetrag As Double)
|
||||
Try
|
||||
Dim POS As New VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen()
|
||||
Dim LEISTUNG As New VERAG_PROG_ALLGEMEIN.cLeistungen(LeistungsNr)
|
||||
POS.LeistungsNr = LEISTUNG.LeistungsNr
|
||||
POS.LeistungsBez = "Rabatt " & LEISTUNG.LeistungsBez
|
||||
|
||||
POS.BerechnungsartNr = LEISTUNG.BerechnungsartNr
|
||||
'POS.Preis = BruttoBetrag
|
||||
POS.Anzahl = 1
|
||||
POS.Steuerpflichtig = LEISTUNG.Steuerpflichtig
|
||||
' POS.BGebBgl = NettoBetrag* -1
|
||||
|
||||
If POS.Steuerpflichtig Then
|
||||
POS.SteuerpflichtigerBetrag = NettoBetrag * -1
|
||||
|
||||
POS.Preis = NettoBetrag
|
||||
Else
|
||||
POS.SteuerfreierBetrag = BruttoBetrag * -1
|
||||
POS.Preis = BruttoBetrag * -1
|
||||
End If
|
||||
|
||||
RG.POSITIONEN.Add(POS)
|
||||
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Function allPlosePosBGeb(ByRef RG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, OFFERTE As VERAG_PROG_ALLGEMEIN.cOfferte, BGebLeistungsNr As Integer, BGebBgl As Double, BGebProzent As Double)
|
||||
Try
|
||||
@@ -996,6 +1030,112 @@ Public Class frmMDMDatenverarbetiung
|
||||
Function pruefData_PLOSE() As Boolean
|
||||
pruefData_PLOSE = True
|
||||
Try
|
||||
Dim VERAGKdNr_DT As DataTable = SQL.loadDgvBySql("SELECT AdressenNr,PLOSEKundenNr FROM Adressen WHERE PLOSEKundenNr is not null", "FMZOLL")
|
||||
Dim VERAGLeistungsNr_DT = SQL.loadDgvBySql("SELECT [plp_LeistungsNr],plp_ProductCode FROM [tblPLOSE_Produktbeschreibung] where plp_ProductCode is not null and plp_Firma IN ('PSS','PU') ", "FMZOLL")
|
||||
'Dim OffertenNr_DT = SQL.loadDgvBySql("SELECT KundenNr,OffertenNr FROM [Offerten] where OffertenNr = 80 ", "FMZOLL")
|
||||
' Dim KundeLeistungsNr_DT = SQL.loadDgvBySql("SELECT [LeistungsNr],KundenNr FROM [Offertenpositionen] where OffertenNr = 80", "FMZOLL")
|
||||
|
||||
Dim VERAGKdNr = -1
|
||||
Dim VERAGLeistungsNr = -1
|
||||
Dim found = False
|
||||
Dim results As DataRow()
|
||||
|
||||
Dim cnt = 0
|
||||
|
||||
For Each r As DataGridViewRow In MyDatagridview1.Rows
|
||||
'KUNDEN-NR / PLOSE KD-NR
|
||||
results = VERAGKdNr_DT.Select("PLOSEKundenNr = '" & r.Cells("plose_POLSEKundennummer").Value & "'")
|
||||
If results.Length > 0 Then
|
||||
'Gefunden!
|
||||
r.Cells("VERAGKdNr").Value = results(0)("PLOSEKundenNr")
|
||||
r.Cells("VERAGKdNr").Style.BackColor = Color.MintCream
|
||||
VERAGKdNr = results(0)("AdressenNr")
|
||||
found = True
|
||||
Else
|
||||
r.Cells("VERAGKdNr").Style.BackColor = Color.PapayaWhip
|
||||
pruefData_PLOSE = False
|
||||
End If
|
||||
|
||||
'KUNDEN-NR / PLOSE KD-NR
|
||||
'Default -> Nicht gefunden
|
||||
'r.Cells("VERAGKdNr").Style.BackColor = Color.PapayaWhip
|
||||
'found = False
|
||||
'For Each k In VERAGKdNr_DT.Rows
|
||||
' If r.Cells("plose_POLSEKundennummer").Value = k("PLOSEKundenNr") Then
|
||||
' 'Gefunden!
|
||||
' r.Cells("VERAGKdNr").Value = k("PLOSEKundenNr")
|
||||
' r.Cells("VERAGKdNr").Style.BackColor = Color.MintCream
|
||||
' VERAGKdNr = k("AdressenNr")
|
||||
' found = True
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
'If Not found Then pruefData_PLOSE = False
|
||||
|
||||
'VERAG/PLOSE LEISTUNG
|
||||
results = VERAGLeistungsNr_DT.Select("plp_ProductCode = '" & r.Cells("plose_ProduktCode").Value & "' AND plp_LeistungsNr is not null")
|
||||
If results.Length > 0 Then
|
||||
'Gefunden!
|
||||
VERAGLeistungsNr = results(0)("plp_LeistungsNr")
|
||||
r.Cells("VERAGLeistungsNr").Value = results(0)("plp_LeistungsNr")
|
||||
r.Cells("VERAGLeistungsNr").Style.BackColor = Color.MintCream
|
||||
found = True
|
||||
Else
|
||||
r.Cells("VERAGLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
pruefData_PLOSE = False
|
||||
End If
|
||||
|
||||
|
||||
'VERAG OFFERT 80
|
||||
'Default -> Nicht gefunden
|
||||
Dim OffertenNr_DT = SQL.loadDgvBySql("SELECT KundenNr,OffertenNr FROM [Offerten] where OffertenNr = 80 AND KundenNr = '" & VERAGKdNr & "'", "FMZOLL")
|
||||
results = OffertenNr_DT.Select("KundenNr = '" & VERAGKdNr & "'")
|
||||
If results.Length > 0 Then
|
||||
'Gefunden!
|
||||
r.Cells("KundeOffertenNr").Value = results(0)("OffertenNr")
|
||||
r.Cells("KundeOffertenNr").Style.BackColor = Color.MintCream
|
||||
Else
|
||||
pruefData_PLOSE = False
|
||||
r.Cells("KundeOffertenNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'VERAG LEISTUNGS-NR
|
||||
'Default -> Nicht gefunden
|
||||
Dim KundeLeistungsNr_DT = SQL.loadDgvBySql("SELECT [LeistungsNr],KundenNr FROM [Offertenpositionen] where OffertenNr = 80 AND KundenNr = '" & VERAGKdNr & "' AND LeistungsNr = '" & VERAGLeistungsNr & "'", "FMZOLL")
|
||||
results = KundeLeistungsNr_DT.Select("KundenNr = '" & VERAGKdNr & "' AND LeistungsNr = '" & VERAGLeistungsNr & "'")
|
||||
If results.Length > 0 Then
|
||||
'Gefunden!
|
||||
r.Cells("KundeLeistungsNr").Value = VERAGLeistungsNr
|
||||
r.Cells("KundeLeistungsNr").Style.BackColor = Color.MintCream
|
||||
Else
|
||||
r.Cells("KundeLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
pruefData_PLOSE = False
|
||||
End If
|
||||
|
||||
|
||||
If cnt Mod 5 = 0 Then
|
||||
lblProzPruef.Text = CInt(cnt / MyDatagridview1.Rows.Count() * 100) & " %"
|
||||
lblProzPruef.Refresh()
|
||||
Me.Refresh()
|
||||
End If
|
||||
|
||||
cnt += 1
|
||||
|
||||
Next
|
||||
lblProzPruef.Text = CInt(cnt / MyDatagridview1.Rows.Count() * 100) & " %" '100
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
pruefData_PLOSE = False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Function pruefData_PLOSE_old() As Boolean
|
||||
pruefData_PLOSE_old = True
|
||||
Try
|
||||
Dim cnt = 0
|
||||
|
||||
For Each r As DataGridViewRow In MyDatagridview1.Rows
|
||||
Dim VERAGKdNr = SQL.getValueTxtBySql("SELECT TOP 1 AdressenNr FROM Adressen WHERE PLOSEKundenNr='" & r.Cells("plose_POLSEKundennummer").Value & "'", "FMZOLL")
|
||||
|
||||
@@ -1003,7 +1143,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
r.Cells("VERAGKdNr").Value = VERAGKdNr
|
||||
r.Cells("VERAGKdNr").Style.BackColor = Color.MintCream
|
||||
Else
|
||||
pruefData_PLOSE = False
|
||||
pruefData_PLOSE_old = False
|
||||
r.Cells("VERAGKdNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
Dim VERAGLeistungsNr = SQL.getValueTxtBySql("SELECT TOP (1) [plp_LeistungsNr] FROM [tblPLOSE_Produktbeschreibung] where plp_ProductCode='" & r.Cells("plose_ProduktCode").Value & "' and plp_Firma IN ('PSS','PU') ", "FMZOLL")
|
||||
@@ -1011,7 +1151,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
r.Cells("VERAGLeistungsNr").Value = VERAGLeistungsNr
|
||||
r.Cells("VERAGLeistungsNr").Style.BackColor = Color.MintCream
|
||||
Else
|
||||
pruefData_PLOSE = False
|
||||
pruefData_PLOSE_old = False
|
||||
r.Cells("VERAGLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
|
||||
@@ -1021,7 +1161,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
r.Cells("KundeOffertenNr").Value = OffertenNr
|
||||
r.Cells("KundeOffertenNr").Style.BackColor = Color.MintCream
|
||||
Else
|
||||
pruefData_PLOSE = False
|
||||
pruefData_PLOSE_old = False
|
||||
r.Cells("KundeOffertenNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
|
||||
@@ -1032,18 +1172,30 @@ Public Class frmMDMDatenverarbetiung
|
||||
r.Cells("KundeLeistungsNr").Value = VERAGLeistungsNr
|
||||
r.Cells("KundeLeistungsNr").Style.BackColor = Color.MintCream
|
||||
Else
|
||||
pruefData_PLOSE = False
|
||||
pruefData_PLOSE_old = False
|
||||
r.Cells("KundeLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
Else
|
||||
pruefData_PLOSE = False
|
||||
pruefData_PLOSE_old = False
|
||||
r.Cells("KundeLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
|
||||
|
||||
If cnt Mod 5 = 0 Then
|
||||
lblProzPruef.Text = CInt(cnt / MyDatagridview1.Rows.Count() * 100) & " %"
|
||||
lblProzPruef.Refresh()
|
||||
Me.Refresh()
|
||||
End If
|
||||
|
||||
cnt += 1
|
||||
|
||||
Next
|
||||
lblProzPruef.Text = CInt(cnt / MyDatagridview1.Rows.Count() * 100) & " %" '100
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
pruefData_PLOSE = False
|
||||
pruefData_PLOSE_old = False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user