Laufzettel NCTS5
This commit is contained in:
@@ -49,30 +49,30 @@ Public Class subRptLaufzettelZollDE_ATA
|
||||
|
||||
If Me.DataSource IsNot Nothing AndAlso Me.Fields IsNot Nothing AndAlso Me.Fields.Item("ATA").Value IsNot Nothing Then
|
||||
Dim ATAMRN As String = Me.Fields.Item("ATA").Value
|
||||
ATAMRN = ATAMRN.Replace(" ", "")
|
||||
ATAMRN = ATAMRN.Replace("/", "")
|
||||
ATAMRN = ATAMRN.Replace("-", "")
|
||||
|
||||
txtATAMRN.Text = ATAMRN
|
||||
If ATAMRN <> "" Then
|
||||
Dim barcodeString = ATAMRN
|
||||
barcodeString = barcodeString.Replace(" ", "")
|
||||
barcodeString = barcodeString.Replace("/", "")
|
||||
barcodeString = barcodeString.Replace("-", "")
|
||||
Dim ACD = ""
|
||||
Dim monat = ""
|
||||
If barcodeString.StartsWith("ATA") And barcodeString.Length > 11 Then barcodeString = barcodeString.Substring(4, 7) : ACD = "A"
|
||||
If barcodeString.StartsWith("ATC") And barcodeString.Length > 11 Then barcodeString = barcodeString.Substring(5, 6) : ACD = "C"
|
||||
If barcodeString.StartsWith("ATD") And barcodeString.Length > 11 Then barcodeString = barcodeString.Substring(5, 6) : ACD = "D"
|
||||
|
||||
If ATAMRN.Length > 13 Then monat = ATAMRN.Substring(11, 2)
|
||||
If barcodeString.Length > 13 Then monat = barcodeString.Substring(11, 2)
|
||||
|
||||
If ACD <> "" Then 'ATA/C/D
|
||||
txtATNr.Visible = True
|
||||
If IsNumeric(barcodeString) Then barcodeString = CInt(barcodeString).ToString()
|
||||
txtATNr.Value = ACD & " " & barcodeString & " / " & monat
|
||||
picBarcodeATAMRN.Visible = False
|
||||
ElseIf barcodeString.Length > 10 Then 'grobe Pr<50>fung der L<>nge, ob es eine g<>ltige ATA Nr sein kann..
|
||||
ElseIf ATAMRN.Length > 10 Then 'grobe Pr<50>fung der L<>nge, ob es eine g<>ltige ATA Nr sein kann..
|
||||
txtATNr.Visible = False
|
||||
|
||||
Dim barcodeATA As Image = Code128Rendering.MakeBarcodeImage(barcodeString, 1, True, 20)
|
||||
Dim barcodeATA As Image = Code128Rendering.MakeBarcodeImage(ATAMRN, 1, True, 20)
|
||||
'barcodeATA.RotateFlip(RotateFlipType.Rotate270FlipNone)
|
||||
picBarcodeATAMRN.Image = barcodeATA
|
||||
picBarcodeATAMRN.Visible = True
|
||||
|
||||
@@ -2118,7 +2118,6 @@ Public Class FormularManagerNEU
|
||||
AddHandler rpt.Detail.Format, Sub()
|
||||
Dim SND As VERAG_PROG_ALLGEMEIN.cSendungen = SENDUNGEN(rpt.Fields.Item("Nr").Value)
|
||||
|
||||
|
||||
Dim ZOLLANMELDUNG As New DAKOSY_Worker.cZollsysteme_Aktenbeschriftung
|
||||
ZOLLANMELDUNG.getDataByBezugsnummer(SND.FilialenNr & "/" & SND.AbfertigungsNr, SND.tblSnd_Abfertigungsart_ID.ToString, SND.tblSnd_DakosyRef, AVISO.Grenzstelle) ' Die weiteren Daten werden hier geladen
|
||||
|
||||
@@ -2218,6 +2217,8 @@ Public Class FormularManagerNEU
|
||||
|
||||
ATAMRN = ZOLLANMELDUNG.getATAMRNBezugsnummer(SND.FilialenNr & "/" & SND.AbfertigungsNr, SND.tblSnd_Abfertigungsart_ID.ToString, SND.tblSnd_DakosyRef)
|
||||
|
||||
|
||||
|
||||
Dim Colli As Double = 0
|
||||
Dim Gewicht As Double = 0
|
||||
If ZOLLANMELDUNG.num_Colli > 0 Then
|
||||
|
||||
77
SDL/zoll/usrCntlZOLLAuswertungen.Designer.vb
generated
77
SDL/zoll/usrCntlZOLLAuswertungen.Designer.vb
generated
@@ -254,6 +254,9 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.Button14 = New System.Windows.Forms.Button()
|
||||
Me.PictureBox8 = New System.Windows.Forms.PictureBox()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Label95 = New System.Windows.Forms.Label()
|
||||
Me.cboDY_NCTS = New VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
CType(Me.picDurmaz, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -296,6 +299,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.GroupBox9.SuspendLayout()
|
||||
CType(Me.PictureBox8, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label3
|
||||
@@ -303,7 +307,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label3.ForeColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.Label3.Location = New System.Drawing.Point(6, 18)
|
||||
Me.Label3.Location = New System.Drawing.Point(3, 13)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(257, 17)
|
||||
Me.Label3.TabIndex = 9
|
||||
@@ -327,7 +331,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.GroupBox1.Controls.Add(Me.datVon)
|
||||
Me.GroupBox1.Controls.Add(Me.Label1)
|
||||
Me.GroupBox1.Controls.Add(Me.btnNCTS)
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(5, 30)
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(2, 25)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(705, 93)
|
||||
Me.GroupBox1.TabIndex = 8
|
||||
@@ -1026,7 +1030,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.Label30.AutoSize = True
|
||||
Me.Label30.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label30.ForeColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.Label30.Location = New System.Drawing.Point(6, 128)
|
||||
Me.Label30.Location = New System.Drawing.Point(6, 18)
|
||||
Me.Label30.Name = "Label30"
|
||||
Me.Label30.Size = New System.Drawing.Size(336, 17)
|
||||
Me.Label30.TabIndex = 20
|
||||
@@ -1034,6 +1038,8 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
'
|
||||
'GroupBox5
|
||||
'
|
||||
Me.GroupBox5.Controls.Add(Me.Label95)
|
||||
Me.GroupBox5.Controls.Add(Me.cboDY_NCTS)
|
||||
Me.GroupBox5.Controls.Add(Me.cbxSplittungNachPos)
|
||||
Me.GroupBox5.Controls.Add(Me.cbxAnrechnungRefBetrag)
|
||||
Me.GroupBox5.Controls.Add(Me.Button8)
|
||||
@@ -1050,9 +1056,9 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.GroupBox5.Controls.Add(Me.datVonDy)
|
||||
Me.GroupBox5.Controls.Add(Me.Label38)
|
||||
Me.GroupBox5.Controls.Add(Me.Button5)
|
||||
Me.GroupBox5.Location = New System.Drawing.Point(5, 140)
|
||||
Me.GroupBox5.Location = New System.Drawing.Point(5, 30)
|
||||
Me.GroupBox5.Name = "GroupBox5"
|
||||
Me.GroupBox5.Size = New System.Drawing.Size(705, 93)
|
||||
Me.GroupBox5.Size = New System.Drawing.Size(705, 144)
|
||||
Me.GroupBox5.TabIndex = 19
|
||||
Me.GroupBox5.TabStop = False
|
||||
'
|
||||
@@ -1141,7 +1147,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.cboBrgDy.FormattingEnabled = True
|
||||
Me.cboBrgDy.Location = New System.Drawing.Point(439, 69)
|
||||
Me.cboBrgDy.Name = "cboBrgDy"
|
||||
Me.cboBrgDy.Size = New System.Drawing.Size(221, 21)
|
||||
Me.cboBrgDy.Size = New System.Drawing.Size(252, 21)
|
||||
Me.cboBrgDy.TabIndex = 12
|
||||
'
|
||||
'Label34
|
||||
@@ -1240,12 +1246,13 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.tbcntr.Location = New System.Drawing.Point(0, 57)
|
||||
Me.tbcntr.Name = "tbcntr"
|
||||
Me.tbcntr.SelectedIndex = 0
|
||||
Me.tbcntr.Size = New System.Drawing.Size(774, 1829)
|
||||
Me.tbcntr.Size = New System.Drawing.Size(757, 1829)
|
||||
Me.tbcntr.TabIndex = 22
|
||||
'
|
||||
'TabPage1
|
||||
'
|
||||
Me.TabPage1.AutoScroll = True
|
||||
Me.TabPage1.Controls.Add(Me.Panel1)
|
||||
Me.TabPage1.Controls.Add(Me.Label88)
|
||||
Me.TabPage1.Controls.Add(Me.Label82)
|
||||
Me.TabPage1.Controls.Add(Me.GroupBox13)
|
||||
@@ -1265,15 +1272,12 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.TabPage1.Controls.Add(Me.Label45)
|
||||
Me.TabPage1.Controls.Add(Me.Label44)
|
||||
Me.TabPage1.Controls.Add(Me.GroupBox6)
|
||||
Me.TabPage1.Controls.Add(Me.Label3)
|
||||
Me.TabPage1.Controls.Add(Me.Label30)
|
||||
Me.TabPage1.Controls.Add(Me.PictureBox3)
|
||||
Me.TabPage1.Controls.Add(Me.Label16)
|
||||
Me.TabPage1.Controls.Add(Me.pic)
|
||||
Me.TabPage1.Controls.Add(Me.PictureBox1)
|
||||
Me.TabPage1.Controls.Add(Me.ComboBox4)
|
||||
Me.TabPage1.Controls.Add(Me.Label8)
|
||||
Me.TabPage1.Controls.Add(Me.GroupBox1)
|
||||
Me.TabPage1.Controls.Add(Me.Label35)
|
||||
Me.TabPage1.Controls.Add(Me.GroupBox2)
|
||||
Me.TabPage1.Controls.Add(Me.GroupBox5)
|
||||
@@ -1283,7 +1287,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage1.Name = "TabPage1"
|
||||
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage1.Size = New System.Drawing.Size(766, 1803)
|
||||
Me.TabPage1.Size = New System.Drawing.Size(749, 1803)
|
||||
Me.TabPage1.TabIndex = 0
|
||||
Me.TabPage1.Text = "Bürgschaften"
|
||||
Me.TabPage1.UseVisualStyleBackColor = True
|
||||
@@ -2413,7 +2417,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
'PictureBox3
|
||||
'
|
||||
Me.PictureBox3.Image = Global.SDL.My.Resources.Resources.flagge_D
|
||||
Me.PictureBox3.Location = New System.Drawing.Point(349, 129)
|
||||
Me.PictureBox3.Location = New System.Drawing.Point(349, 19)
|
||||
Me.PictureBox3.Name = "PictureBox3"
|
||||
Me.PictureBox3.Size = New System.Drawing.Size(29, 16)
|
||||
Me.PictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
@@ -2423,7 +2427,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
'pic
|
||||
'
|
||||
Me.pic.Image = Global.SDL.My.Resources.Resources.flagge_D
|
||||
Me.pic.Location = New System.Drawing.Point(278, 19)
|
||||
Me.pic.Location = New System.Drawing.Point(275, 14)
|
||||
Me.pic.Name = "pic"
|
||||
Me.pic.Size = New System.Drawing.Size(29, 16)
|
||||
Me.pic.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
@@ -2447,7 +2451,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage2.Name = "TabPage2"
|
||||
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage2.Size = New System.Drawing.Size(601, 1803)
|
||||
Me.TabPage2.Size = New System.Drawing.Size(766, 1803)
|
||||
Me.TabPage2.TabIndex = 1
|
||||
Me.TabPage2.Text = "Kunden"
|
||||
Me.TabPage2.UseVisualStyleBackColor = True
|
||||
@@ -2478,7 +2482,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.TabPage3.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage3.Name = "TabPage3"
|
||||
Me.TabPage3.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage3.Size = New System.Drawing.Size(601, 1803)
|
||||
Me.TabPage3.Size = New System.Drawing.Size(766, 1803)
|
||||
Me.TabPage3.TabIndex = 2
|
||||
Me.TabPage3.Text = "Fiskalvertretung / EV-Veranlagung"
|
||||
Me.TabPage3.UseVisualStyleBackColor = True
|
||||
@@ -2513,7 +2517,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.TabPage4.Controls.Add(Me.UsrCntlAuswertungenAufschub_Abgabenliste1)
|
||||
Me.TabPage4.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage4.Name = "TabPage4"
|
||||
Me.TabPage4.Size = New System.Drawing.Size(601, 1803)
|
||||
Me.TabPage4.Size = New System.Drawing.Size(766, 1803)
|
||||
Me.TabPage4.TabIndex = 3
|
||||
Me.TabPage4.Text = "Aufschubdaten"
|
||||
Me.TabPage4.UseVisualStyleBackColor = True
|
||||
@@ -2542,7 +2546,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.TabPage5.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage5.Name = "TabPage5"
|
||||
Me.TabPage5.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage5.Size = New System.Drawing.Size(601, 1803)
|
||||
Me.TabPage5.Size = New System.Drawing.Size(766, 1803)
|
||||
Me.TabPage5.TabIndex = 4
|
||||
Me.TabPage5.Text = "UNISPED"
|
||||
Me.TabPage5.UseVisualStyleBackColor = True
|
||||
@@ -2750,9 +2754,39 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.pnl.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.pnl.Location = New System.Drawing.Point(0, 0)
|
||||
Me.pnl.Name = "pnl"
|
||||
Me.pnl.Size = New System.Drawing.Size(774, 57)
|
||||
Me.pnl.Size = New System.Drawing.Size(757, 57)
|
||||
Me.pnl.TabIndex = 23
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.Add(Me.Label3)
|
||||
Me.Panel1.Controls.Add(Me.GroupBox1)
|
||||
Me.Panel1.Controls.Add(Me.pic)
|
||||
Me.Panel1.Location = New System.Drawing.Point(526, 237)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(188, 38)
|
||||
Me.Panel1.TabIndex = 37
|
||||
Me.Panel1.Visible = False
|
||||
'
|
||||
'Label95
|
||||
'
|
||||
Me.Label95.AutoSize = True
|
||||
Me.Label95.Location = New System.Drawing.Point(145, 103)
|
||||
Me.Label95.Name = "Label95"
|
||||
Me.Label95.Size = New System.Drawing.Size(86, 13)
|
||||
Me.Label95.TabIndex = 23
|
||||
Me.Label95.Text = "NCTS-SYSTEM:"
|
||||
'
|
||||
'cboDY_NCTS
|
||||
'
|
||||
Me.cboDY_NCTS.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboDY_NCTS.DropDownWidth = 350
|
||||
Me.cboDY_NCTS.FormattingEnabled = True
|
||||
Me.cboDY_NCTS.Location = New System.Drawing.Point(148, 117)
|
||||
Me.cboDY_NCTS.Name = "cboDY_NCTS"
|
||||
Me.cboDY_NCTS.Size = New System.Drawing.Size(252, 21)
|
||||
Me.cboDY_NCTS.TabIndex = 22
|
||||
'
|
||||
'usrCntlZOLLAuswertungen
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -2762,7 +2796,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Me.Controls.Add(Me.tbcntr)
|
||||
Me.Controls.Add(Me.pnl)
|
||||
Me.Name = "usrCntlZOLLAuswertungen"
|
||||
Me.Size = New System.Drawing.Size(774, 1174)
|
||||
Me.Size = New System.Drawing.Size(757, 1174)
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.GroupBox1.PerformLayout()
|
||||
Me.GroupBox2.ResumeLayout(False)
|
||||
@@ -2821,6 +2855,8 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
CType(Me.PictureBox8, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -3056,4 +3092,7 @@ Partial Class usrCntlZOLLAuswertungen
|
||||
Friend WithEvents Button22 As Button
|
||||
Friend WithEvents Label94 As Label
|
||||
Friend WithEvents cboBRG_Verimex As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents Label95 As Label
|
||||
Friend WithEvents cboDY_NCTS As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents Panel1 As Panel
|
||||
End Class
|
||||
|
||||
@@ -117,6 +117,12 @@ Public Class usrCntlZOLLAuswertungen
|
||||
ComboBox2.SelectedIndex = 0
|
||||
|
||||
|
||||
cboDY_NCTS.Items.Clear()
|
||||
cboDY_NCTS.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("NCTS 5 (NEU)", "NCTS5"))
|
||||
cboDY_NCTS.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("NCTS 4", "NCTS4"))
|
||||
cboDY_NCTS.SelectedIndex = 0
|
||||
|
||||
|
||||
cboEZOLLBrg.Items.Clear()
|
||||
cboEZOLLBrg.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ALLE", ""))
|
||||
cboEZOLLBrg.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("05AT510000G000FP7 - AT Brg", "05AT510000G000FP7"))
|
||||
@@ -334,6 +340,15 @@ Public Class usrCntlZOLLAuswertungen
|
||||
|
||||
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs, Optional exportPDF As String = "", Optional exportEXCEL As String = "") Handles Button5.Click
|
||||
|
||||
Select Case cboDY_NCTS._value
|
||||
Case "NCTS4" : doDY_NCTS4(exportPDF, exportEXCEL)
|
||||
Case "NCTS5" : doDY_NCTS5(exportPDF, exportEXCEL)
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Sub doDY_NCTS4(Optional exportPDF As String = "", Optional exportEXCEL As String = "")
|
||||
Dim sqlStr = ""
|
||||
|
||||
If cbxSplittungNachPos.Checked Then
|
||||
@@ -357,6 +372,28 @@ Public Class usrCntlZOLLAuswertungen
|
||||
End Sub
|
||||
|
||||
|
||||
Sub doDY_NCTS5(Optional exportPDF As String = "", Optional exportEXCEL As String = "")
|
||||
Dim sqlStr = ""
|
||||
|
||||
If cbxSplittungNachPos.Checked Then
|
||||
sqlStr = getSQL_NCTS_ATLAS_DY_POS(datVonDy.Text, datBisDy.Text, txtStatVonDy.Text, txtStatBisDy.Text, DirectCast(cboBrgDy.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value, "", cbxAnrechnungRefBetrag.Checked, False)
|
||||
Else
|
||||
sqlStr = getSQL_NCTS_ATLAS_DY(datVonDy.Text, datBisDy.Text, txtStatVonDy.Text, txtStatBisDy.Text, DirectCast(cboBrgDy.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value, "", cbxAnrechnungRefBetrag.Checked, False)
|
||||
End If
|
||||
|
||||
|
||||
Dim frmPrintLayout As New frmPrintLayout()
|
||||
frmPrintLayout.AuswertungTKontrolleDY(sqlStr, datVonDy.Text, datBisDy.Text, txtStatVonDy.Text, txtStatBisDy.Text, DirectCast(cboBrgDy.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value, "")
|
||||
|
||||
If exportPDF = "" And exportEXCEL = "" Then
|
||||
frmPrintLayout.Show()
|
||||
Else
|
||||
AddHandler frmPrintLayout.Viewer.LoadCompleted, Sub()
|
||||
If exportPDF <> "" Then ExportToPDF(frmPrintLayout.Viewer.Document, exportPDF)
|
||||
If exportEXCEL <> "" Then ExportToExcel(frmPrintLayout.Viewer.Document, exportEXCEL)
|
||||
End Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button17_Click(sender As Object, e As EventArgs, Optional exportPDF As String = "", Optional exportEXCEL As String = "") Handles Button17.Click
|
||||
Dim sqlStr = ""
|
||||
@@ -400,6 +437,43 @@ Public Class usrCntlZOLLAuswertungen
|
||||
|
||||
|
||||
|
||||
' Dim sql As String = "SELECT ncts_MRN,ncts_Status,(nctsSA_AbgabenBetrag), ncts_dyaAnmID, ncts_ArtAnmeldung,nctsSA_GRN,ncts_Empfaenger_eori,ncts_Empfaenger_NLNR,ncts_Empfaenger_Name,ncts_Bearbeiter"
|
||||
Dim sqlStr = " SELECT '' as [Anzahl Verz], isnull(ncts_Status,'') as Status, '' as Niederlassung, isnull(ncts_ObjectName,'') as Bezugsnummer,'' as LfdNr,"
|
||||
If showANR Then sqlStr &= " isnull(ncts_ANR,'') as ArbNr,"
|
||||
sqlStr &= " isnull(ncts_Empfaenger_Name,'') as Empfaenger,isnull(ncts_MRN,'') as MRN,ncts_Trans_DatumZeit as Antragsdatum,isnull(ncts_Bearbeiter,'') as Sachbearbeiter,[ncts_Wiedergestellungsdatum] as Gestellungsdatum,isnull(nctsSA_AbgabenBetrag,0) as [Sichertheits-Betrag], isnull(nctsSA_GRN,'') as Buergschaft "
|
||||
'sql &= " ,[ncts_ObjectName],[ncts_Trans_DatumZeit] as Transaktionsdatum,[ncts_dyaArt],[ncts_ANR],[ncts_MRN],[ncts_ObjectAlias],[ncts_GesamtRohmasse],[ncts_GesamtAnzahlPackstuecke] "
|
||||
sqlStr &= ",(SELECT COUNT(*) FROM tblDakosy_NCTSOut_Warenposition where nctsWP_NctsId=ncts_Id) as POS"
|
||||
If anrechnungsZP Then sqlStr &= ",(SELECT TOP (1) convert(date,[dySt_ergZeitpunkt] ,104) FROM [tblDakosy_Statusmeldungen] where dySt_dyId=[ncts_dyaAnmID] and [dySt_status] IN (53,60) order by dySt_status) as AnrechnungRef"
|
||||
sqlStr &= " from tblDakosy_NCTSOut_Sicherheitsangaben inner join [VERAG].[dbo].[tblDakosy_NCTSOut] on ncts_Id = nctsSA_NctsId"
|
||||
sqlStr &= " WHERE ncts_Status between '" & StatVon & "' and '" & Statbis & "' "
|
||||
sqlStr &= " " & brg & " "
|
||||
sqlStr &= " AND CAST(ncts_Wiedergestellungsdatum as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "' "
|
||||
sqlStr &= " ORDER BY [ncts_Wiedergestellungsdatum] ASC "
|
||||
MsgBox(sqlStr)
|
||||
Return sqlStr
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Function getSQL_NCTS004_ATLAS_DY(datVon As Date, datBis As Date, StatVon As String, Statbis As String, brg As String, nl As String, Optional anrechnungsZP As Boolean = False, Optional showANR As Boolean = True)
|
||||
|
||||
If brg <> "" Then
|
||||
brg = " AND nctsSA_GRN = '" & brg & "' "
|
||||
Else
|
||||
|
||||
Dim brg_AT As String = "05AT510000G000FP7"
|
||||
Dim brg_AT_IMEX As String = "16AT520000G000VA6"
|
||||
Dim brg_DE As String = "05DE0000000009345"
|
||||
Dim brg_DE_NEU As String = "17DE0000000071678"
|
||||
Dim brg_AT_ATILLA As String = "20AT520000G000092"
|
||||
|
||||
brg = " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_AT_IMEX & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "', '" & brg_AT_ATILLA & "' ) "
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'*XXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
' Dim sql As String = "SELECT ncts_MRN,ncts_Status,(nctsSA_AbgabenBetrag), ncts_dyaAnmID, ncts_ArtAnmeldung,nctsSA_GRN,ncts_Empfaenger_eori,ncts_Empfaenger_NLNR,ncts_Empfaenger_Name,ncts_Bearbeiter"
|
||||
Dim sqlStr = " SELECT '' as [Anzahl Verz], isnull(ncts_Status,'') as Status, '' as Niederlassung, isnull(ncts_ObjectName,'') as Bezugsnummer,'' as LfdNr,"
|
||||
If showANR Then sqlStr &= " isnull(ncts_ANR,'') as ArbNr,"
|
||||
@@ -474,6 +548,44 @@ Public Class usrCntlZOLLAuswertungen
|
||||
|
||||
|
||||
|
||||
' Dim sql As String = "SELECT ncts_MRN,ncts_Status,(nctsSA_AbgabenBetrag), ncts_dyaAnmID, ncts_ArtAnmeldung,nctsSA_GRN,ncts_Empfaenger_eori,ncts_Empfaenger_NLNR,ncts_Empfaenger_Name,ncts_Bearbeiter"
|
||||
Dim sqlStr = " SELECT '' as [Anzahl Verz], isnull(ncts_Status,'') as Status, '' as Niederlassung, isnull(ncts_ObjectName,'') as Bezugsnummer,'' as LfdNr,"
|
||||
If showANR Then sqlStr &= " isnull(ncts_ANR,'') as ArbNr,"
|
||||
sqlStr &= " isnull(ncts_Empfaenger_Name,'') as Empfaenger,isnull(ncts_MRN,'') as MRN,ncts_Trans_DatumZeit as Antragsdatum,isnull(ncts_Bearbeiter,'') as Sachbearbeiter,[ncts_Wiedergestellungsdatum] as GestellungsFrist,[ncts_GestelltAm] as GestelltAm,isnull(nctsSA_AbgabenBetrag,0) as [SichertheitsBetrag], isnull(nctsSA_GRN,'') as Buergschaft "
|
||||
'sql &= " ,[ncts_ObjectName],[ncts_Trans_DatumZeit] as Transaktionsdatum,[ncts_dyaArt],[ncts_ANR],[ncts_MRN],[ncts_ObjectAlias],[ncts_GesamtRohmasse],[ncts_GesamtAnzahlPackstuecke] "
|
||||
sqlStr &= ", [nctsWP_PositionsNummer] as POS, [nctsWP_Warenbezeichnung] as Warenbezeichnung"
|
||||
If anrechnungsZP Then sqlStr &= ",(SELECT TOP (1) convert(date,[dySt_ergZeitpunkt] ,104) FROM [tblDakosy_Statusmeldungen] where dySt_dyId=[ncts_dyaAnmID] and [dySt_status] IN (53,60) order by dySt_status) as AnrechnungRef"
|
||||
sqlStr &= ", ncts_AbgangsDienststellennummer as BesAbgZA, ncts_BestimmungsstelleDienststellennummer as BestZA, [nctsWP_Rohmasse] as Rohmasse"
|
||||
sqlStr &= " from tblDakosy_NCTSOut_Sicherheitsangaben inner join [VERAG].[dbo].[tblDakosy_NCTSOut] on ncts_Id = nctsSA_NctsId inner join [VERAG].[dbo].[tblDakosy_NCTSOut_Warenposition] on ncts_Id = [nctsWP_NctsId]"
|
||||
sqlStr &= " WHERE ncts_Status between '" & StatVon & "' and '" & Statbis & "' "
|
||||
sqlStr &= " " & brg & " "
|
||||
sqlStr &= " AND CAST(ncts_Wiedergestellungsdatum as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "' "
|
||||
sqlStr &= " ORDER BY [ncts_Wiedergestellungsdatum] ASC "
|
||||
MsgBox(sqlStr)
|
||||
Return sqlStr
|
||||
|
||||
End Function
|
||||
|
||||
Function getSQL_NCTS004_ATLAS_DY_POS(datVon As Date, datBis As Date, StatVon As String, Statbis As String, brg As String, nl As String, Optional anrechnungsZP As Boolean = False, Optional showANR As Boolean = True)
|
||||
|
||||
If brg <> "" Then
|
||||
brg = " AND nctsSA_GRN = '" & brg & "' "
|
||||
Else
|
||||
|
||||
Dim brg_AT As String = "05AT510000G000FP7"
|
||||
Dim brg_AT_IMEX As String = "16AT520000G000VA6"
|
||||
Dim brg_DE As String = "05DE0000000009345"
|
||||
Dim brg_DE_NEU As String = "17DE0000000071678"
|
||||
Dim brg_AT_ATILLA As String = "20AT520000G000092"
|
||||
|
||||
brg = " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_AT_IMEX & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "', '" & brg_AT_ATILLA & "' ) "
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'*XXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
' Dim sql As String = "SELECT ncts_MRN,ncts_Status,(nctsSA_AbgabenBetrag), ncts_dyaAnmID, ncts_ArtAnmeldung,nctsSA_GRN,ncts_Empfaenger_eori,ncts_Empfaenger_NLNR,ncts_Empfaenger_Name,ncts_Bearbeiter"
|
||||
Dim sqlStr = " SELECT '' as [Anzahl Verz], isnull(ncts_Status,'') as Status, '' as Niederlassung, isnull(ncts_ObjectName,'') as Bezugsnummer,'' as LfdNr,"
|
||||
If showANR Then sqlStr &= " isnull(ncts_ANR,'') as ArbNr,"
|
||||
@@ -549,6 +661,16 @@ Public Class usrCntlZOLLAuswertungen
|
||||
End Sub
|
||||
|
||||
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
|
||||
|
||||
Select Case cboDY_NCTS._value
|
||||
Case "NCTS4" : doDY_NCTS4_XLS()
|
||||
Case "NCTS5" : doDY_NCTS5_XLS()
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Sub doDY_NCTS4_XLS()
|
||||
|
||||
If cbxSplittungNachPos.Checked Then
|
||||
Dim dt As DataTable = SQL.loadDgvBySql(getSQL_NCTS_ATLAS_DY_POS(datVonDy.Text, datBisDy.Text, txtStatVonDy.Text, txtStatBisDy.Text, DirectCast(cboBrgDy.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value, "", cbxAnrechnungRefBetrag.Checked, False), "FMZOLL")
|
||||
If dt IsNot Nothing Then
|
||||
@@ -562,6 +684,21 @@ Public Class usrCntlZOLLAuswertungen
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub doDY_NCTS5_XLS()
|
||||
|
||||
If cbxSplittungNachPos.Checked Then
|
||||
Dim dt As DataTable = SQL.loadDgvBySql(getSQL_NCTS004_ATLAS_DY_POS(datVonDy.Text, datBisDy.Text, txtStatVonDy.Text, txtStatBisDy.Text, DirectCast(cboBrgDy.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value, "", cbxAnrechnungRefBetrag.Checked, False), "FMZOLL")
|
||||
If dt IsNot Nothing Then
|
||||
cProgramFunctions.genExcelFromDT_NEW(clearDTPosSiBetrag(dt))
|
||||
End If
|
||||
Else
|
||||
Dim dt As DataTable = SQL.loadDgvBySql(getSQL_NCTS004_ATLAS_DY(datVonDy.Text, datBisDy.Text, txtStatVonDy.Text, txtStatBisDy.Text, DirectCast(cboBrgDy.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value, "", cbxAnrechnungRefBetrag.Checked, False), "FMZOLL")
|
||||
If dt IsNot Nothing Then
|
||||
cProgramFunctions.genExcelFromDT_NEW(dt)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Function clearDTPosSiBetrag(dt2 As DataTable) As DataTable
|
||||
Dim dt As DataTable = dt2.Clone
|
||||
'Es muss die Pos-nr neu generiert werden, da die Daten nciht vollständig sind
|
||||
@@ -781,4 +918,5 @@ Public Class usrCntlZOLLAuswertungen
|
||||
frmPrintLayout.AuswertungKontrolleLKW_NCTSTR(datAuswertVon_NCTSTR.Text, datAuswertBis_NCTSTR.Text, "VERIMEX_ATEZ", cboBRG_Verimex._value)
|
||||
frmPrintLayout.Show()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user