This commit is contained in:
2024-11-13 16:51:17 +01:00
parent 7fc416a7e3
commit 0a37086782
5 changed files with 353 additions and 162 deletions

View File

@@ -348,6 +348,13 @@ Public Class frmMDM_USTVAntrag
Return (cnt > 0) Return (cnt > 0)
End Function End Function
Shared Function alreadyExistsMitLeistungsBez(USTVAn_KuNr As Integer, UStVAn_LandNr As String, USTV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen) As Boolean
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim cnt = SQL.getValueTxtBySql(" SELECT count(*) FROM [tblUStVAntrag] inner join [tblUStVPositionen] on tblUStVAntrag.UStVAn_ID= [tblUStVPositionen].UStVAn_ID
WHERE USTVAn_KuNr='" & USTVAn_KuNr & "' AND UStVPo_SchnittstellenNr='" & USTV_POS.UStVPo_SchnittstellenNr & "' AND UStVPo_ReNr = '" & USTV_POS.UStVPo_ReNr & "' AND UStVPo_ReDat='" & USTV_POS.UStVPo_ReDat & "' AND UStVAn_LandNr='" & UStVAn_LandNr & "' AND UStVPo_Leistungsbezeichnung = '" & USTV_POS.UStVPo_Leistungsbezeichnung & "'", "FMZOLL")
Return (cnt > 0)
End Function
Function alreadyExists_InAntrag(USTV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen) As Boolean Function alreadyExists_InAntrag(USTV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen) As Boolean
For Each row As DataGridViewRow In dgvUSTVPositionen.Rows For Each row As DataGridViewRow In dgvUSTVPositionen.Rows
If row.Cells("UStVPo_SchnittstellenNr").Value = USTV_POS.UStVPo_SchnittstellenNr Then If row.Cells("UStVPo_SchnittstellenNr").Value = USTV_POS.UStVPo_SchnittstellenNr Then
@@ -490,7 +497,7 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = r.Item("invoice_number") & " - " & kdNr USTV_POS.UStVPo_ReNr = r.Item("invoice_number") & " - " & kdNr
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then If Not alreadyExistsMitLeistungsBez(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
USTV_POS.UStVPo_Schnittstelle = True USTV_POS.UStVPo_Schnittstelle = True
USTV_POS.UStVPo_Leistungsbezeichnung = r.Item("specification_page_name") USTV_POS.UStVPo_Leistungsbezeichnung = r.Item("specification_page_name")
@@ -556,7 +563,7 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = r.Item("Rechnungsnummer") USTV_POS.UStVPo_ReNr = r.Item("Rechnungsnummer")
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
If True Then 'Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
USTV_POS.UStVPo_Schnittstelle = True USTV_POS.UStVPo_Schnittstelle = True
USTV_POS.UStVPo_Leistungsbezeichnung = "MAUT, DIESEL oder KFZ-Zubehör" USTV_POS.UStVPo_Leistungsbezeichnung = "MAUT, DIESEL oder KFZ-Zubehör"

View File

@@ -47,7 +47,10 @@ Partial Class frmMDMDatenverarbetiung
Me.Label1 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label()
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.pnlIDS = New System.Windows.Forms.Panel()
Me.btnRechenwertesetzen = New System.Windows.Forms.Button()
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()
@@ -60,6 +63,7 @@ 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()
@@ -70,29 +74,26 @@ 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.Button10 = New System.Windows.Forms.Button()
Me.txtPruefsummeBrutto = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtPruefsummeNetto = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.pnlIDS = New System.Windows.Forms.Panel()
Me.btnRechenwertesetzen = New System.Windows.Forms.Button()
Me.pnl.SuspendLayout() Me.pnl.SuspendLayout()
Me.Panel5.SuspendLayout() Me.Panel5.SuspendLayout()
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel4.SuspendLayout() Me.Panel4.SuspendLayout()
Me.FlowLayoutPanel.SuspendLayout() Me.FlowLayoutPanel.SuspendLayout()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
Me.pnlIDS.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlAsfinag.SuspendLayout() Me.pnlAsfinag.SuspendLayout()
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.pnlIDS.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'pnl 'pnl
@@ -363,6 +364,26 @@ Partial Class frmMDMDatenverarbetiung
Me.Panel1.Size = New System.Drawing.Size(1163, 114) Me.Panel1.Size = New System.Drawing.Size(1163, 114)
Me.Panel1.TabIndex = 2 Me.Panel1.TabIndex = 2
' '
'pnlIDS
'
Me.pnlIDS.Controls.Add(Me.Button10)
Me.pnlIDS.Controls.Add(Me.btnRechenwertesetzen)
Me.pnlIDS.Location = New System.Drawing.Point(616, 5)
Me.pnlIDS.Name = "pnlIDS"
Me.pnlIDS.Size = New System.Drawing.Size(311, 32)
Me.pnlIDS.TabIndex = 50
Me.pnlIDS.Visible = False
'
'btnRechenwertesetzen
'
Me.btnRechenwertesetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnRechenwertesetzen.Location = New System.Drawing.Point(10, 3)
Me.btnRechenwertesetzen.Name = "btnRechenwertesetzen"
Me.btnRechenwertesetzen.Size = New System.Drawing.Size(129, 23)
Me.btnRechenwertesetzen.TabIndex = 48
Me.btnRechenwertesetzen.Text = "Rechenwerte setzen"
Me.btnRechenwertesetzen.UseVisualStyleBackColor = True
'
'lblTTRSum 'lblTTRSum
' '
Me.lblTTRSum.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lblTTRSum.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -374,6 +395,32 @@ 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)
@@ -439,9 +486,9 @@ Partial Class frmMDMDatenverarbetiung
' '
Me.Panel3.BackColor = System.Drawing.Color.White Me.Panel3.BackColor = System.Drawing.Color.White
Me.Panel3.Controls.Add(Me.Button6) Me.Panel3.Controls.Add(Me.Button6)
Me.Panel3.Location = New System.Drawing.Point(616, 9) Me.Panel3.Location = New System.Drawing.Point(616, 3)
Me.Panel3.Name = "Panel3" Me.Panel3.Name = "Panel3"
Me.Panel3.Size = New System.Drawing.Size(311, 105) Me.Panel3.Size = New System.Drawing.Size(311, 111)
Me.Panel3.TabIndex = 48 Me.Panel3.TabIndex = 48
' '
'Button6 'Button6
@@ -499,6 +546,31 @@ 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
@@ -595,6 +667,31 @@ 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)
@@ -605,6 +702,31 @@ 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
@@ -642,125 +764,15 @@ 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 'Button10
' '
Me.txtTTRSum._DateTimeOnly = False Me.Button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.txtTTRSum._numbersOnly = False Me.Button10.Location = New System.Drawing.Point(168, 5)
Me.txtTTRSum._numbersOnlyKommastellen = "" Me.Button10.Name = "Button10"
Me.txtTTRSum._numbersOnlyTrennzeichen = True Me.Button10.Size = New System.Drawing.Size(140, 23)
Me.txtTTRSum._Prozent = False Me.Button10.TabIndex = 49
Me.txtTTRSum._ShortDateNew = False Me.Button10.Text = "Rechenw. zurücksetzen"
Me.txtTTRSum._ShortDateOnly = False Me.Button10.UseVisualStyleBackColor = True
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
'
'pnlIDS
'
Me.pnlIDS.Controls.Add(Me.btnRechenwertesetzen)
Me.pnlIDS.Location = New System.Drawing.Point(616, 38)
Me.pnlIDS.Name = "pnlIDS"
Me.pnlIDS.Size = New System.Drawing.Size(311, 32)
Me.pnlIDS.TabIndex = 50
Me.pnlIDS.Visible = False
'
'btnRechenwertesetzen
'
Me.btnRechenwertesetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnRechenwertesetzen.Location = New System.Drawing.Point(10, 3)
Me.btnRechenwertesetzen.Name = "btnRechenwertesetzen"
Me.btnRechenwertesetzen.Size = New System.Drawing.Size(129, 23)
Me.btnRechenwertesetzen.TabIndex = 48
Me.btnRechenwertesetzen.Text = "Rechenwerte setzen"
Me.btnRechenwertesetzen.UseVisualStyleBackColor = True
' '
'frmMDMDatenverarbetiung 'frmMDMDatenverarbetiung
' '
@@ -785,6 +797,7 @@ Partial Class frmMDMDatenverarbetiung
Me.FlowLayoutPanel.ResumeLayout(False) Me.FlowLayoutPanel.ResumeLayout(False)
Me.Panel1.ResumeLayout(False) Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout() Me.Panel1.PerformLayout()
Me.pnlIDS.ResumeLayout(False)
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlAsfinag.ResumeLayout(False) Me.pnlAsfinag.ResumeLayout(False)
@@ -792,7 +805,6 @@ 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.pnlIDS.ResumeLayout(False)
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
@@ -853,4 +865,5 @@ Partial Class frmMDMDatenverarbetiung
Friend WithEvents DateTimePicker2 As DateTimePicker Friend WithEvents DateTimePicker2 As DateTimePicker
Friend WithEvents pnlIDS As Panel Friend WithEvents pnlIDS As Panel
Friend WithEvents btnRechenwertesetzen As Button Friend WithEvents btnRechenwertesetzen As Button
Friend WithEvents Button10 As Button
End Class End Class

