ustva, uta, etc.
This commit is contained in:
@@ -5,13 +5,13 @@ Imports System.Windows.Documents
|
||||
Imports com.sun.org.apache.xml.internal.resolver
|
||||
Imports com.sun.tools.internal.ws.wsdl.framework
|
||||
Imports DocumentFormat.OpenXml.Office2010.Drawing.Charts
|
||||
Imports iTextSharp.text.pdf
|
||||
Imports iTextSharp.text.pdf.parser
|
||||
Imports itextsharp.text.pdf
|
||||
Imports itextsharp.text.pdf.parser
|
||||
Imports java.text.Normalizer
|
||||
Imports jdk.nashorn.internal.objects.annotations
|
||||
'Imports DocumentFormat.OpenXml.Drawing.Charts
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports Org.BouncyCastle.Pqc.Crypto
|
||||
Imports org.BouncyCastle.Pqc.Crypto
|
||||
Imports sun.swing
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
@@ -682,7 +682,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim bytSchnittstellenNr = 1
|
||||
Dim USTV_ANTRAG As New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(UStVAn_ID)
|
||||
Dim dt_RE As New DataTable
|
||||
Dim GET_Rechnungen = cTrdInvoice.GET_RECHNUNGEN(dt_RE, USTV_ANTRAG.UStVAn_ReDatVon, USTV_ANTRAG.UStVAn_ReDatBis, USTV_ANTRAG.UStVAn_KuNr)
|
||||
Dim GET_Rechnungen = cTrdInvoice.GET_RECHNUNGEN(dt_RE, USTV_ANTRAG.UStVAn_ReDatVon, USTV_ANTRAG.UStVAn_ReDatBis, USTV_ANTRAG.UStVAn_KuNr, ArchivierteEintracheNochmalsEinarbetien)
|
||||
|
||||
Dim verarbeitet As Boolean = True
|
||||
If GET_Rechnungen Then
|
||||
@@ -749,7 +749,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
|
||||
If USTV_POS.INSERT() Then
|
||||
verarbeitet = sql.doSQL("Update tblTrdinInvoice SET tblTrdinInvoice.UStVAn_ID = NULL WHERE tblTrdinInvoice.Rechnungsdatum = '" & USTV_POS.UStVPo_ReDat & "' And tblTrdinInvoice.Rechnungsnummer = " & USTV_POS.UStVPo_ReNr, "FMZOLL")
|
||||
verarbeitet = sql.doSQL("Update tblTrdinInvoice SET tblTrdinInvoice.UStVAn_ID = " & USTV_POS.UStVAn_ID & " WHERE tblTrdinInvoice.Rechnungsdatum = '" & USTV_POS.UStVPo_ReDat & "' And tblTrdinInvoice.Rechnungsnummer = " & USTV_POS.UStVPo_ReNr, "FMZOLL")
|
||||
If Not verarbeitet Then
|
||||
MsgBox("Fehler beim Setzen der UStVAn_ID")
|
||||
Return verarbeitet
|
||||
@@ -916,6 +916,7 @@ Public Class frmMDM_USTVAntrag
|
||||
For Each r As DataRow In dt.Rows
|
||||
|
||||
Dim kdnr = r.Item("Kundennummer")
|
||||
Dim kdnrUTA = r.Item("KundennummerUTA")
|
||||
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
@@ -956,7 +957,8 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
|
||||
If USTV_POS.INSERT() Then
|
||||
cUTA.UPDATE_ARCHIV(USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr, kdnr, USTV_POS.UStVAn_ID)
|
||||
'kdnnr von UTA nicht unsere verwenden!!!!
|
||||
cUTA.UPDATE_ARCHIV(USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr, kdnrUTA, USTV_POS.UStVAn_ID)
|
||||
End If
|
||||
'tblUStVPositionen
|
||||
End If
|
||||
@@ -1519,11 +1521,11 @@ Public Class frmMDM_USTVAntrag
|
||||
Try
|
||||
|
||||
Dim fi As New System.IO.DirectoryInfo(path_src)
|
||||
Dim pdfReader As iTextSharp.text.pdf.PdfReader = New iTextSharp.text.pdf.PdfReader(path_src)
|
||||
Dim pdfReader As itextsharp.text.pdf.PdfReader = New itextsharp.text.pdf.PdfReader(path_src)
|
||||
|
||||
Dim TMP_Path_New = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath(fi.Name, fi.Extension,, True, "IDS-Rechnungen")
|
||||
Dim srcDoc As New iTextSharp.text.Document()
|
||||
Dim PdfCopyProvider As New iTextSharp.text.pdf.PdfCopy(srcDoc, New FileStream(TMP_Path_New, System.IO.FileMode.Create))
|
||||
Dim srcDoc As New itextsharp.text.Document()
|
||||
Dim PdfCopyProvider As New itextsharp.text.pdf.PdfCopy(srcDoc, New FileStream(TMP_Path_New, System.IO.FileMode.Create))
|
||||
PdfCopyProvider.SetFullCompression()
|
||||
srcDoc.Open()
|
||||
PdfReader.unethicalreading = True
|
||||
@@ -1534,7 +1536,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim strategy As ITextExtractionStrategy = New SimpleTextExtractionStrategy()
|
||||
Dim currentpagetext As String = PdfTextExtractor.GetTextFromPage(pdfReader, page, strategy)
|
||||
Dim searchtext As String = ReNr
|
||||
Dim impPage As iTextSharp.text.pdf.PdfImportedPage = Nothing
|
||||
Dim impPage As itextsharp.text.pdf.PdfImportedPage = Nothing
|
||||
|
||||
If (currentpagetext.Contains(searchtext)) Then
|
||||
|
||||
@@ -1547,7 +1549,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
impPage = PdfCopyProvider.GetImportedPage(pdfReader, page)
|
||||
' ----- Ermitteln der Seitenauflösung und setzen für die neue Seite
|
||||
PdfCopyProvider.SetPageSize(New iTextSharp.text.Rectangle(0.0F, 0.0F, impPage.Width, impPage.Height, pdfReader.GetPageRotation(page)))
|
||||
PdfCopyProvider.SetPageSize(New itextsharp.text.Rectangle(0.0F, 0.0F, impPage.Width, impPage.Height, pdfReader.GetPageRotation(page)))
|
||||
' ----- PDF Seite in das neue Dokument einfügen
|
||||
If impPage IsNot Nothing Then PdfCopyProvider.AddPage(impPage)
|
||||
Catch ex As Exception
|
||||
|
||||
70
SDL/USTV/frmUSTVoffeneAntraege.Designer.vb
generated
70
SDL/USTV/frmUSTVoffeneAntraege.Designer.vb
generated
@@ -23,9 +23,9 @@ Partial Class frmUSTVoffeneAntraege
|
||||
<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()
|
||||
Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
|
||||
Me.btn = New System.Windows.Forms.Button()
|
||||
Me.Button7 = New System.Windows.Forms.Button()
|
||||
@@ -57,6 +57,7 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.txtMWST = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.btnVerag = New System.Windows.Forms.Button()
|
||||
Me.FlowLayoutPanel.SuspendLayout()
|
||||
Me.Panel4.SuspendLayout()
|
||||
Me.pnlLand.SuspendLayout()
|
||||
@@ -75,6 +76,7 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.Button1)
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.Button2)
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.Button3)
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.btnVerag)
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.btnAlle)
|
||||
Me.FlowLayoutPanel.Location = New System.Drawing.Point(12, 29)
|
||||
Me.FlowLayoutPanel.Name = "FlowLayoutPanel"
|
||||
@@ -140,7 +142,7 @@ Partial Class frmUSTVoffeneAntraege
|
||||
'
|
||||
Me.btnAlle.BackColor = System.Drawing.Color.FloralWhite
|
||||
Me.btnAlle.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnAlle.Location = New System.Drawing.Point(633, 3)
|
||||
Me.btnAlle.Location = New System.Drawing.Point(759, 3)
|
||||
Me.btnAlle.Name = "btnAlle"
|
||||
Me.btnAlle.Size = New System.Drawing.Size(120, 23)
|
||||
Me.btnAlle.TabIndex = 5
|
||||
@@ -431,39 +433,50 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.MyDatagridview1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control
|
||||
DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
|
||||
Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
|
||||
DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control
|
||||
DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
|
||||
Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4
|
||||
Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window
|
||||
DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText
|
||||
DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
|
||||
Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle2
|
||||
DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window
|
||||
DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText
|
||||
DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
|
||||
Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle5
|
||||
Me.MyDatagridview1.Location = New System.Drawing.Point(12, 98)
|
||||
Me.MyDatagridview1.Name = "MyDatagridview1"
|
||||
Me.MyDatagridview1.ReadOnly = True
|
||||
DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control
|
||||
DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
|
||||
Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle3
|
||||
DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control
|
||||
DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
|
||||
Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle6
|
||||
Me.MyDatagridview1.RowHeadersWidth = 62
|
||||
Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.MyDatagridview1.Size = New System.Drawing.Size(1409, 528)
|
||||
Me.MyDatagridview1.TabIndex = 30
|
||||
'
|
||||
'btnVerag
|
||||
'
|
||||
Me.btnVerag.BackColor = System.Drawing.Color.FloralWhite
|
||||
Me.btnVerag.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnVerag.Location = New System.Drawing.Point(633, 3)
|
||||
Me.btnVerag.Name = "btnVerag"
|
||||
Me.btnVerag.Size = New System.Drawing.Size(120, 23)
|
||||
Me.btnVerag.TabIndex = 6
|
||||
Me.btnVerag.Text = "VERAG"
|
||||
Me.btnVerag.UseVisualStyleBackColor = False
|
||||
'
|
||||
'frmUSTVoffeneAntraege
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -527,4 +540,5 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Friend WithEvents cbxSteuerNr As CheckBox
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents cbxKundeLand As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents btnVerag As Button
|
||||
End Class
|
||||
|
||||
@@ -395,12 +395,76 @@ End With
|
||||
|
||||
End Sub
|
||||
|
||||
Sub initDgv_VERAG(anz As Integer, Optional kdnr As Integer = -1)
|
||||
Dim top = ""
|
||||
If anz > 0 Then top = "TOP (" & anz & ")"
|
||||
Dim sqlwhere = ""
|
||||
If kdnr > 0 Then
|
||||
sqlwhere &= " AND tblTrdinInvoice.RechnungsKundenNr = " & kdnr
|
||||
End If
|
||||
With MyDatagridview1
|
||||
.Columns.Clear()
|
||||
'Exit Sub
|
||||
'MsgBox(.sql)
|
||||
Dim sqlstring = "SELECT " & top & "
|
||||
tblTrdinInvoice.RechnungsKundenNr,
|
||||
Adressen.[Name 1],
|
||||
tblTrdinInvoice.Rechnungsdatum,
|
||||
'AT' as Land,
|
||||
tblTrdinInvoice.Rechnungsnummer,
|
||||
tblTrdinInvoice.SteuerbetragLokal
|
||||
FROM tblTrdinInvoice
|
||||
inner join Adressen on Adressen.AdressenNr = tblTrdinInvoice.RechnungsKundenNr
|
||||
WHERE tblTrdinInvoice.Rechnungsdatum Between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.UStVAn_ID is null AND tblTrdinInvoice.WährungLokal='EUR' " & sqlwhere & "
|
||||
ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer"
|
||||
.SET_SQL(sqlstring, "FMZOLL")
|
||||
.LOAD()
|
||||
If .Columns.Count > 0 Then
|
||||
|
||||
.Columns("RechnungsKundenNr").HeaderText = "KdNr"
|
||||
.Columns("Name 1").HeaderText = "Kunde"
|
||||
.Columns("Land").HeaderText = "Land"
|
||||
.Columns("Rechnungsdatum").HeaderText = "RE-Datum"
|
||||
.Columns("Rechnungsnummer").HeaderText = "RE-Nr"
|
||||
.Columns("SteuerbetragLokal").HeaderText = "MWSt Euro"
|
||||
.Columns("Name 1").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
|
||||
|
||||
End If
|
||||
|
||||
Dim sumMwSt As Double = 0
|
||||
|
||||
'Dim c As New DataGridViewImageColumn
|
||||
'c.Name = "clmnPDF" : c.HeaderText = "RE"
|
||||
'' c.Image = Nothing
|
||||
'c.DefaultCellStyle.NullValue = Nothing
|
||||
'c.ImageLayout = DataGridViewImageCellLayout.Zoom
|
||||
'c.Width = 40 : c.DefaultCellStyle.Padding = New Padding(2) : c.DefaultCellStyle.BackColor = Color.White
|
||||
''c.DefaultCellStyle.Tag = "Therefore anzeigen"
|
||||
|
||||
'If Not .Columns.Contains("clmnPDF") Then .Columns.Add(c)
|
||||
|
||||
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
sumMwSt += If(IsNumeric(r.Cells("SteuerbetragLokal").Value), CDbl(r.Cells("SteuerbetragLokal").Value), 0)
|
||||
'If Not IsDBNull(r.Cells("daId").Value) AndAlso r.Cells("daId").Value > 0 Then DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = My.Resources.pdf
|
||||
Next
|
||||
|
||||
txtAnzahl.Text = .Rows.Count
|
||||
txtMWST.Text = sumMwSt
|
||||
|
||||
|
||||
End With
|
||||
|
||||
End Sub
|
||||
|
||||
Sub initDgv_gesamt(anz As Integer, nichtEroeffneteAntraege As Boolean, Optional kdnr As Integer = -1)
|
||||
|
||||
Dim top = ""
|
||||
'If anz > 0 Then top = "TOP (" & anz & ")"
|
||||
|
||||
Dim sqlwhereIDS = ""
|
||||
Dim sqlwhereVERAG = ""
|
||||
Dim sqlwhereUTA = ""
|
||||
Dim sqlwhereRMC = ""
|
||||
Dim sqlwherePLOSE = ""
|
||||
@@ -412,6 +476,7 @@ End With
|
||||
sqlwherePLOSE &= " and AdressenNr = " & kdnr 'sqlwherePLOSE &= " and plose_POLSEKundennummer = " & kdnr
|
||||
sqlwhereIDS &= " and AdressenNr = " & kdnr 'sqlwhereIDS &= " and tblIDSTransactionsNew.KdNrVERAG = " & kdnr
|
||||
sqlwhereUTA &= " and AdressenNr = " & kdnr
|
||||
sqlwhereVERAG &= " and AdressenNr = " & kdnr
|
||||
sqlwhereRMC &= " and rmc_kdNr = " & kdnr
|
||||
sqlwhereMSE &= " and partner_customer_number = " & kdnr
|
||||
End If
|
||||
@@ -485,6 +550,20 @@ End With
|
||||
where cast([Rechnungsdatum] As Date) between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' And [tblUTAImportNew].UStVAn_ID is null
|
||||
" & sqlwhereUTA & "group by Adressen.AdressenNr, Kundennummer,Adressen.[Name 1],Adressen.LandKz ,[Rechnungsdatum], [Lieferland_ISO2] having sum([Gesamtbetrag_Umsatzsteuer_in_Darstellwährung]) <> 0
|
||||
|
||||
UNION ALL
|
||||
|
||||
Select " & top & "
|
||||
'VERAG' as Lieferant,
|
||||
tblTrdinInvoice.RechnungsKundenNr as KdNr,
|
||||
Adressen.[Name 1] as Kundenname,
|
||||
Adressen.LandKz as Kundenland,
|
||||
'AT'as Einreichland,
|
||||
tblTrdinInvoice.Rechnungsdatum,
|
||||
sum(tblTrdinInvoice.SteuerbetragLokal) as MWSt
|
||||
FROM [tblTrdinInvoice]
|
||||
inner join Adressen on Adressen.AdressenNr = tblTrdinInvoice.RechnungsKundenNr
|
||||
where tblTrdinInvoice.Rechnungsdatum Between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' AND tblTrdinInvoice.UStVAn_ID is null
|
||||
" & sqlwhereVERAG & "group by Adressen.AdressenNr, tblTrdinInvoice.RechnungsKundenNr,Adressen.[Name 1],Adressen.LandKz ,[Rechnungsdatum] having sum(tblTrdinInvoice.SteuerbetragLokal) <> 0
|
||||
|
||||
UNION ALL
|
||||
|
||||
@@ -623,6 +702,7 @@ End With
|
||||
Case "mse" : initDgv_MSE(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "uta" : initDgv_UTA(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "ids" : initDgv_IDS(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "verag" : initDgv_VERAG(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "alle" : initDgv_gesamt(txtmaxAnz.Text, cbxNichtEroeffneteAntraege.Checked, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
End Select
|
||||
End Sub
|
||||
@@ -641,6 +721,9 @@ End With
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
initLieferant("IDS", sender)
|
||||
End Sub
|
||||
Private Sub btnVerag_Click(sender As Object, e As EventArgs) Handles btnVerag.Click
|
||||
initLieferant("VERAG", sender)
|
||||
End Sub
|
||||
|
||||
Private Sub cbxAlleoffenen_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAlleoffenen.CheckedChanged, cbxSteuerNr.CheckedChanged, cbxNichtEroeffneteAntraege.CheckedChanged
|
||||
init()
|
||||
@@ -743,4 +826,6 @@ End With
|
||||
Private Sub cbxKundeLand_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cbxKundeLand.SelectedIndexChanged
|
||||
initDgv_gesamt(txtmaxAnz.Text, cbxNichtEroeffneteAntraege.Checked, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -187,7 +187,7 @@ Public Class cTrdInvoice
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function GET_RECHNUNGEN(ByRef dt As DataTable, von As Date, bis As Date, KundenNr As Integer) As Boolean
|
||||
Public Shared Function GET_RECHNUNGEN(ByRef dt As DataTable, von As Date, bis As Date, KundenNr As Integer, Optional Archiv As Object = Nothing) As Boolean
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
@@ -195,13 +195,13 @@ Public Class cTrdInvoice
|
||||
|
||||
Using cmd As New SqlCommand(" SELECT tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer, tblTrdinInvoice.SteuerbetragLokal, tblTrdinInvoice.UStVAn_ID
|
||||
FROM tblTrdinInvoice
|
||||
WHERE tblTrdinInvoice.Rechnungsdatum Between @von And @bis AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.RechnungsKundenNr=@AdressenNr AND tblTrdinInvoice.WährungLokal='EUR'
|
||||
WHERE tblTrdinInvoice.Rechnungsdatum Between @von And @bis AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.RechnungsKundenNr=@AdressenNr AND tblTrdinInvoice.WährungLokal='EUR' AND isnull(tblTrdinInvoice.UStVAn_ID,0) = " & IIf(Archiv IsNot Nothing AndAlso Archiv, 1, 0) & "
|
||||
ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer", conn)
|
||||
|
||||
cmd.Parameters.AddWithValue("@von", von)
|
||||
cmd.Parameters.AddWithValue("@bis", bis)
|
||||
cmd.Parameters.AddWithValue("@AdressenNr", KundenNr)
|
||||
'If Archiv IsNot Nothing Then cmd.Parameters.AddWithValue("@Archiv", If(Archiv, 1, 0))
|
||||
If Archiv IsNot Nothing Then cmd.Parameters.AddWithValue("@Archiv", If(Archiv, 1, 0))
|
||||
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
dt.Load(dr)
|
||||
|
||||
@@ -1348,12 +1348,12 @@ Public Class cUTA
|
||||
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
|
||||
Using cmd As New SqlCommand("SELECT [tblUTAImportNew].Rechnungsdatum, [tblUTAImportNew].Rechnungsnummer_pro_Lieferland AS Rechnungsnummer,Adressen.AdressenNr as Kundennummer,
|
||||
Using cmd As New SqlCommand("SELECT [tblUTAImportNew].Rechnungsdatum, [tblUTAImportNew].Rechnungsnummer_pro_Lieferland AS Rechnungsnummer,Adressen.AdressenNr as Kundennummer, [tblUTAImportNew].Kundennummer as KundennummerUTA,
|
||||
Sum([Gesamtbetrag_Brutto_in_Lieferlandwährung]-[Gesamtbetrag_Netto_in_Lieferlandwährung]) AS Umsatzsteuerbetrag_in_Lieferlandwährung, Lieferlandwährung_ISO,
|
||||
Sum([Gesamtbetrag_Brutto_in_Darstellwährung]-[Gesamtbetrag_Netto_in_Darstellwährung]) AS Umsatzsteuerbetrag_in_Darstellwährung, Darstellwährung_ISO, daId
|
||||
FROM [tblUTAImportNew] INNER JOIN Adressen ON [tblUTAImportNew].Kundennummer = Adressen.UTAKundenNr
|
||||
WHERE ([tblUTAImportNew].Rechnungsdatum Between '" & von.ToShortDateString & "' And '" & bis.ToShortDateString & "' AND [tblUTAImportNew].Lieferland_ISO2='" & LandKZ & "' AND [tblUTAImportNew].Lieferlandwährung_ISO='" & Wahrungscode & "' AND Adressen.AdressenNr=" & KundenNr & " AND charged = 1 AND isnull(tblUTAImportNew.UStVAn_ID,0) = " & IIf(Archiv IsNot Nothing AndAlso Archiv, 1, 0) & " )
|
||||
GROUP BY [tblUTAImportNew].Rechnungsdatum, [tblUTAImportNew].Rechnungsnummer_pro_Lieferland, Lieferlandwährung_ISO ,Darstellwährung_ISO,Adressen.AdressenNr, daId
|
||||
GROUP BY [tblUTAImportNew].Rechnungsdatum, [tblUTAImportNew].Rechnungsnummer_pro_Lieferland, Lieferlandwährung_ISO ,Darstellwährung_ISO,Adressen.AdressenNr,[tblUTAImportNew].Kundennummer, daId
|
||||
HAVING (((Sum([Gesamtbetrag_Brutto_in_Lieferlandwährung]-[Gesamtbetrag_Netto_in_Lieferlandwährung]))<>0));", conn)
|
||||
|
||||
cmd.Parameters.AddWithValue("@von", von)
|
||||
@@ -1391,7 +1391,6 @@ Public Class cUTA
|
||||
|
||||
|
||||
Return SQL.doSQLVarList("
|
||||
|
||||
UPDATE [tblUTAImportNew] set archiv=1, [archiviertDatum]=GETDATE(), UStVAn_ID = @ustvaId
|
||||
WHERE cast(Rechnungsdatum as date) = @reDat and Rechnungsnummer_pro_Lieferland = @reNr and Kundennummer=@uta_kdNr
|
||||
", "FMZOLL",, list)
|
||||
|
||||
@@ -41,6 +41,7 @@ Public Class frmMitarbeitersuche
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MITARBEITER_VERZEICHNIS", "SDL") Then
|
||||
MsgBox("Noch nicht verfügbar!")
|
||||
Me.Close()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_MAVerzeichnis_SettingsTstmp Is Nothing And Not VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_pseudoUser Then
|
||||
|
||||
Reference in New Issue
Block a user