div. Änderungen
This commit is contained in:
@@ -63,6 +63,7 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
Me.dgvLKW = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.pnlOpt = New System.Windows.Forms.Panel()
|
||||
Me.pnlBerichte = New System.Windows.Forms.Panel()
|
||||
Me.Button24 = New System.Windows.Forms.Button()
|
||||
Me.Button23 = New System.Windows.Forms.Button()
|
||||
Me.Button22 = New System.Windows.Forms.Button()
|
||||
Me.Button21 = New System.Windows.Forms.Button()
|
||||
@@ -236,13 +237,13 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
Me.cntxtCntxtSpeditionsbuch.ImageScalingSize = New System.Drawing.Size(24, 24)
|
||||
Me.cntxtCntxtSpeditionsbuch.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EintragLöschenToolStripMenuItem})
|
||||
Me.cntxtCntxtSpeditionsbuch.Name = "cntxtCntxtSpeditionsbuch"
|
||||
Me.cntxtCntxtSpeditionsbuch.Size = New System.Drawing.Size(181, 48)
|
||||
Me.cntxtCntxtSpeditionsbuch.Size = New System.Drawing.Size(156, 26)
|
||||
Me.cntxtCntxtSpeditionsbuch.Text = "cntxtSpeditionsbuch"
|
||||
'
|
||||
'EintragLöschenToolStripMenuItem
|
||||
'
|
||||
Me.EintragLöschenToolStripMenuItem.Name = "EintragLöschenToolStripMenuItem"
|
||||
Me.EintragLöschenToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.EintragLöschenToolStripMenuItem.Size = New System.Drawing.Size(155, 22)
|
||||
Me.EintragLöschenToolStripMenuItem.Text = "Eintrag löschen"
|
||||
'
|
||||
'txtAvisoId
|
||||
@@ -762,6 +763,7 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
'
|
||||
'pnlBerichte
|
||||
'
|
||||
Me.pnlBerichte.Controls.Add(Me.Button24)
|
||||
Me.pnlBerichte.Controls.Add(Me.Button23)
|
||||
Me.pnlBerichte.Controls.Add(Me.Button22)
|
||||
Me.pnlBerichte.Controls.Add(Me.Button21)
|
||||
@@ -798,6 +800,18 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
Me.pnlBerichte.TabIndex = 6
|
||||
Me.pnlBerichte.Visible = False
|
||||
'
|
||||
'Button24
|
||||
'
|
||||
Me.Button24.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button24.BackgroundImage = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button24.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button24.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button24.Location = New System.Drawing.Point(715, 14)
|
||||
Me.Button24.Name = "Button24"
|
||||
Me.Button24.Size = New System.Drawing.Size(41, 34)
|
||||
Me.Button24.TabIndex = 43
|
||||
Me.Button24.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button23
|
||||
'
|
||||
Me.Button23.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
@@ -1105,7 +1119,7 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
Me.txtMax._WaehrungZeichen = True
|
||||
Me.txtMax.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtMax.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtMax.Location = New System.Drawing.Point(743, 8)
|
||||
Me.txtMax.Location = New System.Drawing.Point(793, 11)
|
||||
Me.txtMax.MaxLineLength = -1
|
||||
Me.txtMax.MaxLines_Warning = ""
|
||||
Me.txtMax.MaxLines_Warning_Label = Nothing
|
||||
@@ -1120,7 +1134,7 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
Me.cboRolle._value = ""
|
||||
Me.cboRolle.DropDownWidth = 300
|
||||
Me.cboRolle.FormattingEnabled = True
|
||||
Me.cboRolle.Location = New System.Drawing.Point(743, 27)
|
||||
Me.cboRolle.Location = New System.Drawing.Point(793, 30)
|
||||
Me.cboRolle.Name = "cboRolle"
|
||||
Me.cboRolle.Size = New System.Drawing.Size(76, 21)
|
||||
Me.cboRolle.TabIndex = 39
|
||||
@@ -1128,7 +1142,7 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
'Label35
|
||||
'
|
||||
Me.Label35.AutoSize = True
|
||||
Me.Label35.Location = New System.Drawing.Point(709, 11)
|
||||
Me.Label35.Location = New System.Drawing.Point(759, 14)
|
||||
Me.Label35.Name = "Label35"
|
||||
Me.Label35.Size = New System.Drawing.Size(30, 13)
|
||||
Me.Label35.TabIndex = 32
|
||||
@@ -1137,7 +1151,7 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
'Label34
|
||||
'
|
||||
Me.Label34.AutoSize = True
|
||||
Me.Label34.Location = New System.Drawing.Point(709, 30)
|
||||
Me.Label34.Location = New System.Drawing.Point(759, 33)
|
||||
Me.Label34.Name = "Label34"
|
||||
Me.Label34.Size = New System.Drawing.Size(34, 13)
|
||||
Me.Label34.TabIndex = 39
|
||||
@@ -1151,7 +1165,7 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
Me.Button9.Location = New System.Drawing.Point(606, 8)
|
||||
Me.Button9.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.Button9.Name = "Button9"
|
||||
Me.Button9.Size = New System.Drawing.Size(103, 41)
|
||||
Me.Button9.Size = New System.Drawing.Size(106, 41)
|
||||
Me.Button9.TabIndex = 34
|
||||
Me.Button9.Text = "Auswertung" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Nach Kunden"
|
||||
Me.Button9.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
@@ -2970,4 +2984,5 @@ Partial Class usrCntlSpeditionsBuchSuche
|
||||
Friend WithEvents FlenderBocholtZeitraumAuswählenToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents txtVermerk As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label48 As Label
|
||||
Friend WithEvents Button24 As Button
|
||||
End Class
|
||||
|
||||
@@ -717,9 +717,16 @@ Public Class usrCntlSpeditionsBuchSuche
|
||||
MsgBox("Einträge können nur einzeln gelöscht werden!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If vbYes = MsgBox("Möchten Sie den Eintrag wirklich löschen?", vbYesNoCancel) Then
|
||||
Dim r As DataGridViewRow = DataGridView.SelectedRows(0)
|
||||
'warum löschen? ev. wurde dieser Eintrag schon verrechnet????
|
||||
|
||||
Dim anzRechnung = SQL.getValueTxtBySql("select count(*) FROM [VERAG].[dbo].[Rechnungsausgang] where AbfertigungsNr =" & (r.Cells("AbfertigungsNr").Value) & " AND FilialenNr = " & (r.Cells("FilialenNr").Value) & " AND SpeditionsbuchUnterNr = " & (r.Cells("UnterNr").Value), "FMZOLL")
|
||||
|
||||
If CInt(anzRechnung) > 0 Then
|
||||
MsgBox("Eintrag wurde bereits verrechnet (es existiert bereits ein Beleg " & vbNewLine & " mit dieser Abfertigungsnummer) und kann nicht gelöscht werden!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim spb As New cSpeditionsbuch(r.Cells("FilialenNr").Value, r.Cells("AbfertigungsNr").Value, r.Cells("UnterNr").Value)
|
||||
Dim arv As New cSpeditionsbucharchiv
|
||||
@@ -1082,7 +1089,7 @@ Public Class usrCntlSpeditionsBuchSuche
|
||||
DataGridView.DataSource = dt
|
||||
End Sub
|
||||
|
||||
Private Sub Button9_Click_1(sender As Object, e As EventArgs) Handles Button9.Click
|
||||
Private Sub Button9_Click_1(sender As Object, e As EventArgs) Handles Button9.Click, Button24.Click
|
||||
Dim displayFilter = cbxFilterInBericht.Checked
|
||||
Dim groupByKd = cboRolle._value
|
||||
|
||||
@@ -1098,83 +1105,93 @@ Public Class usrCntlSpeditionsBuchSuche
|
||||
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr.Replace("XXXXX", groupByKd), "FMZOLL", , getSpedbuchList())
|
||||
'DataGridView.DataSource = dt
|
||||
|
||||
If sender.name = "Button24" Then
|
||||
|
||||
Dim print As New frmPrintLayout
|
||||
print.Text = "Speditionsbericht"
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
cProgramFunctions.genExcelFromDT_NEW(dt)
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
Dim rpt As New rptSpeditionsberichtKunde
|
||||
|
||||
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
Case "IMEX" : rpt.picVERAG.Image = My.Resources.IMEX_LOGO_simple : rpt.Label28.Text = "IMEX Customs Service GmbH"
|
||||
Case "ATILLA" : rpt.picVERAG.Image = My.Resources.Atilla : rpt.Label28.Text = "ATILLA Spedition"
|
||||
Case Else
|
||||
End Select
|
||||
|
||||
rpt.DataSource = dt
|
||||
|
||||
'Filter anzeigen
|
||||
If displayFilter Then
|
||||
rpt.lblFilterTxt.Visible = displayFilter
|
||||
rpt.txtFilter.Visible = displayFilter
|
||||
rpt.txtFilter.Text = generateReadableFilter(SQL.getStringReplaceScalarVar(getSpedBuchWhere, getSpedbuchList))
|
||||
Else
|
||||
If txtUeberschr.Text <> "" Then
|
||||
rpt.txtFilter.Text = txtUeberschr.Text
|
||||
rpt.txtFilter.Visible = True
|
||||
rpt.lblFilterTxt.Visible = True
|
||||
rpt.lblFilterTxt.Text = "Beschreibung:"
|
||||
|
||||
|
||||
Dim print As New frmPrintLayout
|
||||
print.Text = "Speditionsbericht"
|
||||
|
||||
Dim rpt As New rptSpeditionsberichtKunde
|
||||
|
||||
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
Case "IMEX" : rpt.picVERAG.Image = My.Resources.IMEX_LOGO_simple : rpt.Label28.Text = "IMEX Customs Service GmbH"
|
||||
Case "ATILLA" : rpt.picVERAG.Image = My.Resources.Atilla : rpt.Label28.Text = "ATILLA Spedition"
|
||||
Case Else
|
||||
End Select
|
||||
|
||||
rpt.DataSource = dt
|
||||
|
||||
'Filter anzeigen
|
||||
If displayFilter Then
|
||||
rpt.lblFilterTxt.Visible = displayFilter
|
||||
rpt.txtFilter.Visible = displayFilter
|
||||
rpt.txtFilter.Text = generateReadableFilter(SQL.getStringReplaceScalarVar(getSpedBuchWhere, getSpedbuchList))
|
||||
Else
|
||||
If txtUeberschr.Text <> "" Then
|
||||
rpt.txtFilter.Text = txtUeberschr.Text
|
||||
rpt.txtFilter.Visible = True
|
||||
rpt.lblFilterTxt.Visible = True
|
||||
rpt.lblFilterTxt.Text = "Beschreibung:"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If rpt.DataSource.rows.count = 0 Then
|
||||
rpt.Dispose() : print.Dispose()
|
||||
MsgBox("Keine Daten vorhanden!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim sum = 0
|
||||
Dim cnt = 0
|
||||
rpt.lblUeberschrift.Text = "Speditionsbericht nach Kunden " & txtAbfertDat.Text & " bis " & txtAbfertDatBis.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 sumAnz As Double = 0
|
||||
Dim sumBar As Double = 0
|
||||
|
||||
rpt.lblFiliale.Text = "Alle Filialen"
|
||||
|
||||
AddHandler rpt.Detail.Format, Sub()
|
||||
cnt += 1
|
||||
' rpt.lblVon.Text = CDate(rpt.Fields.Item("von").Value).ToShortDateString
|
||||
' rpt.lblBis.Text = CDate(rpt.Fields.Item("bis").Value).ToShortDateString
|
||||
rpt.lblNr.Text = cnt
|
||||
' rpt.lblAbfArtNr.Text = rpt.Fields.Item("Abfertigungsart").Value
|
||||
' rpt.lblAbfArt.Text = rpt.Fields.Item("Abfertigungsbezeichnung").Value
|
||||
rpt.lblAbfAnz.Text = rpt.Fields.Item("Anzahl").Value
|
||||
|
||||
rpt.lblKunde.Text = CInt(If(rpt.Fields.Item("KdNr").Value, "0")).ToString("D6") & " " & rpt.Fields.Item("Kunde").Value
|
||||
|
||||
rpt.lblBarzahlungsbetrag.Text = CDbl(rpt.Fields.Item("Barzahlungsbetrag").Value()).ToString("C")
|
||||
|
||||
sumBar += CDbl(rpt.Fields.Item("Barzahlungsbetrag").Value)
|
||||
sumAnz += CDbl(rpt.Fields.Item("Anzahl").Value)
|
||||
End Sub
|
||||
AddHandler rpt.GroupHeader1.Format, Sub()
|
||||
sumAnz = 0
|
||||
sumBar = 0
|
||||
End Sub
|
||||
AddHandler rpt.GroupFooter1.Format, Sub()
|
||||
rpt.lblSummeAnzahl.Text = sumAnz
|
||||
rpt.lblSummeBar.Text = sumBar.ToString("C")
|
||||
End Sub
|
||||
|
||||
print.Viewer.LoadDocument(rpt)
|
||||
print.Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous
|
||||
print.Show()
|
||||
End If
|
||||
|
||||
|
||||
If rpt.DataSource.rows.count = 0 Then
|
||||
rpt.Dispose() : print.Dispose()
|
||||
MsgBox("Keine Daten vorhanden!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim sum = 0
|
||||
Dim cnt = 0
|
||||
rpt.lblUeberschrift.Text = "Speditionsbericht nach Kunden " & txtAbfertDat.Text & " bis " & txtAbfertDatBis.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 sumAnz As Double = 0
|
||||
Dim sumBar As Double = 0
|
||||
|
||||
rpt.lblFiliale.Text = "Alle Filialen"
|
||||
|
||||
AddHandler rpt.Detail.Format, Sub()
|
||||
cnt += 1
|
||||
' rpt.lblVon.Text = CDate(rpt.Fields.Item("von").Value).ToShortDateString
|
||||
' rpt.lblBis.Text = CDate(rpt.Fields.Item("bis").Value).ToShortDateString
|
||||
rpt.lblNr.Text = cnt
|
||||
' rpt.lblAbfArtNr.Text = rpt.Fields.Item("Abfertigungsart").Value
|
||||
' rpt.lblAbfArt.Text = rpt.Fields.Item("Abfertigungsbezeichnung").Value
|
||||
rpt.lblAbfAnz.Text = rpt.Fields.Item("Anzahl").Value
|
||||
|
||||
rpt.lblKunde.Text = CInt(If(rpt.Fields.Item("KdNr").Value, "0")).ToString("D6") & " " & rpt.Fields.Item("Kunde").Value
|
||||
|
||||
rpt.lblBarzahlungsbetrag.Text = CDbl(rpt.Fields.Item("Barzahlungsbetrag").Value()).ToString("C")
|
||||
|
||||
sumBar += CDbl(rpt.Fields.Item("Barzahlungsbetrag").Value)
|
||||
sumAnz += CDbl(rpt.Fields.Item("Anzahl").Value)
|
||||
End Sub
|
||||
AddHandler rpt.GroupHeader1.Format, Sub()
|
||||
sumAnz = 0
|
||||
sumBar = 0
|
||||
End Sub
|
||||
AddHandler rpt.GroupFooter1.Format, Sub()
|
||||
rpt.lblSummeAnzahl.Text = sumAnz
|
||||
rpt.lblSummeBar.Text = sumBar.ToString("C")
|
||||
End Sub
|
||||
|
||||
print.Viewer.LoadDocument(rpt)
|
||||
print.Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous
|
||||
print.Show()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
|
||||
@@ -1442,7 +1459,9 @@ Public Class usrCntlSpeditionsBuchSuche
|
||||
print.Viewer.LoadDocument(rpt)
|
||||
print.Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous
|
||||
print.Show()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Function checkNull(o As Object, Optional ret As String = "") As Object
|
||||
@@ -2477,4 +2496,5 @@ Public Class usrCntlSpeditionsBuchSuche
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user