Kundenübersciht Layout

This commit is contained in:
2023-06-02 09:10:09 +02:00
parent 0b0374cbb2
commit fbdefbb615
5 changed files with 94 additions and 69 deletions

View File

@@ -11,7 +11,7 @@ Public Class rptKontrolleLKW_NCTSTR
Dim kundenSQL As New kundenSQL
Dim SUB_DATA As DataTable = Nothing
Dim LIST_NCTSABR As VERAG_PROG_ALLGEMEIN.cAbrechnung_NCTSBrg_LIST = Nothing
'Public brg As String = "05DE0000000009345," 'default brg
Public GRN As String = "" '"05DE0000000009345," 'default brg
Public erstelltVon As String = ""
Dim groupKz = True 'Es kann nach Kennzeichen groupiert werden
@@ -87,7 +87,11 @@ Public Class rptKontrolleLKW_NCTSTR
Dim sqlStr As String = " SELECT " & If(Not groupKz, " ncts_id, ", "") & " isnull(ncts_Befoerderungsmittel_KennzeichenAbgang,'') as Kennzeichen, cast(ncts_Eroeffnung as date) as AnmeldungsDatum,COUNT(*) ,isnull(SUM(nctsSA_AbgabenBetrag),0) as GarantieWert,isnull(SUM(ncts_VERAG_WeiterverrechungSatz),0) ncts_VERAG_WeiterverrechungSatz FROM tblNCTS_TR_Sicherheitsangaben inner join tblNCTS_TR on ncts_Id = nctsSA_NctsId "
sqlStr &= " WHERE cast (ncts_Eroeffnung as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "'"
sqlStr &= " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
If GRN <> "" Then
sqlStr &= " AND nctsSA_GRN IN ( '" & GRN & "' ) "
Else
sqlStr &= " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
End If
sqlStr &= " AND ncts_status BETWEEN 50 AND 60 "
'sqlStr &= " AND ncts_status BETWEEN 50 AND 80 "
sqlStr &= firmaStr
@@ -100,7 +104,11 @@ Public Class rptKontrolleLKW_NCTSTR
Dim sqlStrSUB As String = " SELECT *, isnull(nctsSA_AbgabenBetrag,0) as GarantieWert,isnull(ncts_Befoerderungsmittel_KennzeichenAbgang,'') as Kennzeichen,cast(ncts_Eroeffnung as date) as AnmeldungsDatum,cast(ncts_Ankunft as date) as ncts_Ankunft,cast(ncts_Erledigung as date) as ncts_Erledigung,ncts_VERAG_WeiterverrechungSatz FROM tblNCTS_TR_Sicherheitsangaben inner join tblNCTS_TR on ncts_Id = nctsSA_NctsId "
sqlStrSUB &= " WHERE cast(ncts_Eroeffnung as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "'"
sqlStrSUB &= " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
If GRN <> "" Then
sqlStr &= " AND nctsSA_GRN IN ( '" & GRN & "' ) "
Else
sqlStr &= " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
End If
sqlStrSUB &= " AND ncts_status BETWEEN 50 AND 60 "
'sqlStrSUB &= " AND ncts_status BETWEEN 50 AND 80 "
sqlStrSUB &= firmaStr

View File

@@ -156,12 +156,13 @@ Public Class frmPrintLayout
Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous
End Sub
Public Sub AuswertungKontrolleLKW_NCTSTR(datvon, datbis, FIRMA)
Public Sub AuswertungKontrolleLKW_NCTSTR(datvon, datbis, FIRMA, GRN)
Me.Text = "Auswertung LKWs"
Dim report As rptKontrolleLKW_NCTSTR = New rptKontrolleLKW_NCTSTR
report.datVon = datvon
report.datBis = datbis
report.FIRMA = FIRMA
report.GRN = GRN
report.erstelltVon = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
Viewer.LoadDocument(report)
Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous