cbam
This commit is contained in:
43
SDL/Fakturierung/frmRechnungenSuche.Designer.vb
generated
43
SDL/Fakturierung/frmRechnungenSuche.Designer.vb
generated
@@ -108,6 +108,7 @@ Partial Class frmRechnungenSuche
|
|||||||
Me.Label17 = New System.Windows.Forms.Label()
|
Me.Label17 = New System.Windows.Forms.Label()
|
||||||
Me.txtMaxSrch = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
Me.txtMaxSrch = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
Me.pnlBerichte = New System.Windows.Forms.Panel()
|
Me.pnlBerichte = New System.Windows.Forms.Panel()
|
||||||
|
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
||||||
Me.Button8 = New System.Windows.Forms.Button()
|
Me.Button8 = New System.Windows.Forms.Button()
|
||||||
Me.MenuStrip2 = New System.Windows.Forms.MenuStrip()
|
Me.MenuStrip2 = New System.Windows.Forms.MenuStrip()
|
||||||
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
@@ -141,7 +142,7 @@ Partial Class frmRechnungenSuche
|
|||||||
Me.pnlTop = New System.Windows.Forms.Panel()
|
Me.pnlTop = New System.Windows.Forms.Panel()
|
||||||
Me.PictureBox5 = New System.Windows.Forms.PictureBox()
|
Me.PictureBox5 = New System.Windows.Forms.PictureBox()
|
||||||
Me.TestToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.TestToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
Me.RechnungsReportgEinschränkungenImFilterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SplitContainer.Panel1.SuspendLayout()
|
Me.SplitContainer.Panel1.SuspendLayout()
|
||||||
Me.SplitContainer.Panel2.SuspendLayout()
|
Me.SplitContainer.Panel2.SuspendLayout()
|
||||||
@@ -157,13 +158,13 @@ Partial Class frmRechnungenSuche
|
|||||||
Me.cntxtCntxtSpeditionsbuch.SuspendLayout()
|
Me.cntxtCntxtSpeditionsbuch.SuspendLayout()
|
||||||
Me.pnlOpt.SuspendLayout()
|
Me.pnlOpt.SuspendLayout()
|
||||||
Me.pnlBerichte.SuspendLayout()
|
Me.pnlBerichte.SuspendLayout()
|
||||||
|
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.MenuStrip2.SuspendLayout()
|
Me.MenuStrip2.SuspendLayout()
|
||||||
Me.MenuStrip1.SuspendLayout()
|
Me.MenuStrip1.SuspendLayout()
|
||||||
Me.pnl.SuspendLayout()
|
Me.pnl.SuspendLayout()
|
||||||
Me.ctxtRg.SuspendLayout()
|
Me.ctxtRg.SuspendLayout()
|
||||||
Me.pnlTop.SuspendLayout()
|
Me.pnlTop.SuspendLayout()
|
||||||
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'SplitContainer
|
'SplitContainer
|
||||||
@@ -1560,6 +1561,17 @@ Partial Class frmRechnungenSuche
|
|||||||
Me.pnlBerichte.Size = New System.Drawing.Size(921, 68)
|
Me.pnlBerichte.Size = New System.Drawing.Size(921, 68)
|
||||||
Me.pnlBerichte.TabIndex = 6
|
Me.pnlBerichte.TabIndex = 6
|
||||||
'
|
'
|
||||||
|
'PictureBox1
|
||||||
|
'
|
||||||
|
Me.PictureBox1.BackgroundImage = Global.SDL.My.Resources.Resources.fragezeichen
|
||||||
|
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||||
|
Me.PictureBox1.Location = New System.Drawing.Point(900, 20)
|
||||||
|
Me.PictureBox1.Name = "PictureBox1"
|
||||||
|
Me.PictureBox1.Size = New System.Drawing.Size(18, 19)
|
||||||
|
Me.PictureBox1.TabIndex = 132
|
||||||
|
Me.PictureBox1.TabStop = False
|
||||||
|
Me.PictureBox1.Visible = False
|
||||||
|
'
|
||||||
'Button8
|
'Button8
|
||||||
'
|
'
|
||||||
Me.Button8.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
Me.Button8.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||||
@@ -1706,14 +1718,14 @@ Partial Class frmRechnungenSuche
|
|||||||
Me.MenuStrip1.Location = New System.Drawing.Point(343, 23)
|
Me.MenuStrip1.Location = New System.Drawing.Point(343, 23)
|
||||||
Me.MenuStrip1.Name = "MenuStrip1"
|
Me.MenuStrip1.Name = "MenuStrip1"
|
||||||
Me.MenuStrip1.Padding = New System.Windows.Forms.Padding(5, 2, 0, 2)
|
Me.MenuStrip1.Padding = New System.Windows.Forms.Padding(5, 2, 0, 2)
|
||||||
Me.MenuStrip1.Size = New System.Drawing.Size(182, 28)
|
Me.MenuStrip1.Size = New System.Drawing.Size(302, 28)
|
||||||
Me.MenuStrip1.TabIndex = 43
|
Me.MenuStrip1.TabIndex = 43
|
||||||
Me.MenuStrip1.Text = "Kundenauswertungen"
|
Me.MenuStrip1.Text = "Kundenauswertungen"
|
||||||
'
|
'
|
||||||
'KundenauswertungenToolStripMenuItem1
|
'KundenauswertungenToolStripMenuItem1
|
||||||
'
|
'
|
||||||
Me.KundenauswertungenToolStripMenuItem1.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
Me.KundenauswertungenToolStripMenuItem1.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||||
Me.KundenauswertungenToolStripMenuItem1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem, Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem})
|
Me.KundenauswertungenToolStripMenuItem1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem, Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem, Me.RechnungsReportgEinschränkungenImFilterToolStripMenuItem})
|
||||||
Me.KundenauswertungenToolStripMenuItem1.Font = New System.Drawing.Font("Segoe UI", 10.0!)
|
Me.KundenauswertungenToolStripMenuItem1.Font = New System.Drawing.Font("Segoe UI", 10.0!)
|
||||||
Me.KundenauswertungenToolStripMenuItem1.ForeColor = System.Drawing.Color.White
|
Me.KundenauswertungenToolStripMenuItem1.ForeColor = System.Drawing.Color.White
|
||||||
Me.KundenauswertungenToolStripMenuItem1.Image = Global.SDL.My.Resources.Resources.statistik_small
|
Me.KundenauswertungenToolStripMenuItem1.Image = Global.SDL.My.Resources.Resources.statistik_small
|
||||||
@@ -1725,21 +1737,21 @@ Partial Class frmRechnungenSuche
|
|||||||
'
|
'
|
||||||
Me.ToolStripMenuItem1.Image = CType(resources.GetObject("ToolStripMenuItem1.Image"), System.Drawing.Image)
|
Me.ToolStripMenuItem1.Image = CType(resources.GetObject("ToolStripMenuItem1.Image"), System.Drawing.Image)
|
||||||
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
|
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
|
||||||
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(372, 24)
|
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(376, 26)
|
||||||
Me.ToolStripMenuItem1.Text = "TRANSFERRY/360 (Sammelrechnung auswählen)"
|
Me.ToolStripMenuItem1.Text = "TRANSFERRY/360 (Sammelrechnung auswählen)"
|
||||||
'
|
'
|
||||||
'EVOLOGSammelrechnungAuswählenToolStripMenuItem
|
'EVOLOGSammelrechnungAuswählenToolStripMenuItem
|
||||||
'
|
'
|
||||||
Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem.Image = CType(resources.GetObject("EVOLOGSammelrechnungAuswählenToolStripMenuItem.Image"), System.Drawing.Image)
|
Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem.Image = CType(resources.GetObject("EVOLOGSammelrechnungAuswählenToolStripMenuItem.Image"), System.Drawing.Image)
|
||||||
Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem.Name = "EVOLOGSammelrechnungAuswählenToolStripMenuItem"
|
Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem.Name = "EVOLOGSammelrechnungAuswählenToolStripMenuItem"
|
||||||
Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem.Size = New System.Drawing.Size(372, 24)
|
Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem.Size = New System.Drawing.Size(376, 26)
|
||||||
Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem.Text = "EVOLOG (Sammelrechnung auswählen)"
|
Me.EVOLOGSammelrechnungAuswählenToolStripMenuItem.Text = "EVOLOG (Sammelrechnung auswählen)"
|
||||||
'
|
'
|
||||||
'ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem
|
'ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem
|
||||||
'
|
'
|
||||||
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Image = CType(resources.GetObject("ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Image"), System.Drawing.Image)
|
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Image = CType(resources.GetObject("ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Image"), System.Drawing.Image)
|
||||||
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Name = "ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem"
|
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Name = "ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem"
|
||||||
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Size = New System.Drawing.Size(372, 24)
|
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Size = New System.Drawing.Size(376, 26)
|
||||||
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Text = "ZF Friedrichshafen AG (Zeitraum auswählen)"
|
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Text = "ZF Friedrichshafen AG (Zeitraum auswählen)"
|
||||||
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Visible = False
|
Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Visible = False
|
||||||
'
|
'
|
||||||
@@ -1891,16 +1903,12 @@ Partial Class frmRechnungenSuche
|
|||||||
Me.TestToolStripMenuItem.Size = New System.Drawing.Size(150, 19)
|
Me.TestToolStripMenuItem.Size = New System.Drawing.Size(150, 19)
|
||||||
Me.TestToolStripMenuItem.Text = "test"
|
Me.TestToolStripMenuItem.Text = "test"
|
||||||
'
|
'
|
||||||
'PictureBox1
|
'RechnungsReportgEinschränkungenImFilterToolStripMenuItem
|
||||||
'
|
'
|
||||||
Me.PictureBox1.BackgroundImage = Global.SDL.My.Resources.Resources.fragezeichen
|
Me.RechnungsReportgEinschränkungenImFilterToolStripMenuItem.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||||
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
Me.RechnungsReportgEinschränkungenImFilterToolStripMenuItem.Name = "RechnungsReportgEinschränkungenImFilterToolStripMenuItem"
|
||||||
Me.PictureBox1.Location = New System.Drawing.Point(900, 20)
|
Me.RechnungsReportgEinschränkungenImFilterToolStripMenuItem.Size = New System.Drawing.Size(376, 26)
|
||||||
Me.PictureBox1.Name = "PictureBox1"
|
Me.RechnungsReportgEinschränkungenImFilterToolStripMenuItem.Text = "Rechnungs-Report (Einschränkungen im Filter)"
|
||||||
Me.PictureBox1.Size = New System.Drawing.Size(18, 19)
|
|
||||||
Me.PictureBox1.TabIndex = 132
|
|
||||||
Me.PictureBox1.TabStop = False
|
|
||||||
Me.PictureBox1.Visible = False
|
|
||||||
'
|
'
|
||||||
'frmRechnungenSuche
|
'frmRechnungenSuche
|
||||||
'
|
'
|
||||||
@@ -1934,6 +1942,7 @@ Partial Class frmRechnungenSuche
|
|||||||
Me.pnlOpt.PerformLayout()
|
Me.pnlOpt.PerformLayout()
|
||||||
Me.pnlBerichte.ResumeLayout(False)
|
Me.pnlBerichte.ResumeLayout(False)
|
||||||
Me.pnlBerichte.PerformLayout()
|
Me.pnlBerichte.PerformLayout()
|
||||||
|
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.MenuStrip2.ResumeLayout(False)
|
Me.MenuStrip2.ResumeLayout(False)
|
||||||
Me.MenuStrip2.PerformLayout()
|
Me.MenuStrip2.PerformLayout()
|
||||||
Me.MenuStrip1.ResumeLayout(False)
|
Me.MenuStrip1.ResumeLayout(False)
|
||||||
@@ -1943,7 +1952,6 @@ Partial Class frmRechnungenSuche
|
|||||||
Me.pnlTop.ResumeLayout(False)
|
Me.pnlTop.ResumeLayout(False)
|
||||||
Me.pnlTop.PerformLayout()
|
Me.pnlTop.PerformLayout()
|
||||||
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -2065,4 +2073,5 @@ Partial Class frmRechnungenSuche
|
|||||||
Friend WithEvents Button8 As Button
|
Friend WithEvents Button8 As Button
|
||||||
Friend WithEvents RechnungenOhnePositionenToolStripMenuItem As ToolStripMenuItem
|
Friend WithEvents RechnungenOhnePositionenToolStripMenuItem As ToolStripMenuItem
|
||||||
Friend WithEvents PictureBox1 As PictureBox
|
Friend WithEvents PictureBox1 As PictureBox
|
||||||
|
Friend WithEvents RechnungsReportgEinschränkungenImFilterToolStripMenuItem As ToolStripMenuItem
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1038,4 +1038,93 @@ Public Class frmRechnungenSuche
|
|||||||
Dim webAddress As String = "https://wiki.verag.ag/de/abteilungen/verrechnung/xxxx#provisionsverg%C3%BCtung"
|
Dim webAddress As String = "https://wiki.verag.ag/de/abteilungen/verrechnung/xxxx#provisionsverg%C3%BCtung"
|
||||||
Process.Start(webAddress)
|
Process.Start(webAddress)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RechnungsReportgEinschränkungenImFilterToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RechnungsReportgEinschränkungenImFilterToolStripMenuItem.Click
|
||||||
|
Me.Cursor = Cursors.WaitCursor
|
||||||
|
Try
|
||||||
|
|
||||||
|
Dim dt As DataTable = SQL.loadDgvBySql_Param("SELECT
|
||||||
|
CAST(RechnungsDatum AS DATE) AS InvoiceDate,
|
||||||
|
RechnungsNr AS InvoiceNumber,
|
||||||
|
FilialenNr AS BranchNo,
|
||||||
|
AbfertigungsNr AS CustomsDeclarationNo,
|
||||||
|
Abfertigungsdatum AS CustomsDeclarationDate,
|
||||||
|
AvisoID AS TruckID,
|
||||||
|
CASE
|
||||||
|
WHEN RechnungsKundenNr = 770931
|
||||||
|
AND CHARINDEX('/', KdAuftragsNr) > 0
|
||||||
|
THEN LTRIM(RTRIM(
|
||||||
|
LEFT(
|
||||||
|
KdAuftragsNr,
|
||||||
|
CHARINDEX('/', KdAuftragsNr) - 1
|
||||||
|
)))
|
||||||
|
ELSE KdAuftragsNr
|
||||||
|
END AS CustomerOrderNo,
|
||||||
|
RechnungsKundenNr AS CustomerNo,
|
||||||
|
[RechnungsName 1] AS CustomerName,
|
||||||
|
RechnungsLandKz AS CountryCode,
|
||||||
|
RechnungsUstIdNr AS CustomerVATNo,
|
||||||
|
LeistungsNr AS ServiceCode,
|
||||||
|
LeistungsBez AS ServiceDescription,
|
||||||
|
RechnungsausgangPositionen.Anzahl AS Quantity,
|
||||||
|
RechnungsausgangPositionen.Preis AS UnitPrice,
|
||||||
|
RechnungsausgangPositionen.SteuerfreierBetrag AS NetAmountTaxFree,
|
||||||
|
RechnungsausgangPositionen.SteuerpflichtigerBetrag AS NetAmountTaxable,
|
||||||
|
-- Umsatzsteuerbetrag
|
||||||
|
RechnungsausgangPositionen.SteuerpflichtigerBetrag *
|
||||||
|
([Steuersatz %] - 1) AS VATAmount,
|
||||||
|
-- Bruttobetrag steuerpflichtiger Teil
|
||||||
|
RechnungsausgangPositionen.SteuerpflichtigerBetrag *
|
||||||
|
[Steuersatz %] AS GrossAmountTaxable,
|
||||||
|
-- Gesamtbetrag
|
||||||
|
RechnungsausgangPositionen.SteuerfreierBetrag +
|
||||||
|
(RechnungsausgangPositionen.SteuerpflichtigerBetrag *
|
||||||
|
[Steuersatz %]) AS GrossAmountTotal,
|
||||||
|
[Steuersatz %] AS VATRate,
|
||||||
|
Währungscode AS CurrencyCode,
|
||||||
|
CASE
|
||||||
|
WHEN ROW_NUMBER() OVER (
|
||||||
|
PARTITION BY Rechnungsausgang.RK_ID
|
||||||
|
ORDER BY RechnungsausgangPositionen.LeistungsNr
|
||||||
|
) = 1
|
||||||
|
THEN Wert
|
||||||
|
END AS GoodsValue,
|
||||||
|
RechnungsausgangPositionen.AufschubkontoNr AS DefermentAccountNo,
|
||||||
|
RechnungsausgangPositionen.Weitere_Reg_Nr AS AdditionalReferenceNo,
|
||||||
|
[LKW Kennzeichen] AS VehicleRegistrationNo,
|
||||||
|
Grenze AS BorderCrossing
|
||||||
|
FROM [VERAG].[dbo].[Rechnungsausgang]
|
||||||
|
inner join Adressen on RechnungsKundenNr=AdressenNr
|
||||||
|
inner join RechnungsausgangPositionen on Rechnungsausgang.RK_ID= RechnungsausgangPositionen.rk_id
|
||||||
|
where 1=1 " & getRechnungsAusgangWhere() & " order by rechnungsdatum,RechnungsNr,CustomerNo, LeistungsNr ", "FMZOLL",, getSpedbuchList())
|
||||||
|
|
||||||
|
Dim Path = ""
|
||||||
|
If dt IsNot Nothing And dt.Rows.Count > 0 Then
|
||||||
|
Dim lastRow As Integer = dt.Rows.Count + 1
|
||||||
|
|
||||||
|
Dim fileName As String = cProgramFunctions.genExcelFromDT_NEW(dt,
|
||||||
|
rangeAsWaehrung:={
|
||||||
|
"N2:N" & lastRow, ' UnitPrice
|
||||||
|
"O2:O" & lastRow, ' NetAmountTaxFree
|
||||||
|
"P2:P" & lastRow, ' NetAmountTaxable
|
||||||
|
"Q2:Q" & lastRow, ' VATAmount
|
||||||
|
"R2:R" & lastRow, ' GrossAmountTaxable
|
||||||
|
"S2:S" & lastRow, ' GrossAmountTotal
|
||||||
|
"V2:V" & lastRow ' GoodsValue
|
||||||
|
},
|
||||||
|
ShowAutoFilter:=True,
|
||||||
|
HeaderTxt:="",
|
||||||
|
waehrungsZeichen:="",
|
||||||
|
fitCellsToContent:=True,
|
||||||
|
Landscape:=True,
|
||||||
|
fitWideToOnePage:=True,
|
||||||
|
openFile:=True)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message & ex.StackTrace)
|
||||||
|
End Try
|
||||||
|
Me.Cursor = Cursors.Default
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Binary file not shown.
@@ -3660,13 +3660,13 @@ Public Class usrCntlSpeditionsBuchSuche
|
|||||||
|
|
||||||
|
|
||||||
If CheckBox4.Checked Then
|
If CheckBox4.Checked Then
|
||||||
RPT.RunReport_VERAG_ZA_DETAIL_FULL(770931, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text))
|
RPT.RunReport_VERAG_ZA_DETAIL_FULL(770931, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), getSpedBuchWhere,, getSpedbuchList)
|
||||||
|
|
||||||
ElseIf cbxDetailbericht.Checked Then
|
ElseIf cbxDetailbericht.Checked Then
|
||||||
RPT.RunReport_VERAG_ZA_DETAIL(770931, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text))
|
RPT.RunReport_VERAG_ZA_DETAIL(770931, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), getSpedBuchWhere, , getSpedbuchList)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
RPT.RunReport_VERAG_ZA_GENERAL(770931, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text),,, CheckBox5.Checked)
|
RPT.RunReport_VERAG_ZA_GENERAL(770931, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), getSpedBuchWhere,, CheckBox5.Checked, getSpedbuchList)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3990,9 +3990,9 @@ Class cSpeditionsbuchReport
|
|||||||
AbfVon As Date,
|
AbfVon As Date,
|
||||||
AbfBis As Date,
|
AbfBis As Date,
|
||||||
Optional whereStr As String = "",
|
Optional whereStr As String = "",
|
||||||
Optional Open As Boolean = True) As String
|
Optional Open As Boolean = True, Optional list As List(Of SQLVariable) = Nothing) As String
|
||||||
Try
|
Try
|
||||||
Dim dt As DataTable = LoadSpeditionsbuchData(KDNR, AbfVon, AbfBis, whereStr)
|
Dim dt As DataTable = LoadSpeditionsbuchData(KDNR, AbfVon, AbfBis, whereStr, list)
|
||||||
If dt Is Nothing OrElse dt.Rows.Count = 0 Then
|
If dt Is Nothing OrElse dt.Rows.Count = 0 Then
|
||||||
Return ""
|
Return ""
|
||||||
End If
|
End If
|
||||||
@@ -4054,9 +4054,9 @@ Class cSpeditionsbuchReport
|
|||||||
AbfBis As Date,
|
AbfBis As Date,
|
||||||
Optional whereStr As String = "",
|
Optional whereStr As String = "",
|
||||||
Optional Open As Boolean = True,
|
Optional Open As Boolean = True,
|
||||||
Optional DL_Kosten As Boolean = False) As String
|
Optional DL_Kosten As Boolean = False, Optional list As List(Of SQLVariable) = Nothing) As String
|
||||||
Try
|
Try
|
||||||
Dim dt As DataTable = LoadSpeditionsbuchData(KDNR, AbfVon, AbfBis, whereStr)
|
Dim dt As DataTable = LoadSpeditionsbuchData(KDNR, AbfVon, AbfBis, whereStr, list)
|
||||||
If dt Is Nothing OrElse dt.Rows.Count = 0 Then
|
If dt Is Nothing OrElse dt.Rows.Count = 0 Then
|
||||||
Return ""
|
Return ""
|
||||||
End If
|
End If
|
||||||
@@ -4117,7 +4117,7 @@ Class cSpeditionsbuchReport
|
|||||||
Private Function LoadSpeditionsbuchData(KDNR As Integer,
|
Private Function LoadSpeditionsbuchData(KDNR As Integer,
|
||||||
AbfVon As Date,
|
AbfVon As Date,
|
||||||
AbfBis As Date,
|
AbfBis As Date,
|
||||||
Optional whereStr As String = "") As DataTable
|
Optional whereStr As String = "", Optional list As List(Of SQLVariable) = Nothing) As DataTable
|
||||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
|
|
||||||
Dim sqlText As String =
|
Dim sqlText As String =
|
||||||
@@ -4139,7 +4139,7 @@ Class cSpeditionsbuchReport
|
|||||||
" AND Abfertigungsdatum BETWEEN '" & AbfVon.ToShortDateString & "' AND '" & AbfBis.ToShortDateString & "' " &
|
" AND Abfertigungsdatum BETWEEN '" & AbfVon.ToShortDateString & "' AND '" & AbfBis.ToShortDateString & "' " &
|
||||||
" AND isAbfertigung = 1 "
|
" AND isAbfertigung = 1 "
|
||||||
|
|
||||||
Return SQL.loadDgvBySql(sqlText & " " & whereStr, "FMZOLL")
|
Return SQL.loadDgvBySql_Param(sqlText & " " & whereStr, "FMZOLL",, list)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function CreateTargetPath(AbfVon As Date, AbfBis As Date, prefix As String) As String
|
Private Function CreateTargetPath(AbfVon As Date, AbfBis As Date, prefix As String) As String
|
||||||
@@ -4750,7 +4750,7 @@ Class cSpeditionsbuchReport
|
|||||||
AbfVon As Date,
|
AbfVon As Date,
|
||||||
AbfBis As Date,
|
AbfBis As Date,
|
||||||
Optional whereStr As String = "",
|
Optional whereStr As String = "",
|
||||||
Optional Open As Boolean = True) As String
|
Optional Open As Boolean = True, Optional list As List(Of SQLVariable) = Nothing) As String
|
||||||
Try
|
Try
|
||||||
Dim dt As DataTable = LoadSpeditionsbuchData(KDNR, AbfVon, AbfBis, whereStr)
|
Dim dt As DataTable = LoadSpeditionsbuchData(KDNR, AbfVon, AbfBis, whereStr)
|
||||||
If dt Is Nothing OrElse dt.Rows.Count = 0 Then
|
If dt Is Nothing OrElse dt.Rows.Count = 0 Then
|
||||||
|
|||||||
@@ -1248,11 +1248,60 @@ Public Class cProgramFunctions
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'If fitCellsToContent Then
|
||||||
|
' wb.Worksheets(0).Columns().AdjustToContents()
|
||||||
|
' ' wb.Worksheets(0).Rows().AdjustToContents() ' weglassen
|
||||||
|
'End If
|
||||||
If fitCellsToContent Then
|
If fitCellsToContent Then
|
||||||
wb.Worksheets(0).Columns().AdjustToContents()
|
Dim ws = wb.Worksheets(0)
|
||||||
wb.Worksheets(0).Rows().AdjustToContents()
|
For i As Integer = 0 To dt.Columns.Count - 1
|
||||||
|
|
||||||
|
Dim maxLen As Integer = dt.Columns(i).ColumnName.Length
|
||||||
|
|
||||||
|
For Each dr As DataRow In dt.Rows
|
||||||
|
|
||||||
|
If Not IsDBNull(dr(i)) Then
|
||||||
|
maxLen = Math.max(maxLen, dr(i).ToString.Length)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
ws.Column(i + 1).Width = Math.min(Math.max(maxLen * 1.1, 8), 60)
|
||||||
|
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'If fitCellsToContent Then
|
||||||
|
|
||||||
|
' Dim ws = wb.Worksheets(0)
|
||||||
|
|
||||||
|
' For Each col In ws.ColumnsUsed()
|
||||||
|
|
||||||
|
' 'Header berücksichtigen
|
||||||
|
' Dim width As Double = col.FirstCell().GetString().Length + 2
|
||||||
|
|
||||||
|
' 'zusätzlich einige Stichproben aus den Daten
|
||||||
|
' Dim lastRow As Integer = Math.min(ws.LastRowUsed().RowNumber(), 500)
|
||||||
|
|
||||||
|
' For r As Integer = 2 To lastRow Step 25
|
||||||
|
' Dim txt = col.Cell(r).GetFormattedString()
|
||||||
|
|
||||||
|
' If txt.Length + 2 > width Then
|
||||||
|
' width = txt.Length + 2
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
|
||||||
|
' 'Mindest- und Maximalbreite
|
||||||
|
' width = Math.max(width, 8)
|
||||||
|
' width = Math.min(width, 60)
|
||||||
|
|
||||||
|
' col.Width = width
|
||||||
|
|
||||||
|
' Next
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
If Landscape Then
|
If Landscape Then
|
||||||
wb.Worksheets(0).PageSetup.PageOrientation = XLPageOrientation.Landscape
|
wb.Worksheets(0).PageSetup.PageOrientation = XLPageOrientation.Landscape
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -2254,8 +2254,8 @@ Public Class usrCntlCBAM
|
|||||||
|
|
||||||
|
|
||||||
doVERAG_SUM(LIST, EORI(0))
|
doVERAG_SUM(LIST, EORI(0))
|
||||||
doVERAG_DETAIL_OLD(LIST, EORI(0))
|
' doVERAG_DETAIL_OLD(LIST, EORI(0))
|
||||||
'doVERAG_DETAIL(LIST, EORI(0))
|
doVERAG_DETAIL(LIST, EORI(0))
|
||||||
If cbxVERAG_GPXLS.Checked Then doVERAG_GREENPULSE_XLS(LIST, EORI(0))
|
If cbxVERAG_GPXLS.Checked Then doVERAG_GREENPULSE_XLS(LIST, EORI(0))
|
||||||
|
|
||||||
|
|
||||||
@@ -2455,6 +2455,7 @@ Public Class usrCntlCBAM
|
|||||||
.Ursprungsland = If(it.zaItem_OriginCountry, ""),
|
.Ursprungsland = If(it.zaItem_OriginCountry, ""),
|
||||||
.VersendungsLand = If(za.za_CountryDispatch, ""),
|
.VersendungsLand = If(za.za_CountryDispatch, ""),
|
||||||
.BestimmungsLand = If(za.za_CountryDestination, ""),
|
.BestimmungsLand = If(za.za_CountryDestination, ""),
|
||||||
|
.GoodsDescription = If(it.zaItem_Description, ""),
|
||||||
.Rechnungspreis = If(it.zaItem_InvoiceValueEUR, it.zaItem_StatisticalValueEUR),
|
.Rechnungspreis = If(it.zaItem_InvoiceValueEUR, it.zaItem_StatisticalValueEUR),
|
||||||
.Rechnungswaehrung = If(it.zaItem_InvoiceCurrency, ""),
|
.Rechnungswaehrung = If(it.zaItem_InvoiceCurrency, ""),
|
||||||
.EmpfaengerEORI = If(importer IsNot Nothing, If(importer.zaParty_EORI, ""), ""),
|
.EmpfaengerEORI = If(importer IsNot Nothing, If(importer.zaParty_EORI, ""), ""),
|
||||||
@@ -2488,9 +2489,10 @@ Public Class usrCntlCBAM
|
|||||||
dt.Columns.Add("gross_mass_kg")
|
dt.Columns.Add("gross_mass_kg")
|
||||||
dt.Columns.Add("origin_country")
|
dt.Columns.Add("origin_country")
|
||||||
dt.Columns.Add("dispatch_country")
|
dt.Columns.Add("dispatch_country")
|
||||||
dt.Columns.Add("destination_country")
|
dt.Columns.Add("destination_country")
|
||||||
dt.Columns.Add("invoice_number")
|
dt.Columns.Add("goods_description")
|
||||||
dt.Columns.Add("invoice_date")
|
dt.Columns.Add("invoice_number")
|
||||||
|
dt.Columns.Add("invoice_date")
|
||||||
dt.Columns.Add("invoice_amount")
|
dt.Columns.Add("invoice_amount")
|
||||||
dt.Columns.Add("invoice_currency")
|
dt.Columns.Add("invoice_currency")
|
||||||
dt.Columns.Add("sender_eori")
|
dt.Columns.Add("sender_eori")
|
||||||
@@ -2591,14 +2593,14 @@ Public Class usrCntlCBAM
|
|||||||
)
|
)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
benchmark = If(benchmarkObj Is Nothing, "", Convert.ToString(benchmarkObj))
|
benchmark = If(benchmarkObj Is Nothing, "", Convert.ToDecimal(benchmarkObj).ToString("N2"))
|
||||||
emission = If(emissionObj Is Nothing, "", Convert.ToString(emissionObj))
|
emission = If(emissionObj Is Nothing, "", Convert.ToDecimal(emissionObj).ToString("N2"))
|
||||||
faktor = If(faktorObj Is Nothing, "", Convert.ToString(faktorObj))
|
faktor = If(faktorObj Is Nothing, "", Convert.ToDecimal(faktorObj).ToString("N2"))
|
||||||
|
|
||||||
If IsNumeric(costObj) Then
|
If IsNumeric(costObj) Then
|
||||||
If CDbl(costObj) >= 0 Then
|
If CDbl(costObj) >= 0 Then
|
||||||
cost = Convert.ToString(costObj)
|
cost = Convert.ToDecimal(costObj).ToString("N2")
|
||||||
Else
|
Else
|
||||||
cost = ""
|
cost = ""
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -2615,15 +2617,16 @@ Public Class usrCntlCBAM
|
|||||||
row("customer_reference") = If(KdAtrNr, "")
|
row("customer_reference") = If(KdAtrNr, "")
|
||||||
row("representation_type") = If(r.VertretungsVerhaeltnis, "")
|
row("representation_type") = If(r.VertretungsVerhaeltnis, "")
|
||||||
row("tariff_code") = If(r.Tarifnummer, "")
|
row("tariff_code") = If(r.Tarifnummer, "")
|
||||||
row("net_mass_kg") = If(r.Eigenmasse Is Nothing, "", Convert.ToString(r.Eigenmasse))
|
row("net_mass_kg") = If(r.Eigenmasse Is Nothing, "", Convert.ToDecimal(r.Eigenmasse).ToString("N2"))
|
||||||
row("gross_mass_kg") = If(r.Rohmasse Is Nothing, "", Convert.ToString(r.Rohmasse))
|
row("gross_mass_kg") = If(r.Rohmasse Is Nothing, "", Convert.ToDecimal(r.Rohmasse).ToString("N2"))
|
||||||
row("origin_country") = If(r.Ursprungsland, "")
|
row("origin_country") = If(r.Ursprungsland, "")
|
||||||
row("dispatch_country") = If(r.VersendungsLand, "")
|
row("dispatch_country") = If(r.VersendungsLand, "")
|
||||||
row("destination_country") = If(r.BestimmungsLand, "")
|
row("destination_country") = If(r.BestimmungsLand, "")
|
||||||
|
row("goods_description") = If(r.GoodsDescription, "")
|
||||||
|
|
||||||
row("invoice_number") = If(r.Rechnungsnummer, "")
|
row("invoice_number") = If(r.Rechnungsnummer, "")
|
||||||
row("invoice_date") = If(r.Rechnungsdatum Is Nothing, "", CDate(r.Rechnungsdatum).ToString("yyyy-MM-dd"))
|
row("invoice_date") = If(r.Rechnungsdatum Is Nothing, "", CDate(r.Rechnungsdatum).ToString("yyyy-MM-dd"))
|
||||||
row("invoice_amount") = If(r.Rechnungspreis Is Nothing, "", Convert.ToString(r.Rechnungspreis))
|
row("invoice_amount") = If(r.Rechnungspreis Is Nothing, "", Convert.ToDecimal(r.Rechnungspreis).ToString("N2"))
|
||||||
row("invoice_currency") = If(r.Rechnungswaehrung, "")
|
row("invoice_currency") = If(r.Rechnungswaehrung, "")
|
||||||
|
|
||||||
row("sender_eori") = If(r.AbsenderEORI, "")
|
row("sender_eori") = If(r.AbsenderEORI, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user