Mahnlauf, FaktAbrechnung, Fremdrechnungen, MDM-Functions
This commit is contained in:
@@ -34,7 +34,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
Select Case LIEFERANT
|
||||
Case "PLOSE" : genSummenbericht_PLOSE()
|
||||
Case "PLOSE" : genSummenbericht_PLOSE() : genSummenbericht_nachLand_PLOSE()
|
||||
Case "ASFINAG" : genSummenbericht_ASFINAG()
|
||||
Case "UTA" : genSummenbericht_UTA()
|
||||
Case "IDS" : genSummenbericht_IDS(17, cbxIDSmitVerag.Checked) : genSummenbericht_IDS(21, cbxIDSmitVerag.Checked)
|
||||
@@ -303,6 +303,100 @@ Public Class frmMDMDatenverarbetiung
|
||||
print.Show()
|
||||
End Sub
|
||||
|
||||
Sub genSummenbericht_nachLand_PLOSE()
|
||||
Dim displayFilter = False
|
||||
Dim sqlstr As String = ""
|
||||
sqlstr = "SELECT
|
||||
COUNT(*) AS Anzahl,
|
||||
[plInv_SupplierCountry],
|
||||
SUM([plInv_Nettobetrag]) AS plose_Nettobetrag,
|
||||
SUM([plInv_MWSTBetrag]) AS plose_MWSTBetrag,
|
||||
SUM([plInv_Bruttobetrag]) AS plose_Bruttobetrag,
|
||||
isnull([plInv_Currency],'EUR') AS Währung
|
||||
FROM [tblPLOSE_Inv_Data]
|
||||
WHERE [plInv_SupplierRechnungsDatum] >= (
|
||||
SELECT MIN(plose_RechnungsDatum)
|
||||
FROM tblPLOSE_Details
|
||||
WHERE plose_DatumTransaktion BETWEEN '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "'
|
||||
AND plose_Fakturiert = 0
|
||||
AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & ")
|
||||
)
|
||||
GROUP BY
|
||||
[plInv_SupplierCountry],
|
||||
[plInv_Currency]
|
||||
ORDER BY
|
||||
[plInv_SupplierCountry]"
|
||||
|
||||
|
||||
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||
'DataGridView.DataSource = dt
|
||||
|
||||
|
||||
Dim print As New frmPrintLayout
|
||||
print.Text = "PLOSE"
|
||||
|
||||
Dim rpt As New rptPLOSE_TransaktionenSumary
|
||||
|
||||
rpt.DataSource = dt
|
||||
|
||||
|
||||
'If cbxProdukt.Checked Then
|
||||
' rpt.GroupHeader2.DataField = "prod_descr"
|
||||
'Else
|
||||
' rpt.GroupHeader2.Visible = False
|
||||
' rpt.GroupFooter2.Visible = False
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
Dim sum = 0
|
||||
rpt.lblUeberschrift.Text = "PLOSE Summenbericht nach Land " & 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 sumMenge As Double = 0
|
||||
|
||||
AddHandler rpt.Detail.Format, Sub()
|
||||
' rpt.lblProduktBeschreibung.Text = isDbnullEmpty(rpt.Fields.Item("BC_DESCR").Value, "")
|
||||
rpt.lblAnzahl.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Anzahl").Value, "")
|
||||
rpt.lblProdukt.Text = SQL.isDbnullEmpty(rpt.Fields.Item("plInv_SupplierCountry").Value, "")
|
||||
rpt.lblMenge.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Währung").Value, "")
|
||||
' rpt.lblPreis.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_Preis").Value, 2, "")
|
||||
rpt.lblNetto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_Nettobetrag").Value, 2, "")
|
||||
rpt.lblMWST.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_MWSTBetrag").Value, 2, "")
|
||||
rpt.lblBrutto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_Bruttobetrag").Value, 2, "")
|
||||
|
||||
|
||||
|
||||
sumNetto += SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_Nettobetrag").Value, 4, 0)
|
||||
sumMWST += SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_MWSTBetrag").Value, 4, 0)
|
||||
sumBrutto += SQL.isDbnullEmptyDbl(rpt.Fields.Item("plose_Bruttobetrag").Value, 4, 0)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
AddHandler rpt.ReportFooter1.Format, Sub()
|
||||
rpt.lblSumMenge.Text = sumMenge.ToString("N0")
|
||||
'rpt.lblSumPreis.Text = sumPreis.ToString("N2")
|
||||
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 genSummenbericht_ASFINAG()
|
||||
Dim displayFilter = False
|
||||
Dim sqlstr As String = ""
|
||||
|
||||
70
SDL/mdm/usrcntlFremdrechnungen.Designer.vb
generated
70
SDL/mdm/usrcntlFremdrechnungen.Designer.vb
generated
@@ -23,8 +23,8 @@ Partial Class usrcntlFremdrechnungen
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.DetailsAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
|
||||
Me.btnSDL_Alle = New System.Windows.Forms.Button()
|
||||
@@ -37,7 +37,6 @@ Partial Class usrcntlFremdrechnungen
|
||||
Me.btnSDL_PLOSE = New System.Windows.Forms.Button()
|
||||
Me.btnSDL_RMC = New System.Windows.Forms.Button()
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.KundenblattAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.cbxTest = New System.Windows.Forms.CheckBox()
|
||||
Me.Label7 = New System.Windows.Forms.Label()
|
||||
@@ -66,10 +65,7 @@ Partial Class usrcntlFremdrechnungen
|
||||
Me.dgvLFRechnung = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.dgvDetails = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.Panel4 = New System.Windows.Forms.Panel()
|
||||
Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripMenuItem6 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.PDFLöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.FlowLayoutPanel.SuspendLayout()
|
||||
Me.ContextMenuStrip1.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
@@ -81,14 +77,14 @@ Partial Class usrcntlFremdrechnungen
|
||||
CType(Me.dgvLFRechnung, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.dgvDetails, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel4.SuspendLayout()
|
||||
Me.cntxtExcel.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'DetailsAnzeigenToolStripMenuItem
|
||||
'
|
||||
Me.DetailsAnzeigenToolStripMenuItem.Image = Global.SDL.My.Resources.Resources.pdf
|
||||
Me.DetailsAnzeigenToolStripMenuItem.Name = "DetailsAnzeigenToolStripMenuItem"
|
||||
Me.DetailsAnzeigenToolStripMenuItem.Size = New System.Drawing.Size(189, 22)
|
||||
Me.DetailsAnzeigenToolStripMenuItem.Text = "Details anzeigen"
|
||||
Me.DetailsAnzeigenToolStripMenuItem.Size = New System.Drawing.Size(154, 22)
|
||||
Me.DetailsAnzeigenToolStripMenuItem.Text = "PDF hochladen"
|
||||
'
|
||||
'FlowLayoutPanel
|
||||
'
|
||||
@@ -268,15 +264,9 @@ Partial Class usrcntlFremdrechnungen
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DetailsAnzeigenToolStripMenuItem, Me.KundenblattAnzeigenToolStripMenuItem})
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DetailsAnzeigenToolStripMenuItem, Me.PDFLöschenToolStripMenuItem})
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(190, 48)
|
||||
'
|
||||
'KundenblattAnzeigenToolStripMenuItem
|
||||
'
|
||||
Me.KundenblattAnzeigenToolStripMenuItem.Name = "KundenblattAnzeigenToolStripMenuItem"
|
||||
Me.KundenblattAnzeigenToolStripMenuItem.Size = New System.Drawing.Size(189, 22)
|
||||
Me.KundenblattAnzeigenToolStripMenuItem.Text = "Kundenblatt anzeigen"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(155, 48)
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
@@ -489,7 +479,7 @@ Partial Class usrcntlFremdrechnungen
|
||||
Me.Button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
|
||||
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button1.Location = New System.Drawing.Point(5, 322)
|
||||
Me.Button1.Location = New System.Drawing.Point(11, 322)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(50, 44)
|
||||
Me.Button1.TabIndex = 45
|
||||
@@ -606,8 +596,8 @@ Partial Class usrcntlFremdrechnungen
|
||||
Me.dgvLFRechnung.AllowUserToDeleteRows = False
|
||||
Me.dgvLFRechnung.AllowUserToResizeColumns = False
|
||||
Me.dgvLFRechnung.AllowUserToResizeRows = False
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvLFRechnung.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||
DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvLFRechnung.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
|
||||
Me.dgvLFRechnung.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvLFRechnung.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvLFRechnung.Location = New System.Drawing.Point(4, 3)
|
||||
@@ -624,8 +614,8 @@ Partial Class usrcntlFremdrechnungen
|
||||
Me.dgvDetails.AllowUserToDeleteRows = False
|
||||
Me.dgvDetails.AllowUserToResizeColumns = False
|
||||
Me.dgvDetails.AllowUserToResizeRows = False
|
||||
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvDetails.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
|
||||
DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvDetails.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
|
||||
Me.dgvDetails.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvDetails.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvDetails.Location = New System.Drawing.Point(-1, 3)
|
||||
@@ -644,29 +634,12 @@ Partial Class usrcntlFremdrechnungen
|
||||
Me.Panel4.Size = New System.Drawing.Size(1356, 108)
|
||||
Me.Panel4.TabIndex = 11
|
||||
'
|
||||
'cntxtExcel
|
||||
'PDFLöschenToolStripMenuItem
|
||||
'
|
||||
Me.cntxtExcel.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem3, Me.ToolStripMenuItem6})
|
||||
Me.cntxtExcel.Name = "cntxtExcel"
|
||||
Me.cntxtExcel.Size = New System.Drawing.Size(211, 48)
|
||||
Me.cntxtExcel.Text = "Excel"
|
||||
'
|
||||
'ToolStripMenuItem3
|
||||
'
|
||||
Me.ToolStripMenuItem3.Name = "ToolStripMenuItem3"
|
||||
Me.ToolStripMenuItem3.Size = New System.Drawing.Size(210, 22)
|
||||
Me.ToolStripMenuItem3.Text = "Einfach"
|
||||
'
|
||||
'ToolStripMenuItem6
|
||||
'
|
||||
Me.ToolStripMenuItem6.Name = "ToolStripMenuItem6"
|
||||
Me.ToolStripMenuItem6.Size = New System.Drawing.Size(210, 22)
|
||||
Me.ToolStripMenuItem6.Text = "Formatiert (dauert länger)"
|
||||
'
|
||||
'ContextMenuStrip2
|
||||
'
|
||||
Me.ContextMenuStrip2.Name = "ContextMenuStrip2"
|
||||
Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4)
|
||||
Me.PDFLöschenToolStripMenuItem.Image = Global.SDL.My.Resources.Resources.del
|
||||
Me.PDFLöschenToolStripMenuItem.Name = "PDFLöschenToolStripMenuItem"
|
||||
Me.PDFLöschenToolStripMenuItem.Size = New System.Drawing.Size(154, 22)
|
||||
Me.PDFLöschenToolStripMenuItem.Text = "PDF löschen"
|
||||
'
|
||||
'usrcntlFremdrechnungen
|
||||
'
|
||||
@@ -689,7 +662,6 @@ Partial Class usrcntlFremdrechnungen
|
||||
CType(Me.dgvLFRechnung, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.dgvDetails, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.Panel4.ResumeLayout(False)
|
||||
Me.cntxtExcel.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -702,7 +674,6 @@ Partial Class usrcntlFremdrechnungen
|
||||
Friend WithEvents btnSDL_FREJUS As System.Windows.Forms.Button
|
||||
Friend WithEvents btnSDL_Hugo As System.Windows.Forms.Button
|
||||
Friend WithEvents ContextMenuStrip1 As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents KundenblattAnzeigenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents Panel1 As System.Windows.Forms.Panel
|
||||
Friend WithEvents Button8 As System.Windows.Forms.Button
|
||||
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||
@@ -710,9 +681,6 @@ Partial Class usrcntlFremdrechnungen
|
||||
Friend WithEvents Panel3 As System.Windows.Forms.Panel
|
||||
Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer
|
||||
Friend WithEvents Button4 As System.Windows.Forms.Button
|
||||
Friend WithEvents cntxtExcel As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents ToolStripMenuItem3 As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripMenuItem6 As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents lblEinträge As System.Windows.Forms.Label
|
||||
Friend WithEvents cbxMax1000Eintrage As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
@@ -736,6 +704,6 @@ Partial Class usrcntlFremdrechnungen
|
||||
Friend WithEvents txtKundenNrbis As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents txtKundenNrvon As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label6 As Label
|
||||
Friend WithEvents ContextMenuStrip2 As ContextMenuStrip
|
||||
Friend WithEvents cbxTest As CheckBox
|
||||
Friend WithEvents PDFLöschenToolStripMenuItem As ToolStripMenuItem
|
||||
End Class
|
||||
|
||||
@@ -120,10 +120,4 @@
|
||||
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="cntxtExcel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>807, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ContextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>913, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports System.Reflection
|
||||
Imports com.sun.tools.corba.se.idl
|
||||
Imports DocumentFormat.OpenXml.VariantTypes
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
@@ -378,18 +380,18 @@ Public Class usrcntlFremdrechnungen
|
||||
|
||||
Dim invToCustomer As String = ""
|
||||
|
||||
Select Case cbx.CheckState
|
||||
Select Case cbx.CheckState
|
||||
' Case CheckState.Unchecked : invToCustomer = "0" Hier alle anzeigen!!!
|
||||
Case CheckState.Checked : invToCustomer = "1"
|
||||
End Select
|
||||
End Select
|
||||
|
||||
If invToCustomer <> "" Then
|
||||
If invToCustomer <> "" Then
|
||||
|
||||
Select Case aktLieferant
|
||||
Select Case aktLieferant
|
||||
'Case "IDS" : SQLWhere &= " AND isnull(InvToCustomer,0) =" & invToCustomer
|
||||
Case "PLOSE" : SQLWhere &= " AND isnull(plInv_InvToCustomer,0) =" & invToCustomer
|
||||
Case "MSE" : SQLWhere &= " AND isnull(InvToCustomer,0) =" & invToCustomer
|
||||
Case "RMC" : SQLWhere &= " AND isnull(InvToCustomer,0) =" & invToCustomer
|
||||
Case "MSE" : SQLWhere &= " AND isnull(InvToCustomer,0) =" & invToCustomer
|
||||
Case "RMC" : SQLWhere &= " AND isnull(InvToCustomer,0) =" & invToCustomer
|
||||
Case "UTA" : SQLWhere &= " AND isnull(InvToCustomer,0) =" & invToCustomer
|
||||
Case "VERAG" : SQLWhere &= " AND 1 <> " & invToCustomer
|
||||
Case "_" : SQLWhere &= " AND 1 <> " & invToCustomer
|
||||
@@ -397,7 +399,7 @@ Public Class usrcntlFremdrechnungen
|
||||
|
||||
End Select
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'If cbx.Checked AndAlso aktLieferant <> "IDS" AndAlso KUNDE IsNot Nothing Then
|
||||
@@ -1195,13 +1197,13 @@ Public Class usrcntlFremdrechnungen
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripMenuItem3_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem3.Click
|
||||
Private Sub ToolStripMenuItem3_Click(sender As Object, e As EventArgs)
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
cProgramFunctions.genExcelFromDGV(dgvLFRechnung, True)
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripMenuItem6_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem6.Click
|
||||
Private Sub ToolStripMenuItem6_Click(sender As Object, e As EventArgs)
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
cProgramFunctions.genExcelFromDGV_NEW(dgvLFRechnung, True)
|
||||
Me.Cursor = Cursors.Default
|
||||
@@ -1554,4 +1556,76 @@ Public Class usrcntlFremdrechnungen
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ContextMenuStrip2_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DetailsAnzeigenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DetailsAnzeigenToolStripMenuItem.Click
|
||||
|
||||
If dgvLFRechnung.CurrentRow.Cells("daId").Value Is Nothing Or IsDBNull(dgvLFRechnung.CurrentRow.Cells("daId").Value) Then
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ReNr As String = dgvLFRechnung.SelectedRows(0).Cells("Rechnungsnummer").Value
|
||||
Dim ReDat As String = dgvLFRechnung.SelectedRows(0).Cells("Rechnungsdatum").Value
|
||||
Dim interneKundenNr As String = dgvLFRechnung.SelectedRows(0).Cells("AdressenNr").Value
|
||||
Dim KundenNr As String = dgvLFRechnung.SelectedRows(0).Cells("Kundennummer").Value
|
||||
Dim LieferlandISO2 As String = dgvLFRechnung.SelectedRows(0).Cells("Land").Value
|
||||
|
||||
If LieferlandISO2 = "" Then MsgBox("Land kann nicht ermittelt werden") : Exit Sub
|
||||
If KundenNr = "" OrElse Not IsNumeric(KundenNr) Then MsgBox("KundenNr kann nicht ermittelt werden") : Exit Sub
|
||||
If ReDat = "" OrElse Not IsDate(ReDat) Then MsgBox("Rechnungsdatum kann nicht ermittelt werden") : Exit Sub
|
||||
If interneKundenNr = "" OrElse Not IsNumeric(interneKundenNr) Then MsgBox("KundenNr kann nicht ermittelt werden") : Exit Sub
|
||||
|
||||
Select Case aktLieferant
|
||||
|
||||
Case "UTA"
|
||||
Dim DS_Import As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("MDM", "MDM_DATEN", aktLieferant & "_MANUELL", Now.Year, interneKundenNr, interneKundenNr & "_" & ReNr & "_" & LieferlandISO2)
|
||||
|
||||
If DS_Import.uploadDataToDATENSERVERFileDialog(, ".pdf", , "PDF") <> "" Then
|
||||
SQL.doSQL("Update [tblUTAImportNew] SET [daId]=" & DS_Import.da_id & ", daIdgesetztDatum = getdate(), PDFsetmanually = getdate() where Rechnungsnummer_pro_Lieferland = '" & ReNr & "' AND cast(Rechnungsdatum as Date) = '" & CDate(ReDat).ToShortDateString & "' AND Kundennummer =" & KundenNr & " and Lieferland_ISO2 ='" & LieferlandISO2 & "' and daId is null", "FMZOLL")
|
||||
MsgBox("Dokument gesetzt! -> " & ReNr & " " & CDate(ReDat).ToShortDateString)
|
||||
SET_SDL(aktLieferant)
|
||||
End If
|
||||
|
||||
Case Else
|
||||
|
||||
MsgBox("Funktion nicht implementiert!")
|
||||
|
||||
End Select
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub dgvLFRechnung_CellMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgvLFRechnung.CellMouseClick
|
||||
|
||||
|
||||
If e.RowIndex < 0 Then Exit Sub 'Es wurde außerhalb einer gültigen Datenzeile geklickt
|
||||
If e.ColumnIndex < 0 Then Exit Sub
|
||||
|
||||
DirectCast(sender, DataGridView).Rows(e.RowIndex).Selected = True
|
||||
If e.Button = MouseButtons.Right Then
|
||||
|
||||
If dgvLFRechnung.SelectedCells.Count = 0 Then Exit Sub 'Es wurde außerhalb einer gültigen Datenzeile geklickt
|
||||
dgvLFRechnung.CurrentCell = dgvLFRechnung.Rows(e.RowIndex).Cells(e.ColumnIndex)
|
||||
|
||||
|
||||
If dgvLFRechnung.CurrentRow.Cells("daId").Value Is Nothing Or IsDBNull(dgvLFRechnung.CurrentRow.Cells("daId").Value) Then
|
||||
|
||||
DetailsAnzeigenToolStripMenuItem.Visible = True
|
||||
Else
|
||||
|
||||
DetailsAnzeigenToolStripMenuItem.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
ContextMenuStrip1.Show(Cursor.Position)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user