ustva, api, fakt.

This commit is contained in:
2025-02-13 11:23:50 +01:00
parent e7a10aacd8
commit e1d3f84bc2
11 changed files with 770 additions and 575 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.5.8")> <Assembly: AssemblyVersion("1.3.5.9")>
<Assembly: AssemblyFileVersion("1.3.5.8")> <Assembly: AssemblyFileVersion("1.3.5.9")>

View File

@@ -41,6 +41,7 @@ Partial Class frmMDM_USTVAntrag
Me.cbxLand = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cbxLand = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.lblLand = New System.Windows.Forms.Label() Me.lblLand = New System.Windows.Forms.Label()
Me.Panel8 = New System.Windows.Forms.Panel() Me.Panel8 = New System.Windows.Forms.Panel()
Me.lblMWSTAbrechnung = New System.Windows.Forms.Label()
Me.Label13 = New System.Windows.Forms.Label() Me.Label13 = New System.Windows.Forms.Label()
Me.txtGueltig = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtGueltig = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label11 = New System.Windows.Forms.Label() Me.Label11 = New System.Windows.Forms.Label()
@@ -89,13 +90,12 @@ Partial Class frmMDM_USTVAntrag
Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.pnl = New System.Windows.Forms.Panel() Me.pnl = New System.Windows.Forms.Panel()
Me.Panel2 = 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.Panel4 = New System.Windows.Forms.Panel()
Me.btnEintragloeschen = New System.Windows.Forms.Button() Me.btnEintragloeschen = New System.Windows.Forms.Button()
Me.btnNeuerEintrag = New System.Windows.Forms.Button() Me.btnNeuerEintrag = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.lblMWSTAbrechnung = New System.Windows.Forms.Label() Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
Me.Panel3.SuspendLayout() Me.Panel3.SuspendLayout()
CType(Me.picPDF, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.picPDF, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
@@ -362,6 +362,18 @@ Partial Class frmMDM_USTVAntrag
Me.Panel8.Size = New System.Drawing.Size(973, 87) Me.Panel8.Size = New System.Drawing.Size(973, 87)
Me.Panel8.TabIndex = 19 Me.Panel8.TabIndex = 19
' '
'lblMWSTAbrechnung
'
Me.lblMWSTAbrechnung.AutoSize = True
Me.lblMWSTAbrechnung.BackColor = System.Drawing.Color.Transparent
Me.lblMWSTAbrechnung.Cursor = System.Windows.Forms.Cursors.Hand
Me.lblMWSTAbrechnung.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblMWSTAbrechnung.ForeColor = System.Drawing.Color.Black
Me.lblMWSTAbrechnung.Location = New System.Drawing.Point(224, 41)
Me.lblMWSTAbrechnung.Name = "lblMWSTAbrechnung"
Me.lblMWSTAbrechnung.Size = New System.Drawing.Size(0, 17)
Me.lblMWSTAbrechnung.TabIndex = 25
'
'Label13 'Label13
' '
Me.Label13.AutoSize = True Me.Label13.AutoSize = True
@@ -522,9 +534,9 @@ Partial Class frmMDM_USTVAntrag
Me.cbxFiliale.DropDownWidth = 150 Me.cbxFiliale.DropDownWidth = 150
Me.cbxFiliale.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.cbxFiliale.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cbxFiliale.FormattingEnabled = True Me.cbxFiliale.FormattingEnabled = True
Me.cbxFiliale.Location = New System.Drawing.Point(429, 33) Me.cbxFiliale.Location = New System.Drawing.Point(413, 33)
Me.cbxFiliale.Name = "cbxFiliale" Me.cbxFiliale.Name = "cbxFiliale"
Me.cbxFiliale.Size = New System.Drawing.Size(89, 24) Me.cbxFiliale.Size = New System.Drawing.Size(105, 24)
Me.cbxFiliale.TabIndex = 16 Me.cbxFiliale.TabIndex = 16
' '
'Label4 'Label4
@@ -534,7 +546,7 @@ Partial Class frmMDM_USTVAntrag
Me.Label4.Cursor = System.Windows.Forms.Cursors.Hand Me.Label4.Cursor = System.Windows.Forms.Cursors.Hand
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.ForeColor = System.Drawing.Color.Black Me.Label4.ForeColor = System.Drawing.Color.Black
Me.Label4.Location = New System.Drawing.Point(363, 38) Me.Label4.Location = New System.Drawing.Point(352, 38)
Me.Label4.Name = "Label4" Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(48, 17) Me.Label4.Size = New System.Drawing.Size(48, 17)
Me.Label4.TabIndex = 15 Me.Label4.TabIndex = 15
@@ -585,9 +597,9 @@ Partial Class frmMDM_USTVAntrag
Me.cbxWahrung._value = "" Me.cbxWahrung._value = ""
Me.cbxWahrung.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.cbxWahrung.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cbxWahrung.FormattingEnabled = True Me.cbxWahrung.FormattingEnabled = True
Me.cbxWahrung.Location = New System.Drawing.Point(447, 5) Me.cbxWahrung.Location = New System.Drawing.Point(431, 5)
Me.cbxWahrung.Name = "cbxWahrung" Me.cbxWahrung.Name = "cbxWahrung"
Me.cbxWahrung.Size = New System.Drawing.Size(71, 24) Me.cbxWahrung.Size = New System.Drawing.Size(87, 24)
Me.cbxWahrung.TabIndex = 12 Me.cbxWahrung.TabIndex = 12
' '
'lblWahrung 'lblWahrung
@@ -597,7 +609,7 @@ Partial Class frmMDM_USTVAntrag
Me.lblWahrung.Cursor = System.Windows.Forms.Cursors.Hand Me.lblWahrung.Cursor = System.Windows.Forms.Cursors.Hand
Me.lblWahrung.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblWahrung.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblWahrung.ForeColor = System.Drawing.Color.Black Me.lblWahrung.ForeColor = System.Drawing.Color.Black
Me.lblWahrung.Location = New System.Drawing.Point(363, 9) Me.lblWahrung.Location = New System.Drawing.Point(352, 9)
Me.lblWahrung.Name = "lblWahrung" Me.lblWahrung.Name = "lblWahrung"
Me.lblWahrung.Size = New System.Drawing.Size(70, 17) Me.lblWahrung.Size = New System.Drawing.Size(70, 17)
Me.lblWahrung.TabIndex = 11 Me.lblWahrung.TabIndex = 11
@@ -1090,14 +1102,6 @@ Partial Class frmMDM_USTVAntrag
Me.Panel2.Size = New System.Drawing.Size(1300, 269) Me.Panel2.Size = New System.Drawing.Size(1300, 269)
Me.Panel2.TabIndex = 1 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 'Panel4
' '
Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke
@@ -1148,17 +1152,13 @@ Partial Class frmMDM_USTVAntrag
Me.ContextMenuStrip2.Name = "ContextMenuStrip1" Me.ContextMenuStrip2.Name = "ContextMenuStrip1"
Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4) Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4)
' '
'lblMWSTAbrechnung 'UstCntlUSTV_AntragPosition1
' '
Me.lblMWSTAbrechnung.AutoSize = True Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
Me.lblMWSTAbrechnung.BackColor = System.Drawing.Color.Transparent Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(0, 0)
Me.lblMWSTAbrechnung.Cursor = System.Windows.Forms.Cursors.Hand Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
Me.lblMWSTAbrechnung.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1298, 267)
Me.lblMWSTAbrechnung.ForeColor = System.Drawing.Color.Black Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
Me.lblMWSTAbrechnung.Location = New System.Drawing.Point(224, 41)
Me.lblMWSTAbrechnung.Name = "lblMWSTAbrechnung"
Me.lblMWSTAbrechnung.Size = New System.Drawing.Size(0, 17)
Me.lblMWSTAbrechnung.TabIndex = 25
' '
'frmMDM_USTVAntrag 'frmMDM_USTVAntrag
' '

