USTVA - doppelte Rechnungspos, etc.
This commit is contained in:
@@ -985,8 +985,6 @@ Public Class cFakturierung
|
||||
Case 24
|
||||
rpt.picVERAG.Image = My.Resources.ambar_boarder
|
||||
rpt.Picture1.Image = Nothing
|
||||
rpt.txtWarenwert.Visible = False
|
||||
rpt.lblWarenWertUeberschrift.Visible = False
|
||||
|
||||
Case 26
|
||||
rpt.picVERAG.Image = My.Resources.VERAG_UNISPED_Logo
|
||||
@@ -1527,7 +1525,7 @@ Public Class cFakturierung
|
||||
' Case 26 : rpt.picVERAG.Image = My.Resources.VERAG_UNISPED_Logo : rpt.Picture1.Image = Nothing
|
||||
' Case 23 : rpt.picVERAG.Image = My.Resources.Unisped_ZS_logo : rpt.Picture1.Image = My.Resources.unisped_aeo_ZS_AT
|
||||
' Case 24 : rpt.picVERAG.Image = My.Resources.ambar_boarder : rpt.Picture1.Image = Nothing
|
||||
' rpt.txtAvisierer.Visible = False : rpt.lblAvisiererUeberschrift.Visible = False : rpt.txtWarenwert.Visible = False : rpt.lblWarenWertUeberschrift.Visible = False
|
||||
' rpt.txtAvisierer.Visible = False : rpt.lblAvisiererUeberschrift.Visible = False :
|
||||
|
||||
'End Select
|
||||
|
||||
@@ -1585,6 +1583,9 @@ Public Class cFakturierung
|
||||
rpt.txtWarenwert.Visible = False
|
||||
rpt.txtGrenze.Visible = False
|
||||
rpt.txtGrenzeUeberschrift.Visible = False
|
||||
ElseIf firma.Firma_ID = 24 Then
|
||||
rpt.txtWarenwert.Visible = False
|
||||
rpt.lblWarenWertUeberschrift.Visible = False
|
||||
End If
|
||||
|
||||
rpt.txtZollbelegNr.Text = If(Rechnung.BelegNr, "")
|
||||
@@ -2300,7 +2301,7 @@ Public Class cFakturierung
|
||||
' Case 26 : rpt.picVERAG.Image = My.Resources.VERAG_UNISPED_Logo : rpt.Picture1.Image = Nothing
|
||||
' Case 23 : rpt.picVERAG.Image = My.Resources.Unisped_ZS_logo : rpt.Picture1.Image = My.Resources.unisped_aeo_ZS_AT
|
||||
' Case 24 : rpt.picVERAG.Image = My.Resources.ambar_boarder : rpt.Picture1.Image = Nothing
|
||||
' rpt.txtWarenwert.Visible = False : rpt.lblWarenWertUeberschrift.Visible = False
|
||||
'
|
||||
|
||||
'End Select
|
||||
|
||||
@@ -2331,6 +2332,9 @@ Public Class cFakturierung
|
||||
rpt.txtGrenzeUeberschrift.Visible = False
|
||||
rpt.lblWarenWertUeberschrift.Visible = False
|
||||
rpt.txtWarenwert.Visible = False
|
||||
Case 24
|
||||
rpt.txtWarenwert.Visible = False
|
||||
rpt.lblWarenWertUeberschrift.Visible = False
|
||||
End Select
|
||||
|
||||
rpt.lblKundenNr.Text = If(RECHNUNG.RechnungsKundenNr > 0, RECHNUNG.RechnungsKundenNr, "")
|
||||
@@ -3751,7 +3755,7 @@ Public Class cFakturierung
|
||||
Return getSignature(RECHNUNG.RechnungsLandKz, RECHNUNG.Firma_ID,,,,,,,, useLogosFromDB)
|
||||
End Function
|
||||
|
||||
Shared Function getSignature(Optional landKz = "", Optional firma = -1, Optional individuell = False, Optional displayFirmenmane = True, Optional special = "", Optional additionalLine = "", Optional departmentmailadress = True, Optional fakturierung = False, Optional firmenSignature = False, Optional useLogosFromDB = False) As String
|
||||
Shared Function getSignature(Optional landKz = "", Optional firma = -1, Optional individuell = False, Optional displayFirmenmane = True, Optional special = "", Optional additionalLine = "", Optional departmentmailadress = True, Optional fakturierung = False, Optional firmenSignature = False, Optional useSignatureFromDB = False) As String
|
||||
getSignature = ""
|
||||
|
||||
firma = getFirmaNr(firma)
|
||||
@@ -3768,7 +3772,7 @@ Public Class cFakturierung
|
||||
|
||||
Dim firma_temp As New cFirmen(firma)
|
||||
|
||||
If useLogosFromDB AndAlso (firma_temp.Firma_Logo IsNot Nothing OrElse firma_temp.Firma_Logo_Erweitert IsNot Nothing) Then
|
||||
If useSignatureFromDB AndAlso (firma_temp.Firma_Logo IsNot Nothing OrElse firma_temp.Firma_Logo_Erweitert IsNot Nothing) Then
|
||||
|
||||
|
||||
Dim logo As Byte()
|
||||
|
||||
@@ -1021,7 +1021,7 @@ Public Class frmFaktSammelRgDrucken
|
||||
Dim ShowInfo As String = ""
|
||||
fun.sendMailSammelrechnung(CDate(txtRechnungsdatum.Text), Sammelrechung, Firma, getAvisoIds(), getKundenNr(), cbxMailoeffnen.Checked,, CDate(txtZeitraumBis.Text), cbxMailoeffnen.Checked, ShowInfo)
|
||||
|
||||
If cbxMailoeffnen.Checked Then
|
||||
If cbxMailoeffnen.Checked AndAlso Not ShowInfo.Contains("Empfänger") Then
|
||||
ShowInfo = ""
|
||||
End If
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.5.6.3")>
|
||||
<Assembly: AssemblyFileVersion("1.5.6.3")>
|
||||
<Assembly: AssemblyVersion("1.5.6.4")>
|
||||
<Assembly: AssemblyFileVersion("1.5.6.4")>
|
||||
|
||||
71
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
71
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
@@ -122,7 +122,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.pnlAntragsPosDetails = New System.Windows.Forms.Panel()
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||
Me.Panel4 = New System.Windows.Forms.Panel()
|
||||
Me.cbxKIUploaddelete = New System.Windows.Forms.CheckBox()
|
||||
Me.scanUSTVA = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
|
||||
@@ -133,7 +132,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||
Me.dgvErstattungspositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.pnlErstattungsdetails = New System.Windows.Forms.Panel()
|
||||
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
@@ -150,6 +148,9 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.FakturiertToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.txtWarning = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
|
||||
Me.pnlBottom.SuspendLayout()
|
||||
CType(Me.pbXMLExport, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.pbMail, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -429,6 +430,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
'pnlHeader
|
||||
'
|
||||
Me.pnlHeader.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.pnlHeader.Controls.Add(Me.txtWarning)
|
||||
Me.pnlHeader.Controls.Add(Me.cbxRGretour)
|
||||
Me.pnlHeader.Controls.Add(Me.lblGesamtUSteuer)
|
||||
Me.pnlHeader.Controls.Add(Me.lblDiffernezbetrag)
|
||||
@@ -560,7 +562,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.lblKdNr.ForeColor = System.Drawing.Color.White
|
||||
Me.lblKdNr.Location = New System.Drawing.Point(79, 62)
|
||||
Me.lblKdNr.Name = "lblKdNr"
|
||||
Me.lblKdNr.Size = New System.Drawing.Size(422, 18)
|
||||
Me.lblKdNr.Size = New System.Drawing.Size(390, 18)
|
||||
Me.lblKdNr.TabIndex = 21
|
||||
Me.lblKdNr.Text = "0000000"
|
||||
'
|
||||
@@ -1575,7 +1577,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.lblFirma.ForeColor = System.Drawing.Color.White
|
||||
Me.lblFirma.Location = New System.Drawing.Point(79, 42)
|
||||
Me.lblFirma.Name = "lblFirma"
|
||||
Me.lblFirma.Size = New System.Drawing.Size(422, 18)
|
||||
Me.lblFirma.Size = New System.Drawing.Size(390, 18)
|
||||
Me.lblFirma.TabIndex = 3
|
||||
Me.lblFirma.Text = "VERAG Spedition AG"
|
||||
'
|
||||
@@ -1670,14 +1672,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel2.Size = New System.Drawing.Size(1428, 263)
|
||||
Me.Panel2.TabIndex = 1
|
||||
'
|
||||
'UstCntlUSTV_AntragPosition1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(154, 0)
|
||||
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
|
||||
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1272, 261)
|
||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
||||
'
|
||||
'Panel4
|
||||
'
|
||||
Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
@@ -1823,14 +1817,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.pnlErstattungsdetails.Size = New System.Drawing.Size(1426, 261)
|
||||
Me.pnlErstattungsdetails.TabIndex = 0
|
||||
'
|
||||
'UstCntlUSTV_AntragErstattungen1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Location = New System.Drawing.Point(154, 0)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Name = "UstCntlUSTV_AntragErstattungen1"
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1270, 259)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
@@ -1949,6 +1935,50 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.FakturiertToolStripMenuItem.Text = "Fakturiert zurücksetzen"
|
||||
Me.FakturiertToolStripMenuItem.Visible = False
|
||||
'
|
||||
'txtWarning
|
||||
'
|
||||
Me.txtWarning._DateTimeOnly = False
|
||||
Me.txtWarning._numbersOnly = False
|
||||
Me.txtWarning._numbersOnlyKommastellen = ""
|
||||
Me.txtWarning._numbersOnlyTrennzeichen = False
|
||||
Me.txtWarning._Prozent = False
|
||||
Me.txtWarning._ShortDateNew = False
|
||||
Me.txtWarning._ShortDateOnly = False
|
||||
Me.txtWarning._TimeOnly = False
|
||||
Me.txtWarning._TimeOnly_Seconds = False
|
||||
Me.txtWarning._value = ""
|
||||
Me.txtWarning._Waehrung = False
|
||||
Me.txtWarning._WaehrungZeichen = False
|
||||
Me.txtWarning.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.txtWarning.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtWarning.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtWarning.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtWarning.Location = New System.Drawing.Point(475, 36)
|
||||
Me.txtWarning.MaxLength = 10
|
||||
Me.txtWarning.MaxLineLength = -1
|
||||
Me.txtWarning.MaxLines_Warning = ""
|
||||
Me.txtWarning.MaxLines_Warning_Label = Nothing
|
||||
Me.txtWarning.Multiline = True
|
||||
Me.txtWarning.Name = "txtWarning"
|
||||
Me.txtWarning.Size = New System.Drawing.Size(88, 40)
|
||||
Me.txtWarning.TabIndex = 61
|
||||
'
|
||||
'UstCntlUSTV_AntragPosition1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(154, 0)
|
||||
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
|
||||
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1272, 261)
|
||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
||||
'
|
||||
'UstCntlUSTV_AntragErstattungen1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Location = New System.Drawing.Point(154, 0)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Name = "UstCntlUSTV_AntragErstattungen1"
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1270, 259)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
|
||||
'
|
||||
'frmMDM_USTVAntrag
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -2123,4 +2153,5 @@ Partial Class frmMDM_USTVAntrag
|
||||
Friend WithEvents btnSortNachLeist As Button
|
||||
Friend WithEvents txtVZOffen As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label19 As Label
|
||||
Friend WithEvents txtWarning As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
End Class
|
||||
|
||||
@@ -57,6 +57,7 @@ Public Class frmMDM_USTVAntrag
|
||||
lblGesamtErstattungFW.Text = "-"
|
||||
lblDiffernezbetragFW.Text = "-"
|
||||
|
||||
txtWarning.Text = ""
|
||||
|
||||
lblGesamtUSteuer.Text = "-"
|
||||
lblGesamtErstattung.Text = "-"
|
||||
@@ -187,6 +188,9 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If Not .Columns.Contains("clmnPDF") Then .Columns.Add(c)
|
||||
|
||||
Dim invoiceNumbers As New HashSet(Of String)
|
||||
|
||||
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
|
||||
Dim da_id As Integer = -1
|
||||
@@ -203,6 +207,17 @@ Public Class frmMDM_USTVAntrag
|
||||
DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = My.Resources.pdf
|
||||
End If
|
||||
|
||||
|
||||
Dim rechnungsNr = CStr(r.Cells("UStVPo_ReNr").Value)
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(rechnungsNr) Then
|
||||
If Not invoiceNumbers.Add(rechnungsNr) Then
|
||||
txtWarning.Text = "dopp. Rechnungsnr!"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
If .Columns.Count > 1 Then
|
||||
@@ -1817,6 +1832,8 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If UStVAn_ID > 0 Then
|
||||
|
||||
Dim invoiceNumbers As New HashSet(Of String)
|
||||
|
||||
dgvUSTVPositionen.GetOrder()
|
||||
|
||||
getValue(USTV_ANTRAG)
|
||||
@@ -1842,6 +1859,14 @@ Public Class frmMDM_USTVAntrag
|
||||
PosNr = row.Cells("UStVPo_ID").Value
|
||||
End If
|
||||
|
||||
Dim rechnungsNr = CStr(row.Cells("UStVPo_ReNr").Value)
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(rechnungsNr) Then
|
||||
If Not invoiceNumbers.Add(rechnungsNr) Then
|
||||
MessageBox.Show($"Doppelt erfasste RechnungsNr: {rechnungsNr}")
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
averageUmrechnungskurs = averageUmrechnungskurs / dgvUSTVPositionen.Rows.Count
|
||||
|
||||
@@ -3,6 +3,7 @@ Imports System.Linq.Expressions
|
||||
Imports System.Text
|
||||
Imports GrapeCity.DataVisualization.TypeScript
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports org.BouncyCastle.Math.EC.Endo
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
||||
|
||||
@@ -681,6 +682,12 @@ Public Class usrCntlUSTV
|
||||
ContextMenuStrip1.Items.Add(pdf)
|
||||
End If
|
||||
|
||||
If Not ContextMenuStrip1.Items.ContainsKey("checkAntragspositionen") Then
|
||||
Dim pos = New ToolStripMenuItem() With {.Text = "Antragspositionen prüfen", .Name = "checkAntragspositionen", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler pos.Click, AddressOf mnuItem_Clicked
|
||||
ContextMenuStrip1.Items.Add(pos)
|
||||
End If
|
||||
|
||||
ContextMenuStrip1.Show(Cursor.Position)
|
||||
|
||||
|
||||
@@ -729,8 +736,12 @@ Public Class usrCntlUSTV
|
||||
|
||||
ElseIf item.Name = "checkPDF" Then
|
||||
checkPDF()
|
||||
Else
|
||||
|
||||
ElseIf item.Name = "checkAntragspositionen" Then
|
||||
|
||||
checkAntragspositionen(CInt(cboJahr._value), CInt(cboJahrBis._value))
|
||||
|
||||
Else
|
||||
|
||||
MsgBox("Funktion nicht implementiert!")
|
||||
End If
|
||||
@@ -787,6 +798,27 @@ Public Class usrCntlUSTV
|
||||
|
||||
End Function
|
||||
|
||||
Private Function checkAntragspositionen(RechnungsjahrVon As Integer, RechnungsjahrBis As Integer) As Boolean
|
||||
|
||||
|
||||
Dim sqlStr = "SELECT [UStVAn_ID] as AntragsID,cast([UStVPo_ReDat] as date) as Rechnungsdatum,[UStVPo_ReNr] as RechnungsNr
|
||||
FROM [VERAG].[dbo].[tblUStVPositionen] where Year([UStVPo_ReDat]) >= " & RechnungsjahrVon & " and Year([UStVPo_ReDat]) >= " & RechnungsjahrBis & "
|
||||
group by [UStVAn_ID] ,[UStVPo_ReNr], [UStVPo_ReDat]
|
||||
HAVING COUNT(*) > 1
|
||||
order by [UStVAn_ID] desc"
|
||||
|
||||
Dim dt = SQL.loadDgvBySql(sqlStr, "FMZOLL")
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.genExcelFromDT_NEW(dt,,,,, True,,, True)
|
||||
Return True
|
||||
Else
|
||||
MsgBox("Keine Daten!")
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub mailmitExcelauswertung()
|
||||
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user