MDM, IDS, USTVA

This commit is contained in:
2024-12-04 11:04:21 +01:00
parent 9fd1c28b5a
commit 890818df47
12 changed files with 177 additions and 148 deletions

View File

@@ -338,14 +338,14 @@ Partial Class frmMDMDatenverarbetiung
'
'Panel1
'
Me.Panel1.Controls.Add(Me.pnlAsfinag)
Me.Panel1.Controls.Add(Me.Panel3)
Me.Panel1.Controls.Add(Me.pnlIDS)
Me.Panel1.Controls.Add(Me.lblTTRSum)
Me.Panel1.Controls.Add(Me.txtTTRSum)
Me.Panel1.Controls.Add(Me.lblProzPruef)
Me.Panel1.Controls.Add(Me.PictureBox1)
Me.Panel1.Controls.Add(Me.pic)
Me.Panel1.Controls.Add(Me.pnlAsfinag)
Me.Panel1.Controls.Add(Me.Panel3)
Me.Panel1.Controls.Add(Me.Button5)
Me.Panel1.Controls.Add(Me.Button1)
Me.Panel1.Controls.Add(Me.btnKunde)
@@ -360,46 +360,46 @@ Partial Class frmMDMDatenverarbetiung
Me.Panel1.Controls.Add(Me.Button3)
Me.Panel1.Controls.Add(Me.Button2)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel1.Location = New System.Drawing.Point(0, 677)
Me.Panel1.Location = New System.Drawing.Point(0, 647)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(1163, 114)
Me.Panel1.Size = New System.Drawing.Size(1163, 151)
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.Location = New System.Drawing.Point(933, 5)
Me.pnlIDS.Name = "pnlIDS"
Me.pnlIDS.Size = New System.Drawing.Size(311, 32)
Me.pnlIDS.Size = New System.Drawing.Size(230, 36)
Me.pnlIDS.TabIndex = 50
Me.pnlIDS.Visible = False
'
'Button10
'
Me.Button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button10.Location = New System.Drawing.Point(168, 5)
Me.Button10.Location = New System.Drawing.Point(114, 5)
Me.Button10.Name = "Button10"
Me.Button10.Size = New System.Drawing.Size(140, 23)
Me.Button10.Size = New System.Drawing.Size(108, 25)
Me.Button10.TabIndex = 49
Me.Button10.Text = "Rechenw. zurücksetzen"
Me.Button10.Text = "RW zurücksetzen"
Me.Button10.UseVisualStyleBackColor = True
'
'btnRechenwertesetzen
'
Me.btnRechenwertesetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnRechenwertesetzen.Location = New System.Drawing.Point(10, 3)
Me.btnRechenwertesetzen.Location = New System.Drawing.Point(17, 5)
Me.btnRechenwertesetzen.Name = "btnRechenwertesetzen"
Me.btnRechenwertesetzen.Size = New System.Drawing.Size(129, 23)
Me.btnRechenwertesetzen.Size = New System.Drawing.Size(91, 25)
Me.btnRechenwertesetzen.TabIndex = 48
Me.btnRechenwertesetzen.Text = "Rechenwerte setzen"
Me.btnRechenwertesetzen.Text = "RW setzen"
Me.btnRechenwertesetzen.UseVisualStyleBackColor = True
'
'lblTTRSum
'
Me.lblTTRSum.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.lblTTRSum.AutoSize = True
Me.lblTTRSum.Location = New System.Drawing.Point(953, 95)
Me.lblTTRSum.Location = New System.Drawing.Point(953, 127)
Me.lblTTRSum.Name = "lblTTRSum"
Me.lblTTRSum.Size = New System.Drawing.Size(87, 13)
Me.lblTTRSum.TabIndex = 52
@@ -422,7 +422,7 @@ Partial Class frmMDMDatenverarbetiung
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.Location = New System.Drawing.Point(1051, 124)
Me.txtTTRSum.MaxLineLength = -1
Me.txtTTRSum.MaxLines_Warning = ""
Me.txtTTRSum.MaxLines_Warning_Label = Nothing
@@ -434,7 +434,7 @@ Partial Class frmMDMDatenverarbetiung
'
'lblProzPruef
'
Me.lblProzPruef.Location = New System.Drawing.Point(63, 92)
Me.lblProzPruef.Location = New System.Drawing.Point(63, 97)
Me.lblProzPruef.Name = "lblProzPruef"
Me.lblProzPruef.Size = New System.Drawing.Size(69, 13)
Me.lblProzPruef.TabIndex = 41
@@ -445,7 +445,7 @@ Partial Class frmMDMDatenverarbetiung
'
Me.PictureBox1.BackgroundImage = Global.SDL.My.Resources.Resources.ok
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox1.Location = New System.Drawing.Point(574, 88)
Me.PictureBox1.Location = New System.Drawing.Point(574, 93)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(23, 23)
Me.PictureBox1.TabIndex = 50
@@ -456,7 +456,7 @@ Partial Class frmMDMDatenverarbetiung
'
Me.pic.BackgroundImage = Global.SDL.My.Resources.Resources.ok
Me.pic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.pic.Location = New System.Drawing.Point(574, 62)
Me.pic.Location = New System.Drawing.Point(574, 67)
Me.pic.Name = "pic"
Me.pic.Size = New System.Drawing.Size(23, 23)
Me.pic.TabIndex = 49
@@ -467,18 +467,18 @@ Partial Class frmMDMDatenverarbetiung
'
Me.pnlAsfinag.Controls.Add(Me.bntDatumzuruecksetzen)
Me.pnlAsfinag.Controls.Add(Me.bntDatumsetzen)
Me.pnlAsfinag.Location = New System.Drawing.Point(616, 6)
Me.pnlAsfinag.Location = New System.Drawing.Point(896, 6)
Me.pnlAsfinag.Name = "pnlAsfinag"
Me.pnlAsfinag.Size = New System.Drawing.Size(311, 32)
Me.pnlAsfinag.Size = New System.Drawing.Size(267, 30)
Me.pnlAsfinag.TabIndex = 29
Me.pnlAsfinag.Visible = False
'
'bntDatumzuruecksetzen
'
Me.bntDatumzuruecksetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.bntDatumzuruecksetzen.Location = New System.Drawing.Point(168, 5)
Me.bntDatumzuruecksetzen.Location = New System.Drawing.Point(123, 3)
Me.bntDatumzuruecksetzen.Name = "bntDatumzuruecksetzen"
Me.bntDatumzuruecksetzen.Size = New System.Drawing.Size(140, 23)
Me.bntDatumzuruecksetzen.Size = New System.Drawing.Size(140, 25)
Me.bntDatumzuruecksetzen.TabIndex = 49
Me.bntDatumzuruecksetzen.Text = "Abr-datum zurücksetzen"
Me.bntDatumzuruecksetzen.UseVisualStyleBackColor = True
@@ -486,9 +486,9 @@ Partial Class frmMDMDatenverarbetiung
'bntDatumsetzen
'
Me.bntDatumsetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.bntDatumsetzen.Location = New System.Drawing.Point(10, 3)
Me.bntDatumsetzen.Location = New System.Drawing.Point(3, 4)
Me.bntDatumsetzen.Name = "bntDatumsetzen"
Me.bntDatumsetzen.Size = New System.Drawing.Size(129, 23)
Me.bntDatumsetzen.Size = New System.Drawing.Size(114, 23)
Me.bntDatumsetzen.TabIndex = 48
Me.bntDatumsetzen.Text = "Abr-datum setzen"
Me.bntDatumsetzen.UseVisualStyleBackColor = True
@@ -497,9 +497,9 @@ Partial Class frmMDMDatenverarbetiung
'
Me.Panel3.BackColor = System.Drawing.Color.White
Me.Panel3.Controls.Add(Me.Button6)
Me.Panel3.Location = New System.Drawing.Point(616, 3)
Me.Panel3.Location = New System.Drawing.Point(603, 9)
Me.Panel3.Name = "Panel3"
Me.Panel3.Size = New System.Drawing.Size(311, 111)
Me.Panel3.Size = New System.Drawing.Size(313, 139)
Me.Panel3.TabIndex = 48
'
'Button6
@@ -515,7 +515,7 @@ Partial Class frmMDMDatenverarbetiung
'Button5
'
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.Location = New System.Drawing.Point(461, 88)
Me.Button5.Location = New System.Drawing.Point(461, 93)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(107, 23)
Me.Button5.TabIndex = 47
@@ -525,7 +525,7 @@ Partial Class frmMDMDatenverarbetiung
'Button1
'
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Location = New System.Drawing.Point(461, 62)
Me.Button1.Location = New System.Drawing.Point(461, 67)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(107, 23)
Me.Button1.TabIndex = 46
@@ -538,7 +538,7 @@ Partial Class frmMDMDatenverarbetiung
Me.btnKunde.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnKunde.Image = Global.SDL.My.Resources.Resources.person1
Me.btnKunde.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnKunde.Location = New System.Drawing.Point(461, 6)
Me.btnKunde.Location = New System.Drawing.Point(461, 11)
Me.btnKunde.Name = "btnKunde"
Me.btnKunde.Padding = New System.Windows.Forms.Padding(0, 0, 2, 0)
Me.btnKunde.Size = New System.Drawing.Size(136, 32)
@@ -551,7 +551,7 @@ Partial Class frmMDMDatenverarbetiung
'
Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(953, 72)
Me.Label4.Location = New System.Drawing.Point(953, 104)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(92, 13)
Me.Label4.TabIndex = 44
@@ -573,7 +573,7 @@ Partial Class frmMDMDatenverarbetiung
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.Location = New System.Drawing.Point(1051, 101)
Me.txtPruefsummeBrutto.MaxLineLength = -1
Me.txtPruefsummeBrutto.MaxLines_Warning = ""
Me.txtPruefsummeBrutto.MaxLines_Warning_Label = Nothing
@@ -585,7 +585,7 @@ Partial Class frmMDMDatenverarbetiung
'cbx
'
Me.cbx.AutoSize = True
Me.cbx.Location = New System.Drawing.Point(13, 73)
Me.cbx.Location = New System.Drawing.Point(13, 78)
Me.cbx.Name = "cbx"
Me.cbx.Size = New System.Drawing.Size(103, 17)
Me.cbx.TabIndex = 42
@@ -602,7 +602,7 @@ Partial Class frmMDMDatenverarbetiung
Me.Panel2.Controls.Add(Me.pbPloseAnh_Proz)
Me.Panel2.Controls.Add(Me.lblPloseAnh_Proz)
Me.Panel2.Enabled = False
Me.Panel2.Location = New System.Drawing.Point(154, 0)
Me.Panel2.Location = New System.Drawing.Point(154, 5)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(301, 114)
Me.Panel2.TabIndex = 41
@@ -672,7 +672,7 @@ Partial Class frmMDMDatenverarbetiung
'
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(953, 46)
Me.Label3.Location = New System.Drawing.Point(953, 78)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(89, 13)
Me.Label3.TabIndex = 38
@@ -694,7 +694,7 @@ Partial Class frmMDMDatenverarbetiung
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.Location = New System.Drawing.Point(1051, 75)
Me.txtPruefsummeNetto.MaxLineLength = -1
Me.txtPruefsummeNetto.MaxLines_Warning = ""
Me.txtPruefsummeNetto.MaxLines_Warning_Label = Nothing
@@ -707,7 +707,7 @@ Partial Class frmMDMDatenverarbetiung
'
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(953, 19)
Me.Label2.Location = New System.Drawing.Point(953, 51)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(42, 13)
Me.Label2.TabIndex = 36
@@ -729,7 +729,7 @@ Partial Class frmMDMDatenverarbetiung
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.Location = New System.Drawing.Point(1051, 48)
Me.txtAnzahl.MaxLineLength = -1
Me.txtAnzahl.MaxLines_Warning = ""
Me.txtAnzahl.MaxLines_Warning_Label = Nothing
@@ -741,7 +741,7 @@ Partial Class frmMDMDatenverarbetiung
'Button3
'
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.Location = New System.Drawing.Point(12, 43)
Me.Button3.Location = New System.Drawing.Point(12, 13)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(120, 23)
Me.Button3.TabIndex = 29
@@ -751,7 +751,7 @@ Partial Class frmMDMDatenverarbetiung
'Button2
'
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Location = New System.Drawing.Point(12, 14)
Me.Button2.Location = New System.Drawing.Point(12, 42)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(120, 23)
Me.Button2.TabIndex = 28
@@ -772,7 +772,7 @@ Partial Class frmMDMDatenverarbetiung
Me.MyDatagridview1.ReadOnly = True
Me.MyDatagridview1.RowHeadersWidth = 62
Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.MyDatagridview1.Size = New System.Drawing.Size(1163, 577)
Me.MyDatagridview1.Size = New System.Drawing.Size(1163, 547)
Me.MyDatagridview1.TabIndex = 0
'
'ContextMenuStrip1
@@ -785,10 +785,10 @@ Partial Class frmMDMDatenverarbetiung
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(1163, 791)
Me.ClientSize = New System.Drawing.Size(1163, 798)
Me.Controls.Add(Me.MyDatagridview1)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.pnl)
Me.Controls.Add(Me.Panel1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmMDMDatenverarbetiung"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen

View File

@@ -457,7 +457,7 @@ Public Class frmMDMDatenverarbetiung
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
left 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
where bills.invoice_date = '" & DateTimePicker2.Text & "' and isnull(trans.charged,0) = 0
GROUP BY Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country, trans.device_product_type--, trans.device_product_number
order by KundenNr"
@@ -829,7 +829,7 @@ Public Class frmMDMDatenverarbetiung
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
left 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
where bills.invoice_date = '" & DateTimePicker2.Text & "' and isnull(trans.charged,0) = 0
GROUP BY Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country, trans.device_product_type", "FMZOLL")
.LOAD()
@@ -911,7 +911,7 @@ Public Class frmMDMDatenverarbetiung
left join tbl_IDS_Kunden as Kunde on Kunde.CustomerCode = trans.CustomerCode And Kunde.KdNrAlt = 0
left join tbl_IDS_Kunden_ohne_Rabatt as KundeOhneR on KundeOhneR.CustomerCode = trans.CustomerCode
left join tbl_IDS_Produkte as prod on prod.ProductTypeCode = trans.ProductTypeCode
where cast(trans.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' and trans.charged <> 1 AND trans.[UStVAn_ID] is null ", "FMZOLL")
where cast(trans.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' and isnull(trans.charged,0) = 0 AND trans.[UStVAn_ID] is null ", "FMZOLL")
.LOAD()
@@ -1199,7 +1199,7 @@ Public Class frmMDMDatenverarbetiung
INNER JOIN (((Adressen INNER JOIN tblUTAImportNew ON Adressen.UTAKundenNr = tblUTAImportNew.Kundennummer)
INNER JOIN Offertenpositionen ON Adressen.AdressenNr = Offertenpositionen.KundenNr)
INNER JOIN tblUTALeistungen ON (tblUTALeistungen.VERAG_LeistungsNr = Offertenpositionen.LeistungsNr) AND (tblUTALeistungen.VERAG_OffertenNr = Offertenpositionen.OffertenNr) AND (tblUTAImportNew.Lieferland = tblUTALeistungen.Lieferland) AND (tblUTAImportNew.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart)) ON tblUTAFakturierwarenarten.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart
where abgerechnet <> 1 and [Rechnungsdatum] = '" & DateTimePicker2.Text & "'
where isnull(abgerechnet,0) = 0 and [Rechnungsdatum] = '" & DateTimePicker2.Text & "'
group by Kundennummer, KundenNr, UTAExportCSV,Rechnungsdruck"
Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200)
@@ -1327,7 +1327,7 @@ Public Class frmMDMDatenverarbetiung
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
left 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) " & sqlWhere & "
where bills.invoice_date = '" & DateTimePicker2.Text & "' and isnull(trans.charged,0)= 0 and (trans.transaction_gross_amount <> 0 or trans.[msts_fee_amount] <> 0) " & sqlWhere & "
order by cust.customer_id"
Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200)
@@ -1376,7 +1376,7 @@ Public Class frmMDMDatenverarbetiung
left join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
left 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")
where bills.invoice_date = '" & DateTimePicker2.Text & "' and isnull(trans.charged,0)= 0 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()
@@ -1487,7 +1487,7 @@ Public Class frmMDMDatenverarbetiung
LEFT JOIN
tblIDSInvoicesNew
on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber
WHERE cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' AND tblIDSTransactionsNew.[UStVAn_ID] is null " & sqlWhere & "
WHERE cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' AND tblIDSTransactionsNew.[UStVAn_ID] is null and isnull(charged,0)= 0 and " & sqlWhere & "
order by tblIDSTransactionsNew.KdNrVERAG"
Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200)
@@ -1534,7 +1534,7 @@ Public Class frmMDMDatenverarbetiung
If IDS("InvoiceID") > 0 Then
Dim DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER(IDS("InvoiceID"))
File.Copy(DS.GET_TOP1_PATH, dir & "\" & IDS("KdNrVERAG") & "_" & (DS.da_name), False)
File.Copy(DS.GET_TOP1_PATH, dir & "\" & IDS("KdNrVERAG") & "_" & (DS.da_name), True)
End If
@@ -3506,7 +3506,7 @@ Public Class frmMDMDatenverarbetiung
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
left JOIN tblMSELeistungen ON (tblMSELeistungen.[Card Type] = trans.device_product_type) AND (tblMSELeistungen.[Transaction Country] = trans.transaction_country)
left 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 & "
where bills.invoice_date = '" & DateTimePicker2.Text & "' and isnull(trans.charged,0) = 0 and cust.[partner_customer_number] = " & KdNr & "
group by cust.[customer_id], trans.device_product_type, Offertenpositionen.LeistungsNr , Offertenpositionen.LeistungsBez ) as temp group by customer_id, LeistungsNr"
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL", 1200)
@@ -4142,6 +4142,15 @@ Public Class frmMDMDatenverarbetiung
End If
Dim sqlStringfehlendeLeistungsNr = "select count(*) from (SELECT Leistungen.LeistungsNr, Leistungen.LeistungsBez,tblIDSTransactionsNew.KdNrVERAG FROM Leistungen INNER Join tbl_IDS_Länder On Leistungen.LeistungsNr = tbl_IDS_Länder.LeistungsNr INNER Join tblIDSTransactionsNew On tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode Left JOIN Offertenpositionen on Offertenpositionen.KundenNr IN (select tblIDSTransactionsNew.KdNrVERAG from tblIDSTransactionsNew where cast(tblIDSTransactionsNew.YearMonthDay As Date) = '" & DateTimePicker2.Text & "') and Leistungen.LeistungsNr = Offertenpositionen.LeistungsNr and ( Offertenpositionen.OffertenNr=17 or Offertenpositionen.OffertenNr=21) where cast(tblIDSTransactionsNew.YearMonthDay As Date) = '" & DateTimePicker2.Text & "' and Offertenpositionen.LeistungsNr is null Group by Leistungen.LeistungsNr, Leistungen.LeistungsBez,tblIDSTransactionsNew.KdNrVERAG ) as t1" 'Verag360 und VeragAG
Dim fehlendeLeistungsNr As Integer = CInt((New SQL).getValueTxtBySql(sqlStringfehlendeLeistungsNr, "FMZOLL"))
If fehlendeLeistungsNr > 0 Then
pruefData_IDS = False
MsgBox("Bei " & fehlendeLeistungsNr & " Leistungen fehlt die Offertenzuweisung !" & vbNewLine & "Diese Offerten (von Rechnungsdatum " & DateTimePicker2.Text & ") müssen nachgetragen werden.")
Return False
End If
Dim OBONumberOderVRNumberfehlern As Integer = 0
OBONumberOderVRNumberfehlern = CInt((New SQL).getValueTxtBySql("select count(*) from [tblIDSTransactionsNew] WHERE cast(YearMonthDay as Date) = '" & DateTimePicker2.Text & "' AND tblIDSTransactionsNew.[UStVAn_ID] is null AND [VRNumber] is null AND [OBONumber] is null", "FMZOLL"))
@@ -4293,7 +4302,7 @@ Public Class frmMDMDatenverarbetiung
PictureBox1.Visible = True
End If
Case "UTA"
If SQL.doSQL("UPDATE [tblUTAImportNew] set abgerechnet=1 where abgerechnetDatum is not null and abgerechnet <> 1 And and tblUTAImportNew.Rechnungsdatum = '" & DateTimePicker2.Text & "'", "FMZOLL") Then
If SQL.doSQL("UPDATE [tblUTAImportNew] set abgerechnet=1 where abgerechnetDatum is not null and isnull(abgerechnet,0) = 0 And and tblUTAImportNew.Rechnungsdatum = '" & DateTimePicker2.Text & "'", "FMZOLL") Then
PictureBox1.Visible = True
End If
Case "MSE"
@@ -4301,21 +4310,21 @@ Public Class frmMDMDatenverarbetiung
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
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.chargedDatetime is not null and isnull(trans.charged) = 0 ", "FMZOLL") Then
PictureBox1.Visible = True
End If
Case "IDS"
If SQL.doSQL("UPDATE [VERAG].[dbo].[tblIDSTransactionsNew] Set charged = 1
FROM [VERAG].[dbo].[tblIDSTransactionsNew]
where cast(tblIDSTransactionsNew.YearMonthDay As Date) = '" & DateTimePicker2.Text & "' and chargedDatetime is not null and charged <> 1 and tblIDSTransactionsNew.OutletCountryCode <> 740543 ") Then
where cast(tblIDSTransactionsNew.YearMonthDay As Date) = '" & DateTimePicker2.Text & "' and chargedDatetime is not null and isnull(charged,0) = 0 and tblIDSTransactionsNew.OutletCountryCode <> 740543 ", "FMZOLL") Then
PictureBox1.Visible = True
End If
Case "IDS_AT"
If SQL.doSQL("UPDATE [VERAG].[dbo].[tblIDSTransactionsNew] Set charged = 1
FROM [VERAG].[dbo].[tblIDSTransactionsNew]
where cast(tblIDSTransactionsNew.YearMonthDay As Date) = '" & DateTimePicker2.Text & "' and chargedDatetime is not null and charged <> 1 and tblIDSTransactionsNew.OutletCountryCode = 740543 ") Then
where cast(tblIDSTransactionsNew.YearMonthDay As Date) = '" & DateTimePicker2.Text & "' and chargedDatetime is not null and isnull(charged,0) = 0 and tblIDSTransactionsNew.OutletCountryCode = 740543 ", "FMZOLL") Then
PictureBox1.Visible = True
End If
Case Else

View File

@@ -35,7 +35,7 @@ Partial Class usrCntlMDMDatenverarbeitungAuswertungen_divers
Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button6.Image = Global.SDL.My.Resources.Resources.statistik_small
Me.Button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button6.Location = New System.Drawing.Point(13, 6)
Me.Button6.Location = New System.Drawing.Point(6, 3)
Me.Button6.Name = "Button6"
Me.Button6.Padding = New System.Windows.Forms.Padding(0, 0, 2, 0)
Me.Button6.Size = New System.Drawing.Size(149, 41)
@@ -49,7 +49,7 @@ Partial Class usrCntlMDMDatenverarbeitungAuswertungen_divers
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Image = Global.SDL.My.Resources.Resources.statistik_small
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(13, 64)
Me.Button1.Location = New System.Drawing.Point(6, 61)
Me.Button1.Name = "Button1"
Me.Button1.Padding = New System.Windows.Forms.Padding(0, 0, 2, 0)
Me.Button1.Size = New System.Drawing.Size(149, 41)
@@ -61,7 +61,7 @@ Partial Class usrCntlMDMDatenverarbeitungAuswertungen_divers
'cbxNurEULander
'
Me.cbxNurEULander.AutoSize = True
Me.cbxNurEULander.Location = New System.Drawing.Point(67, 47)
Me.cbxNurEULander.Location = New System.Drawing.Point(60, 44)
Me.cbxNurEULander.Name = "cbxNurEULander"
Me.cbxNurEULander.Size = New System.Drawing.Size(95, 17)
Me.cbxNurEULander.TabIndex = 50
@@ -74,7 +74,7 @@ Partial Class usrCntlMDMDatenverarbeitungAuswertungen_divers
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Image = Global.SDL.My.Resources.Resources.statistik_small
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button2.Location = New System.Drawing.Point(168, 6)
Me.Button2.Location = New System.Drawing.Point(161, 3)
Me.Button2.Name = "Button2"
Me.Button2.Padding = New System.Windows.Forms.Padding(0, 0, 2, 0)
Me.Button2.Size = New System.Drawing.Size(130, 41)
@@ -86,7 +86,7 @@ Partial Class usrCntlMDMDatenverarbeitungAuswertungen_divers
'cbxConsFakt
'
Me.cbxConsFakt.AutoSize = True
Me.cbxConsFakt.Location = New System.Drawing.Point(231, 47)
Me.cbxConsFakt.Location = New System.Drawing.Point(224, 44)
Me.cbxConsFakt.Name = "cbxConsFakt"
Me.cbxConsFakt.Size = New System.Drawing.Size(70, 17)
Me.cbxConsFakt.TabIndex = 52
@@ -100,7 +100,7 @@ Partial Class usrCntlMDMDatenverarbeitungAuswertungen_divers
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.Image = Global.SDL.My.Resources.Resources.statistik_small
Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button3.Location = New System.Drawing.Point(168, 64)
Me.Button3.Location = New System.Drawing.Point(161, 61)
Me.Button3.Name = "Button3"
Me.Button3.Padding = New System.Windows.Forms.Padding(0, 0, 2, 0)
Me.Button3.Size = New System.Drawing.Size(130, 41)
@@ -122,7 +122,7 @@ Partial Class usrCntlMDMDatenverarbeitungAuswertungen_divers
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Button6)
Me.Name = "usrCntlMDMDatenverarbeitungAuswertungen_divers"
Me.Size = New System.Drawing.Size(301, 114)
Me.Size = New System.Drawing.Size(295, 104)
Me.ResumeLayout(False)
Me.PerformLayout()

View File

@@ -53,10 +53,10 @@ Public Class usrCntlMDMDatenverarbeitungAuswertungen_divers
Case "IDS"
Button6.Visible = False
Button2.Visible = False
Button6.Text = "Nach Spezifikation"
Button2.Text = "Leistungsnummern"
Button6.Visible = True
Button2.Text = "Nach Spezifikation"
Button6.Text = "fehl. Offerten"
Button1.Text = "Kunden"
Button3.Text = "Ländercodes"
Button3.Visible = True
@@ -100,6 +100,10 @@ Public Class usrCntlMDMDatenverarbeitungAuswertungen_divers
genMSEBericht("SPEZ")
Case "IDS"
genIDSBericht("OFFERTEN")
Case Else
MsgBox("nicht definiert!")
@@ -148,6 +152,7 @@ Public Class usrCntlMDMDatenverarbeitungAuswertungen_divers
Case "MSE"
genMSEBericht("LENR")
End Select
@@ -596,9 +601,13 @@ Public Class usrCntlMDMDatenverarbeitungAuswertungen_divers
ORDER BY
tblIDSTransactionsNew.[CustomerCode];"
Case "TRANS"
Case "OFFERTEN"
sqlstr = ""
sqlstr = "select Leistungen.LeistungsNr, Leistungen.LeistungsBez,tblIDSTransactionsNew.KdNrVERAG FROM Leistungen
INNER Join tbl_IDS_Länder On Leistungen.LeistungsNr = tbl_IDS_Länder.LeistungsNr
INNER Join tblIDSTransactionsNew On tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode
Left JOIN Offertenpositionen on Offertenpositionen.KundenNr IN (select tblIDSTransactionsNew.KdNrVERAG from tblIDSTransactionsNew where cast(tblIDSTransactionsNew.YearMonthDay As Date) = '" & MAIN.DateTimePicker2.Text & "') and Leistungen.LeistungsNr = Offertenpositionen.LeistungsNr and ( Offertenpositionen.OffertenNr=17 or Offertenpositionen.OffertenNr=21)
where cast(tblIDSTransactionsNew.YearMonthDay As Date) = '" & MAIN.DateTimePicker2.Text & "' and Offertenpositionen.LeistungsNr is null Group by Leistungen.LeistungsNr, Leistungen.LeistungsBez,tblIDSTransactionsNew.KdNrVERAG"
Case Else
MsgBox("Auswertungsart nicht definiert!")