View File

@@ -724,7 +724,7 @@ Public Class frmMDM_USTVAntrag
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
Dim sql As New SQL Dim sql As New SQL
USTV_POS.UStVPo_Schnittstelle = True USTV_POS.UStVPo_Schnittstelle = True
USTV_POS.UStVPo_Leistender = "VERAG 360 GmbH; 4975 Suben" USTV_POS.UStVPo_Leistender = "VERAG 360 GmbH"
USTV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME USTV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
USTV_POS.UStVPo_Zeitstempel = Now() USTV_POS.UStVPo_Zeitstempel = Now()
@@ -1855,8 +1855,8 @@ Public Class frmMDM_USTVAntrag
Dim dtSteuerNr As DataTable = SQL.loadDgvBySql("SELECT * FROM tblSteuernummern WHERE AdressenNr = " & USTV_ANTRAG.UStVAn_KuNr & " and tblSteuernummern.LandNr =" & USTV_ANTRAG.UStVAn_LandNr, "FMZOLL") Dim dtSteuerNr As DataTable = SQL.loadDgvBySql("SELECT * FROM tblSteuernummern WHERE AdressenNr = " & USTV_ANTRAG.UStVAn_KuNr & " and tblSteuernummern.LandNr =" & USTV_ANTRAG.UStVAn_LandNr, "FMZOLL")
If dtSteuerNr.Rows.Count > 0 Then If dtSteuerNr.Rows.Count > 0 Then
txtStNr.Text = dtSteuerNr.Rows(0).Item("StNrFürRückerstattungUSt") txtStNr.Text = IIf(Not IsDBNull(dtSteuerNr.Rows(0).Item("StNrFürRückerstattungUSt")), dtSteuerNr.Rows(0).Item("StNrFürRückerstattungUSt"), "")
txtGueltig.Text = dtSteuerNr.Rows(0).Item("StNrGültigkeitsdatum") txtGueltig.Text = IIf(Not IsDBNull(dtSteuerNr.Rows(0).Item("StNrGültigkeitsdatum")), dtSteuerNr.Rows(0).Item("StNrGültigkeitsdatum"), "")
End If End If

