CBAM
This commit is contained in:
@@ -1086,70 +1086,70 @@ Public Class usrCntlCBAM
|
|||||||
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
btnCBAM_DS_DAKOSY_Summe.Enabled = False
|
'btnCBAM_DS_DAKOSY_Summe.Enabled = False
|
||||||
btnCBAM_DS_DAKOSY_Summe.Tag = ""
|
'btnCBAM_DS_DAKOSY_Summe.Tag = ""
|
||||||
|
|
||||||
Try
|
'Try
|
||||||
Dim EORI = txtEori.Text
|
' Dim EORI = txtEori.Text
|
||||||
If cbxVERAG.Checked Then EORI = "VERAG"
|
' If cbxVERAG.Checked Then EORI = "VERAG"
|
||||||
If EORI = "" Then MsgBox("EORI eingeben!") : Exit Sub
|
' If EORI = "" Then MsgBox("EORI eingeben!") : Exit Sub
|
||||||
If txtVon._value = "" Then MsgBox("Datum von eingeben!") : Exit Sub
|
' If txtVon._value = "" Then MsgBox("Datum von eingeben!") : Exit Sub
|
||||||
If txtBis._value = "" Then MsgBox("Datum bis eingeben!") : Exit Sub
|
' If txtBis._value = "" Then MsgBox("Datum bis eingeben!") : Exit Sub
|
||||||
Me.Cursor = Cursors.WaitCursor
|
' Me.Cursor = Cursors.WaitCursor
|
||||||
|
|
||||||
Dim SQLSTR = "
|
' Dim SQLSTR = "
|
||||||
SELECT
|
' SELECT
|
||||||
left(ezaWP_WarennummerEZT,8) Tarifnummer,sum(ezaWP_Eigenmasse)Eigenmasse,sum(ezaWP_Rohmasse)Rohmasse,sum(ezaWP_Artikelpreis)Rechnungspreis,eza_VersendungsLandCode VersendungsLand ,isnull(ezaWP_AnmeldeVErfahren,'') Verfahren,isnull([ezaWP_VerfahrensCodeVorangegangenesVerfahren],'') VorangegangenesVerfahren
|
' left(ezaWP_WarennummerEZT,8) Tarifnummer,sum(ezaWP_Eigenmasse)Eigenmasse,sum(ezaWP_Rohmasse)Rohmasse,sum(ezaWP_Artikelpreis)Rechnungspreis,eza_VersendungsLandCode VersendungsLand ,isnull(ezaWP_AnmeldeVErfahren,'') Verfahren,isnull([ezaWP_VerfahrensCodeVorangegangenesVerfahren],'') VorangegangenesVerfahren
|
||||||
|
|
||||||
FROM [VERAG].[dbo].[tblDakosy_EZA]
|
' FROM [VERAG].[dbo].[tblDakosy_EZA]
|
||||||
inner join tblDakosy_EZA_Warenposition on ezaWP_EzaId=eza_Id
|
' inner join tblDakosy_EZA_Warenposition on ezaWP_EzaId=eza_Id
|
||||||
where
|
' where
|
||||||
eza_anmeldedatum between '" & txtVon._value & "' and '" & txtBis._value & "'
|
' eza_anmeldedatum between '" & txtVon._value & "' and '" & txtBis._value & "'
|
||||||
and
|
' and
|
||||||
(
|
' (
|
||||||
left(ezaWP_WarennummerEZT,4) IN (2523,2716,2808,2814,3102,3105,7201,7203,7318,7326,7601,7616)
|
' left(ezaWP_WarennummerEZT,4) IN (2523,2716,2808,2814,3102,3105,7201,7203,7318,7326,7601,7616)
|
||||||
OR left(ezaWP_WarennummerEZT,4) between 7301 and 7311
|
' OR left(ezaWP_WarennummerEZT,4) between 7301 and 7311
|
||||||
OR left(ezaWP_WarennummerEZT,4) between 7205 and 7229
|
' OR left(ezaWP_WarennummerEZT,4) between 7205 and 7229
|
||||||
OR left(ezaWP_WarennummerEZT,4) between 7603 and 7614
|
' OR left(ezaWP_WarennummerEZT,4) between 7603 and 7614
|
||||||
OR ezaWP_WarennummerEZT like '25070080%'
|
' OR ezaWP_WarennummerEZT like '25070080%'
|
||||||
OR ezaWP_WarennummerEZT like '283421%'
|
' OR ezaWP_WarennummerEZT like '283421%'
|
||||||
OR ezaWP_WarennummerEZT like '260112%'
|
' OR ezaWP_WarennummerEZT like '260112%'
|
||||||
OR ezaWP_WarennummerEZT like '720211%'
|
' OR ezaWP_WarennummerEZT like '720211%'
|
||||||
OR ezaWP_WarennummerEZT like '720219%'
|
' OR ezaWP_WarennummerEZT like '720219%'
|
||||||
OR ezaWP_WarennummerEZT like '720241%'
|
' OR ezaWP_WarennummerEZT like '720241%'
|
||||||
OR ezaWP_WarennummerEZT like '720249%'
|
' OR ezaWP_WarennummerEZT like '720249%'
|
||||||
OR ezaWP_WarennummerEZT like '720260%'
|
' OR ezaWP_WarennummerEZT like '720260%'
|
||||||
OR ezaWP_WarennummerEZT like '280410%'
|
' OR ezaWP_WarennummerEZT like '280410%'
|
||||||
|
|
||||||
)
|
' )
|
||||||
and ezaWP_WarennummerEZT not like '310560%'
|
' and ezaWP_WarennummerEZT not like '310560%'
|
||||||
and (eza_status between 50 and 60 or [eza_ANR] LIKE 'ATC%')
|
' and (eza_status between 50 and 60 or [eza_ANR] LIKE 'ATC%')
|
||||||
|
|
||||||
"
|
' "
|
||||||
|
|
||||||
If cbxVERAG.Checked Then
|
' If cbxVERAG.Checked Then
|
||||||
SQLSTR &= "
|
' SQLSTR &= "
|
||||||
and eza_VertretungsVerhaeltnisCode=2
|
' and eza_VertretungsVerhaeltnisCode=2
|
||||||
"
|
' "
|
||||||
Else
|
' Else
|
||||||
SQLSTR &= "
|
' SQLSTR &= "
|
||||||
and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
' and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||||
"
|
' "
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
SQLSTR &= " group by eza_VersendungsLandCode,left(ezaWP_WarennummerEZT,8),ezaWP_AnmeldeVErfahren,ezaWP_VerfahrensCodeVorangegangenesVerfahren"
|
' SQLSTR &= " group by eza_VersendungsLandCode,left(ezaWP_WarennummerEZT,8),ezaWP_AnmeldeVErfahren,ezaWP_VerfahrensCodeVorangegangenesVerfahren"
|
||||||
|
|
||||||
|
|
||||||
Dim dt = SQL.loadDgvBySql(SQLSTR, "FMZOLL", 600)
|
' Dim dt = SQL.loadDgvBySql(SQLSTR, "FMZOLL", 600)
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
' If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
Dim path = VERAG_PROG_ALLGEMEIN.cProgramFunctions.genExcelFromDT_NEW(dt,,,,, False, EORI & "_Summenbericht_" & txtVon._value & "-" & txtBis._value)
|
' Dim path = VERAG_PROG_ALLGEMEIN.cProgramFunctions.genExcelFromDT_NEW(dt,,,,, False, EORI & "_Summenbericht_" & txtVon._value & "-" & txtBis._value)
|
||||||
btnCBAM_DS_DAKOSY_Summe.Tag = path
|
' btnCBAM_DS_DAKOSY_Summe.Tag = path
|
||||||
btnCBAM_DS_DAKOSY_Summe.Enabled = True
|
' btnCBAM_DS_DAKOSY_Summe.Enabled = True
|
||||||
btnCBAM_DS_DAKOSY_Copy.Enabled = True
|
' btnCBAM_DS_DAKOSY_Copy.Enabled = True
|
||||||
|
|
||||||
Me.Cursor = Cursors.Default
|
' Me.Cursor = Cursors.Default
|
||||||
|
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1168,12 +1168,9 @@ Public Class usrCntlCBAM
|
|||||||
|
|
||||||
''---------------------------------------------------------------------------------------------------------------------------------------------
|
''---------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Catch ex As Exception
|
'Catch ex As Exception
|
||||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
' VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
'End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Me.Cursor = Cursors.Default
|
Me.Cursor = Cursors.Default
|
||||||
|
|||||||
Reference in New Issue
Block a user