View File

@@ -823,7 +823,7 @@ Public Class frmMDMDatenverarbetiung
,trans.[UStVAn_ID] ,trans.[UStVAn_ID]
,trans.[VRNumber] ,trans.[VRNumber]
,trans.[OBONumber] ,trans.[OBONumber]
,Kunde.CustomerCode ,Kunde.CustomerCode as KundeCustomerCode
,isnull(KundeOhneR.CustomerCode,0) as KundeOhneRabatt ,isnull(KundeOhneR.CustomerCode,0) as KundeOhneRabatt
from tblIDSTransactionsNew as trans from tblIDSTransactionsNew as trans
left join tbl_IDS_Kunden as Kunde on Kunde.CustomerCode = trans.CustomerCode left join tbl_IDS_Kunden as Kunde on Kunde.CustomerCode = trans.CustomerCode
@@ -841,7 +841,10 @@ Public Class frmMDMDatenverarbetiung
'.Columns("VERAGLeistungsNr").ReadOnly = False '.Columns("VERAGLeistungsNr").ReadOnly = False
.Columns("transaction_id").Visible = False .Columns("transaction_id").Visible = False
.Columns("Kunde.CustomerCode").Visible = False .Columns("KundeCustomerCode").Visible = False
.Columns("Datum").Visible = False
.Columns("KundeOhneRabatt").Visible = False
.Columns("UStVAn_ID").Visible = False
'For Each r As DataGridViewColumn In .Columns 'For Each r As DataGridViewColumn In .Columns
' If r.Name = "VERAGLeistungsNr" Or r.Name = "VERAGKdNr" Then ' If r.Name = "VERAGLeistungsNr" Or r.Name = "VERAGKdNr" Then
@@ -1001,6 +1004,7 @@ Public Class frmMDMDatenverarbetiung
pnlAsfinag.Visible = True pnlAsfinag.Visible = True
Exit Sub Exit Sub
Case "IDS" Case "IDS"
Panel5.Visible = True
Dim c As New usrCntlMDMDatenverarbeitungAuswertungen_divers(Me, Me.LIEFERANT) Dim c As New usrCntlMDMDatenverarbeitungAuswertungen_divers(Me, Me.LIEFERANT)
Panel3.Controls.Add(c) Panel3.Controls.Add(c)
c.Dock = DockStyle.Fill c.Dock = DockStyle.Fill
@@ -4074,6 +4078,8 @@ Public Class frmMDMDatenverarbetiung
Private Function setRechenwerteIDS() As Boolean Private Function setRechenwerteIDS() As Boolean
'Abrechnungsdatum setzen 'Abrechnungsdatum setzen
Return False
If Not LIEFERANT = "IDS" Then Return False If Not LIEFERANT = "IDS" Then Return False
If MyDatagridview1.Rows.Count = 0 Then If MyDatagridview1.Rows.Count = 0 Then
@@ -4093,31 +4099,93 @@ Public Class frmMDMDatenverarbetiung
trans.avpriceexclVAT = trans.TotalNetAmount / trans.TransactionVolume trans.avpriceexclVAT = trans.TotalNetAmount / trans.TransactionVolume
End If End If
If Not IsDBNull(row.Cells("Kunde.CustomerCode").Value) AndAlso CInt(row.Cells("Kunde.CustomerCode").Value) > 0 Then Dim rechnenwertVorhanden = False
If Not IsDBNull(row.Cells("KundeCustomerCode").Value) AndAlso CInt(row.Cells("KundeCustomerCode").Value) > 0 Then
kundeOhneRabatt = row.Cells("KundeOhneRabatt").Value kundeOhneRabatt = row.Cells("KundeOhneRabatt").Value
If Not kundeOhneRabatt Then 'kundeOhneRabatt -> gleich zu Rabattberechnen! If Not kundeOhneRabatt Then 'kundeOhneRabatt -> gleich zu Rabattberechnen!
'Rechenwert für Land/Station/Kunde/Produkt ermitteln 'Rechenwert für Land/Station/Kunde/Produkt ermitteln
Dim sqlStringLandStationKundeProdukt = "select Case Rechenwert, Kz, KategorieNr FROM tbl_IDS_Rechenwerte WHERE (((OutletCountryCode)=" & row.Cells("OutletCountryCode").Value & ") & AND ((OutletCode)=" & row.Cells("OutletCode").Value & ") & And ((CustomerCode)=" & row.Cells("Kunde.CustomerCode").Value & ") AND ((ProductTypeCode)=" & row.Cells("ProductTypeCode").Value & ")) & ORDER BY Zeitstempel DESC" Dim sqlStringLandStationKundeProdukt = "select Rechenwert, Kz, KategorieNr FROM tbl_IDS_Rechenwerte WHERE (((OutletCountryCode)=" & row.Cells("OutletCountryCode").Value & ") AND ((OutletCode)=" & row.Cells("OutletCode").Value & ") And ((CustomerCode)=" & row.Cells("KundeCustomerCode").Value & ") AND ((ProductTypeCode)=" & row.Cells("ProductTypeCode").Value & ")) ORDER BY Zeitstempel DESC"
Dim dtLandStationKundeProdukt As DataTable = SQL.loadDgvBySql(sqlStringLandStationKundeProdukt, "FMZOLL")
If dtLandStationKundeProdukt.Rows.Count > 0 Then
rechnenwertVorhanden = True
For Each r In dtLandStationKundeProdukt.Rows
Next
End If
'Rechenwert für Land/Kunde/Produkt ermittteln 'Rechenwert für Land/Kunde/Produkt ermittteln
Dim sqlStringLandKundeProdukt = "Select Case Rechenwert, Kz, KategorieNr FROM tbl_IDS_Rechenwerte WHERE (((OutletCountryCode)=" & row.Cells("OutletCountryCode").Value & ") And ((OutletCode) Is Null) AND ((CustomerCode)=" & row.Cells("Kunde.CustomerCode").Value & ") & And ((ProductTypeCode)=" & row.Cells("ProductTypeCode").Value & ")) ORDER BY Zeitstempel DESC" If Not rechnenwertVorhanden Then
Dim sqlStringLandKundeProdukt = "Select Rechenwert, Kz, KategorieNr FROM tbl_IDS_Rechenwerte WHERE (((OutletCountryCode)=" & row.Cells("OutletCountryCode").Value & ") And ((OutletCode) Is Null) AND ((CustomerCode)=" & row.Cells("KundeCustomerCode").Value & ") And ((ProductTypeCode)=" & row.Cells("ProductTypeCode").Value & ")) ORDER BY Zeitstempel DESC"
Dim dtLandKundeProdukt As DataTable = SQL.loadDgvBySql(sqlStringLandStationKundeProdukt, "FMZOLL")
If dtLandKundeProdukt.Rows.Count > 0 Then
rechnenwertVorhanden = True
For Each r In dtLandKundeProdukt.Rows
Next
Dim sum As Double = 0 End If
If Not IsDBNull(row.Cells("Kunde.CustomerCode").Value) AndAlso CInt(row.Cells("Kunde.CustomerCode").Value) > 0 Then
sum = +row.Cells("transaction_id").Value
End If End If
End If End If
End If End If
' Rechenwert für Land/Station/Produkt ermitteln
If Not rechnenwertVorhanden Then
Dim sqlStringLandStationProdukt = "select Rechenwert, Kz, KategorieNr FROM tbl_IDS_Rechenwerte WHERE (((OutletCountryCode)=" & row.Cells("OutletCountryCode").Value & ") AND ((OutletCode)=" & row.Cells("OutletCode").Value & ") AND ((ProductTypeCode)=" & row.Cells("ProductTypeCode").Value & ")) ORDER BY Zeitstempel DESC"
Dim dtLandStationProdukt As DataTable = SQL.loadDgvBySql(sqlStringLandStationProdukt, "FMZOLL")
If dtLandStationProdukt.Rows.Count > 0 Then
rechnenwertVorhanden = True
For Each r In dtLandStationProdukt.Rows
Next
End If
End If
' Rechenwert für Land/Produkt ermitteln
If Not rechnenwertVorhanden Then
Dim sqlStringLandProdukt = "Select Rechenwert, Kz, KategorieNr FROM tbl_IDS_Rechenwerte WHERE (((OutletCountryCode)=" & row.Cells("OutletCountryCode").Value & ") And ((OutletCode) Is Null) And ((ProductTypeCode)=" & row.Cells("ProductTypeCode").Value & ")) ORDER BY Zeitstempel DESC"
Dim dtLandProdukt As DataTable = SQL.loadDgvBySql(sqlStringLandProdukt, "FMZOLL")
If dtLandProdukt.Rows.Count > 0 Then
rechnenwertVorhanden = True
For Each r In dtLandProdukt.Rows
Next
End If
End If
If trans.Rechenwert > 0 Then
'!Rechenwert = rstIDSRechenwert!Rechenwert
'1720 !Kz = rstIDSRechenwert!Kz
'1730 If Not IsNull(rstIDSRechenwert!KategorieNr) Then
'1740 Set qry = dbs.QueryDefs("qry_IDS_KategorieNr_ProductTypeCode_Rechenwert")
'1750 qry.Parameters("[prmKategorieNr]") = rstIDSRechenwert!KategorieNr
'1760 qry.Parameters("[prmProductTypeCode]") = ![Product Type Code]
'1770 Set rst = qry.OpenRecordset(dbOpenSnapshot)
'1780 If Not rst.EOF Then
'1790 !Rechenwert = !Rechenwert + rst!Rechenwert
'1800 If !Rechenwert < 0 Then
'1810 !Rechenwert = 0
'1820 End If
'1830 End If
'1840 rst.Close
'1850 qry.Close
'1860 End If
'1870 rstIDSRechenwert.Close
End If
'Rabatt_errechnen: 'Rabatt_errechnen:
Select Case trans.Kz Select Case trans.Kz
@@ -4130,6 +4198,11 @@ Public Class frmMDMDatenverarbetiung
End Select End Select
'Rechenwert eintragen:
If trans.TransactionVolume <> 0 Then If trans.TransactionVolume <> 0 Then
trans.RabattbetragProLiter = row.Cells("Rabattbetrag").Value / row.Cells("TransactionVolume").Value trans.RabattbetragProLiter = row.Cells("Rabattbetrag").Value / row.Cells("TransactionVolume").Value
End If End If
@@ -4139,8 +4212,13 @@ Public Class frmMDMDatenverarbetiung
Next Next
' Kunde ohne Rabatt ' Public Function fktDieselIDSImportiereCSV()
'1390 strSQL = "Select *" & _
'1380 If Not IsNull(![KdNrVERAG]) Then
' ' Kunde ohne Rabatt
'1390 strSQL = "SELECT *" & _
' " FROM tbl_IDS_Kunden_ohne_Rabatt" & _ ' " FROM tbl_IDS_Kunden_ohne_Rabatt" & _
' " WHERE (((tbl_IDS_Kunden_ohne_Rabatt.CustomerCode)=" & ![KdNrVERAG] & "));" ' " WHERE (((tbl_IDS_Kunden_ohne_Rabatt.CustomerCode)=" & ![KdNrVERAG] & "));"
'1400 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot) '1400 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
@@ -4150,12 +4228,12 @@ Public Class frmMDMDatenverarbetiung
'1440 rstIDSRechenwert.Close '1440 rstIDSRechenwert.Close
' ' Rechenwert für Land/Station/Kunde/Produkt ermitteln ' ' Rechenwert für Land/Station/Kunde/Produkt ermitteln
'1450 strSQL = "Select Rechenwert, Kz, KategorieNr" & _ '1450 strSQL = "SELECT Rechenwert, Kz, KategorieNr" & _
' " FROM tbl_IDS_Rechenwerte" & _ ' " FROM tbl_IDS_Rechenwerte" & _
' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _ ' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _
' " And ((OutletCode)=" & ![Outlet Code] & ")" & _ ' " AND ((OutletCode)=" & ![Outlet Code] & ")" & _
' " And ((CustomerCode)=" & ![KdNrVERAG] & ")" & _ ' " AND ((CustomerCode)=" & ![KdNrVERAG] & ")" & _
' " And ((ProductTypeCode)=" & ![Product Type Code] & "))" & _ ' " AND ((ProductTypeCode)=" & ![Product Type Code] & "))" & _
' " ORDER BY Zeitstempel DESC;" ' " ORDER BY Zeitstempel DESC;"
'1460 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot) '1460 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
'1470 If Not rstIDSRechenwert.EOF Then '1470 If Not rstIDSRechenwert.EOF Then
@@ -4164,12 +4242,12 @@ Public Class frmMDMDatenverarbetiung
'1500 rstIDSRechenwert.Close '1500 rstIDSRechenwert.Close
' ' Rechenwert für Land/Kunde/Produkt ermittteln ' ' Rechenwert für Land/Kunde/Produkt ermittteln
'1510 strSQL = "Select Rechenwert, Kz, KategorieNr" & _ '1510 strSQL = "SELECT Rechenwert, Kz, KategorieNr" & _
' " FROM tbl_IDS_Rechenwerte" & _ ' " FROM tbl_IDS_Rechenwerte" & _
' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _ ' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _
' " And ((OutletCode) Is Null)" & _ ' " AND ((OutletCode) Is Null)" & _
' " And ((CustomerCode)=" & ![KdNrVERAG] & ")" & _ ' " AND ((CustomerCode)=" & ![KdNrVERAG] & ")" & _
' " And ((ProductTypeCode)=" & ![Product Type Code] & "))" & _ ' " AND ((ProductTypeCode)=" & ![Product Type Code] & "))" & _
' " ORDER BY Zeitstempel DESC;" ' " ORDER BY Zeitstempel DESC;"
'1520 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot) '1520 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
'1530 If Not rstIDSRechenwert.EOF Then '1530 If Not rstIDSRechenwert.EOF Then
@@ -4180,12 +4258,12 @@ Public Class frmMDMDatenverarbetiung
'1570 End If '1570 End If
' ' Rechenwert für Land/Station/Produkt ermitteln ' ' Rechenwert für Land/Station/Produkt ermitteln
'1580 strSQL = "Select Rechenwert, Kz, KategorieNr" & _ '1580 strSQL = "SELECT Rechenwert, Kz, KategorieNr" & _
' " FROM tbl_IDS_Rechenwerte" & _ ' " FROM tbl_IDS_Rechenwerte" & _
' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _ ' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _
' " And ((OutletCode)=" & ![Outlet Code] & ")" & _ ' " AND ((OutletCode)=" & ![Outlet Code] & ")" & _
' " And ((CustomerCode) Is Null)" & _ ' " AND ((CustomerCode) Is Null)" & _
' " And ((ProductTypeCode)=" & ![Product Type Code] & "))" & _ ' " AND ((ProductTypeCode)=" & ![Product Type Code] & "))" & _
' " ORDER BY Zeitstempel DESC;" ' " ORDER BY Zeitstempel DESC;"
'1590 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot) '1590 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
'1600 If Not rstIDSRechenwert.EOF Then '1600 If Not rstIDSRechenwert.EOF Then
@@ -4194,12 +4272,12 @@ Public Class frmMDMDatenverarbetiung
'1630 rstIDSRechenwert.Close '1630 rstIDSRechenwert.Close
' ' Rechenwert für Land/Produkt ermitteln ' ' Rechenwert für Land/Produkt ermitteln
'1640 strSQL = "Select Rechenwert, Kz, KategorieNr" & _ '1640 strSQL = "SELECT Rechenwert, Kz, KategorieNr" & _
' " FROM tbl_IDS_Rechenwerte" & _ ' " FROM tbl_IDS_Rechenwerte" & _
' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _ ' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _
' " And ((OutletCode) Is Null)" & _ ' " AND ((OutletCode) Is Null)" & _
' " And ((CustomerCode) Is Null)" & _ ' " AND ((CustomerCode) Is Null)" & _
' " And ((ProductTypeCode)=" & ![Product Type Code] & "))" & _ ' " AND ((ProductTypeCode)=" & ![Product Type Code] & "))" & _
' " ORDER BY Zeitstempel DESC;" ' " ORDER BY Zeitstempel DESC;"
'1650 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot) '1650 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
'1660 If Not rstIDSRechenwert.EOF Then '1660 If Not rstIDSRechenwert.EOF Then
@@ -4229,6 +4307,85 @@ Public Class frmMDMDatenverarbetiung
'1870 rstIDSRechenwert.Close '1870 rstIDSRechenwert.Close
'Rabatt_errechnen:
'1880 Select Case !Kz
' Case "P" 'Rechenwert ist Preis pro Liter
'1890 !Rabattbetrag = ![Total Net Amount] - Int(!Rechenwert * ![Transaction Volume] * 100 + 0.5) / 100
'1900 Case "R" 'Rechenwert ist Rabatt pro Liter
'1910 !Rabattbetrag = Int(!Rechenwert * ![Transaction Volume] * 100 + 0.5) / 100
'1920 End Select
'1930 If ![Transaction Volume] <> 0 Then
'1940 !RabattbetragProLiter = !Rabattbetrag / ![Transaction Volume]
'1950 End If
' ' Zeitstempel und Sachbearbeiter in tblDiesel eintragen
'1960 !Zeitstempel = Now
'1970 !Sachbearbeiter = CurrentUser()
'1980 .Update
' ' Daten in das Archiv schreiben.
'1990 Set qryIDSDieselArchiv = dbs.QueryDefs("qryDieselArchivPKey")
'2000 qryIDSDieselArchiv.Parameters("[prmYearMonthDay]") = ![Year Month Day]
'2010 qryIDSDieselArchiv.Parameters("[prmPaymentSummaryNumber]") = ![Payment summary number]
'2020 qryIDSDieselArchiv.Parameters("[prmCustomerCode]") = ![Customer Code]
'2030 qryIDSDieselArchiv.Parameters("[prmOutletCountryCode]") = ![Outlet Country Code]
'2040 qryIDSDieselArchiv.Parameters("[prmOutletCode]") = ![Outlet Code]
'2050 qryIDSDieselArchiv.Parameters("[prmProductTypeCode]") = ![Product Type Code]
'2060 Set rstIDSDieselArchiv = qryIDSDieselArchiv.OpenRecordset(dbOpenDynaset)
'2070 If rstIDSDieselArchiv.EOF Then
'2080 rstIDSDieselArchiv.AddNew
'2090 lngDatensätzeAngefügt = lngDatensätzeAngefügt + 1
'2100 Call SysCmd(acSysCmdSetStatus, "IDS-Diesel-Archiv Neuzugang: " & ![Year Month Day] & "-" & ![Payment summary number] & "-" & ![Customer Code] & "-" & ![Outlet Country Code] & "-" & ![Outlet Code] & "-" & ![Product Type Code])
'2110 Else
'2120 rstIDSDieselArchiv.Edit
'2130 lngDatensätzeAktualisiert = lngDatensätzeAktualisiert + 1
'2140 Call SysCmd(acSysCmdSetStatus, "IDS-Diesel-Archiv Änderung: " & ![Year Month Day] & "-" & ![Payment summary number] & "-" & ![Customer Code] & "-" & ![Outlet Country Code] & "-" & ![Outlet Code] & "-" & ![Product Type Code])
'2150 End If
'2160 For Each fld In .Fields
'2170 rstIDSDieselArchiv(fld.Name) = fld.Value
'2180 Next
'2190 rstIDSDieselArchiv.Update
'2200 rstIDSDieselArchiv.Close
'2210 qryIDSDieselArchiv.Close
'2220 DoEvents
'2230 .MoveNext
'2240 Loop
'2250 wrk.CommitTrans
'2260 On Error GoTo Fehler
'2270 .Close
'2280 End With
'2290 Call SysCmd(acSysCmdClearStatus)
'2300 DoCmd.Hourglass False
'2310 strPrompt = "Es wurden " & lngDatensätzeAngefügt & " Datensätze in das Archiv übernommen."
'2320 If lngDatensätzeAktualisiert > 0 Then
'2330 strPrompt = strPrompt & vbNewLine & lngDatensätzeAktualisiert & " Archivsätze wurden aktualisiert."
'2340 End If
'2350 strTitle = "Diesel-Datenarchiv"
'2360 MsgBox strPrompt, , strTitle
' ' intAntwort = MsgBox("Das Einlesen ist beendet. Soll die Datei gelöscht werden?", vbYesNo + vbQuestion + vbDefaultButton2, Trim(dlg.SelectedItems(1)))
' ' If intAntwort = vbYes Then Kill (Trim(dlg.SelectedItems(1)))
'2370 Else
'2380 MsgBox "Es wurde keine Datei ausgewählt.", vbInformation, "Daten einlesen."
'2390 End If
'Ende:
'2400 DoCmd.Hourglass False
'2410 Exit Function
'Rollback:
'2420 wrk.Rollback
'Fehler:
'2430 Call SysCmd(acSysCmdClearStatus)
'2440 DoCmd.Hourglass False
'2450 DoCmd.Beep
'2460 MsgBox "Error: " & Err.Number & ". " & Err.Description, , "fktDieselIDSImportiereCSV"
'2470 Resume Ende
' End Function
@@ -4315,4 +4472,12 @@ Public Class frmMDMDatenverarbetiung
Private Sub btnRechenwertesetzen_Click(sender As Object, e As EventArgs) Handles btnRechenwertesetzen.Click Private Sub btnRechenwertesetzen_Click(sender As Object, e As EventArgs) Handles btnRechenwertesetzen.Click
If vbYes = MsgBox("Haben Sie die Rechenwerte in den IDS-Tabellen aktualisiert?" & vbNewLine & "(Diese werden beim Importieren in die Abrechnungsdaten übernommen)", vbYesNoCancel) Then setRechenwerteIDS() If vbYes = MsgBox("Haben Sie die Rechenwerte in den IDS-Tabellen aktualisiert?" & vbNewLine & "(Diese werden beim Importieren in die Abrechnungsdaten übernommen)", vbYesNoCancel) Then setRechenwerteIDS()
End Sub End Sub
Private Sub Button10_Click_1(sender As Object, e As EventArgs) Handles Button10.Click
If vbYes = MsgBox("Haben Sie die Rechenwerte in den IDS-Tabellen zurücksetzen?", vbYesNoCancel) Then
setRechenwerteIDS()
End If
End Sub
End Class End Class