View File

@@ -70,6 +70,7 @@ Partial Class usrCntlUSTV
Me.Button8 = New System.Windows.Forms.Button() Me.Button8 = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip3 = New System.Windows.Forms.ContextMenuStrip(Me.components)
CType(Me.dgvUSTV, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvUSTV, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
Me.Panel2.SuspendLayout() Me.Panel2.SuspendLayout()
@@ -694,7 +695,7 @@ Partial Class usrCntlUSTV
Me.Button2.Name = "Button2" Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(92, 39) Me.Button2.Size = New System.Drawing.Size(92, 39)
Me.Button2.TabIndex = 27 Me.Button2.TabIndex = 27
Me.Button2.Text = "St.-Nr. prüfen" Me.Button2.Text = "FA-Bestätig. prüfen"
Me.Button2.UseVisualStyleBackColor = True Me.Button2.UseVisualStyleBackColor = True
' '
'btnVorschau 'btnVorschau
@@ -776,6 +777,11 @@ Partial Class usrCntlUSTV
Me.ContextMenuStrip2.Name = "ContextMenuStrip1" Me.ContextMenuStrip2.Name = "ContextMenuStrip1"
Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4) Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4)
' '
'ContextMenuStrip3
'
Me.ContextMenuStrip3.Name = "ContextMenuStrip1"
Me.ContextMenuStrip3.Size = New System.Drawing.Size(61, 4)
'
'usrCntlUSTV 'usrCntlUSTV
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -840,4 +846,5 @@ Partial Class usrCntlUSTV
Friend WithEvents Button2 As Button Friend WithEvents Button2 As Button
Friend WithEvents lblVZhint As Label Friend WithEvents lblVZhint As Label
Friend WithEvents lblVZKunde As Label Friend WithEvents lblVZKunde As Label
Friend WithEvents ContextMenuStrip3 As ContextMenuStrip
End Class End Class

