iDS, MDM
This commit is contained in:
@@ -53,10 +53,12 @@ Public Class usrCntlMDMDatenverarbeitungAuswertungen_divers
|
||||
|
||||
Case "IDS"
|
||||
|
||||
Button6.Visible = False
|
||||
Button2.Visible = False
|
||||
Button6.Text = "Nach Spezifikation"
|
||||
Button2.Text = "Leistungsnummern"
|
||||
Button1.Text = "Kunden"
|
||||
Button3.Text = "fehlende Transakt."
|
||||
Button3.Text = "Ländercodes"
|
||||
Button3.Visible = True
|
||||
|
||||
|
||||
@@ -122,6 +124,9 @@ Public Class usrCntlMDMDatenverarbeitungAuswertungen_divers
|
||||
Case "MSE"
|
||||
genMSEBericht("KDNR")
|
||||
|
||||
Case "IDS"
|
||||
genIDSBericht("KDNR")
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
@@ -498,6 +503,153 @@ Public Class usrCntlMDMDatenverarbeitungAuswertungen_divers
|
||||
|
||||
|
||||
|
||||
' 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 genIDSBericht(art As String)
|
||||
|
||||
Dim sqlstr = ""
|
||||
|
||||
Select Case art
|
||||
|
||||
Case "LAENDERCODES"
|
||||
|
||||
sqlstr = "SELECT
|
||||
tblIDSTransactionsNew.[OutletCountryCode],
|
||||
tbl_IDS_Länder.OutletCountry,
|
||||
tblIDSTransactionsNew.[ProductTypeCode],
|
||||
tbl_IDS_Produkte.ProductDescription,
|
||||
tbl_IDS_Rechenwerte.Rechenwert
|
||||
FROM
|
||||
tblIDSTransactionsNew
|
||||
LEFT JOIN tbl_IDS_Rechenwerte
|
||||
ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Rechenwerte.OutletCountryCode
|
||||
AND tblIDSTransactionsNew.[ProductTypeCode] = tbl_IDS_Rechenwerte.ProductTypeCode
|
||||
LEFT JOIN tbl_IDS_Produkte
|
||||
ON tblIDSTransactionsNew.[ProductTypeCode] = tbl_IDS_Produkte.ProductTypeCode
|
||||
LEFT JOIN tbl_IDS_Länder
|
||||
ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode
|
||||
WHERE
|
||||
tbl_IDS_Rechenwerte.OutletCode IS NULL
|
||||
AND tbl_IDS_Rechenwerte.CustomerCode IS NULL AND cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & MAIN.DateTimePicker2.Text & "'
|
||||
GROUP BY
|
||||
tblIDSTransactionsNew.[OutletCountryCode],
|
||||
tbl_IDS_Länder.OutletCountry,
|
||||
tblIDSTransactionsNew.[ProductTypeCode],
|
||||
tbl_IDS_Produkte.ProductDescription,
|
||||
tbl_IDS_Rechenwerte.Rechenwert
|
||||
HAVING
|
||||
tbl_IDS_Rechenwerte.Rechenwert IS NULL
|
||||
ORDER BY
|
||||
tblIDSTransactionsNew.[OutletCountryCode],
|
||||
tblIDSTransactionsNew.[ProductTypeCode];"
|
||||
|
||||
Case "KDNR"
|
||||
|
||||
sqlstr = "SELECT
|
||||
tblIDSTransactionsNew.[CustomerCode],
|
||||
tblIDSTransactionsNew.[CustomerName],
|
||||
tblIDSTransactionsNew.KdNrVERAG,
|
||||
(SELECT Offerten.OffertenNr
|
||||
FROM Offerten
|
||||
WHERE Offerten.KundenNr = ISNULL(tblIDSTransactionsNew.KdNrVERAG, 0)
|
||||
AND Offerten.OffertenNr = 17) AS Offerte_17,
|
||||
(SELECT Offerten.OffertenNr
|
||||
FROM Offerten
|
||||
WHERE Offerten.KundenNr = ISNULL(tblIDSTransactionsNew.KdNrVERAG, 0)
|
||||
AND Offerten.OffertenNr = 21) AS Offerte_21
|
||||
FROM
|
||||
tblIDSTransactionsNew
|
||||
WHERE
|
||||
cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & MAIN.DateTimePicker2.Text & "'
|
||||
GROUP BY
|
||||
tblIDSTransactionsNew.[CustomerCode],
|
||||
tblIDSTransactionsNew.[CustomerName],
|
||||
tblIDSTransactionsNew.KdNrVERAG
|
||||
HAVING
|
||||
(tblIDSTransactionsNew.KdNrVERAG IS NULL
|
||||
OR (tblIDSTransactionsNew.KdNrVERAG IS NOT NULL
|
||||
AND (SELECT Offerten.OffertenNr
|
||||
FROM Offerten
|
||||
WHERE Offerten.KundenNr = ISNULL(tblIDSTransactionsNew.KdNrVERAG, 0)
|
||||
AND Offerten.OffertenNr = 17) IS NULL)
|
||||
OR (tblIDSTransactionsNew.KdNrVERAG IS NOT NULL
|
||||
AND (SELECT Offerten.OffertenNr
|
||||
FROM Offerten
|
||||
WHERE Offerten.KundenNr = ISNULL(tblIDSTransactionsNew.KdNrVERAG, 0)
|
||||
AND Offerten.OffertenNr = 21) IS NULL))
|
||||
AND CustomerCode not in (60013994, 60004479)
|
||||
|
||||
ORDER BY
|
||||
tblIDSTransactionsNew.[CustomerCode];"
|
||||
|
||||
Case "TRANS"
|
||||
|
||||
sqlstr = ""
|
||||
|
||||
Case Else
|
||||
MsgBox("Auswertungsart nicht definiert!")
|
||||
Exit Sub
|
||||
|
||||
End Select
|
||||
|
||||
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||
Dim print As New frmPrintLayout
|
||||
print.Text = "IDS"
|
||||
If dt Is Nothing OrElse dt.Rows.Count = 0 Then
|
||||
MsgBox("Keine Daten!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
cProgramFunctions.genExcelCSVFromDT(dt, True)
|
||||
|
||||
'DEAKVIERT weil zu aufwendig, aktuell per Excel-Export
|
||||
'Dim rpt As New rptPLOSE_LaenderGesamt
|
||||
'rpt.DataSource = dt
|
||||
|
||||
'Dim sum = 0
|
||||
'' rpt.lblUeberschrift.Text = "PLOSE Summenbericht " & dat_Sum_Von.Text & " bis " & dat_Sum_Bis.Text
|
||||
'rpt.lblSachbearbeiter.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
|
||||
''rpt.lblMandantNiederlassung.Text = PERSONAL.Mandant & " / " & PERSONAL.Niederlassung
|
||||
|
||||
''Dim cnt As Integer = 0
|
||||
'rpt.lblDat.Text = Now.ToLongDateString
|
||||
|
||||
|
||||
'Dim sumPreis As Double = 0
|
||||
'Dim sumNetto As Double = 0
|
||||
'Dim sumMWST As Double = 0
|
||||
'Dim sumBrutto As Double = 0
|
||||
'Dim sumBruttoAlleLeistungen As Double = 0
|
||||
'Dim sumMenge As Double = 0
|
||||
|
||||
'AddHandler rpt.Detail.Format, Sub()
|
||||
' rpt.lblLand.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Rechnung").Value, "") & " - " & SQL.isDbnullEmpty(rpt.Fields.Item("Spezifikation_Id").Value, "")
|
||||
' rpt.lblEU.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Spezifikation").Value, "")
|
||||
|
||||
' rpt.lblNetto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaktionsbetrag_Netto").Value, 2, "")
|
||||
' rpt.lblMWST.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Steuerbetrag").Value, 2, "")
|
||||
' rpt.lblBrutto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaktionsbetrag_Brutto").Value, 2, "")
|
||||
|
||||
' sumNetto += SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaktionsbetrag_Netto").Value, 4, 0)
|
||||
' sumMWST += SQL.isDbnullEmptyDbl(rpt.Fields.Item("Steuerbetrag").Value, 4, 0)
|
||||
' sumBrutto += SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaktionsbetrag_Brutto").Value, 4, 0)
|
||||
|
||||
|
||||
|
||||
' End Sub
|
||||
|
||||
'AddHandler rpt.ReportFooter1.Format, Sub()
|
||||
@@ -622,6 +774,10 @@ Public Class usrCntlMDMDatenverarbeitungAuswertungen_divers
|
||||
Case "MSE"
|
||||
genMSEBericht("TRANS")
|
||||
|
||||
Case "IDS"
|
||||
genIDSBericht("LAENDERCODES")
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user