View File

@@ -86,7 +86,7 @@ Public Class cMDMFunctionsAllgemein
End Try End Try
End Function End Function
Shared Function UStVAKunden_SummenNeuBerechnen(Optional KundenNr As Integer = 0, Optional saveValues As Boolean = True, Optional dt As DataTable = Nothing) As Boolean Shared Function UStVAKunden_SummenNeuBerechnen(Optional KundenNr As Integer = 0, Optional saveValues As Boolean = True, Optional dt As DataTable = Nothing, Optional sendMail As Boolean = False) As Boolean
Try Try
Dim sumChangedPLOSEOK As Boolean = True Dim sumChangedPLOSEOK As Boolean = True
@@ -231,7 +231,7 @@ Public Class cMDMFunctionsAllgemein
End If End If
End If End If
If KundenNr > 0 AndAlso dt IsNot Nothing Then If (KundenNr > 0 Or sendMail) AndAlso dt IsNot Nothing Then
dt.Columns.Add("KundenNr", GetType(String)) dt.Columns.Add("KundenNr", GetType(String))
dt.Columns.Add("VorschaubetragEUR", GetType(Double)) dt.Columns.Add("VorschaubetragEUR", GetType(Double))
@@ -247,7 +247,7 @@ Public Class cMDMFunctionsAllgemein
dt.Columns.Add("VZBetragEUR", GetType(Double)) dt.Columns.Add("VZBetragEUR", GetType(Double))
Dim ro As DataRow = dt.NewRow Dim ro As DataRow = dt.NewRow
ro("KundenNr") = KundenNr ro("KundenNr") = IIf(KundenNr > 0, KundenNr, r.Item("KundenNr"))
ro("VorschaubetragEUR") = curUStV_SummeVorschaubetragEUR ro("VorschaubetragEUR") = curUStV_SummeVorschaubetragEUR
ro("VorschaubetragEUR_VERAG") = curUStV_SummeVorschaubetragEUR_VERAG ro("VorschaubetragEUR_VERAG") = curUStV_SummeVorschaubetragEUR_VERAG
ro("VorschaubetragEUR_IDS") = curUStV_SummeVorschaubetragEUR_IDS ro("VorschaubetragEUR_IDS") = curUStV_SummeVorschaubetragEUR_IDS

