UTA, MDM, MSE, Datenarchiv
This commit is contained in:
@@ -4104,8 +4104,8 @@ Nächste_Textzeile_lesen:
|
|||||||
If check >= 0 Then
|
If check >= 0 Then
|
||||||
If IsNumeric(cboSteuerschlüssel._value) AndAlso CInt(cboSteuerschlüssel._value) <> check Then
|
If IsNumeric(cboSteuerschlüssel._value) AndAlso CInt(cboSteuerschlüssel._value) <> check Then
|
||||||
Dim text = SQL.getValueTxtBySql("select AuswahlSteuerbezeichnung from Steuertabelle where Steuerschlüssel =" & check, "FMZOLL")
|
Dim text = SQL.getValueTxtBySql("select AuswahlSteuerbezeichnung from Steuertabelle where Steuerschlüssel =" & check, "FMZOLL")
|
||||||
Dim hintUIDPruef As String = IIf((RECHNUNG.RechnungsUstIdGeprüft IsNot Nothing AndAlso CDate(RECHNUNG.RechnungsUstIdGeprüft) < Today.AddDays(-30)), " UID-Prüfung ist älter als 30 Tage!", "")
|
Dim hintUIDPruef As String = IIf((RECHNUNG.RechnungsUstIdGeprüft IsNot Nothing AndAlso CDate(RECHNUNG.RechnungsUstIdGeprüft) < Today.AddDays(-31)), "UID-Prüfung ist älter als 31 Tage!", "")
|
||||||
If Not vbYes = MsgBox("Falscher Steuertyp!" & vbNewLine & " Steuerschlüssel " & text & " sollte hinterlegt werden." & vbNewLine & IIf(hintUIDPruef <> "", hintUIDPruef & vbNewLine, "") & "Trotzdem speichern?", vbYesNo) Then
|
If Not vbYes = MsgBox("Falscher Steuertyp!" & vbNewLine & "Steuerschlüssel " & text & " sollte hinterlegt werden." & vbNewLine & IIf(hintUIDPruef <> "", hintUIDPruef & vbNewLine, "") & "Trotzdem speichern?", vbYesNo) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -450,9 +450,13 @@ Public Class frmEssensbestellungenAdministration
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
dgvBestellungen.GetOrder()
|
If dgvBestellungen.RowCount > 0 Then
|
||||||
dgvBestellungen.LOAD()
|
|
||||||
dgvBestellungen.SetOrder()
|
dgvBestellungen.GetOrder()
|
||||||
|
dgvBestellungen.LOAD()
|
||||||
|
dgvBestellungen.SetOrder()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
247
SDL/mdm/frmMDMDatenverarbetiung.Designer.vb
generated
247
SDL/mdm/frmMDMDatenverarbetiung.Designer.vb
generated
@@ -45,7 +45,6 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.lbl = New System.Windows.Forms.Label()
|
Me.lbl = New System.Windows.Forms.Label()
|
||||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
Me.lblTTRSum = New System.Windows.Forms.Label()
|
Me.lblTTRSum = New System.Windows.Forms.Label()
|
||||||
Me.txtTTRSum = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
|
||||||
Me.lblProzPruef = New System.Windows.Forms.Label()
|
Me.lblProzPruef = New System.Windows.Forms.Label()
|
||||||
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
||||||
Me.pic = New System.Windows.Forms.PictureBox()
|
Me.pic = New System.Windows.Forms.PictureBox()
|
||||||
@@ -58,7 +57,6 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.Button1 = New System.Windows.Forms.Button()
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
Me.btnKunde = New System.Windows.Forms.Button()
|
Me.btnKunde = New System.Windows.Forms.Button()
|
||||||
Me.Label4 = New System.Windows.Forms.Label()
|
Me.Label4 = New System.Windows.Forms.Label()
|
||||||
Me.txtPruefsummeBrutto = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
|
||||||
Me.cbx = New System.Windows.Forms.CheckBox()
|
Me.cbx = New System.Windows.Forms.CheckBox()
|
||||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||||
Me.Label43 = New System.Windows.Forms.Label()
|
Me.Label43 = New System.Windows.Forms.Label()
|
||||||
@@ -69,12 +67,17 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.pbPloseAnh_Proz = New System.Windows.Forms.ProgressBar()
|
Me.pbPloseAnh_Proz = New System.Windows.Forms.ProgressBar()
|
||||||
Me.lblPloseAnh_Proz = New System.Windows.Forms.Label()
|
Me.lblPloseAnh_Proz = New System.Windows.Forms.Label()
|
||||||
Me.Label3 = New System.Windows.Forms.Label()
|
Me.Label3 = New System.Windows.Forms.Label()
|
||||||
Me.txtPruefsummeNetto = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
|
||||||
Me.Label2 = New System.Windows.Forms.Label()
|
Me.Label2 = New System.Windows.Forms.Label()
|
||||||
Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
|
||||||
Me.Button3 = New System.Windows.Forms.Button()
|
Me.Button3 = New System.Windows.Forms.Button()
|
||||||
Me.Button2 = New System.Windows.Forms.Button()
|
Me.Button2 = New System.Windows.Forms.Button()
|
||||||
Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||||
|
Me.txtTTRSum = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
|
Me.txtPruefsummeBrutto = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
|
Me.txtPruefsummeNetto = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
|
Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
|
Me.Panel5 = New System.Windows.Forms.Panel()
|
||||||
|
Me.Label5 = New System.Windows.Forms.Label()
|
||||||
|
Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
|
||||||
Me.pnl.SuspendLayout()
|
Me.pnl.SuspendLayout()
|
||||||
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.Panel4.SuspendLayout()
|
Me.Panel4.SuspendLayout()
|
||||||
@@ -86,10 +89,12 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.Panel3.SuspendLayout()
|
Me.Panel3.SuspendLayout()
|
||||||
Me.Panel2.SuspendLayout()
|
Me.Panel2.SuspendLayout()
|
||||||
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.Panel5.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'pnl
|
'pnl
|
||||||
'
|
'
|
||||||
|
Me.pnl.Controls.Add(Me.Panel5)
|
||||||
Me.pnl.Controls.Add(Me.PictureBox5)
|
Me.pnl.Controls.Add(Me.PictureBox5)
|
||||||
Me.pnl.Controls.Add(Me.cbxBelegeerstellt)
|
Me.pnl.Controls.Add(Me.cbxBelegeerstellt)
|
||||||
Me.pnl.Controls.Add(Me.cbxASFINAGAbgerechnet)
|
Me.pnl.Controls.Add(Me.cbxASFINAGAbgerechnet)
|
||||||
@@ -338,32 +343,6 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.lblTTRSum.Text = "Prüfsumme TTR:"
|
Me.lblTTRSum.Text = "Prüfsumme TTR:"
|
||||||
Me.lblTTRSum.Visible = False
|
Me.lblTTRSum.Visible = False
|
||||||
'
|
'
|
||||||
'txtTTRSum
|
|
||||||
'
|
|
||||||
Me.txtTTRSum._DateTimeOnly = False
|
|
||||||
Me.txtTTRSum._numbersOnly = False
|
|
||||||
Me.txtTTRSum._numbersOnlyKommastellen = ""
|
|
||||||
Me.txtTTRSum._numbersOnlyTrennzeichen = True
|
|
||||||
Me.txtTTRSum._Prozent = False
|
|
||||||
Me.txtTTRSum._ShortDateNew = False
|
|
||||||
Me.txtTTRSum._ShortDateOnly = False
|
|
||||||
Me.txtTTRSum._TimeOnly = False
|
|
||||||
Me.txtTTRSum._TimeOnly_Seconds = False
|
|
||||||
Me.txtTTRSum._value = ""
|
|
||||||
Me.txtTTRSum._Waehrung = False
|
|
||||||
Me.txtTTRSum._WaehrungZeichen = True
|
|
||||||
Me.txtTTRSum.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.txtTTRSum.ForeColor = System.Drawing.Color.Black
|
|
||||||
Me.txtTTRSum.Location = New System.Drawing.Point(1051, 92)
|
|
||||||
Me.txtTTRSum.MaxLineLength = -1
|
|
||||||
Me.txtTTRSum.MaxLines_Warning = ""
|
|
||||||
Me.txtTTRSum.MaxLines_Warning_Label = Nothing
|
|
||||||
Me.txtTTRSum.Name = "txtTTRSum"
|
|
||||||
Me.txtTTRSum.Size = New System.Drawing.Size(100, 20)
|
|
||||||
Me.txtTTRSum.TabIndex = 51
|
|
||||||
Me.txtTTRSum.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
|
||||||
Me.txtTTRSum.Visible = False
|
|
||||||
'
|
|
||||||
'lblProzPruef
|
'lblProzPruef
|
||||||
'
|
'
|
||||||
Me.lblProzPruef.Location = New System.Drawing.Point(63, 92)
|
Me.lblProzPruef.Location = New System.Drawing.Point(63, 92)
|
||||||
@@ -489,31 +468,6 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.Label4.TabIndex = 44
|
Me.Label4.TabIndex = 44
|
||||||
Me.Label4.Text = "Prüfsumme brutto:"
|
Me.Label4.Text = "Prüfsumme brutto:"
|
||||||
'
|
'
|
||||||
'txtPruefsummeBrutto
|
|
||||||
'
|
|
||||||
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
|
|
||||||
Me.txtPruefsummeBrutto._TimeOnly = False
|
|
||||||
Me.txtPruefsummeBrutto._TimeOnly_Seconds = False
|
|
||||||
Me.txtPruefsummeBrutto._value = ""
|
|
||||||
Me.txtPruefsummeBrutto._Waehrung = False
|
|
||||||
Me.txtPruefsummeBrutto._WaehrungZeichen = True
|
|
||||||
Me.txtPruefsummeBrutto.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.txtPruefsummeBrutto.ForeColor = System.Drawing.Color.Black
|
|
||||||
Me.txtPruefsummeBrutto.Location = New System.Drawing.Point(1051, 69)
|
|
||||||
Me.txtPruefsummeBrutto.MaxLineLength = -1
|
|
||||||
Me.txtPruefsummeBrutto.MaxLines_Warning = ""
|
|
||||||
Me.txtPruefsummeBrutto.MaxLines_Warning_Label = Nothing
|
|
||||||
Me.txtPruefsummeBrutto.Name = "txtPruefsummeBrutto"
|
|
||||||
Me.txtPruefsummeBrutto.Size = New System.Drawing.Size(100, 20)
|
|
||||||
Me.txtPruefsummeBrutto.TabIndex = 43
|
|
||||||
Me.txtPruefsummeBrutto.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
|
||||||
'
|
|
||||||
'cbx
|
'cbx
|
||||||
'
|
'
|
||||||
Me.cbx.AutoSize = True
|
Me.cbx.AutoSize = True
|
||||||
@@ -610,31 +564,6 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.Label3.TabIndex = 38
|
Me.Label3.TabIndex = 38
|
||||||
Me.Label3.Text = "Prüfsumme netto:"
|
Me.Label3.Text = "Prüfsumme netto:"
|
||||||
'
|
'
|
||||||
'txtPruefsummeNetto
|
|
||||||
'
|
|
||||||
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
|
|
||||||
Me.txtPruefsummeNetto._TimeOnly = False
|
|
||||||
Me.txtPruefsummeNetto._TimeOnly_Seconds = False
|
|
||||||
Me.txtPruefsummeNetto._value = ""
|
|
||||||
Me.txtPruefsummeNetto._Waehrung = False
|
|
||||||
Me.txtPruefsummeNetto._WaehrungZeichen = True
|
|
||||||
Me.txtPruefsummeNetto.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.txtPruefsummeNetto.ForeColor = System.Drawing.Color.Black
|
|
||||||
Me.txtPruefsummeNetto.Location = New System.Drawing.Point(1051, 43)
|
|
||||||
Me.txtPruefsummeNetto.MaxLineLength = -1
|
|
||||||
Me.txtPruefsummeNetto.MaxLines_Warning = ""
|
|
||||||
Me.txtPruefsummeNetto.MaxLines_Warning_Label = Nothing
|
|
||||||
Me.txtPruefsummeNetto.Name = "txtPruefsummeNetto"
|
|
||||||
Me.txtPruefsummeNetto.Size = New System.Drawing.Size(100, 20)
|
|
||||||
Me.txtPruefsummeNetto.TabIndex = 37
|
|
||||||
Me.txtPruefsummeNetto.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
|
||||||
'
|
|
||||||
'Label2
|
'Label2
|
||||||
'
|
'
|
||||||
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
@@ -645,31 +574,6 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.Label2.TabIndex = 36
|
Me.Label2.TabIndex = 36
|
||||||
Me.Label2.Text = "Anzahl:"
|
Me.Label2.Text = "Anzahl:"
|
||||||
'
|
'
|
||||||
'txtAnzahl
|
|
||||||
'
|
|
||||||
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
|
|
||||||
Me.txtAnzahl._TimeOnly = False
|
|
||||||
Me.txtAnzahl._TimeOnly_Seconds = False
|
|
||||||
Me.txtAnzahl._value = ""
|
|
||||||
Me.txtAnzahl._Waehrung = False
|
|
||||||
Me.txtAnzahl._WaehrungZeichen = True
|
|
||||||
Me.txtAnzahl.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.txtAnzahl.ForeColor = System.Drawing.Color.Black
|
|
||||||
Me.txtAnzahl.Location = New System.Drawing.Point(1051, 16)
|
|
||||||
Me.txtAnzahl.MaxLineLength = -1
|
|
||||||
Me.txtAnzahl.MaxLines_Warning = ""
|
|
||||||
Me.txtAnzahl.MaxLines_Warning_Label = Nothing
|
|
||||||
Me.txtAnzahl.Name = "txtAnzahl"
|
|
||||||
Me.txtAnzahl.Size = New System.Drawing.Size(100, 20)
|
|
||||||
Me.txtAnzahl.TabIndex = 35
|
|
||||||
Me.txtAnzahl.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
|
||||||
'
|
|
||||||
'Button3
|
'Button3
|
||||||
'
|
'
|
||||||
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
@@ -707,6 +611,134 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.MyDatagridview1.Size = New System.Drawing.Size(1163, 577)
|
Me.MyDatagridview1.Size = New System.Drawing.Size(1163, 577)
|
||||||
Me.MyDatagridview1.TabIndex = 0
|
Me.MyDatagridview1.TabIndex = 0
|
||||||
'
|
'
|
||||||
|
'txtTTRSum
|
||||||
|
'
|
||||||
|
Me.txtTTRSum._DateTimeOnly = False
|
||||||
|
Me.txtTTRSum._numbersOnly = False
|
||||||
|
Me.txtTTRSum._numbersOnlyKommastellen = ""
|
||||||
|
Me.txtTTRSum._numbersOnlyTrennzeichen = True
|
||||||
|
Me.txtTTRSum._Prozent = False
|
||||||
|
Me.txtTTRSum._ShortDateNew = False
|
||||||
|
Me.txtTTRSum._ShortDateOnly = False
|
||||||
|
Me.txtTTRSum._TimeOnly = False
|
||||||
|
Me.txtTTRSum._TimeOnly_Seconds = False
|
||||||
|
Me.txtTTRSum._value = ""
|
||||||
|
Me.txtTTRSum._Waehrung = False
|
||||||
|
Me.txtTTRSum._WaehrungZeichen = True
|
||||||
|
Me.txtTTRSum.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.txtTTRSum.ForeColor = System.Drawing.Color.Black
|
||||||
|
Me.txtTTRSum.Location = New System.Drawing.Point(1051, 92)
|
||||||
|
Me.txtTTRSum.MaxLineLength = -1
|
||||||
|
Me.txtTTRSum.MaxLines_Warning = ""
|
||||||
|
Me.txtTTRSum.MaxLines_Warning_Label = Nothing
|
||||||
|
Me.txtTTRSum.Name = "txtTTRSum"
|
||||||
|
Me.txtTTRSum.Size = New System.Drawing.Size(100, 20)
|
||||||
|
Me.txtTTRSum.TabIndex = 51
|
||||||
|
Me.txtTTRSum.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||||
|
Me.txtTTRSum.Visible = False
|
||||||
|
'
|
||||||
|
'txtPruefsummeBrutto
|
||||||
|
'
|
||||||
|
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
|
||||||
|
Me.txtPruefsummeBrutto._TimeOnly = False
|
||||||
|
Me.txtPruefsummeBrutto._TimeOnly_Seconds = False
|
||||||
|
Me.txtPruefsummeBrutto._value = ""
|
||||||
|
Me.txtPruefsummeBrutto._Waehrung = False
|
||||||
|
Me.txtPruefsummeBrutto._WaehrungZeichen = True
|
||||||
|
Me.txtPruefsummeBrutto.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.txtPruefsummeBrutto.ForeColor = System.Drawing.Color.Black
|
||||||
|
Me.txtPruefsummeBrutto.Location = New System.Drawing.Point(1051, 69)
|
||||||
|
Me.txtPruefsummeBrutto.MaxLineLength = -1
|
||||||
|
Me.txtPruefsummeBrutto.MaxLines_Warning = ""
|
||||||
|
Me.txtPruefsummeBrutto.MaxLines_Warning_Label = Nothing
|
||||||
|
Me.txtPruefsummeBrutto.Name = "txtPruefsummeBrutto"
|
||||||
|
Me.txtPruefsummeBrutto.Size = New System.Drawing.Size(100, 20)
|
||||||
|
Me.txtPruefsummeBrutto.TabIndex = 43
|
||||||
|
Me.txtPruefsummeBrutto.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||||
|
'
|
||||||
|
'txtPruefsummeNetto
|
||||||
|
'
|
||||||
|
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
|
||||||
|
Me.txtPruefsummeNetto._TimeOnly = False
|
||||||
|
Me.txtPruefsummeNetto._TimeOnly_Seconds = False
|
||||||
|
Me.txtPruefsummeNetto._value = ""
|
||||||
|
Me.txtPruefsummeNetto._Waehrung = False
|
||||||
|
Me.txtPruefsummeNetto._WaehrungZeichen = True
|
||||||
|
Me.txtPruefsummeNetto.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.txtPruefsummeNetto.ForeColor = System.Drawing.Color.Black
|
||||||
|
Me.txtPruefsummeNetto.Location = New System.Drawing.Point(1051, 43)
|
||||||
|
Me.txtPruefsummeNetto.MaxLineLength = -1
|
||||||
|
Me.txtPruefsummeNetto.MaxLines_Warning = ""
|
||||||
|
Me.txtPruefsummeNetto.MaxLines_Warning_Label = Nothing
|
||||||
|
Me.txtPruefsummeNetto.Name = "txtPruefsummeNetto"
|
||||||
|
Me.txtPruefsummeNetto.Size = New System.Drawing.Size(100, 20)
|
||||||
|
Me.txtPruefsummeNetto.TabIndex = 37
|
||||||
|
Me.txtPruefsummeNetto.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||||
|
'
|
||||||
|
'txtAnzahl
|
||||||
|
'
|
||||||
|
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
|
||||||
|
Me.txtAnzahl._TimeOnly = False
|
||||||
|
Me.txtAnzahl._TimeOnly_Seconds = False
|
||||||
|
Me.txtAnzahl._value = ""
|
||||||
|
Me.txtAnzahl._Waehrung = False
|
||||||
|
Me.txtAnzahl._WaehrungZeichen = True
|
||||||
|
Me.txtAnzahl.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.txtAnzahl.ForeColor = System.Drawing.Color.Black
|
||||||
|
Me.txtAnzahl.Location = New System.Drawing.Point(1051, 16)
|
||||||
|
Me.txtAnzahl.MaxLineLength = -1
|
||||||
|
Me.txtAnzahl.MaxLines_Warning = ""
|
||||||
|
Me.txtAnzahl.MaxLines_Warning_Label = Nothing
|
||||||
|
Me.txtAnzahl.Name = "txtAnzahl"
|
||||||
|
Me.txtAnzahl.Size = New System.Drawing.Size(100, 20)
|
||||||
|
Me.txtAnzahl.TabIndex = 35
|
||||||
|
Me.txtAnzahl.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||||
|
'
|
||||||
|
'Panel5
|
||||||
|
'
|
||||||
|
Me.Panel5.Controls.Add(Me.Label5)
|
||||||
|
Me.Panel5.Controls.Add(Me.DateTimePicker2)
|
||||||
|
Me.Panel5.Location = New System.Drawing.Point(3, 67)
|
||||||
|
Me.Panel5.Name = "Panel5"
|
||||||
|
Me.Panel5.Size = New System.Drawing.Size(264, 33)
|
||||||
|
Me.Panel5.TabIndex = 29
|
||||||
|
Me.Panel5.Visible = False
|
||||||
|
'
|
||||||
|
'Label5
|
||||||
|
'
|
||||||
|
Me.Label5.AutoSize = True
|
||||||
|
Me.Label5.Location = New System.Drawing.Point(11, 12)
|
||||||
|
Me.Label5.Name = "Label5"
|
||||||
|
Me.Label5.Size = New System.Drawing.Size(113, 13)
|
||||||
|
Me.Label5.TabIndex = 23
|
||||||
|
Me.Label5.Text = "Rechnungsdaten von:"
|
||||||
|
'
|
||||||
|
'DateTimePicker2
|
||||||
|
'
|
||||||
|
Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
|
||||||
|
Me.DateTimePicker2.Location = New System.Drawing.Point(143, 6)
|
||||||
|
Me.DateTimePicker2.Name = "DateTimePicker2"
|
||||||
|
Me.DateTimePicker2.Size = New System.Drawing.Size(103, 20)
|
||||||
|
Me.DateTimePicker2.TabIndex = 22
|
||||||
|
'
|
||||||
'frmMDMDatenverarbetiung
|
'frmMDMDatenverarbetiung
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
@@ -735,6 +767,8 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Me.Panel2.ResumeLayout(False)
|
Me.Panel2.ResumeLayout(False)
|
||||||
Me.Panel2.PerformLayout()
|
Me.Panel2.PerformLayout()
|
||||||
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
Me.Panel5.ResumeLayout(False)
|
||||||
|
Me.Panel5.PerformLayout()
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -790,4 +824,7 @@ Partial Class frmMDMDatenverarbetiung
|
|||||||
Friend WithEvents PictureBox5 As PictureBox
|
Friend WithEvents PictureBox5 As PictureBox
|
||||||
Friend WithEvents Button4 As Button
|
Friend WithEvents Button4 As Button
|
||||||
Friend WithEvents Button9 As Button
|
Friend WithEvents Button9 As Button
|
||||||
|
Friend WithEvents Panel5 As Panel
|
||||||
|
Friend WithEvents Label5 As Label
|
||||||
|
Friend WithEvents DateTimePicker2 As DateTimePicker
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Imports System.Data.OleDb
|
Imports System.Data.OleDb
|
||||||
Imports System.DirectoryServices.ActiveDirectory
|
Imports System.DirectoryServices.ActiveDirectory
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports Chilkat
|
||||||
Imports com.sun.jdi
|
Imports com.sun.jdi
|
||||||
Imports com.sun.net.httpserver.Authenticator
|
Imports com.sun.net.httpserver.Authenticator
|
||||||
Imports DAKOSY_Worker.NichtAbschliessendeFestsetzung
|
Imports DAKOSY_Worker.NichtAbschliessendeFestsetzung
|
||||||
@@ -35,7 +36,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Case "ASFINAG" : genSummenbericht_ASFINAG()
|
Case "ASFINAG" : genSummenbericht_ASFINAG()
|
||||||
Case "UTA" : genSummenbericht_UTA()
|
Case "UTA" : genSummenbericht_UTA()
|
||||||
Case "IDS" : MsgBox("Nicht verfügbar!") : Exit Sub
|
Case "IDS" : MsgBox("Nicht verfügbar!") : Exit Sub
|
||||||
Case "MSE" : MsgBox("Nicht verfügbar!") : Exit Sub
|
Case "MSE" : genSummenbericht_MSE()
|
||||||
Case Else : MsgBox("Nicht verfügbar!")
|
Case Else : MsgBox("Nicht verfügbar!")
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
@@ -53,7 +54,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Case "ASFINAG" : pruef = pruefData_ASFINAG()
|
Case "ASFINAG" : pruef = pruefData_ASFINAG()
|
||||||
Case "UTA" : pruef = pruefData_UTA()
|
Case "UTA" : pruef = pruefData_UTA()
|
||||||
Case "IDS" : MsgBox("Nicht verfügbar!") : Exit Sub
|
Case "IDS" : MsgBox("Nicht verfügbar!") : Exit Sub
|
||||||
Case "MSE" : MsgBox("Nicht verfügbar!") : Exit Sub
|
Case "MSE" : pruef = pruefData_MSE()
|
||||||
Case Else : MsgBox("Nicht verfügbar!") : Exit Sub
|
Case Else : MsgBox("Nicht verfügbar!") : Exit Sub
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
btnDatenLaden.Text = "Daten laden"
|
btnDatenLaden.Text = "Daten laden"
|
||||||
Case "IDS" : MsgBox("Nicht verfügbar!")
|
Case "IDS" : MsgBox("Nicht verfügbar!")
|
||||||
btnDatenLaden.Text = "Daten laden"
|
btnDatenLaden.Text = "Daten laden"
|
||||||
Case "MSE" : MsgBox("Nicht verfügbar!")
|
Case "MSE" : initDgv_MSE()
|
||||||
btnDatenLaden.Text = "Daten laden"
|
btnDatenLaden.Text = "Daten laden"
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
@@ -97,20 +98,24 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Case "PLOSE"
|
Case "PLOSE"
|
||||||
If genRGAtt_PLOSE() Then
|
If genRGAtt_PLOSE() Then
|
||||||
If MautD_Befuellen() Then
|
If MautD_Befuellen() Then
|
||||||
setFakturiertPLOSE()
|
setFakturiert(LIEFERANT)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Case "UTA"
|
Case "UTA"
|
||||||
If genRGAtt_UTA() Then
|
If genRGAtt_UTA() Then
|
||||||
If MautD_Befuellen() Then
|
If MautD_Befuellen() Then
|
||||||
'setFakturiertUTA()
|
setFakturiert(LIEFERANT)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case "IDS"
|
Case "IDS"
|
||||||
MsgBox("Nicht verfügbar!")
|
MsgBox("Nicht verfügbar!")
|
||||||
Case "MSE"
|
Case "MSE"
|
||||||
MsgBox("Nicht verfügbar!")
|
If genRGAtt_MSE() Then
|
||||||
|
If MautD_Befuellen() Then
|
||||||
|
setFakturiert(LIEFERANT)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Case "ASFINAG"
|
Case "ASFINAG"
|
||||||
Dim abrechnungsDatum As DateTime = Now()
|
Dim abrechnungsDatum As DateTime = Now()
|
||||||
@@ -439,6 +444,97 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
print.Show()
|
print.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub genSummenbericht_MSE()
|
||||||
|
Dim displayFilter = False
|
||||||
|
Dim sqlstr As String = ""
|
||||||
|
|
||||||
|
sqlstr &= " SELECT Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country AS Country,trans.device_product_type AS CardType, Sum(trans.transaction_gross_amount) AS [Transaction Amount], Sum(trans.total_gross_amount) AS [Total Amount]
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||||
|
left join adressen ON cust.[customer_id] = Adressen.MSEKundenNr
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.charged <> 1
|
||||||
|
GROUP BY Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country, trans.device_product_type order by cust.customer_id"
|
||||||
|
|
||||||
|
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||||
|
'DataGridView.DataSource = dt
|
||||||
|
|
||||||
|
|
||||||
|
Dim print As New frmPrintLayout
|
||||||
|
print.Text = "mse"
|
||||||
|
|
||||||
|
Dim rpt As New rptASFINAG_TransaktionenSumary
|
||||||
|
|
||||||
|
rpt.DataSource = dt
|
||||||
|
|
||||||
|
|
||||||
|
'If cbxProdukt.Checked Then
|
||||||
|
' rpt.GroupHeader2.DataField = "prod_descr"
|
||||||
|
'Else
|
||||||
|
' rpt.GroupHeader2.Visible = False
|
||||||
|
' rpt.GroupFooter2.Visible = False
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim sum = 0
|
||||||
|
rpt.lblUeberschrift.Text = "MSE Summenbericht " & CDate(Now.ToShortDateString)
|
||||||
|
rpt.lblSachbearbeiter.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
|
||||||
|
rpt.lblBrutto.Text = "Total Amount"
|
||||||
|
rpt.lblNetto.Text = "Transaction Amount"
|
||||||
|
|
||||||
|
'rpt.lblMandantNiederlassung.Text = PERSONAL.Mandant & " / " & PERSONAL.Niederlassung
|
||||||
|
|
||||||
|
'Dim cnt As Integer = 0
|
||||||
|
rpt.lblDat.Text = Now.ToLongDateString
|
||||||
|
|
||||||
|
Dim sumNetto As Double = 0
|
||||||
|
'Dim sumMWST As Double = 0
|
||||||
|
Dim sumBrutto As Double = 0
|
||||||
|
|
||||||
|
Dim sumperKdNrNetto As Double = 0
|
||||||
|
'Dim sumperKdNrMWST As Double = 0
|
||||||
|
Dim sumperKdNrBrutto As Double = 0
|
||||||
|
|
||||||
|
|
||||||
|
AddHandler rpt.Detail.Format, Sub()
|
||||||
|
|
||||||
|
|
||||||
|
rpt.lblKundennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("KundenNr").Value, "")
|
||||||
|
rpt.lblName1.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Name").Value, "")
|
||||||
|
rpt.lblKartennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Country").Value, "") & " " & SQL.isDbnullEmpty(rpt.Fields.Item("CardType").Value, "")
|
||||||
|
|
||||||
|
rpt.lblNetto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaction Amount").Value, 2, "")
|
||||||
|
rpt.lblMWST.Text = "" 'SQL.isDbnullEmptyDbl(CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Brutto_in_Darstellwährung").Value) - CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Netto_in_Darstellwährung").Value), 2, "")
|
||||||
|
rpt.lblBrutto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Total Amount").Value, 2, "")
|
||||||
|
|
||||||
|
|
||||||
|
rpt.lblSumNet.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaction Amount").Value, 2, "")
|
||||||
|
rpt.lblSumVat.Text = "" 'SQL.isDbnullEmptyDbl(CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Brutto_in_Darstellwährung").Value) - CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Netto_in_Darstellwährung").Value), 2, "")
|
||||||
|
rpt.lblSumBrt.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Total Amount").Value, 2, "")
|
||||||
|
|
||||||
|
sumNetto += SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaction Amount").Value, 4, 0)
|
||||||
|
'sumMWST += SQL.isDbnullEmptyDbl(CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Brutto_in_Darstellwährung").Value) - CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Netto_in_Darstellwährung").Value), 4, 0)
|
||||||
|
sumBrutto += SQL.isDbnullEmptyDbl(rpt.Fields.Item("Total Amount").Value, 4, 0)
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
AddHandler rpt.ReportFooter1.Format, Sub()
|
||||||
|
|
||||||
|
rpt.lblSumNetto.Text = sumNetto.ToString("N2")
|
||||||
|
'rpt.lblSumMwst.Text = sumMWST.ToString("N2")
|
||||||
|
rpt.lblSumBrutto.Text = sumBrutto.ToString("N2")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
print.Viewer.LoadDocument(rpt)
|
||||||
|
print.Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous
|
||||||
|
print.Show()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Sub initDgv_PLOSE()
|
Sub initDgv_PLOSE()
|
||||||
@@ -534,7 +630,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
INNER JOIN (((Adressen INNER JOIN tblUTAImport ON Adressen.UTAKundenNr = tblUTAImport.Kundennummer)
|
INNER JOIN (((Adressen INNER JOIN tblUTAImport ON Adressen.UTAKundenNr = tblUTAImport.Kundennummer)
|
||||||
INNER JOIN Offertenpositionen ON Adressen.AdressenNr = Offertenpositionen.KundenNr)
|
INNER JOIN Offertenpositionen ON Adressen.AdressenNr = Offertenpositionen.KundenNr)
|
||||||
INNER JOIN tblUTALeistungen ON (tblUTALeistungen.VERAG_LeistungsNr = Offertenpositionen.LeistungsNr) AND (tblUTALeistungen.VERAG_OffertenNr = Offertenpositionen.OffertenNr) AND (tblUTAImport.Lieferland = tblUTALeistungen.Lieferland) AND (tblUTAImport.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart)) ON tblUTAFakturierwarenarten.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart
|
INNER JOIN tblUTALeistungen ON (tblUTALeistungen.VERAG_LeistungsNr = Offertenpositionen.LeistungsNr) AND (tblUTALeistungen.VERAG_OffertenNr = Offertenpositionen.OffertenNr) AND (tblUTAImport.Lieferland = tblUTALeistungen.Lieferland) AND (tblUTAImport.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart)) ON tblUTAFakturierwarenarten.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart
|
||||||
where archiv <> 1
|
where abgerechnet <> 1
|
||||||
group by Adressen.AdressenNr, Adressen.[Name 1], Adressen.LandKz, Adressen.Ort, Offertenpositionen.OffertenNr, Offertenpositionen.LeistungsNr, Offertenpositionen.LeistungsBez, tblUTAFakturierwarenarten.Warenart,tblUTAImport.Fakturierwarenart ", "FMZOLL")
|
group by Adressen.AdressenNr, Adressen.[Name 1], Adressen.LandKz, Adressen.Ort, Offertenpositionen.OffertenNr, Offertenpositionen.LeistungsNr, Offertenpositionen.LeistungsBez, tblUTAFakturierwarenarten.Warenart,tblUTAImport.Fakturierwarenart ", "FMZOLL")
|
||||||
.LOAD()
|
.LOAD()
|
||||||
'MsgBox(.GET_SQL())
|
'MsgBox(.GET_SQL())
|
||||||
@@ -603,6 +699,89 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub initDgv_MSE()
|
||||||
|
With MyDatagridview1
|
||||||
|
.Columns.Clear()
|
||||||
|
'Exit Sub
|
||||||
|
'MsgBox(.sql)
|
||||||
|
|
||||||
|
.SET_SQL(" SELECT Adressen.AdressenNr as KundenNr, Adressen.[Name 1] as Name, trans.transaction_country AS Country,trans.device_product_type AS CardType, Sum(trans.transaction_gross_amount) As [Transaktionsbetrag],Sum(trans.USteuer_EUR) As [USt Betrag], Sum(trans.total_gross_amount) As [Gesamtbetrag_Brutto]
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||||
|
Left Join adressen ON cust.[customer_id] = Adressen.MSEKundenNr
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.charged <> 1
|
||||||
|
GROUP BY Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country, trans.device_product_type", "FMZOLL")
|
||||||
|
|
||||||
|
|
||||||
|
.LOAD()
|
||||||
|
'MsgBox(.GET_SQL())
|
||||||
|
If .Columns.Count > 0 Then
|
||||||
|
|
||||||
|
'.Columns("AdressenNr").HeaderText = "KdNr"
|
||||||
|
'.Columns("Name 1").HeaderText = "Kunde"
|
||||||
|
'.Columns("LandKz").HeaderText = "Land"
|
||||||
|
'.Columns("Name 1").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||||
|
|
||||||
|
'.Columns("VERAGLeistungsNr").ReadOnly = False
|
||||||
|
'.Columns("VERAGKdNr").ReadOnly = False
|
||||||
|
|
||||||
|
'For Each r As DataGridViewColumn In .Columns
|
||||||
|
' If r.Name = "VERAGLeistungsNr" Or r.Name = "VERAGKdNr" Then
|
||||||
|
' r.ReadOnly = False
|
||||||
|
' Else
|
||||||
|
' r.ReadOnly = True
|
||||||
|
' End If
|
||||||
|
'Next
|
||||||
|
|
||||||
|
|
||||||
|
'Dim c As New DataGridViewTextBoxColumn
|
||||||
|
'c.Name = "VERAGKdNr"
|
||||||
|
'c.HeaderText = "VERAG KdNr"
|
||||||
|
'c.Width = 100
|
||||||
|
'.Columns.Insert(1, c)
|
||||||
|
|
||||||
|
'c = New DataGridViewTextBoxColumn
|
||||||
|
'c.Name = "VERAGLeistungsNr"
|
||||||
|
'c.HeaderText = "VERAG/PLOSE LeistungsNr."
|
||||||
|
'c.Width = 100
|
||||||
|
'.Columns.Insert(2, c)
|
||||||
|
|
||||||
|
'c = New DataGridViewTextBoxColumn
|
||||||
|
'c.Name = "KundeOffertenNr"
|
||||||
|
'c.HeaderText = "Kunde OffertenNr."
|
||||||
|
'c.Width = 100
|
||||||
|
'.Columns.Insert(3, c)
|
||||||
|
|
||||||
|
'c = New DataGridViewTextBoxColumn
|
||||||
|
'c.Name = "KundeLeistungsNr"
|
||||||
|
'c.HeaderText = "Kunde LeistungsNr."
|
||||||
|
'c.Width = 100
|
||||||
|
'.Columns.Insert(4, c)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim sumBto As Double = 0
|
||||||
|
Dim sumNto As Double = 0
|
||||||
|
For Each r As DataGridViewRow In .Rows
|
||||||
|
sumBto += If(IsNumeric(r.Cells("Gesamtbetrag_Brutto").Value), CDbl(r.Cells("Gesamtbetrag_Brutto").Value), 0)
|
||||||
|
sumNto += If(IsNumeric(r.Cells("Transaktionsbetrag").Value), CDbl(r.Cells("Transaktionsbetrag").Value), 0)
|
||||||
|
Next
|
||||||
|
|
||||||
|
txtAnzahl.Text = .Rows.Count
|
||||||
|
txtPruefsummeNetto.Text = CDbl(sumNto).ToString("C2")
|
||||||
|
txtPruefsummeBrutto.Text = CDbl(sumBto).ToString("C2")
|
||||||
|
.ClearSelection()
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub initDgv_ASFINAG(abgerechnet As Boolean, belegeErstellt As Boolean)
|
Sub initDgv_ASFINAG(abgerechnet As Boolean, belegeErstellt As Boolean)
|
||||||
|
|
||||||
'datum = CDate(SQL.getValueTxtBySql("SELECT Abrechnungsdatum FROM Abrechnungsdatum", "ASFINAG"))
|
'datum = CDate(SQL.getValueTxtBySql("SELECT Abrechnungsdatum FROM Abrechnungsdatum", "ASFINAG"))
|
||||||
@@ -676,6 +855,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
cbxTestdaten.Visible = False
|
cbxTestdaten.Visible = False
|
||||||
pnlAsfinag.Visible = False
|
pnlAsfinag.Visible = False
|
||||||
Panel4.Visible = False
|
Panel4.Visible = False
|
||||||
|
Panel5.Visible = False
|
||||||
|
|
||||||
|
|
||||||
Select Case Me.LIEFERANT
|
Select Case Me.LIEFERANT
|
||||||
@@ -700,7 +880,10 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
MsgBox("Noch nicht verfürbar!")
|
MsgBox("Noch nicht verfürbar!")
|
||||||
|
|
||||||
Case "MSE"
|
Case "MSE"
|
||||||
MsgBox("Noch nicht verfürbar!")
|
Panel5.Visible = True
|
||||||
|
Dim c As New usrCntlMDMDatenverarbeitungAuswertungen_divers(Me, Me.LIEFERANT)
|
||||||
|
Panel3.Controls.Add(c)
|
||||||
|
c.Dock = DockStyle.Fill
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
init()
|
init()
|
||||||
@@ -780,7 +963,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
INNER JOIN (((Adressen INNER JOIN tblUTAImport ON Adressen.UTAKundenNr = tblUTAImport.Kundennummer)
|
INNER JOIN (((Adressen INNER JOIN tblUTAImport ON Adressen.UTAKundenNr = tblUTAImport.Kundennummer)
|
||||||
INNER JOIN Offertenpositionen ON Adressen.AdressenNr = Offertenpositionen.KundenNr)
|
INNER JOIN Offertenpositionen ON Adressen.AdressenNr = Offertenpositionen.KundenNr)
|
||||||
INNER JOIN tblUTALeistungen ON (tblUTALeistungen.VERAG_LeistungsNr = Offertenpositionen.LeistungsNr) AND (tblUTALeistungen.VERAG_OffertenNr = Offertenpositionen.OffertenNr) AND (tblUTAImport.Lieferland = tblUTALeistungen.Lieferland) AND (tblUTAImport.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart)) ON tblUTAFakturierwarenarten.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart
|
INNER JOIN tblUTALeistungen ON (tblUTALeistungen.VERAG_LeistungsNr = Offertenpositionen.LeistungsNr) AND (tblUTALeistungen.VERAG_OffertenNr = Offertenpositionen.OffertenNr) AND (tblUTAImport.Lieferland = tblUTALeistungen.Lieferland) AND (tblUTAImport.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart)) ON tblUTAFakturierwarenarten.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart
|
||||||
where archiv <> 1
|
where abgerechnet <> 1
|
||||||
group by Kundennummer, KundenNr, UTAExportCSV,Rechnungsdruck"
|
group by Kundennummer, KundenNr, UTAExportCSV,Rechnungsdruck"
|
||||||
|
|
||||||
Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200)
|
Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200)
|
||||||
@@ -842,7 +1025,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
If verarbOK Then
|
If verarbOK Then
|
||||||
'UPDATE Fakturiert
|
'UPDATE Fakturiert
|
||||||
SQL.doSQL("UPDATE [tblUTAImport] set archiv=1, archiviertDatum=GETDATE() where Kundennummer = " & UTA("Customer ID"), "FMZOLL")
|
SQL.doSQL("UPDATE [tblUTAImport] set abgerechnetDatum=GETDATE() where abgerechnetDatum is null and Kundennummer = " & UTA("Customer ID"), "FMZOLL")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -884,6 +1067,135 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Function genRGAtt_MSE() As Boolean
|
||||||
|
Dim top = ""
|
||||||
|
'top = " TOP 20 "
|
||||||
|
Dim SQLStr = " SELECT distinct cust.customer_id as [Customer ID], Adressen.AdressenNr AS [Customer Nr], Adressen.MSEExportCSV, Adressen.Rechnungsdruck
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||||
|
left join adressen ON cust.[customer_id] = Adressen.MSEKundenNr
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.charged <> 1 and (trans.transaction_gross_amount <> 0 or trans.[msts_fee_amount] <> 0)
|
||||||
|
order by cust.customer_id"
|
||||||
|
|
||||||
|
Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200)
|
||||||
|
|
||||||
|
|
||||||
|
If dt_Main Is Nothing OrElse dt_Main.Rows.Count = 0 Then
|
||||||
|
MsgBox("Keine Daten!")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Dim cnt = 0
|
||||||
|
If vbYes = MsgBox("Es wurden Daten von " & dt_Main.Rows.Count & " Kunden gefunden " & vbNewLine & " Möchten Sie die Anhänge erstellen?", vbYesNoCancel) Then
|
||||||
|
Dim dir = "F:\FMZoll\MSE\Archiv\" & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "Test", "") & Now.ToShortDateString
|
||||||
|
|
||||||
|
If Directory.Exists(dir) Then dir &= "_" & Now.ToShortTimeString.Replace(":", "")
|
||||||
|
Directory.CreateDirectory(dir)
|
||||||
|
|
||||||
|
|
||||||
|
Dim displayView = New DataView(dt_Main, "MSEExportCSV = 1", "Customer ID", DataViewRowState.CurrentRows)
|
||||||
|
Dim distinctDT_CSV As DataTable = displayView.ToTable(True, "Customer ID", "Customer Nr")
|
||||||
|
|
||||||
|
|
||||||
|
For Each csv As DataRow In distinctDT_CSV.Rows
|
||||||
|
|
||||||
|
Dim dt_CSV_selected = SQL.loadDgvBySql_Param("
|
||||||
|
SELECT controller_id as [Controller ID], 'VERAG 360 GmbH' as [Controller Name] , inv.[invoice_id] as [Invoice ID], inv.invoice_date as [Invoice Date],
|
||||||
|
cust.customer_id as [Customer ID], cust.partner_customer_number as [Customer No], cust.customer_name as [Customer name], bills.specification_page_name as [Specification Page], bills.specification_page_id as [Specification ID], trans.purchase_datetime as [Transaction date], trans.transaction_id as [Transaction ID],
|
||||||
|
trans.supplier_name as [Transaction Supplier/Terminal], trans.transaction_country as [Transaction Country], trans.transaction_product_name as [Product description], trans.transaction_product_id as [Product Description ID], trans.device_product_type as [Card Type], trans.device_product_number as [Card number], trans.license_plate_number as [Load File Licence Plate Number],
|
||||||
|
|
||||||
|
|
||||||
|
'' as [Card Licence Plate Number], trans.license_plate_number as [Truck Licence Plate Number], '' as [Truck Fleet Code], '' as [Truck Driver Name], trans.entry_point_name as [Entry Terminal/Direction], trans.entry_datetime as [Start date], trans.entry_datetime as [Start Time], trans.exit_point_name as [Exit Terminal Description], trans.exit_datetime as [End Date], trans.exit_datetime as [End Time],
|
||||||
|
'' as [Eurovignet K-Number], '' as [LKW-Kostenstelle], trans.original_net_amount as [Original Nett Amount], trans.original_vat_amount as [Original VAT Amount], trans.original_gross_amount as [Original Amount], trans.original_currency as [Original Currency],
|
||||||
|
trans.transaction_gross_amount as [Transaction Amount ( EUR )], trans.msts_fee_amount as [Admin Fee Amount ( EUR )], '' as [Fees and Costs Amount ( EUR )], trans.msts_vat_amount as [VAT Amount ( EUR )],trans.total_gross_amount as [Total Amount ( EUR )], '' as [Total Dutch VAT ( EUR )], '' as [Total Foreign VAT ( EUR )], trans.[USteuer_EUR] as [USteuer_EUR]
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.charged <> 1 and (trans.transaction_gross_amount <> 0 or [msts_fee_amount] <> 0) and cust.[customer_id] = " & csv.Item("Customer ID"), "FMZOLL")
|
||||||
|
dt_CSV_selected.ParentRelations.Clear()
|
||||||
|
dt_CSV_selected.ChildRelations.Clear()
|
||||||
|
dt_CSV_selected.Constraints.Clear()
|
||||||
|
|
||||||
|
|
||||||
|
Dim fn As String = dir & "\" & csv.Item("Customer ID") & "_Maut_MSE.csv"
|
||||||
|
Dim outFile As System.IO.StreamWriter = My.Computer.FileSystem.OpenTextFileWriter(fn, False)
|
||||||
|
Dim clmns As String = ""
|
||||||
|
For i = 0 To dt_CSV_selected.Columns.Count - 1
|
||||||
|
clmns &= dt_CSV_selected.Columns(i).ColumnName.ToString().Replace(";", ", ") & ";"
|
||||||
|
Next
|
||||||
|
outFile.WriteLine(clmns)
|
||||||
|
For i = 0 To dt_CSV_selected.Rows.Count - 1
|
||||||
|
clmns = ""
|
||||||
|
For j = 0 To dt_CSV_selected.Columns.Count - 1
|
||||||
|
clmns &= dt_CSV_selected.Rows(i)(j).ToString.Replace(";", ", ") & ";"
|
||||||
|
Next
|
||||||
|
outFile.WriteLine(clmns)
|
||||||
|
|
||||||
|
Next
|
||||||
|
outFile.Close()
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
For Each MSE In dt_Main.Rows
|
||||||
|
|
||||||
|
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
||||||
|
Dim verarbOK = True
|
||||||
|
|
||||||
|
If Not gen_SPEDBUCH_ByKdNr(MSE("Customer Nr"), SPEDBUCH, "MSE") Then verarbOK = False
|
||||||
|
If Not gen_RECHNUNG_BySPEDBUCH(MSE("Customer Nr"), SPEDBUCH, "MSE") Then verarbOK = False
|
||||||
|
|
||||||
|
genMSEAttachmentByKdNr(MSE("Customer Nr"), MSE("Customer ID"), dir, datPloseAnhang.Value)
|
||||||
|
|
||||||
|
If verarbOK Then
|
||||||
|
'Update Fakturiert
|
||||||
|
SQL.doSQL("UPDATE [tblMSETransactions] Set chargedDatetime = GETDATE()
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.chargedDatetime is null and cust.[customer_id] = " & MSE("Customer ID"), "FMZOLL")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If True Then 'cnt Mod 10 = 0 Then
|
||||||
|
txtPloseAnh_Einarbeitung.Text = cnt & " / " & dt_Main.Rows.Count
|
||||||
|
Dim proz As Double = (cnt / dt_Main.Rows.Count) * 100
|
||||||
|
pbPloseAnh_Proz.Value = proz
|
||||||
|
lblPloseAnh_Proz.Text = proz.ToString("N2") & " %"
|
||||||
|
'GroupBox12.Refresh()
|
||||||
|
My.Application.DoEvents()
|
||||||
|
End If
|
||||||
|
cnt += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
' ANHÄNGE WERDEN NCIHT BENÖTIGT::
|
||||||
|
'Alle Alangen im foglenden VZ löschen und die aktuellen kopieren
|
||||||
|
Dim dirAnhang = "F: \FMZoll\MSE\Anlagen\" & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "Test", "") & Now.ToShortDateString
|
||||||
|
If Directory.Exists(dirAnhang) Then 'Directory.Delete(dirAnhang, True)
|
||||||
|
For Each f In Directory.GetFiles(dirAnhang)
|
||||||
|
File.Delete(f)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not Directory.Exists(dirAnhang) Then Directory.CreateDirectory(dirAnhang)
|
||||||
|
|
||||||
|
For Each f In Directory.GetFiles(dir)
|
||||||
|
File.Copy(f, dirAnhang & (New FileInfo(f)).Name)
|
||||||
|
Next
|
||||||
|
|
||||||
|
'IN FMZOLL / DB MautD einfügen --> Mautbericht
|
||||||
|
'genPLOSEInsertMautD(dat_Sum_Von.Value.ToShortDateString, dat_Sum_Bis.Value.ToShortDateString)
|
||||||
|
|
||||||
|
|
||||||
|
pbPloseAnh_Proz.Value = 100
|
||||||
|
txtPloseAnh_Einarbeitung.Text = dt_Main.Rows.Count & " / " & dt_Main.Rows.Count
|
||||||
|
lblPloseAnh_Proz.Text = "100.00 %"
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Function genRGAtt_ASFINAG(belegerstellungsdatum As DateTime, abrechnungsdatum As Date, inputKdNr As String) As Boolean
|
Function genRGAtt_ASFINAG(belegerstellungsdatum As DateTime, abrechnungsdatum As Date, inputKdNr As String) As Boolean
|
||||||
|
|
||||||
@@ -1245,8 +1557,6 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
group by Adressen.AdressenNr, licenceplate,turnoverdate,CardNumber
|
group by Adressen.AdressenNr, licenceplate,turnoverdate,CardNumber
|
||||||
order by Adressen.AdressenNr"
|
order by Adressen.AdressenNr"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim dtAT As DataTable = SQL.loadDgvBySql_Param(sqlstrAT, "FMZOLL")
|
Dim dtAT As DataTable = SQL.loadDgvBySql_Param(sqlstrAT, "FMZOLL")
|
||||||
|
|
||||||
|
|
||||||
@@ -1324,7 +1634,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Function genUTAInsertMautAT(kdNr) As Boolean
|
Function genUTAInsertMaut(kdNr) As Boolean
|
||||||
Try
|
Try
|
||||||
pic.Visible = False
|
pic.Visible = False
|
||||||
Dim displayFilter = False
|
Dim displayFilter = False
|
||||||
@@ -1385,7 +1695,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Try
|
Try
|
||||||
'Zeitstempel
|
'Zeitstempel
|
||||||
|
|
||||||
Dim SQLQuery = "INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Nett Amount],[VAT Amount],[Total Amount]) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10) "
|
Dim SQLQuery = "INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Entry Terminal],[Exit Terminal],[Nett Amount],[VAT Amount],[Total Amount]) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12) "
|
||||||
' "SELECT * FROM DBParent WHERE P_ID = " & UniqeID & ";"
|
' "SELECT * FROM DBParent WHERE P_ID = " & UniqeID & ";"
|
||||||
Using Command As New OleDbCommand(SQLQuery, con)
|
Using Command As New OleDbCommand(SQLQuery, con)
|
||||||
|
|
||||||
@@ -1396,9 +1706,100 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Command.Parameters.AddWithValue("@P5", r(4))
|
Command.Parameters.AddWithValue("@P5", r(4))
|
||||||
Command.Parameters.AddWithValue("@P6", r(5))
|
Command.Parameters.AddWithValue("@P6", r(5))
|
||||||
Command.Parameters.AddWithValue("@P7", r(6))
|
Command.Parameters.AddWithValue("@P7", r(6))
|
||||||
Command.Parameters.AddWithValue("@P8", CDbl(r(7)))
|
Command.Parameters.AddWithValue("@P8", r(7))
|
||||||
Command.Parameters.AddWithValue("@P9", CDbl(r(8)))
|
Command.Parameters.AddWithValue("@P9", r(8))
|
||||||
Command.Parameters.AddWithValue("@P10", CDbl(r(9)))
|
Command.Parameters.AddWithValue("@P10", CDbl(r(9)))
|
||||||
|
Command.Parameters.AddWithValue("@P11", CDbl(r(10)))
|
||||||
|
Command.Parameters.AddWithValue("@P12", CDbl(r(11)))
|
||||||
|
|
||||||
|
Command.ExecuteNonQuery()
|
||||||
|
Command.Dispose()
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Catch ex2 As System.Exception
|
||||||
|
MsgBox("err: " & ex2.Message & ex2.StackTrace)
|
||||||
|
|
||||||
|
Finally
|
||||||
|
If reader IsNot Nothing Then reader.Close()
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
con.Close()
|
||||||
|
End If
|
||||||
|
pic.Visible = True
|
||||||
|
Return True
|
||||||
|
|
||||||
|
Catch ex As System.Exception
|
||||||
|
MsgBox(ex.Message & ex.StackTrace)
|
||||||
|
End Try
|
||||||
|
Return False
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Function genMSEInsertMaut(kdNr) As Boolean
|
||||||
|
Try
|
||||||
|
pic.Visible = False
|
||||||
|
Dim displayFilter = False
|
||||||
|
Dim sqlstr As String = ""
|
||||||
|
|
||||||
|
Dim sqlWhere As String = ""
|
||||||
|
If kdNr <> "" Then
|
||||||
|
sqlWhere &= " AND Adressen.AdressenNr=" & kdNr
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
sqlstr = " Select adressen.AdressenNr As [Customer No],trans.license_plate_number as [Licence Plate Number],cast(trans.[purchase_datetime] as Date) as [Transaction Date], trans.transaction_country As [Transaction Country],trans.device_product_type As [Product description],trans.device_product_number as [Card Number], trans.entry_point_name as [Entry Terminal],trans.exit_point_name as [Exit Terminal], Sum(trans.transaction_gross_amount) As [Nett Amount],Sum(trans.USteuer_EUR) As [VAT Amount], Sum(trans.total_gross_amount) As [Total Amount]
|
||||||
|
From [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner Join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner Join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
inner Join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] And inv.customer_number = cust.[customer_id] And trans.transaction_country = inv.country
|
||||||
|
Left Join adressen ON cust.[customer_id] = Adressen.MSEKundenNr
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.chargedDatetime is null " & sqlWhere &
|
||||||
|
"GROUP BY Adressen.AdressenNr,trans.license_plate_number,cast(trans.[purchase_datetime] as Date), trans.transaction_country,trans.device_product_type, trans.device_product_number, trans.entry_point_name ,trans.exit_point_name
|
||||||
|
order by Adressen.AdressenNr "
|
||||||
|
|
||||||
|
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||||
|
|
||||||
|
Dim connectionString = ""
|
||||||
|
If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
|
||||||
|
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD_Test.accdb"
|
||||||
|
Else
|
||||||
|
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD.accdb"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim con As New OleDbConnection(connectionString)
|
||||||
|
Dim cmd As New OleDbCommand
|
||||||
|
Dim var1 As String
|
||||||
|
|
||||||
|
Dim adapter As OleDbDataAdapter = New OleDbDataAdapter()
|
||||||
|
Dim reader As OleDbDataReader = Nothing
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If dt IsNot Nothing Then
|
||||||
|
con.Open()
|
||||||
|
For Each r In dt.Rows
|
||||||
|
Try
|
||||||
|
'Zeitstempel
|
||||||
|
|
||||||
|
Dim SQLQuery = "INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Entry Terminal],[Exit Terminal],[Nett Amount],[VAT Amount],[Total Amount]) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12) "
|
||||||
|
' "SELECT * FROM DBParent WHERE P_ID = " & UniqeID & ";"
|
||||||
|
Using Command As New OleDbCommand(SQLQuery, con)
|
||||||
|
|
||||||
|
Command.Parameters.AddWithValue("@P1", r(0))
|
||||||
|
Command.Parameters.AddWithValue("@P2", r(1))
|
||||||
|
Command.Parameters.AddWithValue("@P3", r(2))
|
||||||
|
Command.Parameters.AddWithValue("@P4", r(3))
|
||||||
|
Command.Parameters.AddWithValue("@P5", r(4))
|
||||||
|
Command.Parameters.AddWithValue("@P6", r(5))
|
||||||
|
Command.Parameters.AddWithValue("@P7", r(6))
|
||||||
|
Command.Parameters.AddWithValue("@P8", r(7))
|
||||||
|
Command.Parameters.AddWithValue("@P9", r(8))
|
||||||
|
Command.Parameters.AddWithValue("@P10", CDbl(r(9)))
|
||||||
|
Command.Parameters.AddWithValue("@P11", CDbl(r(10)))
|
||||||
|
Command.Parameters.AddWithValue("@P12", CDbl(r(11)))
|
||||||
|
|
||||||
Command.ExecuteNonQuery()
|
Command.ExecuteNonQuery()
|
||||||
Command.Dispose()
|
Command.Dispose()
|
||||||
@@ -1806,6 +2207,193 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Function genMSEAttachmentByKdNr(KdNr As String, MSEKdNr As String, dir As String, bis As Date)
|
||||||
|
Try
|
||||||
|
|
||||||
|
Dim displayFilter = False
|
||||||
|
Dim sqlstr As String = ""
|
||||||
|
|
||||||
|
sqlstr &= "Select cust.customer_id as [Customer ID], cust.partner_customer_number as [Customer No], cust.customer_name as [Customer name],
|
||||||
|
trans.supplier_name as [Transaction Supplier/Terminal], trans.transaction_country as [Transaction Country], trans.transaction_product_name as [Product description], trans.purchase_datetime as [Transaction date],trans.device_product_type as [Card Type], trans.device_product_number as [Card number], trans.license_plate_number as [LicencePlateNumber],
|
||||||
|
trans.entry_point_name as [Entry Terminal/Direction], trans.entry_datetime as [Start date], trans.entry_datetime as [Start Time], trans.exit_point_name as [Exit Terminal Description], trans.exit_datetime as [End Date], trans.exit_datetime as [End Time],
|
||||||
|
trans.original_net_amount as [Original Nett Amount], trans.original_vat_amount as [Original VAT Amount], trans.original_gross_amount as [Original Amount], trans.original_currency as [Original Currency],
|
||||||
|
trans.transaction_gross_amount as [Transaction Amount ( EUR )], trans.msts_fee_amount as [Admin Fee Amount ( EUR )], '' as [Fees and Costs Amount ( EUR )], trans.msts_vat_amount as [VAT Amount ( EUR )],trans.total_gross_amount as [Total Amount ( EUR )], '' as [Total Dutch VAT ( EUR )], '' as [Total Foreign VAT ( EUR )], trans.[USteuer_EUR] as [USteuer_EUR]
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and (trans.transaction_gross_amount <> 0 or [msts_fee_amount] <> 0) and cust.[customer_id] = " & MSEKdNr
|
||||||
|
|
||||||
|
|
||||||
|
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||||
|
If dt Is DBNull.Value Then Return ""
|
||||||
|
If dt.Rows.Count = 0 Then Return ""
|
||||||
|
|
||||||
|
Dim rpt As New rptPLOSE_Anhang
|
||||||
|
|
||||||
|
rpt.DataSource = dt
|
||||||
|
|
||||||
|
rpt.txtKunde.Text = KdNr & " " & New VERAG_PROG_ALLGEMEIN.cAdressen(KdNr).FullName
|
||||||
|
rpt.lblRgDatum.Text = datPloseAnhang.Value.ToShortDateString
|
||||||
|
|
||||||
|
rpt.GroupHeaderKz.DataField = "LicencePlateNumber" 'Gruppierung
|
||||||
|
|
||||||
|
|
||||||
|
rpt.txtNettoKzSum.Visible = False
|
||||||
|
rpt.txtNettoGesSum.Visible = False
|
||||||
|
rpt.txtNetto.Visible = False
|
||||||
|
rpt.txtNettoKatSum.Visible = False
|
||||||
|
rpt.lblNetto.Visible = False
|
||||||
|
|
||||||
|
rpt.txtMWSTKzSum.Visible = False
|
||||||
|
rpt.txtMWSTGEsSum.Visible = False
|
||||||
|
rpt.txtMWST.Visible = False
|
||||||
|
rpt.txtMWSTKatSum.Visible = False
|
||||||
|
rpt.lblMWST.Visible = False
|
||||||
|
|
||||||
|
rpt.lblBrutto.Text = "Total Amount ( EUR )"
|
||||||
|
rpt.Label4.Text = bis.ToShortDateString
|
||||||
|
rpt.Label2.Text = "MSE-KundenNr:"
|
||||||
|
rpt.TextBox1.Text = MSEKdNr
|
||||||
|
rpt.Label1.Text = " MSE Fleet Management Service"
|
||||||
|
|
||||||
|
rpt.lblSummeKennzeichen.Visible = False
|
||||||
|
rpt.lblService.Visible = False
|
||||||
|
|
||||||
|
'rpt.lblSummeKennzeichen.Location = New PointF(rpt.lblSummeKennzeichen.Location.X + 4.5, rpt.lblSummeKennzeichen.Location.Y)
|
||||||
|
'rpt.lblSumKategorie.Location = New PointF(rpt.lblSumKategorie.Location.X + 4.5, rpt.lblSumKategorie.Location.Y)
|
||||||
|
'rpt.lblGessumme.Location = New PointF(rpt.lblGessumme.Location.X + 4.5, rpt.lblGessumme.Location.Y)
|
||||||
|
|
||||||
|
Dim sumNetto As Double = 0
|
||||||
|
Dim sumMWST As Double = 0
|
||||||
|
Dim sumBrutto As Double = 0
|
||||||
|
|
||||||
|
Dim sumNettoKat As Double = 0
|
||||||
|
Dim sumMWSTKat As Double = 0
|
||||||
|
Dim sumBruttoKat As Double = 0
|
||||||
|
|
||||||
|
Dim sumNettoGes As Double = 0
|
||||||
|
Dim sumMWSTGes As Double = 0
|
||||||
|
Dim sumBruttoGes As Double = 0
|
||||||
|
|
||||||
|
Dim cntKat = 0
|
||||||
|
Dim cnt = 0
|
||||||
|
rpt.GroupFooterKat.Visible = False
|
||||||
|
|
||||||
|
AddHandler rpt.Detail.Format, Sub()
|
||||||
|
' If cnt = 0 Then
|
||||||
|
rpt.txtKunde.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Customer ID").Value, "")
|
||||||
|
rpt.txtKunde.Text &= " " & SQL.isDbnullEmpty(rpt.Fields.Item("Customer name").Value, "")
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' rpt.txtProduktBeschreibung.Text = sql.isDbnullEmpty(rpt.Fields.Item("BC_DESCR").Value, "")
|
||||||
|
Select Case "DE"
|
||||||
|
Case "DE" : rpt.txtProdukt.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Product description").Value, "") 'sql.isDbnullEmpty(rpt.Fields.Item("plose_ProduktCode").Value, "") & " - " & sql.isDbnullEmpty(rpt.Fields.Item("plose_Produktbeschreibung").Value, "")
|
||||||
|
Case "IT" : rpt.txtProdukt.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Product description").Value, "") 'sql.isDbnullEmpty(rpt.Fields.Item("plose_ProduktCode").Value, "") & " - " & sql.isDbnullEmpty(rpt.Fields.Item("plose_Produktbeschreibung").Value, "")
|
||||||
|
Case Else : rpt.txtProdukt.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Product description").Value, "") 'sql.isDbnullEmpty(rpt.Fields.Item("plose_ProduktCode").Value, "") & " - " & sql.isDbnullEmpty(rpt.Fields.Item("plose_Produktbeschreibung").Value, "")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
rpt.txtKartennummer.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Card number").Value, "")
|
||||||
|
rpt.txtEingang.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Entry Terminal/Direction").Value, "")
|
||||||
|
rpt.txtAusgang.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Exit Terminal Description").Value, "")
|
||||||
|
rpt.txtLand.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Transaction Country").Value, "")
|
||||||
|
rpt.txtDatum.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Transaction Date").Value, "")
|
||||||
|
rpt.txtEingang.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Card Type").Value, "")
|
||||||
|
|
||||||
|
rpt.txtNetto.Text = "" 'SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_NettobetragWaehrungAbbuchung").Value, 2, "")
|
||||||
|
rpt.txtMWST.Text = "" 'SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_MWSTBetragWaehrungAbbuchung").Value, 2, "")
|
||||||
|
rpt.txtBrutto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaction Amount ( EUR )").Value, 2, "")
|
||||||
|
|
||||||
|
sumNetto += 0 'SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_NettobetragWaehrungAbbuchung").Value, 4, 0)
|
||||||
|
sumMWST += 0 'SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_MWSTBetragWaehrungAbbuchung").Value, 4, 0)
|
||||||
|
sumBrutto += SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaction Amount ( EUR )").Value, 4, 0)
|
||||||
|
cnt += 1
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
AddHandler rpt.GroupHeaderKz.Format, Sub()
|
||||||
|
rpt.txtKennzeichen.Text = SQL.isDbnullEmpty(rpt.Fields.Item("LicencePlateNumber").Value, "")
|
||||||
|
If rpt.txtKennzeichen.Text = "" Then rpt.lblKennzeichen.Visible = False
|
||||||
|
End Sub
|
||||||
|
AddHandler rpt.GroupHeaderKat.Format, Sub()
|
||||||
|
rpt.lblKategorie.Text = "MAUT REPORT"
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
AddHandler rpt.GroupFooterKz.Format, Sub()
|
||||||
|
rpt.txtNettoKzSum.Text = sumNetto.ToString("N2")
|
||||||
|
rpt.txtMWSTKzSum.Text = sumMWST.ToString("N2")
|
||||||
|
rpt.txtBruttoKzSum.Text = sumBrutto.ToString("N2")
|
||||||
|
sumNettoGes += sumNetto
|
||||||
|
sumMWSTGes += sumMWST
|
||||||
|
sumBruttoGes += sumBrutto
|
||||||
|
|
||||||
|
sumNetto = 0
|
||||||
|
sumMWST = 0
|
||||||
|
sumBrutto = 0
|
||||||
|
|
||||||
|
rpt.lblSummeKennzeichen.Text = rpt.lblSummeKennzeichen.Text.Replace("Kennzeichen", SQL.isDbnullEmpty(rpt.Fields.Item("LicencePlateNumber").Value, ""))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AddHandler rpt.GroupFooterKat.Format, Sub()
|
||||||
|
sumNettoKat += sumNetto
|
||||||
|
sumMWSTKat += sumMWST
|
||||||
|
sumBruttoKat += sumBrutto
|
||||||
|
sumNetto = 0
|
||||||
|
sumMWST = 0
|
||||||
|
sumBrutto = 0
|
||||||
|
|
||||||
|
rpt.txtNettoKatSum.Text = sumNettoKat.ToString("N2")
|
||||||
|
rpt.txtMWSTKatSum.Text = sumMWSTKat.ToString("N2")
|
||||||
|
rpt.txtBruttoKatSum.Text = sumBruttoKat.ToString("N2")
|
||||||
|
cntKat += 1
|
||||||
|
End Sub
|
||||||
|
AddHandler rpt.ReportFooter1.Format, Sub()
|
||||||
|
'sumNettoGes += sumNettoKat
|
||||||
|
'sumMWSTGes += sumMWSTKat
|
||||||
|
'sumBruttoGes += sumBruttoKat
|
||||||
|
sumNettoKat = 0
|
||||||
|
sumMWSTKat = 0
|
||||||
|
sumBruttoKat = 0
|
||||||
|
|
||||||
|
sumNetto = 0
|
||||||
|
sumMWST = 0
|
||||||
|
sumBrutto = 0
|
||||||
|
|
||||||
|
rpt.txtNettoGesSum.Text = sumNettoGes.ToString("N2")
|
||||||
|
rpt.txtMWSTGEsSum.Text = sumMWSTGes.ToString("N2")
|
||||||
|
rpt.txtBruttoGesSum.Text = sumBruttoGes.ToString("N2")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'If cntKat <= 1 Then
|
||||||
|
' rpt.GroupFooterKat.Visible = False
|
||||||
|
'End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'print.Viewer.LoadDocument(rpt)
|
||||||
|
'print.Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous
|
||||||
|
'print.Show()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim tmpPath = dir & "\" & KdNr & "_Maut_MSE.pdf"
|
||||||
|
Dim p As New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport
|
||||||
|
rpt.Run(False)
|
||||||
|
p.NeverEmbedFonts = ""
|
||||||
|
p.Export(rpt.Document, tmpPath)
|
||||||
|
|
||||||
|
rpt.Dispose()
|
||||||
|
|
||||||
|
Return tmpPath
|
||||||
|
|
||||||
|
Catch ex As System.Exception
|
||||||
|
MsgBox(ex.Message & ex.StackTrace)
|
||||||
|
End Try
|
||||||
|
Return ""
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Function genASFINAGAttachmentByKdNr(KdNr As Integer, dt As DataTable, tmpPath As String)
|
Function genASFINAGAttachmentByKdNr(KdNr As Integer, dt As DataTable, tmpPath As String)
|
||||||
Try
|
Try
|
||||||
@@ -2332,7 +2920,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
useNettogesamtbetrag = True
|
useNettogesamtbetrag = True
|
||||||
sqlstr = "SELECT '135' as LeistungsNr, 'MAUT AT lt. Auslage' as ProductCode, sum([netAmount]) as Netto ,sum([VATamount]) as Vatamount ,sum([totalAmount]) as Brutto FROM Kreditkarten INNER JOIN tblAsfinagMaut ON Kreditkarten.KartenNr = tblAsfinagMaut.cardnumber Where Kreditkarten.AdressenNr= '" & KD.KundenNr & "' and tblAsfinagMaut.VATamount <> 0 group by Kreditkarten.AdressenNr
|
sqlstr = "SELECT '135' as LeistungsNr, 'MAUT AT lt. Auslage' as ProductCode, sum([netAmount]) as Netto ,sum([VATamount]) as Vatamount ,sum([totalAmount]) as Brutto FROM Kreditkarten INNER JOIN tblAsfinagMaut ON Kreditkarten.KartenNr = tblAsfinagMaut.cardnumber Where Kreditkarten.AdressenNr= '" & KD.KundenNr & "' and tblAsfinagMaut.VATamount <> 0 group by Kreditkarten.AdressenNr
|
||||||
UNION
|
UNION
|
||||||
SELECT '153' as LeistungsNr, 'MAUT AT lt. Auslage' as ProductCode, sum([netAmount]) as Netto ,sum([VATamount]) as Vatamount ,sum([totalAmount]) as Brutto FROM Kreditkarten INNER JOIN tblAsfinagMaut ON Kreditkarten.KartenNr = tblAsfinagMaut.cardnumber Where Kreditkarten.AdressenNr= '" & KD.KundenNr & "' and tblAsfinagMaut.VATamount = 0 group by Kreditkarten.AdressenNr"
|
SELECT '153' as LeistungsNr, 'MAUT AT lt. Auslage' as ProductCode, sum([netAmount]) as Netto ,sum([VATamount]) as Vatamount ,sum([totalAmount]) as Brutto FROM Kreditkarten INNER JOIN tblAsfinagMaut ON Kreditkarten.KartenNr = tblAsfinagMaut.cardnumber Where Kreditkarten.AdressenNr= '" & KD.KundenNr & "' and tblAsfinagMaut.VATamount = 0 group by Kreditkarten.AdressenNr"
|
||||||
|
|
||||||
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||||
|
|
||||||
@@ -2379,7 +2967,68 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
|
|
||||||
Case "MSE"
|
Case "MSE"
|
||||||
'noch nicht implementiert!
|
' Case 23 'MSE Maut
|
||||||
|
'5070 Select Case ![LeistungsNr]
|
||||||
|
' Case 134 'Frejus - Tunnelmaut (20.01.2011)
|
||||||
|
'5080 Set rst = OpenParameterQuery("qryReErfSchOpt6BeträgeLNr134", eOpensnapshot, "prmAdressenNr:=" & rstRK![RechnungsKundenNr])
|
||||||
|
'5090 If Not rst.EOF Then
|
||||||
|
'5100 ![Anzahl] = 1
|
||||||
|
'5110 ![Preis] = rst![SummevonTransaction Amount ( EUR )] + rst![SummevonFees And Costs Amount ( EUR )]
|
||||||
|
'5120 If Not IsNull(![BGebLeistungsNr]) Then
|
||||||
|
'5130 ![BGebBgl] = ![Preis] - rst![SummevonUSteuer_EUR]
|
||||||
|
'5140 End If
|
||||||
|
'5150 End If
|
||||||
|
'5160 rst.Close
|
||||||
|
'5170 Set rst = Nothing
|
||||||
|
'5180 Case 141 'MSC Ressa - alle Länder
|
||||||
|
'5190 Set rst = OpenParameterQuery("qryReErfSchOpt6BeträgeLNr141", eOpensnapshot, "prmAdressenNr:=" & rstRK![RechnungsKundenNr])
|
||||||
|
'5200 If Not rst.EOF Then
|
||||||
|
'5210 ![Anzahl] = 1
|
||||||
|
'5220 ![Preis] = rst![SummevonTransaction Amount ( EUR )] + rst![SummevonFees And Costs Amount ( EUR )]
|
||||||
|
'5230 If Not IsNull(![BGebLeistungsNr]) Then
|
||||||
|
'5240 ![BGebBgl] = ![Preis] - rst![SummevonUSteuer_EUR]
|
||||||
|
'5250 End If
|
||||||
|
'5260 End If
|
||||||
|
'5270 rst.Close
|
||||||
|
'5280 Set rst = Nothing
|
||||||
|
'5290 Case Else 'alle anderen MSE Transactions
|
||||||
|
'5300 Set rst = OpenParameterQuery("qryReErfSchOpt6Beträge", eOpensnapshot, "prmAdressenNr:=" & rstRK![RechnungsKundenNr], "prmLeistungsNr:=" & ![LeistungsNr])
|
||||||
|
'5310 If Not rst.EOF Then
|
||||||
|
'5320 ![Anzahl] = 1
|
||||||
|
'5330 ![Preis] = rst![SummevonTransaction Amount ( EUR )] + rst![SummevonFees And Costs Amount ( EUR )]
|
||||||
|
'5340 If Not IsNull(![BGebLeistungsNr]) Then
|
||||||
|
'5350 ![BGebBgl] = ![Preis] - rst![SummevonUSteuer_EUR]
|
||||||
|
'5360 End If
|
||||||
|
'5370 End If
|
||||||
|
'5380 rst.Close
|
||||||
|
'5390 Set rst = Nothing
|
||||||
|
'5400 End Select
|
||||||
|
|
||||||
|
|
||||||
|
useNettogesamtbetrag = False
|
||||||
|
|
||||||
|
sqlstr = "select cust.[customer_id], trans.device_product_type, Offertenpositionen.LeistungsNr , sum(trans.total_gross_amount) as Brutto, sum(trans.total_gross_amount) - sum(trans.USteuer_EUR) as Netto
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
INNER JOIN tblMSELeistungen ON (tblMSELeistungen.[Card Type] = trans.device_product_type) AND (tblMSELeistungen.[Transaction Country] = trans.transaction_country)
|
||||||
|
INNER JOIN Offertenpositionen ON cust.partner_customer_number = Offertenpositionen.KundenNr and tblMSELeistungen.LeistungsNr = Offertenpositionen.LeistungsNr and Offertenpositionen.OffertenNr = " & OffertenNr & "
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.charged = 0 and cust.[partner_customer_number] = " & KdNr & "
|
||||||
|
group by cust.[customer_id], trans.device_product_type, Offertenpositionen.LeistungsNr , Offertenpositionen.LeistungsBez"
|
||||||
|
|
||||||
|
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||||
|
|
||||||
|
For Each r In dt.Rows
|
||||||
|
|
||||||
|
|
||||||
|
Dim NettoBetrag As Double = r("Netto")
|
||||||
|
Dim BruttoBetrag As Double = r("Brutto")
|
||||||
|
Dim LeistungsNr As Integer = r("LeistungsNr")
|
||||||
|
Dim OFFERTE As New VERAG_PROG_ALLGEMEIN.cOfferte(KdNr, OffertenNr, True)
|
||||||
|
|
||||||
|
allPos(RG, OFFERTE, LeistungsNr, NettoBetrag, BruttoBetrag)
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
@@ -2425,7 +3074,6 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
Dim POS As New VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen()
|
Dim POS As New VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen()
|
||||||
Dim LEISTUNG As New VERAG_PROG_ALLGEMEIN.cLeistungen(o.LeistungsNr)
|
Dim LEISTUNG As New VERAG_PROG_ALLGEMEIN.cLeistungen(o.LeistungsNr)
|
||||||
POS.LeistungsNr = o.LeistungsNr
|
POS.LeistungsNr = o.LeistungsNr
|
||||||
@@ -2543,7 +3191,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Private Sub dat_Sum_Von_ValueChanged(sender As Object, e As EventArgs) Handles dat_Sum_Von.ValueChanged, dat_Sum_Bis.ValueChanged
|
Private Sub dat_Sum_Von_ValueChanged(sender As Object, e As EventArgs) Handles dat_Sum_Von.ValueChanged, dat_Sum_Bis.ValueChanged, DateTimePicker2.ValueChanged
|
||||||
init()
|
init()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2746,6 +3394,70 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Function pruefData_MSE() As Boolean
|
||||||
|
pruefData_MSE = True
|
||||||
|
Try
|
||||||
|
|
||||||
|
Dim dtMSEKundennummern As DataTable = SQL.loadDgvBySql(" SELECT cust.customer_id, cust.customer_name, Adressen.AdressenNr, (SELECT Offerten.OffertenNr FROM Offerten WHERE (((Offerten.KundenNr)=isnull(Adressen.[AdressenNr],0)) AND ((Offerten.OffertenNr)=23))) AS Offerte_23
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||||
|
left join adressen ON cust.[customer_id] = Adressen.MSEKundenNr
|
||||||
|
GROUP BY cust.customer_id, cust.customer_name, Adressen.AdressenNr
|
||||||
|
HAVING (((cust.customer_id) Is Not Null) AND ((Adressen.AdressenNr) Is Null)) OR (((cust.customer_id) Is Not Null) AND ((Adressen.AdressenNr) Is Not Null) AND (((SELECT Offerten.OffertenNr FROM Offerten WHERE (((Offerten.KundenNr)=isnull(Adressen.[AdressenNr],0)) AND ((Offerten.OffertenNr)=23)))) Is Null));
|
||||||
|
", "FMZOLL")
|
||||||
|
|
||||||
|
If dtMSEKundennummern.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
pruefData_MSE = False
|
||||||
|
|
||||||
|
'If dtMSEKundennummern.Rows.Count = 1 AndAlso dtMSEKundennummern.Rows(0).Item("Kundennummer").Value = "868070" Then pruefData_MSE = True 'ist VERAG -> OK
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim dtLeistungsnummern As DataTable = SQL.loadDgvBySql(" SELECT trans.device_product_type, trans.transaction_country,trans.transaction_product_name, trans.transaction_product_id, cust.[customer_id], trans.partner_haulier_id, cust.customer_name,
|
||||||
|
Sum(trans.transaction_gross_amount) AS [Summe Transaction Amount ( EUR )],
|
||||||
|
Sum(trans.msts_fee_amount) AS [Summe Admin Fee Amount ( EUR )],
|
||||||
|
Sum(trans.msts_fee_amount) AS [Summe Fees and Costs Amount ( EUR )],
|
||||||
|
Sum(trans.msts_vat_amount) AS [Summe VAT Amount ( EUR )],
|
||||||
|
Sum(trans.transaction_gross_amount) AS [Summe Total Amount ( EUR )]
|
||||||
|
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||||
|
LEFT JOIN tblMSELeistungen ON trans.device_product_type = tblMSELeistungen.[Card Type] AND trans.transaction_country = tblMSELeistungen.[Transaction Country]
|
||||||
|
|
||||||
|
WHERE ((trans.transaction_gross_amount <> 0) AND tblMSELeistungen.LeistungsNr Is Null)
|
||||||
|
|
||||||
|
GROUP BY trans.device_product_type, trans.transaction_country,trans.transaction_product_name, trans.transaction_product_id, cust.[customer_id], trans.partner_haulier_id, cust.customer_name;", "FMZOLL")
|
||||||
|
|
||||||
|
|
||||||
|
If dtLeistungsnummern.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
pruefData_MSE = False
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim fehlendeTransactionen As Integer = 0
|
||||||
|
|
||||||
|
fehlendeTransactionen = CInt((New SQL).getValueTxtBySql("select count(*) FROM [VERAG].[dbo].[tblMSESettlements] where [invoice_date] = '" & DateTimePicker2.Text & "' AND [transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions]) ", "AVISO"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If fehlendeTransactionen > 0 Then
|
||||||
|
pruefData_MSE = False
|
||||||
|
MsgBox("Es fehlen " & fehlendeTransactionen & " Transaktionen in der Datenbank!" & vbNewLine & "Diese Transaktionen (von Rechnung " & DateTimePicker2.Text & ") müssen nachgeladen werden (bitte an Administrator wenden).")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message & ex.StackTrace)
|
||||||
|
pruefData_MSE = False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
Function pruefData_PLOSE_old() As Boolean
|
Function pruefData_PLOSE_old() As Boolean
|
||||||
pruefData_PLOSE_old = True
|
pruefData_PLOSE_old = True
|
||||||
Try
|
Try
|
||||||
@@ -2847,25 +3559,47 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Select Case LIEFERANT
|
Select Case LIEFERANT
|
||||||
Case "PLOSE" : deleteMautD("PLOSE") : Return genPLOSEInsertMautD(dat_Sum_Von.Value.ToShortDateString, dat_Sum_Bis.Value.ToShortDateString)
|
Case "PLOSE" : deleteMautD("PLOSE") : Return genPLOSEInsertMautD(dat_Sum_Von.Value.ToShortDateString, dat_Sum_Bis.Value.ToShortDateString)
|
||||||
Case "ASFINAG" : deleteMautD("AT") : Return genASFINAGInsertMautAT(kdNr)
|
Case "ASFINAG" : deleteMautD("AT") : Return genASFINAGInsertMautAT(kdNr)
|
||||||
Case "UTA" : deleteMautD("UTA") : Return genUTAInsertMautAT(kdNr)
|
Case "UTA" : deleteMautD("UTA") : Return genUTAInsertMaut(kdNr)
|
||||||
Case "MSE" : deleteMautD("MSE") 'Return genUTAInsertMautAT(kdNr)
|
Case "MSE" : deleteMautD("MSE") : Return genMSEInsertMaut(kdNr)
|
||||||
End Select
|
End Select
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Sub setFakturiertPLOSE()
|
Sub setFakturiert(Lieferant As String)
|
||||||
PictureBox1.Visible = False
|
PictureBox1.Visible = False
|
||||||
If SQL.doSQL("UPDATE tblPLOSE_Details SET plose_Fakturiert=1 WHERE plose_Fakturiert = 0 AND plose_DatumTransaktion between '" & dat_Sum_Von.Value.ToShortDateString & "' and '" & dat_Sum_Bis.Value.ToShortDateString & "' ", "FMZOLL") Then
|
|
||||||
PictureBox1.Visible = True
|
Select Case Lieferant
|
||||||
End If
|
Case "PLOSE"
|
||||||
|
If SQL.doSQL("UPDATE tblPLOSE_Details SET plose_Fakturiert=1 WHERE plose_Fakturiert = 0 AND plose_DatumTransaktion between '" & dat_Sum_Von.Value.ToShortDateString & "' and '" & dat_Sum_Bis.Value.ToShortDateString & "' ", "FMZOLL") Then
|
||||||
|
PictureBox1.Visible = True
|
||||||
|
End If
|
||||||
|
Case "UTA"
|
||||||
|
If SQL.doSQL("UPDATE [tblUTAImport] set abgerechnet=1 where abgerechnetDatum is not null and abgerechnet <> 1", "FMZOLL") Then
|
||||||
|
PictureBox1.Visible = True
|
||||||
|
End If
|
||||||
|
Case "MSE"
|
||||||
|
If SQL.doSQL("UPDATE [tblMSETransactions] Set charged = 1
|
||||||
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.chargedDatetime is not null and charged <> 1 ") Then
|
||||||
|
PictureBox1.Visible = True
|
||||||
|
End If
|
||||||
|
Case Else
|
||||||
|
MsgBox("Funktion setFaktiuriert für den Lieferant " & Lieferant & " nicht definiert!")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||||
If vbYes = MsgBox("Möchten Sie den Vorgang wirklich manuell ausgeführen (wird bei Rechnungserstellung automatisch ausgeführt)", vbYesNoCancel) Then
|
If vbYes = MsgBox("Möchten Sie den Vorgang wirklich manuell ausgeführen (wird bei Rechnungserstellung automatisch ausgeführt)", vbYesNoCancel) Then
|
||||||
Select Case LIEFERANT
|
Select Case LIEFERANT
|
||||||
Case "PLOSE" : setFakturiertPLOSE()
|
Case "PLOSE" : setFakturiert(LIEFERANT)
|
||||||
|
Case "UTA" : setFakturiert(LIEFERANT)
|
||||||
|
Case "MSE" : setFakturiert(LIEFERANT)
|
||||||
Case "ASFINAG" : setFakturiert_ASFINAG()
|
Case "ASFINAG" : setFakturiert_ASFINAG()
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
@@ -3000,7 +3734,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
cbxASFINAGAbgerechnet.Checked = True
|
cbxASFINAGAbgerechnet.Checked = True
|
||||||
'initDgv_ASFINAG(Not cbxASFINAGNichtAbgerechnet.Checked)
|
'initDgv_ASFINAG(Not cbxASFINAGNichtAbgerechnet.Checked)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user