ustva-Antraege, Email Fakturierung, FIskaluebersicht, Benachrichtigungen, Essensbestellungen für Unisped
This commit is contained in:
@@ -161,7 +161,7 @@ Public Class frmFaktEmail
|
||||
|
||||
initDGVAnhaenge()
|
||||
|
||||
If FISKAL IsNot Nothing Then
|
||||
If FISKAL IsNot Nothing AndAlso (SPEDBUCH.AbfertigungsNr = 26 Or SPEDBUCH.AbfertigungsNr = 28) AndAlso (SPEDBUCH.FilialenNr = 4805 Or SPEDBUCH.FilialenNr = 4811) Then 'Prüfung
|
||||
cbxSteuerberaterEmail.Checked = (If(FISKAL.fisk_schreibenSB_Mail, "") <> "")
|
||||
txtSteuerberaterEmail.Text = If(FISKAL.fisk_schreibenSB_Mail, "")
|
||||
cbxFAEmail.Checked = (If(FISKAL.fisk_schreibenFA_Mail, "") <> "")
|
||||
|
||||
@@ -5381,7 +5381,7 @@ Public Class FormularManagerNEU
|
||||
End Function
|
||||
|
||||
|
||||
Shared Function Zollstopp(Zollstop, Entladestelle, Kommentare, Absender) As String
|
||||
Shared Function Zollstopp(Zollstop, Entladestelle, Kommentare, Absender, ataNr) As String
|
||||
Dim fm As New VERAG_PROG_ALLGEMEIN.cFormularManager
|
||||
|
||||
Dim listTowrite As New List(Of VERAG_PROG_ALLGEMEIN.cPDFWriteValues)
|
||||
@@ -5392,6 +5392,8 @@ Public Class FormularManagerNEU
|
||||
listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(Entladestelle, 50, 145, 110, 30, "bold", 14, , itextsharp.text.Element.ALIGN_LEFT))
|
||||
listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(Kommentare, 50, 212, 110, 30, "normal", 12, , itextsharp.text.Element.ALIGN_LEFT))
|
||||
|
||||
listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(ataNr, 50, 115, 110, 30, "bold", 12, , itextsharp.text.Element.ALIGN_LEFT))
|
||||
|
||||
Return fm.fillPDF("DOKUMENTE", "VORLAGEN", "SONSTIGE", getUO2, "", "Zollstopp", listTowrite)
|
||||
End Function
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\BouncyCastle.Crypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ClosedXML, Version=0.68.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
|
||||
<Reference Include="ClosedXML, Version=0.76.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\closedxml\95\ClosedXML.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -119,7 +119,7 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\SharpSSH\DiffieHellman.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="DocumentFormat.OpenXml, Version=2.9.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\OpenXML\DocumentFormat.OpenXml.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
46
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
46
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
@@ -1,9 +1,9 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmMDM_USTVAntrag
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
@@ -20,12 +20,13 @@ Partial Class frmMDM_USTVAntrag
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
<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 resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMDM_USTVAntrag))
|
||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||
Me.btnMail = New System.Windows.Forms.Button()
|
||||
Me.Button14 = New System.Windows.Forms.Button()
|
||||
Me.cbxArchivierteEintracheNochmalsEinarbetien = New System.Windows.Forms.CheckBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
@@ -68,10 +69,11 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.pnl = 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.Button3 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||
Me.Panel3.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.Panel9.SuspendLayout()
|
||||
@@ -90,6 +92,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
'
|
||||
Me.Panel3.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.Panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Panel3.Controls.Add(Me.btnMail)
|
||||
Me.Panel3.Controls.Add(Me.Button14)
|
||||
Me.Panel3.Controls.Add(Me.cbxArchivierteEintracheNochmalsEinarbetien)
|
||||
Me.Panel3.Controls.Add(Me.Button1)
|
||||
@@ -100,6 +103,18 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel3.Size = New System.Drawing.Size(1454, 100)
|
||||
Me.Panel3.TabIndex = 3
|
||||
'
|
||||
'btnMail
|
||||
'
|
||||
Me.btnMail.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnMail.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnMail.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnMail.Location = New System.Drawing.Point(271, 30)
|
||||
Me.btnMail.Name = "btnMail"
|
||||
Me.btnMail.Size = New System.Drawing.Size(75, 39)
|
||||
Me.btnMail.TabIndex = 26
|
||||
Me.btnMail.Text = "Anträge"
|
||||
Me.btnMail.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button14
|
||||
'
|
||||
Me.Button14.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
@@ -685,14 +700,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel2.Size = New System.Drawing.Size(1300, 269)
|
||||
Me.Panel2.TabIndex = 1
|
||||
'
|
||||
'UstCntlUSTV_AntragPosition1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
|
||||
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1298, 267)
|
||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
||||
'
|
||||
'Panel4
|
||||
'
|
||||
Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
@@ -735,6 +742,19 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4)
|
||||
'
|
||||
'UstCntlUSTV_AntragPosition1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
|
||||
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1298, 267)
|
||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
||||
'
|
||||
'frmMDM_USTVAntrag
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -818,4 +838,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Friend WithEvents Panel8 As Panel
|
||||
Friend WithEvents lblKdNr As Label
|
||||
Friend WithEvents Panel9 As Panel
|
||||
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
||||
Friend WithEvents btnMail As Button
|
||||
End Class
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
Imports System.Reflection
|
||||
Imports DocumentFormat.OpenXml.Drawing.Charts
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
||||
|
||||
Public Class frmMDM_USTVAntrag
|
||||
|
||||
@@ -28,8 +31,9 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If UStVAn_ID <= 0 Then Exit Sub
|
||||
|
||||
.SET_SQL("SELECT [UStVAn_ID] ,[UStVPo_ID] ,[UStVPo_ReDat],[UStVPo_ReNr],[UStVPo_Leistungsbezeichnung],[UStVPo_Leistender],[UStVPo_USteuerbetrag],[UStVPo_Schnittstelle],[UStVPo_SchnittstellenNr],[UStVPo_Umrechnungskurs],[UStVPo_USteuerbetragEUR],[UStVPo_Sachbearbeiter]
|
||||
FROM [tblUStVPositionen]
|
||||
.SET_SQL("SELECT [UStVAn_ID] ,[UStVPo_ID] ,[UStVPo_ReDat],[UStVPo_ReNr],[UStVPo_Leistungsbezeichnung],[UStVPo_Leistender],leist.[UstV_Leistender_Strasse] + ' ' + leist.[UstV_Leistender_StrasseNr] as [UstV_Leistender_Strasse],leist.[UstV_Leistender_PLZ],leist.[UstV_Leistender_Stadt],leist.[UstV_Leistender_Land],leist.[UstV_Leistender_UstNr],[UStVPo_USteuerbetrag],[UStVPo_Schnittstelle],[UStVPo_SchnittstellenNr],[UStVPo_Umrechnungskurs],[UStVPo_USteuerbetragEUR],[UStVPo_Sachbearbeiter]
|
||||
FROM [tblUStVPositionen]
|
||||
inner join [tblUStVLeistender] as leist on leist.UStV_Leistender = [tblUStVPositionen].[UStVPo_Leistender]
|
||||
where UStVAn_ID='" & UStVAn_ID & "' ORDER BY UStVPo_ID", "FMZOLL")
|
||||
.LOAD()
|
||||
.RowTemplate.Height = 20
|
||||
@@ -56,12 +60,26 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
|
||||
.Columns("UStVPo_Leistungsbezeichnung").HeaderText = "Leistungsbezeichnung"
|
||||
.Columns("UStVPo_Leistungsbezeichnung").Width = 200
|
||||
|
||||
.Columns("UStVPo_Leistungsbezeichnung").Width = 150
|
||||
|
||||
.Columns("UStVPo_Leistender").HeaderText = "Leistender"
|
||||
.Columns("UStVPo_Leistender").Width = 220
|
||||
.Columns("UStVPo_Leistender").Width = 100
|
||||
|
||||
.Columns("UstV_Leistender_Strasse").HeaderText = "Strasse"
|
||||
.Columns("UstV_Leistender_Strasse").Width = 50
|
||||
|
||||
.Columns("UstV_Leistender_PLZ").HeaderText = "PLZ"
|
||||
.Columns("UstV_Leistender_PLZ").Width = 50
|
||||
|
||||
.Columns("UstV_Leistender_Land").HeaderText = "Land"
|
||||
.Columns("UstV_Leistender_Land").Width = 50
|
||||
|
||||
.Columns("UstV_Leistender_Stadt").HeaderText = "Stadt"
|
||||
.Columns("UstV_Leistender_Stadt").Width = 100
|
||||
|
||||
|
||||
.Columns("UstV_Leistender_UstNr").HeaderText = "UID-Nr"
|
||||
.Columns("UstV_Leistender_UstNr").Width = 150
|
||||
|
||||
.Columns("UStVPo_Schnittstelle").HeaderText = "API"
|
||||
.Columns("UStVPo_Schnittstelle").Width = 30
|
||||
@@ -81,7 +99,7 @@ Public Class frmMDM_USTVAntrag
|
||||
.Columns("UStVPo_USteuerbetragEUR").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
|
||||
|
||||
.Columns("UStVPo_Sachbearbeiter").HeaderText = "Sachbearbeiter"
|
||||
.Columns("UStVPo_Sachbearbeiter").MinimumWidth = 150
|
||||
.Columns("UStVPo_Sachbearbeiter").MinimumWidth = 100
|
||||
.Columns("UStVPo_Sachbearbeiter").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
|
||||
End If
|
||||
@@ -267,8 +285,9 @@ Public Class frmMDM_USTVAntrag
|
||||
Sub initPosition(UStVPo_ID)
|
||||
If UStVPo_ID > 0 Then
|
||||
Dim ANTR_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen(USTV_ANTRAG.UStVAn_ID, UStVPo_ID)
|
||||
Dim ANTR_Leistender As New VERAG_PROG_ALLGEMEIN.cUStVLeistender(ANTR_POS.UStVPo_Leistender)
|
||||
UstCntlUSTV_AntragPosition1.Enabled = True
|
||||
UstCntlUSTV_AntragPosition1.setValues(USTV_ANTRAG.UStVAn_KuNr, ANTR_POS, Antrag_LandKz)
|
||||
UstCntlUSTV_AntragPosition1.setValues(USTV_ANTRAG.UStVAn_KuNr, ANTR_POS, Antrag_LandKz, ANTR_Leistender)
|
||||
Else
|
||||
UstCntlUSTV_AntragPosition1.reset()
|
||||
UstCntlUSTV_AntragPosition1.Enabled = False
|
||||
@@ -446,6 +465,107 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnMail_Click(sender As Object, e As EventArgs) Handles btnMail.Click
|
||||
|
||||
If Not ContextMenuStrip1.Items.ContainsKey("excel") Then
|
||||
Dim uploadPictures = New ToolStripMenuItem() With {.Text = "Excelauswertung starten", .Name = "excel", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
ContextMenuStrip1.Items.Add(uploadPictures)
|
||||
AddHandler uploadPictures.Click, AddressOf mnuItem_Clicked
|
||||
End If
|
||||
|
||||
|
||||
If Not ContextMenuStrip1.Items.ContainsKey("mail") Then
|
||||
Dim copyToClipboard = New ToolStripMenuItem() With {.Text = "Email generieren", .Name = "mail", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler copyToClipboard.Click, AddressOf mnuItem_Clicked
|
||||
ContextMenuStrip1.Items.Add(copyToClipboard)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ContextMenuStrip1.Show(Cursor.Position)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub mnuItem_Clicked(sender As Object, e As EventArgs)
|
||||
ContextMenuStrip1.Hide()
|
||||
Dim item As ToolStripMenuItem = TryCast(sender, ToolStripMenuItem)
|
||||
|
||||
If item IsNot Nothing Then
|
||||
If item.Name = "excel" Then
|
||||
excelAuswertung()
|
||||
|
||||
ElseIf item.Name = "mail" Then
|
||||
mailmitExcelauswertung()
|
||||
Else
|
||||
MsgBox("Funktion nicht implementiert!")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function excelAuswertung(ByRef Optional filepath As String = "", Optional feedback As Boolean = False, Optional openExcel As Boolean = True) As Boolean
|
||||
|
||||
Dim sqlStr = "SELECT [UStVPo_ReDat] as InvoiceDate , [UStVPo_ReNr] As InvoiceNumber, 'Verag 360 GmbH' as Company, 'FR' as CountryOfRefund ,'EUR' as Currency ,[UStVPo_Leistender] as SupplierName, leist.[UstV_Leistender_Strasse] AS SupplierStreet, leist.[UstV_Leistender_StrasseNr] as SupplierStreetNumber, leist.[UstV_Leistender_PLZ] as SupplierPostalCode, leist.[UstV_Leistender_Stadt] as SupplierCity, leist.[UstV_Leistender_Land] as SupplierCountry, leist.[UstV_Leistender_UstNr] as SupplierVAT_TaxNumber, [UStVPo_Leistungsbezeichnung] as ExpenseCategory ,Round((1119/19*[UStVPo_USteuerbetragEUR]),2) as ExpenseGrossAmount, [UStVPo_USteuerbetragEUR] as ExpenseVATAmount,Round((100/19*[UStVPo_USteuerbetragEUR]),2) as ExpenseNetAmount
|
||||
FROM [tblUStVPositionen]
|
||||
inner Join [tblUStVLeistender] as leist on leist.UStV_Leistender = [tblUStVPositionen].[UStVPo_Leistender]
|
||||
where UStVAn_ID ='" & UStVAn_ID & "' ORDER BY UStVPo_ID"
|
||||
|
||||
Dim dt = SQL.loadDgvBySql(sqlStr, "FMZOLL")
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
filepath = VERAG_PROG_ALLGEMEIN.cProgramFunctions.genExcelFromDT_NEW(dt, {"N1:N" & (dt.Rows.Count + 1), "O1:O" & (dt.Rows.Count + 1), "P1:P" & (dt.Rows.Count + 1)},,,, openExcel)
|
||||
Return True
|
||||
Else
|
||||
If feedback Then MsgBox("keine Daten vorhanden!")
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub mailmitExcelauswertung()
|
||||
|
||||
Try
|
||||
Dim outl As New Outlook.Application
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
|
||||
Dim filepath = ""
|
||||
If excelAuswertung(filepath, False, False) Then
|
||||
|
||||
Mail.Attachments.Add(filepath, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Mail.Subject = USTV_ANTRAG.UStVAn_Name & "_" & USTV_ANTRAG.UStVAn_LandKz & "_" & USTV_ANTRAG.UStVAn_ReDatVon & "-" & USTV_ANTRAG.UStVAn_ReDatBis
|
||||
|
||||
Dim TextHTML = ""
|
||||
TextHTML &= "Ladies and Gentlemen,<br>"
|
||||
TextHTML &= "<br>"
|
||||
TextHTML &= "In the attachment we will send you the Excel list and the corresponding invoices for the VAT refund.<br>"
|
||||
TextHTML &= "Please submit these invoices to the tax office.<br>"
|
||||
TextHTML &= "We are always available to answer more questions.<br>"
|
||||
|
||||
TextHTML &= "Mit freundlichen Grüßen<br>"
|
||||
TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "<br>"
|
||||
TextHTML &= "<br>"
|
||||
Mail.HTMLBody = "<div style=""font-family:Calibri, Arial;font-size:15px;"">" & TextHTML & SDL.cFakturierung.getSignature("DE") & "</div>"
|
||||
|
||||
Mail.Display()
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Fehler beim Öffnen der Mail!")
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
' Private Sub cmdITMautÜbernehmen_Click()
|
||||
|
||||
' Dim wrk As DAO.Workspace
|
||||
|
||||
28
SDL/USTV/usrCntlUSTV.Designer.vb
generated
28
SDL/USTV/usrCntlUSTV.Designer.vb
generated
@@ -23,7 +23,7 @@ Partial Class usrCntlUSTV
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.pnlFilter = New System.Windows.Forms.Panel()
|
||||
Me.dgvUSTV = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
@@ -41,6 +41,8 @@ Partial Class usrCntlUSTV
|
||||
Me.btnPLOSEAlle = New System.Windows.Forms.Button()
|
||||
Me.Button5 = New System.Windows.Forms.Button()
|
||||
Me.Button8 = New System.Windows.Forms.Button()
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.btnMail = New System.Windows.Forms.Button()
|
||||
CType(Me.dgvUSTV, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.Panel2.SuspendLayout()
|
||||
@@ -62,8 +64,8 @@ Partial Class usrCntlUSTV
|
||||
Me.dgvUSTV.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvUSTV.AllowUserToAddRows = False
|
||||
Me.dgvUSTV.AllowUserToDeleteRows = False
|
||||
DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvUSTV.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
|
||||
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvUSTV.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
|
||||
Me.dgvUSTV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvUSTV.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.dgvUSTV.Location = New System.Drawing.Point(0, 84)
|
||||
@@ -228,6 +230,7 @@ Partial Class usrCntlUSTV
|
||||
'Panel3
|
||||
'
|
||||
Me.Panel3.AutoSize = True
|
||||
Me.Panel3.Controls.Add(Me.btnMail)
|
||||
Me.Panel3.Controls.Add(Me.btnPLOSEAlle)
|
||||
Me.Panel3.Controls.Add(Me.Button5)
|
||||
Me.Panel3.Controls.Add(Me.Button8)
|
||||
@@ -283,6 +286,23 @@ Partial Class usrCntlUSTV
|
||||
Me.Button8.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button8.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4)
|
||||
'
|
||||
'btnMail
|
||||
'
|
||||
Me.btnMail.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnMail.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnMail.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnMail.Location = New System.Drawing.Point(545, 10)
|
||||
Me.btnMail.Name = "btnMail"
|
||||
Me.btnMail.Size = New System.Drawing.Size(75, 39)
|
||||
Me.btnMail.TabIndex = 25
|
||||
Me.btnMail.Text = "Anträge"
|
||||
Me.btnMail.UseVisualStyleBackColor = True
|
||||
'
|
||||
'usrCntlUSTV
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -318,4 +338,6 @@ Partial Class usrCntlUSTV
|
||||
Friend WithEvents cboJahrBis As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents Button5 As Button
|
||||
Friend WithEvents btnPLOSEAlle As Button
|
||||
Friend WithEvents btnMail As Button
|
||||
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,6 +1,8 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data.SqlClient
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports VERAG_PROG_ALLGEMEIN.CBAM_QReport_17
|
||||
|
||||
Public Class usrCntlUSTV
|
||||
|
||||
@@ -27,7 +29,6 @@ Public Class usrCntlUSTV
|
||||
.ClearSelection()
|
||||
|
||||
|
||||
|
||||
.SET_SQL("SELECT TOP (200) [UStVAn_ID],[UStVAn_KuNr],[UStVAn_Name],LandKz,[UStVAn_ReDatVon],[UStVAn_ReDatBis] ,UStVAn_AntragEingereichtAm,[UStVAn_3470] ,[UStVAn_Währungscode],[UStVAn_USteuerbetrag],[UStVAn_Erstattungsbetrag],[UStVAn_USteuerbetragEUR],[UStVAn_ErstattungsbetragEUR],[UStVAn_Sachbearbeiter]
|
||||
FROM [tblUStVAntrag] inner join [Länderverzeichnis für die Außenhandelsstatistik] on UStVAn_LandNr=Landnr
|
||||
where 1=1 " & getWhere() & "
|
||||
@@ -198,12 +199,12 @@ Public Class usrCntlUSTV
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||
' If Not kdNr_filter Then
|
||||
If dgvUSTV.SelectedCells.Count > 0 Then
|
||||
If IsNumeric(dgvUSTV.CurrentRow.Cells("UStVAn_KuNr").Value) Then
|
||||
cProgramFunctions.openKundenblatt(dgvUSTV.CurrentRow.Cells("UStVAn_KuNr").Value, Me.FindForm, True)
|
||||
'Dim pf As New cProgramFunctions
|
||||
'pf.openKundenblatt(dgvSDL.CurrentRow.Cells("KundenNr").Value)
|
||||
End If
|
||||
If IsNumeric(dgvUSTV.CurrentRow.Cells("UStVAn_KuNr").Value) Then
|
||||
cProgramFunctions.openKundenblatt(dgvUSTV.CurrentRow.Cells("UStVAn_KuNr").Value, Me.FindForm, True)
|
||||
'Dim pf As New cProgramFunctions
|
||||
'pf.openKundenblatt(dgvSDL.CurrentRow.Cells("KundenNr").Value)
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
@@ -232,4 +233,104 @@ Public Class usrCntlUSTV
|
||||
End Try
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Private Sub btnMail_Click(sender As Object, e As EventArgs) Handles btnMail.Click
|
||||
|
||||
If Not ContextMenuStrip1.Items.ContainsKey("excel") Then
|
||||
Dim excel = New ToolStripMenuItem() With {.Text = "Excelauswertung starten", .Name = "excel", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
ContextMenuStrip1.Items.Add(excel)
|
||||
AddHandler excel.Click, AddressOf mnuItem_Clicked
|
||||
End If
|
||||
|
||||
|
||||
If Not ContextMenuStrip1.Items.ContainsKey("mail") Then
|
||||
Dim mail = New ToolStripMenuItem() With {.Text = "Email generieren", .Name = "mail", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler mail.Click, AddressOf mnuItem_Clicked
|
||||
ContextMenuStrip1.Items.Add(mail)
|
||||
End If
|
||||
|
||||
ContextMenuStrip1.Show(Cursor.Position)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub mnuItem_Clicked(sender As Object, e As EventArgs)
|
||||
|
||||
If dgvUSTV.SelectedRows.Count > 0 Then
|
||||
|
||||
ContextMenuStrip1.Hide()
|
||||
Dim item As ToolStripMenuItem = TryCast(sender, ToolStripMenuItem)
|
||||
|
||||
If item IsNot Nothing Then
|
||||
If item.Name = "excel" Then
|
||||
excelAuswertung()
|
||||
|
||||
ElseIf item.Name = "mail" Then
|
||||
mailmitExcelauswertung()
|
||||
Else
|
||||
MsgBox("Funktion nicht implementiert!")
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function excelAuswertung(Optional filepath As String = "", Optional feedback As Boolean = False, Optional openExcel As Boolean = True) As Boolean
|
||||
|
||||
Dim sqlStr = "SELECT [UStVPo_ReDat] as InvoiceDate , [UStVPo_ReNr] As InvoiceNumber, 'Verag 360 GmbH' as Company, 'FR' as CountryOfRefund ,'EUR' as Currency ,[UStVPo_Leistender] as SupplierName, leist.[UstV_Leistender_Strasse] AS SupplierStreet, leist.[UstV_Leistender_StrasseNr] as SupplierStreetNumber, leist.[UstV_Leistender_PLZ] as SupplierPostalCode, leist.[UstV_Leistender_Stadt] as SupplierCity, leist.[UstV_Leistender_Land] as SupplierCountry, leist.[UstV_Leistender_UstNr] as SupplierVAT_TaxNumber, [UStVPo_Leistungsbezeichnung] as ExpenseCategory ,Round((1119/19*[UStVPo_USteuerbetragEUR]),2) as ExpenseGrossAmount, [UStVPo_USteuerbetragEUR] as ExpenseVATAmount,Round((100/19*[UStVPo_USteuerbetragEUR]),2) as ExpenseNetAmount
|
||||
FROM [tblUStVPositionen]
|
||||
inner Join [tblUStVLeistender] as leist on leist.UStV_Leistender = [tblUStVPositionen].[UStVPo_Leistender]
|
||||
where UStVAn_ID ='" & dgvUSTV.SelectedRows(0).Cells("UStVAn_ID").Value & "' ORDER BY UStVPo_ID"
|
||||
|
||||
Dim dt = SQL.loadDgvBySql(sqlStr, "FMZOLL")
|
||||
filepath = ""
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
filepath = VERAG_PROG_ALLGEMEIN.cProgramFunctions.genExcelFromDT_NEW(dt, {"N1:N" & (dt.Rows.Count + 1), "O1:O" & (dt.Rows.Count + 1), "P1:P" & (dt.Rows.Count + 1)},,,, openExcel)
|
||||
Else
|
||||
MsgBox("Keine Daten!")
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub mailmitExcelauswertung()
|
||||
|
||||
Try
|
||||
Dim outl As New Outlook.Application
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
|
||||
Dim filepath = ""
|
||||
If excelAuswertung(filepath, False, False) Then
|
||||
|
||||
Mail.Attachments.Add(filepath, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
|
||||
|
||||
End If
|
||||
|
||||
If dgvUSTV.Columns.Count > 0 Then Mail.Subject = dgvUSTV.CurrentRow.Cells("UStVAn_Name").Value & "_" & dgvUSTV.CurrentRow.Cells("UStVAn_LandKz").Value & "_" & dgvUSTV.CurrentRow.Cells("UStVAn_ReDatVon").Value & "-" & dgvUSTV.CurrentRow.Cells("UStVAn_ReDatBis").Value
|
||||
|
||||
Dim TextHTML = ""
|
||||
TextHTML &= "Ladies and Gentlemen,<br>"
|
||||
TextHTML &= "<br>"
|
||||
TextHTML &= "In the attachment we will send you the Excel list and the corresponding invoices for the VAT refund.<br>"
|
||||
TextHTML &= "Please submit these invoices to the tax office.<br>"
|
||||
TextHTML &= "We are always available to answer more questions.<br>"
|
||||
|
||||
TextHTML &= "Mit freundlichen Grüßen<br>"
|
||||
TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "<br>"
|
||||
TextHTML &= "<br>"
|
||||
Mail.HTMLBody = "<div style=""font-family:Calibri, Arial;font-size:15px;"">" & TextHTML & SDL.cFakturierung.getSignature("DE") & "</div>"
|
||||
|
||||
Mail.Display()
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Fehler beim Öffnen der Mail!")
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
248
SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb
generated
248
SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb
generated
@@ -59,12 +59,24 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.lblSachbearbeiter = New System.Windows.Forms.Label()
|
||||
Me.cboSchnittstellennr = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.txtUIDNr = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label17 = New System.Windows.Forms.Label()
|
||||
Me.txtLand = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtStrassenNr = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtOrt = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label16 = New System.Windows.Forms.Label()
|
||||
Me.txtPLZ = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label15 = New System.Windows.Forms.Label()
|
||||
Me.txtStrasse = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label14 = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||
Me.Panel4 = New System.Windows.Forms.Panel()
|
||||
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
||||
Me.TabPage1 = New System.Windows.Forms.TabPage()
|
||||
Me.UsrcntlPDFScanList1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
|
||||
Me.pnlAdresse = New System.Windows.Forms.Panel()
|
||||
Me.picSave = New System.Windows.Forms.PictureBox()
|
||||
Me.tabDok.SuspendLayout()
|
||||
Me.tbcntr.SuspendLayout()
|
||||
Me.tabVollmachten.SuspendLayout()
|
||||
@@ -76,6 +88,8 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.Panel4.SuspendLayout()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
Me.pnlAdresse.SuspendLayout()
|
||||
CType(Me.picSave, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'scanLieferschein
|
||||
@@ -209,7 +223,7 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.cbxAPI._value = ""
|
||||
Me.cbxAPI.AutoSize = True
|
||||
Me.cbxAPI.Enabled = False
|
||||
Me.cbxAPI.Location = New System.Drawing.Point(634, 132)
|
||||
Me.cbxAPI.Location = New System.Drawing.Point(634, 193)
|
||||
Me.cbxAPI.Name = "cbxAPI"
|
||||
Me.cbxAPI.Size = New System.Drawing.Size(83, 17)
|
||||
Me.cbxAPI.TabIndex = 17
|
||||
@@ -564,7 +578,7 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.cboSchnittstellennr._value = ""
|
||||
Me.cboSchnittstellennr.Enabled = False
|
||||
Me.cboSchnittstellennr.FormattingEnabled = True
|
||||
Me.cboSchnittstellennr.Location = New System.Drawing.Point(723, 130)
|
||||
Me.cboSchnittstellennr.Location = New System.Drawing.Point(723, 191)
|
||||
Me.cboSchnittstellennr.Name = "cboSchnittstellennr"
|
||||
Me.cboSchnittstellennr.Size = New System.Drawing.Size(190, 21)
|
||||
Me.cboSchnittstellennr.TabIndex = 18
|
||||
@@ -572,6 +586,8 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.BackColor = System.Drawing.Color.White
|
||||
Me.pnl.Controls.Add(Me.picSave)
|
||||
Me.pnl.Controls.Add(Me.pnlAdresse)
|
||||
Me.pnl.Controls.Add(Me.Label6)
|
||||
Me.pnl.Controls.Add(Me.cboSchnittstellennr)
|
||||
Me.pnl.Controls.Add(Me.Label9)
|
||||
@@ -601,6 +617,190 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.pnl.Size = New System.Drawing.Size(1300, 239)
|
||||
Me.pnl.TabIndex = 1
|
||||
'
|
||||
'txtUIDNr
|
||||
'
|
||||
Me.txtUIDNr._DateTimeOnly = False
|
||||
Me.txtUIDNr._numbersOnly = False
|
||||
Me.txtUIDNr._numbersOnlyKommastellen = ""
|
||||
Me.txtUIDNr._numbersOnlyTrennzeichen = True
|
||||
Me.txtUIDNr._Prozent = False
|
||||
Me.txtUIDNr._ShortDateNew = False
|
||||
Me.txtUIDNr._ShortDateOnly = False
|
||||
Me.txtUIDNr._TimeOnly = False
|
||||
Me.txtUIDNr._TimeOnly_Seconds = False
|
||||
Me.txtUIDNr._value = ""
|
||||
Me.txtUIDNr._Waehrung = False
|
||||
Me.txtUIDNr._WaehrungZeichen = True
|
||||
Me.txtUIDNr.ForeColor = System.Drawing.Color.Red
|
||||
Me.txtUIDNr.Location = New System.Drawing.Point(180, 60)
|
||||
Me.txtUIDNr.MaxLength = 50
|
||||
Me.txtUIDNr.MaxLineLength = -1
|
||||
Me.txtUIDNr.MaxLines_Warning = ""
|
||||
Me.txtUIDNr.MaxLines_Warning_Label = Nothing
|
||||
Me.txtUIDNr.Name = "txtUIDNr"
|
||||
Me.txtUIDNr.Size = New System.Drawing.Size(106, 20)
|
||||
Me.txtUIDNr.TabIndex = 32
|
||||
'
|
||||
'Label17
|
||||
'
|
||||
Me.Label17.AutoSize = True
|
||||
Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
|
||||
Me.Label17.Location = New System.Drawing.Point(129, 63)
|
||||
Me.Label17.Name = "Label17"
|
||||
Me.Label17.Size = New System.Drawing.Size(45, 15)
|
||||
Me.Label17.TabIndex = 31
|
||||
Me.Label17.Text = "UID-Nr"
|
||||
'
|
||||
'txtLand
|
||||
'
|
||||
Me.txtLand._DateTimeOnly = False
|
||||
Me.txtLand._numbersOnly = False
|
||||
Me.txtLand._numbersOnlyKommastellen = ""
|
||||
Me.txtLand._numbersOnlyTrennzeichen = True
|
||||
Me.txtLand._Prozent = False
|
||||
Me.txtLand._ShortDateNew = False
|
||||
Me.txtLand._ShortDateOnly = False
|
||||
Me.txtLand._TimeOnly = False
|
||||
Me.txtLand._TimeOnly_Seconds = False
|
||||
Me.txtLand._value = ""
|
||||
Me.txtLand._Waehrung = False
|
||||
Me.txtLand._WaehrungZeichen = True
|
||||
Me.txtLand.ForeColor = System.Drawing.Color.Red
|
||||
Me.txtLand.Location = New System.Drawing.Point(66, 58)
|
||||
Me.txtLand.MaxLength = 2
|
||||
Me.txtLand.MaxLineLength = -1
|
||||
Me.txtLand.MaxLines_Warning = ""
|
||||
Me.txtLand.MaxLines_Warning_Label = Nothing
|
||||
Me.txtLand.Name = "txtLand"
|
||||
Me.txtLand.Size = New System.Drawing.Size(38, 20)
|
||||
Me.txtLand.TabIndex = 30
|
||||
'
|
||||
'txtStrassenNr
|
||||
'
|
||||
Me.txtStrassenNr._DateTimeOnly = False
|
||||
Me.txtStrassenNr._numbersOnly = False
|
||||
Me.txtStrassenNr._numbersOnlyKommastellen = ""
|
||||
Me.txtStrassenNr._numbersOnlyTrennzeichen = True
|
||||
Me.txtStrassenNr._Prozent = False
|
||||
Me.txtStrassenNr._ShortDateNew = False
|
||||
Me.txtStrassenNr._ShortDateOnly = False
|
||||
Me.txtStrassenNr._TimeOnly = False
|
||||
Me.txtStrassenNr._TimeOnly_Seconds = False
|
||||
Me.txtStrassenNr._value = ""
|
||||
Me.txtStrassenNr._Waehrung = False
|
||||
Me.txtStrassenNr._WaehrungZeichen = True
|
||||
Me.txtStrassenNr.ForeColor = System.Drawing.Color.Red
|
||||
Me.txtStrassenNr.Location = New System.Drawing.Point(241, 2)
|
||||
Me.txtStrassenNr.MaxLength = 10
|
||||
Me.txtStrassenNr.MaxLineLength = -1
|
||||
Me.txtStrassenNr.MaxLines_Warning = ""
|
||||
Me.txtStrassenNr.MaxLines_Warning_Label = Nothing
|
||||
Me.txtStrassenNr.Name = "txtStrassenNr"
|
||||
Me.txtStrassenNr.Size = New System.Drawing.Size(45, 20)
|
||||
Me.txtStrassenNr.TabIndex = 29
|
||||
'
|
||||
'txtOrt
|
||||
'
|
||||
Me.txtOrt._DateTimeOnly = False
|
||||
Me.txtOrt._numbersOnly = False
|
||||
Me.txtOrt._numbersOnlyKommastellen = ""
|
||||
Me.txtOrt._numbersOnlyTrennzeichen = True
|
||||
Me.txtOrt._Prozent = False
|
||||
Me.txtOrt._ShortDateNew = False
|
||||
Me.txtOrt._ShortDateOnly = False
|
||||
Me.txtOrt._TimeOnly = False
|
||||
Me.txtOrt._TimeOnly_Seconds = False
|
||||
Me.txtOrt._value = ""
|
||||
Me.txtOrt._Waehrung = False
|
||||
Me.txtOrt._WaehrungZeichen = True
|
||||
Me.txtOrt.ForeColor = System.Drawing.Color.Red
|
||||
Me.txtOrt.Location = New System.Drawing.Point(132, 29)
|
||||
Me.txtOrt.MaxLength = 50
|
||||
Me.txtOrt.MaxLineLength = -1
|
||||
Me.txtOrt.MaxLines_Warning = ""
|
||||
Me.txtOrt.MaxLines_Warning_Label = Nothing
|
||||
Me.txtOrt.Name = "txtOrt"
|
||||
Me.txtOrt.Size = New System.Drawing.Size(154, 20)
|
||||
Me.txtOrt.TabIndex = 28
|
||||
'
|
||||
'Label16
|
||||
'
|
||||
Me.Label16.AutoSize = True
|
||||
Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
|
||||
Me.Label16.Location = New System.Drawing.Point(8, 58)
|
||||
Me.Label16.Name = "Label16"
|
||||
Me.Label16.Size = New System.Drawing.Size(35, 15)
|
||||
Me.Label16.TabIndex = 27
|
||||
Me.Label16.Text = "Land"
|
||||
'
|
||||
'txtPLZ
|
||||
'
|
||||
Me.txtPLZ._DateTimeOnly = False
|
||||
Me.txtPLZ._numbersOnly = False
|
||||
Me.txtPLZ._numbersOnlyKommastellen = ""
|
||||
Me.txtPLZ._numbersOnlyTrennzeichen = True
|
||||
Me.txtPLZ._Prozent = False
|
||||
Me.txtPLZ._ShortDateNew = False
|
||||
Me.txtPLZ._ShortDateOnly = False
|
||||
Me.txtPLZ._TimeOnly = False
|
||||
Me.txtPLZ._TimeOnly_Seconds = False
|
||||
Me.txtPLZ._value = ""
|
||||
Me.txtPLZ._Waehrung = False
|
||||
Me.txtPLZ._WaehrungZeichen = True
|
||||
Me.txtPLZ.ForeColor = System.Drawing.Color.Red
|
||||
Me.txtPLZ.Location = New System.Drawing.Point(66, 29)
|
||||
Me.txtPLZ.MaxLength = 10
|
||||
Me.txtPLZ.MaxLineLength = -1
|
||||
Me.txtPLZ.MaxLines_Warning = ""
|
||||
Me.txtPLZ.MaxLines_Warning_Label = Nothing
|
||||
Me.txtPLZ.Name = "txtPLZ"
|
||||
Me.txtPLZ.Size = New System.Drawing.Size(59, 20)
|
||||
Me.txtPLZ.TabIndex = 26
|
||||
'
|
||||
'Label15
|
||||
'
|
||||
Me.Label15.AutoSize = True
|
||||
Me.Label15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
|
||||
Me.Label15.Location = New System.Drawing.Point(8, 32)
|
||||
Me.Label15.Name = "Label15"
|
||||
Me.Label15.Size = New System.Drawing.Size(48, 15)
|
||||
Me.Label15.TabIndex = 25
|
||||
Me.Label15.Text = "PLZ/Ort"
|
||||
'
|
||||
'txtStrasse
|
||||
'
|
||||
Me.txtStrasse._DateTimeOnly = False
|
||||
Me.txtStrasse._numbersOnly = False
|
||||
Me.txtStrasse._numbersOnlyKommastellen = ""
|
||||
Me.txtStrasse._numbersOnlyTrennzeichen = True
|
||||
Me.txtStrasse._Prozent = False
|
||||
Me.txtStrasse._ShortDateNew = False
|
||||
Me.txtStrasse._ShortDateOnly = False
|
||||
Me.txtStrasse._TimeOnly = False
|
||||
Me.txtStrasse._TimeOnly_Seconds = False
|
||||
Me.txtStrasse._value = ""
|
||||
Me.txtStrasse._Waehrung = False
|
||||
Me.txtStrasse._WaehrungZeichen = True
|
||||
Me.txtStrasse.ForeColor = System.Drawing.Color.Red
|
||||
Me.txtStrasse.Location = New System.Drawing.Point(66, 3)
|
||||
Me.txtStrasse.MaxLength = 50
|
||||
Me.txtStrasse.MaxLineLength = -1
|
||||
Me.txtStrasse.MaxLines_Warning = ""
|
||||
Me.txtStrasse.MaxLines_Warning_Label = Nothing
|
||||
Me.txtStrasse.Name = "txtStrasse"
|
||||
Me.txtStrasse.Size = New System.Drawing.Size(169, 20)
|
||||
Me.txtStrasse.TabIndex = 24
|
||||
'
|
||||
'Label14
|
||||
'
|
||||
Me.Label14.AutoSize = True
|
||||
Me.Label14.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
|
||||
Me.Label14.Location = New System.Drawing.Point(4, 5)
|
||||
Me.Label14.Name = "Label14"
|
||||
Me.Label14.Size = New System.Drawing.Size(64, 15)
|
||||
Me.Label14.TabIndex = 23
|
||||
Me.Label14.Text = "Strasse/Nr"
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.Add(Me.btnBildAuf)
|
||||
@@ -671,6 +871,35 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.UsrcntlPDFScanList1.Size = New System.Drawing.Size(264, 207)
|
||||
Me.UsrcntlPDFScanList1.TabIndex = 0
|
||||
'
|
||||
'pnlAdresse
|
||||
'
|
||||
Me.pnlAdresse.AccessibleRole = System.Windows.Forms.AccessibleRole.WhiteSpace
|
||||
Me.pnlAdresse.Controls.Add(Me.txtStrasse)
|
||||
Me.pnlAdresse.Controls.Add(Me.txtUIDNr)
|
||||
Me.pnlAdresse.Controls.Add(Me.Label14)
|
||||
Me.pnlAdresse.Controls.Add(Me.Label17)
|
||||
Me.pnlAdresse.Controls.Add(Me.Label15)
|
||||
Me.pnlAdresse.Controls.Add(Me.txtLand)
|
||||
Me.pnlAdresse.Controls.Add(Me.txtPLZ)
|
||||
Me.pnlAdresse.Controls.Add(Me.txtStrassenNr)
|
||||
Me.pnlAdresse.Controls.Add(Me.Label16)
|
||||
Me.pnlAdresse.Controls.Add(Me.txtOrt)
|
||||
Me.pnlAdresse.Location = New System.Drawing.Point(626, 76)
|
||||
Me.pnlAdresse.Name = "pnlAdresse"
|
||||
Me.pnlAdresse.Size = New System.Drawing.Size(287, 82)
|
||||
Me.pnlAdresse.TabIndex = 33
|
||||
'
|
||||
'picSave
|
||||
'
|
||||
Me.picSave.BackgroundImage = Global.SDL.My.Resources.Resources.save
|
||||
Me.picSave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.picSave.Location = New System.Drawing.Point(886, 164)
|
||||
Me.picSave.Name = "picSave"
|
||||
Me.picSave.Size = New System.Drawing.Size(26, 22)
|
||||
Me.picSave.TabIndex = 34
|
||||
Me.picSave.TabStop = False
|
||||
Me.picSave.Visible = False
|
||||
'
|
||||
'ustCntlUSTV_AntragPosition
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -694,6 +923,9 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.Panel4.ResumeLayout(False)
|
||||
Me.TabControl1.ResumeLayout(False)
|
||||
Me.TabPage1.ResumeLayout(False)
|
||||
Me.pnlAdresse.ResumeLayout(False)
|
||||
Me.pnlAdresse.PerformLayout()
|
||||
CType(Me.picSave, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -739,4 +971,16 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Friend WithEvents tabFABest As TabPage
|
||||
Friend WithEvents scanUSTVVollmachten As VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList
|
||||
Friend WithEvents scanUSTVFABest As VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList
|
||||
Friend WithEvents txtStrassenNr As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents txtOrt As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label16 As Label
|
||||
Friend WithEvents txtPLZ As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label15 As Label
|
||||
Friend WithEvents txtStrasse As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label14 As Label
|
||||
Friend WithEvents txtUIDNr As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label17 As Label
|
||||
Friend WithEvents txtLand As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents pnlAdresse As Panel
|
||||
Friend WithEvents picSave As PictureBox
|
||||
End Class
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
Public Class ustCntlUSTV_AntragPosition
|
||||
Imports java.awt.print
|
||||
|
||||
Public Class ustCntlUSTV_AntragPosition
|
||||
Public UStV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen = Nothing
|
||||
Public UStV_Leist As VERAG_PROG_ALLGEMEIN.cUStVLeistender = Nothing
|
||||
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim Antrag_LandKz = ""
|
||||
Dim kdnr = ""
|
||||
@@ -19,10 +22,12 @@
|
||||
Sub reset()
|
||||
txtRgDatum._value = ""
|
||||
txtRgNr._value = ""
|
||||
picSave.Visible = False
|
||||
End Sub
|
||||
|
||||
Sub setValues(kdnr As Integer, UStV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen, Antrag_LandKz As String)
|
||||
Sub setValues(kdnr As Integer, UStV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen, Antrag_LandKz As String, UStV_Leitender As VERAG_PROG_ALLGEMEIN.cUStVLeistender)
|
||||
gridAktiv = False
|
||||
picSave.Visible = False
|
||||
Me.Antrag_LandKz = Antrag_LandKz
|
||||
Me.UStV_POS = UStV_POS
|
||||
Me.kdnr = kdnr
|
||||
@@ -38,6 +43,11 @@
|
||||
txtUmrechnungskurs.Text = If(UStV_POS.UStVPo_Umrechnungskurs, "")
|
||||
txtUSTBetragEUR.Text = If(UStV_POS.UStVPo_USteuerbetragEUR, "")
|
||||
|
||||
If UStV_Leitender IsNot Nothing Then
|
||||
UStV_Leist = UStV_Leitender
|
||||
loadChangedDSToPanel(Not UStV_Leitender.UstV_Leistender_Adresse, UStV_Leitender)
|
||||
End If
|
||||
|
||||
Dim da_id = -1
|
||||
Select Case If(UStV_POS.UStVPo_SchnittstellenNr, -1)
|
||||
Case 6, 0 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [plInv_daId] FROM [tblPLOSE_Inv_Data] where plInv_SupplierRechnungsDatum='" & UStV_POS.UStVPo_ReDat & "' and plInv_SupplierRechnungsNr='" & UStV_POS.UStVPo_ReNr & "' and plInv_SupplierCountry='" & Antrag_LandKz & "' AND [plInv_daId] is not null", "FMZOLL",,, -1)
|
||||
@@ -94,6 +104,11 @@
|
||||
'If sender Is txtLieferung Then
|
||||
' If Not PROG.checkSDLNrPartnerKdNr(kdNr, SDLNr) Then MsgBox("Bitte geben Sie die Partner-Kundennummer im Kundenblatt oder im FM-ZOLL ein!")
|
||||
'End If
|
||||
|
||||
If sender Is cboLeistungsgeber Then
|
||||
UStV_POS.UStVPo_Leistender = cboLeistungsgeber.Text
|
||||
|
||||
End If
|
||||
values_changed()
|
||||
End If
|
||||
End Sub
|
||||
@@ -105,5 +120,47 @@
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub loadChangedDSToPanel(enablePanel As Boolean, UStV_Leitender As VERAG_PROG_ALLGEMEIN.cUStVLeistender)
|
||||
pnlAdresse.Enabled = True 'enablePanel 'immer änderbar!
|
||||
txtStrasse.Text = If(UStV_Leitender.UstV_Leistender_Strasse, "")
|
||||
txtStrassenNr.Text = If(UStV_Leitender.UstV_Leistender_StrasseNr, "")
|
||||
txtPLZ.Text = If(UStV_Leitender.UstV_Leistender_PLZ, "")
|
||||
txtOrt.Text = If(UStV_Leitender.UstV_Leistender_Stadt, "")
|
||||
txtLand.Text = If(UStV_Leitender.UstV_Leistender_Land, "")
|
||||
txtUIDNr.Text = If(UStV_Leitender.UstV_Leistender_UstNr, "")
|
||||
|
||||
'Listener für Änderungen im Detail-Panel
|
||||
For Each c As Control In pnlAdresse.Controls
|
||||
If TypeOf (c) Is TextBox Then
|
||||
AddHandler CType(c, TextBox).TextChanged, AddressOf SomethingChanged
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub SomethingChanged(sender As Object, e As EventArgs)
|
||||
picSave.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub picSave_Click(sender As Object, e As EventArgs) Handles picSave.Click
|
||||
If UStV_Leist Is Nothing Then Exit Sub
|
||||
|
||||
If UStV_Leist.UstV_Leistender_Adresse Then
|
||||
If Not vbYes = MsgBox("Bei diesem Leistendem ist bereits eine Adresse hinterlegt, soll diese Adresse wirklich geändert werden?", vbYesNo) Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
UStV_Leist.UstV_Leistender_Strasse = If(txtStrasse.Text, "")
|
||||
UStV_Leist.UstV_Leistender_StrasseNr = If(txtStrassenNr.Text, "")
|
||||
UStV_Leist.UstV_Leistender_PLZ = If(txtPLZ.Text, "")
|
||||
UStV_Leist.UstV_Leistender_Stadt = If(txtOrt.Text, "")
|
||||
UStV_Leist.UstV_Leistender_Land = If(txtLand.Text, "")
|
||||
UStV_Leist.UstV_Leistender_UstNr = If(txtUIDNr.Text, "")
|
||||
UStV_Leist.UstV_Leistender_Adresse = True
|
||||
If UStV_Leist.SAVE() Then
|
||||
picSave.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
Imports System.Data.SqlTypes
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class UsrCntlessensbestellungen
|
||||
@@ -588,7 +589,19 @@ Public Class UsrCntlessensbestellungen
|
||||
cbxMitarbeiter.DropDownWidth = 200
|
||||
|
||||
cbxMenu.fillWithSQL("SELECT Distinct Top 50 (REPLACE(MenuTitel,'Wochenkarte ','')) + ' - ' + Convert(varchar, Year(MenuDateVon)), MenuDateVon from tblEBMenu order by MenuDateVon desc", True, "AVISO", True) '/ where MenuDateVon >= GETDATE()
|
||||
cbxMitarbeiter.fillWithSQL("SELECT [mit_id], ([mit_vname] + ' ' + [mit_nname]) + ' (' + mit_firma +')' as name FROM [tblMitarbeiter] where [mit_ChatBenutzer] = 1 AND [mit_pseudoUser] = 0 AND [mit_gekuendigt] = 0 AND mit_niederlassung = 'SUB' AND ((CAse when mit_firma = 'ALL' Then mit_FirmaHaupt else mit_firma END ) = 'VERAG' Or mit_firma = 'UNISPED' OR mit_firma = 'IMEX' OR mit_firma = 'FRONTOFFICE') Or mit_id = 144 order by name ", False, "ADMIN", True)
|
||||
|
||||
Dim sqlMA = "SELECT [mit_id], ([mit_vname] + ' ' + [mit_nname]) + ' (' + mit_firma +')' as name FROM [tblMitarbeiter] "
|
||||
sqlMA &= "where [mit_ChatBenutzer] = 1 AND [mit_pseudoUser] = 0 AND [mit_gekuendigt] = 0 AND mit_niederlassung = 'SUB'"
|
||||
If cAllgemein.MITARBEITER.getFirma = "UNISPED" Then
|
||||
sqlMA &= " And mit_firma = '" & cAllgemein.MITARBEITER.getFirma & "' "
|
||||
Else
|
||||
sqlMA &= " And ((Case When mit_firma = 'ALL' Then mit_FirmaHaupt else mit_firma END ) = 'VERAG' OR mit_firma = 'IMEX' OR mit_firma = 'FRONTOFFICE') Or mit_id = 144 "
|
||||
End If
|
||||
|
||||
sqlMA &= "order by name"
|
||||
|
||||
|
||||
cbxMitarbeiter.fillWithSQL(sqlMA, False, "ADMIN", True)
|
||||
cbxAbteilung.fillWithSQL("SELECT [abt_kuerzel], [abt_bezeichnung] from [tblAbteilungen] ", False, "ADMIN", True,, "")
|
||||
|
||||
cbxGebäude.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Frontoffice", "Frontoffice"))
|
||||
|
||||
14
SDL/frmEssensbestellungenAdministration.Designer.vb
generated
14
SDL/frmEssensbestellungenAdministration.Designer.vb
generated
@@ -82,6 +82,7 @@ Partial Class frmEssensbestellungenAdministration
|
||||
Me.lblWarning = New System.Windows.Forms.Label()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Label9 = New System.Windows.Forms.Label()
|
||||
Me.cbxCurrenyear = New System.Windows.Forms.CheckBox()
|
||||
Me.pnlTop.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.ContextMenuStrip1.SuspendLayout()
|
||||
@@ -122,6 +123,7 @@ Partial Class frmEssensbestellungenAdministration
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.Add(Me.cbxCurrenyear)
|
||||
Me.Panel1.Controls.Add(Me.cbxAlleAnzeigen)
|
||||
Me.Panel1.Controls.Add(Me.lblBestellungBis)
|
||||
Me.Panel1.Controls.Add(Me.btnBestelllimit)
|
||||
@@ -823,6 +825,17 @@ Partial Class frmEssensbestellungenAdministration
|
||||
Me.Label9.Text = "Gesamtbetrag"
|
||||
Me.Label9.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'cbxCurrenyear
|
||||
'
|
||||
Me.cbxCurrenyear.AutoSize = True
|
||||
Me.cbxCurrenyear.Checked = True
|
||||
Me.cbxCurrenyear.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.cbxCurrenyear.Location = New System.Drawing.Point(296, 12)
|
||||
Me.cbxCurrenyear.Name = "cbxCurrenyear"
|
||||
Me.cbxCurrenyear.Size = New System.Drawing.Size(15, 14)
|
||||
Me.cbxCurrenyear.TabIndex = 73
|
||||
Me.cbxCurrenyear.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmEssensbestellungenAdministration
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -916,4 +929,5 @@ Partial Class frmEssensbestellungenAdministration
|
||||
Friend WithEvents cbxAlleAnzeigen As CheckBox
|
||||
Friend WithEvents ExportToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents ExcelToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents cbxCurrenyear As CheckBox
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Timers
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
@@ -26,7 +27,9 @@ Public Class frmEssensbestellungenAdministration
|
||||
|
||||
cboAbteilung.fillWithSQL("SELECT DISTINCT(eb_abteilung) FROM [tblEssensbestellungen]", False, "AVISO", True)
|
||||
|
||||
cbKW.fillWithSQL("SELECT DISTINCT(eb_kw) FROM [tblEssensbestellungen] UNION SELECT (REPLACE(MenuTitel,'Wochenkarte ','')) + ' - ' + Convert(varchar, Year(MenuDateVon)) as kwDateNew FROM [tblEBMenu] where MenuDateVon > GETDATE()ORDER BY eb_kw desc", False, "AVISO", True)
|
||||
'changeYear()
|
||||
|
||||
cbKW.fillWithSQL("SELECT DISTINCT(eb_kw) FROM [tblEssensbestellungen] UNION SELECT (REPLACE(MenuTitel,'Wochenkarte ','')) + ' - ' + Convert(varchar, Year(MenuDateVon)) as kwDateNew FROM [tblEBMenu] where MenuDateVon > GETDATE() ORDER BY eb_kw desc", False, "AVISO", True)
|
||||
|
||||
cbxMailKW.fillWithSQL("SELECT DISTINCT(eb_kw) FROM [tblEssensbestellungen] ORDER BY eb_kw desc", False, "AVISO", True)
|
||||
cbxMailKW.changeItem("")
|
||||
@@ -49,14 +52,14 @@ Public Class frmEssensbestellungenAdministration
|
||||
FROM
|
||||
[tblEssensbestellungen] WHERE 1=1"
|
||||
|
||||
IIf(cAllgemein.MITARBEITER.getFirma = SQLString & "UNISPED", "And essen.eb_firma = " & cAllgemein.MITARBEITER.getFirma, "") 'UNISPED-Bestellungen!
|
||||
SQLString &= IIf(cAllgemein.MITARBEITER.getFirma = "UNISPED", " And eb_firma = '" & cAllgemein.MITARBEITER.getFirma & "'", "") 'UNISPED-Bestellungen!
|
||||
|
||||
dgvBestellungen.SET_SQL(SQLString & bestellungenWhereClause() & " Order by eb_datum, eb_mitid", "AVISO", ,)
|
||||
dgvBestellungen.LOAD()
|
||||
|
||||
|
||||
With dgvBestellungen
|
||||
'If .RowCount = 0 Then Me.Cursor = Cursors.Default : Exit Sub
|
||||
If .RowCount = 0 Then Me.Cursor = Cursors.Default : Exit Sub
|
||||
.RowHeadersVisible = False
|
||||
.ReadOnly = True
|
||||
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
@@ -628,12 +631,18 @@ Public Class frmEssensbestellungenAdministration
|
||||
|
||||
Dim dtBestellungen As DataTable
|
||||
|
||||
''LEFT([eb_kw],5)
|
||||
Dim sqlWhere = ""
|
||||
|
||||
If cAllgemein.MITARBEITER.getFirma = "UNISPED" Then
|
||||
sqlWhere &= " And eb_firma = '" & cAllgemein.MITARBEITER.getFirma & "' "
|
||||
Else
|
||||
sqlWhere &= " And eb_firma = 'VERAG' OR eb_firma = 'IMEX' OR eb_firma = 'FRONTOFFICE'"
|
||||
End If
|
||||
|
||||
Dim SQLStringBEstellungen As String = "SELECT [eb_mitname] as Name ,[eb_mitid] as ID , [eb_kw] as KW , [eb_gebaeude] as Gebaeude ,[eb_abteilung] as Abteilung ,[eb_montag] As Montag ,[eb_dienstag] As Dienstag,[eb_mittwoch] As Mittwoch,
|
||||
[eb_donnerstag] As Donnerstag , [eb_freitag] As Freitag, [eb_anmerkung] As Anmerkung , [eb_datum] As Datum , [eb_storniert] as Storniert, [eb_firma] as Firma
|
||||
FROM
|
||||
[tblEssensbestellungen] WHERE eb_kw = '" & cbxMailKW._value & "' AND eb_gebaeude = '" & cbxMailGebäude._value & "' AND ISNULL(eb_storniert,1)=0 Order by eb_datum"
|
||||
[tblEssensbestellungen] WHERE eb_kw = '" & cbxMailKW._value & "' AND eb_gebaeude = '" & cbxMailGebäude._value & "' AND ISNULL(eb_storniert,1)=0 " & sqlWhere & " Order by eb_datum"
|
||||
|
||||
dtBestellungen = SQL.loadDgvBySql(SQLStringBEstellungen, "AVISO", 100, True)
|
||||
|
||||
@@ -913,6 +922,7 @@ Public Class frmEssensbestellungenAdministration
|
||||
cbxMailGebäude.Enabled = False
|
||||
|
||||
Else
|
||||
|
||||
cboAbteilung.changeItem("")
|
||||
cboAbteilung.Enabled = True
|
||||
|
||||
@@ -923,4 +933,22 @@ Public Class frmEssensbestellungenAdministration
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub cbxCurrenyear_CheckedChanged(sender As Object, e As EventArgs) Handles cbxCurrenyear.CheckedChanged
|
||||
' changeYear()
|
||||
'End Sub
|
||||
|
||||
'Private Sub changeYear()
|
||||
|
||||
' Dim sqlwhere = "WHERE "
|
||||
' sqlwhere &= IIf(cbxCurrenyear.Checked, "Year(MenuDateVon) = Year(getdate()) and MenuDateVon > GETDATE()", "MenuDateVon > GETDATE()")
|
||||
' cbKW.fillWithSQL("SELECT DISTINCT(eb_kw) FROM [tblEssensbestellungen] UNION SELECT (REPLACE(MenuTitel,'Wochenkarte ','')) + ' - ' + Convert(varchar, Year(MenuDateVon)) as kwDateNew FROM [tblEBMenu] " & sqlwhere & " ORDER BY eb_kw desc", False, "AVISO", True)
|
||||
|
||||
|
||||
' Dim sqlwhere2 = "WHERE "
|
||||
' sqlwhere2 &= IIf(cbxCurrenyear.Checked, "Year([eb_datum]) = Year(getdate()) and [eb_datum] <= GETDATE()", "[eb_datum] <= GETDATE()")
|
||||
' cbxMailKW.fillWithSQL("SELECT DISTINCT(eb_kw) FROM [tblEssensbestellungen] " & sqlwhere2 & " ORDER BY eb_kw desc", False, "AVISO", True)
|
||||
|
||||
|
||||
'End Sub
|
||||
End Class
|
||||
@@ -362,19 +362,26 @@ Public Class usrcntlFiskaluebersicht
|
||||
|
||||
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
|
||||
If vbYes = MsgBox("Möchten Sie den Fiskalakt vom " & dgvFiskaluebersicht.SelectedRows(0).Cells("FK_Datum").Value & " abschließen?" & vbNewLine & "Er kann anschließend nicht mehr verändert werden", vbYesNo) Then
|
||||
getFields()
|
||||
|
||||
If checkEntries() Then
|
||||
fk.FK_locked = True
|
||||
fk.FK_Abschlussdatum = Now()
|
||||
fk.FK_MaId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
|
||||
fk.SAVE()
|
||||
initDGVFiskaluebersicht()
|
||||
btnOK.Enabled = False
|
||||
btnSave.Enabled = False
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_id = 170 Then
|
||||
If Not vbYes = MsgBox("Kerstin...... WIRKLICH?", vbYesNo) Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
getFields()
|
||||
|
||||
If checkEntries() Then
|
||||
fk.FK_locked = True
|
||||
fk.FK_Abschlussdatum = Now()
|
||||
fk.FK_MaId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
|
||||
fk.SAVE()
|
||||
initDGVFiskaluebersicht()
|
||||
btnOK.Enabled = False
|
||||
btnSave.Enabled = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||
|
||||
Reference in New Issue
Block a user