View File

@@ -1007,7 +1007,7 @@ Public Class cMSEAPI
End If End If
inv.SAVE() If Not inv.archiv Then inv.SAVE() 'bereits archiverte REchnungen nicht überschreiben!!!!
End If End If
j = j + 1 j = j + 1
@@ -1422,11 +1422,14 @@ Public Class cMSEInvoices
Property total_vat_amount_euro As Object = Nothing Property total_vat_amount_euro As Object = Nothing
Property msts_vat_number As Object = Nothing Property msts_vat_number As Object = Nothing
Property invoice_id As Object = Nothing Property invoice_id As Object = Nothing
Property invoice_nr As Object = Nothing
Property invoice_date As Object = Nothing Property invoice_date As Object = Nothing
Property customer_number As Object = Nothing Property customer_number As Object = Nothing
Property country As Object = Nothing Property country As Object = Nothing
Property imported As Boolean = False Property imported As Boolean = False
Property daId As Object = Nothing Property daId As Object = Nothing
Property archiv As Boolean = False
Property archiviertDatum As Object = Nothing
Public hasEntry = False Public hasEntry = False
@@ -1453,6 +1456,9 @@ Public Class cMSEInvoices
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("country", country)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("country", country))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("imported", imported)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("imported", imported))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("daId", daId)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("daId", daId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("archiv", archiv))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("archiviertDatum", archiviertDatum))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("invoice_nr", invoice_nr))
Return list Return list
End Function End Function