View File

@@ -123,4 +123,7 @@
<metadata name="ContextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ContextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>174, 17</value> <value>174, 17</value>
</metadata> </metadata>
<metadata name="ContextMenuStrip3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>331, 17</value>
</metadata>
</root> </root>

View File

@@ -1,6 +1,9 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports com.sun.javadoc
Imports com.sun.xml.internal.bind.v2.model.core Imports com.sun.xml.internal.bind.v2.model.core
Imports itextsharp.text.factories
Imports Microsoft.Office.Interop Imports Microsoft.Office.Interop
Imports sun.swing
Imports VERAG_PROG_ALLGEMEIN Imports VERAG_PROG_ALLGEMEIN
@@ -541,6 +544,38 @@ Public Class usrCntlUSTV
Private Sub btn2_Click(sender As Object, e As EventArgs) Handles Button2.Click
If Not ContextMenuStrip3.Items.ContainsKey("dgv") Then
Dim dgv = New ToolStripMenuItem() With {.Text = "Übersicht anzeigen", .Name = "dgv", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
AddHandler dgv.Click, AddressOf mnuItem3_Clicked
ContextMenuStrip3.Items.Add(dgv)
End If
If Not ContextMenuStrip3.Items.ContainsKey("excel") Then
Dim excel = New ToolStripMenuItem() With {.Text = "Excelauswertung starten", .Name = "excel", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
ContextMenuStrip3.Items.Add(excel)
AddHandler excel.Click, AddressOf mnuItem3_Clicked
End If
If Not ContextMenuStrip3.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 mnuItem3_Clicked
ContextMenuStrip3.Items.Add(mail)
End If
ContextMenuStrip3.Show(Cursor.Position)
End Sub
Private Sub btnMail_Click(sender As Object, e As EventArgs) Handles btnMail.Click Private Sub btnMail_Click(sender As Object, e As EventArgs) Handles btnMail.Click
If Not ContextMenuStrip1.Items.ContainsKey("excel") Then If Not ContextMenuStrip1.Items.ContainsKey("excel") Then
@@ -952,7 +987,49 @@ Public Class usrCntlUSTV
End Sub End Sub
Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click Private Sub mnuItem3_Clicked(sender As Object, e As EventArgs)
Dim item As ToolStripMenuItem = TryCast(sender, ToolStripMenuItem)
Dim sqlKunde = ""
Dim sqlKundeadmin = ""
If KdSearchBox1.KdNr > 0 Then
sqlKunde = " And A.AdressenNr = " & KdSearchBox1.KdNr
sqlKundeadmin = " AND [api_KundenNr] = " & KdSearchBox1.KdNr
End If
If item IsNot Nothing Then
If item.Name = "dgv" Then
Try
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim frm As New Form
Dim dgv As New DataGridView()
Dim dt As DataTable = SQL.loadDgvBySql(" select [api_datetime] as erstelltAm,[api_EMail] as An ,[api_EMailCC] as CC,[api_EMailBCC] as BCC,[api_EMailSubject] as Betreff,[api_EMailAttCnt] as Anzahl_Anhänge, [api_KundenNr] as KundenNr, [api_Username] as erstelltVon from [tblAPI] where [api_apiUArt] = 'FA-Bestaetigung' AND api_progName = 'SDL'" & sqlKundeadmin & " Order by api_datetime desc", "ADMIN")
dgv.DataSource = dt
If dgv IsNot Nothing Then
frm.Size = New Size(1000, 1000)
dgv.Size = New Size(frm.Size.Width - 10, frm.Size.Height - 10)
dgv.Dock = DockStyle.Fill
dgv.Anchor = AnchorStyles.Left
dgv.Anchor = AnchorStyles.Top
dgv.ReadOnly = True
frm.Controls.Add(dgv)
frm.StartPosition = FormStartPosition.CenterScreen
frm.ShowDialog()
End If
Catch ex As System.Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Else
Dim f As New frmDatumsabfrage("Bitte Prüfdatum eingeben", False) Dim f As New frmDatumsabfrage("Bitte Prüfdatum eingeben", False)
f.ShowDialog() f.ShowDialog()
@@ -960,41 +1037,147 @@ Public Class usrCntlUSTV
Dim pruefdatum As Date = CDate(f.Datum) Dim pruefdatum As Date = CDate(f.Datum)
Dim sqlKunde = ""
If KdSearchBox1.KdNr > 0 Then
sqlKunde = " AND A.AdressenNr = " & KdSearchBox1.KdNr
End If
Dim sqlQery = "SELECT
A.LandKz, Dim sqlQery = "Select A.AdressenNr, A.[E-Mail], A.[E-Mail2], A.LandKz, A.Ordnungsbegriff, L.LandKz, S.StNrFürRückerstattungUSt, S.StNrGültigkeitsdatum, CAST('" & pruefdatum & "' AS DATE) AS Prüfdatum,
A.AdressenNr,
A.Ordnungsbegriff,
L.LandKz,
S.StNrFürRückerstattungUSt,
S.StNrGültigkeitsdatum,
CAST('" & pruefdatum & "' AS DATE) AS Prüfdatum,
CASE CASE
WHEN S.StNrGültigkeitsdatum > CAST('" & pruefdatum & "' AS DATE) THEN 1 WHEN S.StNrGültigkeitsdatum > CAST('" & pruefdatum & "' AS DATE) THEN 1 ELSE 0
ELSE 0
END AS Gültig END AS Gültig
FROM FROM [Länderverzeichnis für die Außenhandelsstatistik] L INNER JOIN (Adressen A INNER JOIN Währungstabelle W ON A.LandKz = W.LandKz INNER JOIN tblSteuernummern S ON A.AdressenNr = S.AdressenNr) ON L.LandNr = S.LandNr
[Länderverzeichnis für die Außenhandelsstatistik] L WHERE S.StNrGültigkeitsdatum IS NOT NULL AND W.MitgliedslandEU = 0 " & sqlKunde
INNER JOIN
(Adressen A
INNER JOIN Währungstabelle W ON A.LandKz = W.LandKz
INNER JOIN tblSteuernummern S ON A.AdressenNr = S.AdressenNr)
ON L.LandNr = S.LandNr
WHERE
S.StNrGültigkeitsdatum IS NOT NULL
AND W.MitgliedslandEU = 0 " & sqlKunde
Dim dtVorschau As DataTable = SQL.loadDgvBySql(sqlQery, "FMZOLL") Dim dtVorschau As DataTable = SQL.loadDgvBySql(sqlQery, "FMZOLL")
ContextMenuStrip3.Hide()
If dtVorschau.Rows.Count = 0 Then Exit Sub
If item.Name = "excel" Then
If dtVorschau.Columns.Contains("E-Mail") Then dtVorschau.Columns.Remove("E-Mail")
If dtVorschau.Columns.Contains("E-Mail2") Then dtVorschau.Columns.Remove("E-Mail2")
cProgramFunctions.genExcelFromDT_NEW(dtVorschau,,,,,, True) cProgramFunctions.genExcelFromDT_NEW(dtVorschau,,,,,, True)
ElseIf item.Name = "mail" Then
Dim displayView = New DataView(dtVorschau, "Gültig = 0", "AdressenNr", DataViewRowState.CurrentRows)
Dim distinctDT As DataTable = displayView.ToTable(True, "AdressenNr")
If distinctDT.Rows.Count = 0 Then
MsgBox("Zu diesem Datum sind alle FA-Bestätigung gültig!")
Exit Sub
End If
If Not vbYes = MsgBox("Es werden Emails für " & distinctDT.Rows.Count & " unterschiedliche/n Kunden erstellt." & vbNewLine & "Möchten Sie fortfahren?", vbYesNoCancel) Then Exit Sub
For Each row In distinctDT.Rows
Dim dt_Data_selected = dtVorschau.Select("AdressenNr ='" & row.Item(0) & "'").CopyToDataTable
Try
Dim outl As New Outlook.Application
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
Mail = outl.CreateItem(0)
Mail.Subject = "PDV UVERENJA"
Dim TextHTML = ""
TextHTML &= "Postovani,<br>"
TextHTML &= "<br>"
TextHTML &= "isteklo nam je staro porezno Uvjerenje i potrebno je da nam dostavite hitno nova za sljedece zemlje.<br><br>"
Dim attachmentSRB As Boolean = False
Dim attachmentBIH As Boolean = False
Dim attachmendSK As Boolean = False
For Each r In dt_Data_selected.Rows
If Not IsDBNull(r.item("LandKZ1")) Then
Select Case r.item("LandKZ1")
Case "HU" : TextHTML &= "<li><b>" & r.item("LandKZ1") & " (Na uverenju mora biti naveden datum kad ste registrovani kao PDV obaveznik, prevedite na Madarski, potpis sluzbene osobe ne smije biti faksimil mora bit vlastorucan)</li></b><br><br>"
Case "SI" : TextHTML &= "<li><b>" & r.item("LandKZ1") & " (Na uverenju mora biti naveden datum kad ste registrovani kao PDV obaveznik, prevedite na Slovenacki)</li></b><br><br>"
Case "LU" : TextHTML &= "<li><b>" & r.item("LandKZ1") & " (Na uverenju obavezno navedite sifru djelatnosti 4941, prevesti na Engleski)</li></b><br><br>"
Case "SK" : TextHTML &= "<li><b>" & r.item("LandKZ1") & " (Na uverenju mora biti naveden datum kad ste registrovani kao PDV obaveznik, prevedite na Engleski)</li></b><br><br>" : attachmendSK = True
Case "RO" : TextHTML &= "<li><b>" & r.item("LandKZ1") & " (Na uverenju mora biti naveden datum kad ste registrovani kao PDV obaveznik, prevedite na Rumonski)</li></b><br><br>"
Case "HR" : TextHTML &= "<li><b>" & r.item("LandKZ1") & " (Na uverenju mora biti naveden datum kad ste registrovani kao PDV obaveznik, prevedite na Hrvatski)</li></b><br><br>"
Case Else
TextHTML &= "<li><b>" & r.item("LandKZ1") & " (prevod na Engleski)</li></b><br><br>"
End Select
End If End If
If Not IsDBNull(r.item("LandKZ")) Then
Select Case r.item("LandKZ")
Case "SRB" : attachmentSRB = True
Case "BIH" : attachmentBIH = True
End Select
End If
Next
TextHTML &= "<br><br>Molim Vas da nam original uverenja + prijevod dostavite pojedinacno za svaku zemlju, znaci koliko zemalja toliko uverenja I prevoda.<br><br>"
TextHTML &= "U privitku se nalazi primjer uverenja (u smislu sadrzaja)<br><br>"
TextHTML &= "za pitanja stojim na raspolaganju!<br><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>"
If Not IsDBNull(dt_Data_selected.Rows(0).Item("E-Mail")) Then Mail.To &= dt_Data_selected.Rows(0).Item("E-Mail") & ";"
If Not IsDBNull(dt_Data_selected.Rows(0).Item("E-Mail2")) Then Mail.To &= dt_Data_selected.Rows(0).Item("E-Mail2") & ";"
If attachmentSRB Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "VORLAGEN", "SONSTIGE", "MDM", "", "SRB_FA_BESTAETIGUNG")
Dim filepath = DS.GET_TOP1_PATH(False)
If filepath <> "" Then Mail.Attachments.Add(filepath, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
End If
If attachmentBIH Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "VORLAGEN", "SONSTIGE", "MDM", "", "BIH_FA_BESTAETIGUNG")
Dim filepath = DS.GET_TOP1_PATH(False)
If filepath <> "" Then Mail.Attachments.Add(filepath, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
End If
If attachmentBIH And attachmendSK Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "VORLAGEN", "SONSTIGE", "MDM", "", "SVK_FA_BESTAETIGUNG")
Dim filepath = DS.GET_TOP1_PATH(False)
If filepath <> "" Then Mail.Attachments.Add(filepath, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
End If
Mail.Display()
Dim API = VERAG_PROG_ALLGEMEIN.cAPI.INSERT_API(VERAG_PROG_ALLGEMEIN.cAPI_INOUT.OUT, VERAG_PROG_ALLGEMEIN.cAPI_Type.MAIL, VERAG_PROG_ALLGEMEIN.cAPI_ART.SDL_OUT_FA, "FA-Bestaetigung",,, row.Item(0))
API.api_EMail = Mail.To
API.api_EMailSubject = Mail.Subject
API.api_EMailText = TextHTML
API.api_EMailAttCnt = Mail.Attachments.Count
API.SAVE()
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
Next
End If
End If
End If
End If
End Sub End Sub
End Class End Class

View File

@@ -302,7 +302,7 @@ Public Class ustCntlUSTV_AntragPosition
If UStV_Leist.SAVE() Then If UStV_Leist.SAVE() Then
btnLeistenderSave.Visible = False btnLeistenderSave.Visible = False
UStV_POS.UStVPo_Leistender = UStV_Leist UStV_POS.UStVPo_Leistender = UStV_Leist.UStV_Leistender
'RaiseEvent CHANGED(UStV_POS.UStVPo_ID) 'RaiseEvent CHANGED(UStV_POS.UStVPo_ID)
values_changed() values_changed()
End If End If
@@ -332,7 +332,7 @@ Public Class ustCntlUSTV_AntragPosition
If Not vbYes = MsgBox("Bei diesem Leistenden ist bereits eine Adresse hinterlegt, soll diese Adresse wirklich geändert werden?", vbYesNo) Then If Not vbYes = MsgBox("Bei diesem Leistenden ist bereits eine Adresse hinterlegt, soll diese Adresse wirklich geändert werden?", vbYesNo) Then
btnLeistenderSave.Visible = False btnLeistenderSave.Visible = False
UStV_POS.UStVPo_Leistender = UStV_Leist UStV_POS.UStVPo_Leistender = UStV_Leist.UStV_Leistender
'RaiseEvent CHANGED(UStV_POS.UStVPo_ID) 'RaiseEvent CHANGED(UStV_POS.UStVPo_ID)
values_changed() values_changed()
Exit Sub Exit Sub

View File

@@ -119,7 +119,7 @@ Public Class usrCntlATLAS_NCTS004
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
End Sub End Sub
Shared Function getBezugsnr(FIRMA_DY, SENDUNG, ByRef BezugsNr, ByRef zusatz) Shared Function getBezugsnr(FIRMA_DY As String, SENDUNG As cSendungen, ByRef BezugsNr As String, ByRef zusatz As String)
Dim BezugsNrTmp = "" Dim BezugsNrTmp = ""
Select Case FIRMA_DY Select Case FIRMA_DY
Case "UNISPED" Case "UNISPED"

File diff suppressed because it is too large Load Diff

View File

@@ -450,6 +450,7 @@ Public Class usrcntlFakturierung
If intZlr = 0 Then Exit For If intZlr = 0 Then Exit For
Next Next
End If End If

View File

@@ -25,6 +25,7 @@ Public Enum cAPI_ART
VERAG_OUT_EZA = 11 VERAG_OUT_EZA = 11
AVISO_IN_MSE = 80 AVISO_IN_MSE = 80
SDL_OUT_FA = 81
End Enum End Enum