sammelrechnungsdruck, ustva, etc.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -556,6 +556,7 @@ Public Class frmFaktEmail
|
||||
|
||||
If outl.Session.Accounts.Count > 0 Then
|
||||
For Each oAccount In outl.Session.Accounts
|
||||
|
||||
If oAccount.SmtpAddress = accountToSent Then
|
||||
Mail.SendUsingAccount = oAccount
|
||||
Exit For
|
||||
|
||||
@@ -594,6 +594,8 @@ Public Class frmRechnungenSuche
|
||||
|
||||
rpt.DataSource = dt
|
||||
|
||||
'cProgramFunctions.genExcelFromDT_NEW(DataGridView.DataSource)
|
||||
|
||||
If rpt.DataSource.rows.count = 0 Then
|
||||
rpt.Dispose() : print.Dispose()
|
||||
MsgBox("Keine Daten vorhanden!")
|
||||
|
||||
@@ -1039,7 +1039,7 @@ Partial Public Class rptSammelRechnungAnlagenDruck
|
||||
'GroupHeader4
|
||||
'
|
||||
Me.GroupHeader4.Controls.AddRange(New GrapeCity.ActiveReports.SectionReportModel.ARControl() {Me.lblLeistungsdatumUeberschrift, Me.lblSteuerpflichtigUeberschrift, Me.lblPosNrUeberschrift, Me.lblSendungUeberschrift, Me.lblSteuerfreiUeberschrift, Me.Line4, Me.Line12, Me.Line16, Me.Line15, Me.Line17, Me.lblDurchlaufposten, Me.lblSteuerplichtUeberschriftMDM})
|
||||
Me.GroupHeader4.Height = 0.472441!
|
||||
Me.GroupHeader4.Height = 0.378691!
|
||||
Me.GroupHeader4.KeepTogether = True
|
||||
Me.GroupHeader4.Name = "GroupHeader4"
|
||||
'
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -21,4 +21,7 @@ Public Class rptSammelRechnungAnlagenDruck
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GroupFooter4_Format(sender As Object, e As EventArgs) Handles GroupFooter4.Format
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
1293
SDL/Fakturierung/rptSammelRechnungAnlagenDruck_MDM.Designer.vb
generated
Normal file
1293
SDL/Fakturierung/rptSammelRechnungAnlagenDruck_MDM.Designer.vb
generated
Normal file
File diff suppressed because it is too large
Load Diff
136
SDL/Fakturierung/rptSammelRechnungAnlagenDruck_MDM.resx
Normal file
136
SDL/Fakturierung/rptSammelRechnungAnlagenDruck_MDM.resx
Normal file
File diff suppressed because one or more lines are too long
24
SDL/Fakturierung/rptSammelRechnungAnlagenDruck_MDM.vb
Normal file
24
SDL/Fakturierung/rptSammelRechnungAnlagenDruck_MDM.vb
Normal file
@@ -0,0 +1,24 @@
|
||||
Imports GrapeCity.ActiveReports
|
||||
Imports GrapeCity.ActiveReports.Document
|
||||
|
||||
Public Class rptSammelRechnungAnlagenDruck_MDM
|
||||
Public _LAN = ""
|
||||
Sub New()
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
Sub New(_LAN)
|
||||
' Dieser Aufruf ist f<>r den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
Me._LAN = _LAN
|
||||
' F<>gen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
End Sub
|
||||
Private Sub rptRechnungDruck_ReportStart(sender As Object, e As EventArgs) Handles MyBase.ReportStart
|
||||
If _LAN.replace("DE", "") <> "" Then
|
||||
SDL.cProgramFunctions._TRANSLATE_RPT(Me, Me.ReportHeader1.Controls, _LAN, "rptSammelRechnungAnlagenDruck")
|
||||
SDL.cProgramFunctions._TRANSLATE_RPT(Me, Me.ReportFooter1.Controls, _LAN, "rptSammelRechnungAnlagenDruck")
|
||||
SDL.cProgramFunctions._TRANSLATE_RPT(Me, Me.GroupHeader4.Controls, _LAN, "rptSammelRechnungAnlagenDruck")
|
||||
SDL.cProgramFunctions._TRANSLATE_RPT(Me, Me.PageFooter.Controls, _LAN, "rptSammelRechnungAnlagenDruck")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1129,9 +1129,13 @@ Public Class frmFormulare
|
||||
If listMail IsNot Nothing AndAlso listMail.Count > 0 Then
|
||||
For Each l In listMail
|
||||
Dim outl As New Outlook.Application
|
||||
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
'Dim StandAcc = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getdefaultOutlookAccount(outl)
|
||||
'If StandAcc IsNot Nothing Then Mail.SendUsingAccount = StandAcc
|
||||
|
||||
If l.MailHTMLText <> "" Then Mail.HTMLBody = l.MailHTMLText
|
||||
If l.Mail_To <> "" Then Mail.To = l.Mail_To
|
||||
If l.Mail_CC <> "" Then Mail.CC = l.Mail_CC
|
||||
@@ -1153,9 +1157,18 @@ Public Class frmFormulare
|
||||
Next
|
||||
Else
|
||||
Dim outl As New Outlook.Application
|
||||
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
MsgBox(VERAG_PROG_ALLGEMEIN.cProgramFunctions.printdefaultOutlookAccount(outl))
|
||||
|
||||
'Dim StandAcc = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getdefaultOutlookAccount(outl)
|
||||
|
||||
Mail.SendUsingAccount = outl.Session.DefaultAccount
|
||||
|
||||
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
|
||||
Try
|
||||
Mail.SentOnBehalfOfName = SDL.cFakturierung.getDefaultMail("AMBAR")
|
||||
|
||||
@@ -604,6 +604,12 @@
|
||||
<Compile Include="Fakturierung\frmSendEmail.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Fakturierung\rptSammelRechnungAnlagenDruck_MDM.Designer.vb">
|
||||
<DependentUpon>rptSammelRechnungAnlagenDruck_MDM.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Fakturierung\rptSammelRechnungAnlagenDruck_MDM.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Fakturierung\rptSammelRechnungAnlagenDruck_Leistungen.Designer.vb">
|
||||
<DependentUpon>rptSammelRechnungAnlagenDruck_Leistungen.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -3258,6 +3264,9 @@
|
||||
<EmbeddedResource Include="Fakturierung\frmSendEmail.resx">
|
||||
<DependentUpon>frmSendEmail.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Fakturierung\rptSammelRechnungAnlagenDruck_MDM.resx">
|
||||
<DependentUpon>rptSammelRechnungAnlagenDruck_MDM.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Fakturierung\rptSammelRechnungAnlagenDruck_Leistungen.resx">
|
||||
<DependentUpon>rptSammelRechnungAnlagenDruck_Leistungen.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
24
SDL/USTV/frmUSTVoffeneAntraege.Designer.vb
generated
24
SDL/USTV/frmUSTVoffeneAntraege.Designer.vb
generated
@@ -50,7 +50,7 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.cbxKundeLand = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.cbxNichtEroeffneteAntraege = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxSteuerNr = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxUStV = New System.Windows.Forms.CheckBox()
|
||||
Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.AntragEröffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@@ -284,7 +284,7 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.pnlLand.Controls.Add(Me.Label5)
|
||||
Me.pnlLand.Controls.Add(Me.cbxKundeLand)
|
||||
Me.pnlLand.Controls.Add(Me.cbxNichtEroeffneteAntraege)
|
||||
Me.pnlLand.Controls.Add(Me.cbxSteuerNr)
|
||||
Me.pnlLand.Controls.Add(Me.cbxUStV)
|
||||
Me.pnlLand.Controls.Add(Me.Label4)
|
||||
Me.pnlLand.Controls.Add(Me.MyComboBox1)
|
||||
Me.pnlLand.Location = New System.Drawing.Point(807, 62)
|
||||
@@ -325,16 +325,16 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.cbxNichtEroeffneteAntraege.Text = "nicht eröffnete Anträge"
|
||||
Me.cbxNichtEroeffneteAntraege.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cbxSteuerNr
|
||||
'cbxUStV
|
||||
'
|
||||
Me.cbxSteuerNr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.cbxSteuerNr.AutoSize = True
|
||||
Me.cbxSteuerNr.Location = New System.Drawing.Point(338, 17)
|
||||
Me.cbxSteuerNr.Name = "cbxSteuerNr"
|
||||
Me.cbxSteuerNr.Size = New System.Drawing.Size(105, 17)
|
||||
Me.cbxSteuerNr.TabIndex = 46
|
||||
Me.cbxSteuerNr.Text = " nur mit SteuerNr"
|
||||
Me.cbxSteuerNr.UseVisualStyleBackColor = True
|
||||
Me.cbxUStV.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.cbxUStV.AutoSize = True
|
||||
Me.cbxUStV.Location = New System.Drawing.Point(338, 17)
|
||||
Me.cbxUStV.Name = "cbxUStV"
|
||||
Me.cbxUStV.Size = New System.Drawing.Size(88, 17)
|
||||
Me.cbxUStV.TabIndex = 46
|
||||
Me.cbxUStV.Text = " nur mit UStV"
|
||||
Me.cbxUStV.UseVisualStyleBackColor = True
|
||||
'
|
||||
'MyComboBox1
|
||||
'
|
||||
@@ -549,7 +549,7 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Friend WithEvents cbxNichtEroeffneteAntraege As CheckBox
|
||||
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
||||
Friend WithEvents AntragEröffnenToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents cbxSteuerNr As CheckBox
|
||||
Friend WithEvents cbxUStV As CheckBox
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents cbxKundeLand As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents btnVerag As Button
|
||||
|
||||
@@ -528,7 +528,7 @@ Public Class frmUSTVoffeneAntraege
|
||||
sqlwhereLand &= " and Kundenland = '" & cbxKundeLand._value & "'"
|
||||
End If
|
||||
|
||||
If cbxSteuerNr.Checked Then
|
||||
If cbxUStV.Checked Then
|
||||
sqlwhereSteuerNr &= " and isnull(tblSteuernummern.UStV,0) <> 0"
|
||||
End If
|
||||
|
||||
@@ -584,7 +584,7 @@ Public Class frmUSTVoffeneAntraege
|
||||
|
||||
|
||||
|
||||
Dim sqlstring = "select isnull(UStVAn_ID,0) as antragExisitiert,tblSteuernummern.UStV as SteuerNr,Lieferant , KdNr, Kundenname, Kundenland, Einreichland from (" & SQLPLOSEUMSTELLUNG & "
|
||||
Dim sqlstring = "select isnull(UStVAn_ID,0) as antragExisitiert,tblSteuernummern.UStV as UStV,Lieferant , KdNr, Kundenname, Kundenland, Einreichland from (" & SQLPLOSEUMSTELLUNG & "
|
||||
|
||||
UNION ALL
|
||||
|
||||
@@ -693,7 +693,7 @@ Public Class frmUSTVoffeneAntraege
|
||||
If .Columns.Count > 0 Then
|
||||
|
||||
.Columns("KdNr").HeaderText = "KdNr"
|
||||
.Columns("SteuerNr").HeaderText = "SteuerNr"
|
||||
.Columns("UStV").HeaderText = "UStV"
|
||||
.Columns("Kundenname").HeaderText = "Kunde"
|
||||
.Columns("Kundenland").HeaderText = "Kundenland"
|
||||
.Columns("Einreichland").HeaderText = "Einreichland"
|
||||
@@ -793,7 +793,7 @@ Public Class frmUSTVoffeneAntraege
|
||||
initLieferant("VERAG", sender)
|
||||
End Sub
|
||||
|
||||
Private Sub cbxAlleoffenen_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAlleoffenen.CheckedChanged, cbxSteuerNr.CheckedChanged, cbxNichtEroeffneteAntraege.CheckedChanged
|
||||
Private Sub cbxAlleoffenen_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAlleoffenen.CheckedChanged, cbxUStV.CheckedChanged, cbxNichtEroeffneteAntraege.CheckedChanged
|
||||
init()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1077,7 +1077,7 @@ Public Class usrCntlUSTV
|
||||
|
||||
For Each row In distinctDT.Rows
|
||||
|
||||
Dim dt_Data_selected = dtVorschau.Select("AdressenNr ='" & row.Item(0) & "'").CopyToDataTable
|
||||
Dim dt_Data_selected = dtVorschau.Select("AdressenNr ='" & row.Item(0) & "' AND Gültig = 0").CopyToDataTable
|
||||
|
||||
Try
|
||||
|
||||
|
||||
@@ -65,12 +65,12 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
|
||||
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) : scanSonstiges.Enabled = False
|
||||
Case 7 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & UStV_POS.UStVPo_ReDat & "' and rmc_reNr='" & UStV_POS.UStVPo_ReNr & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_daId] is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
|
||||
Case 4, 9 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblMSEInvoices] as inv inner join tblMSECustomers on inv.customer_number = customer_id where invoice_date='" & UStV_POS.UStVPo_ReDat & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & kdnr & " AND daId is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
|
||||
Case 10 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & UStV_POS.UStVPo_ReDat & "' and Abrechnungsnummer='" & UStV_POS.UStVPo_ReNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
|
||||
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)
|
||||
Case 7 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & UStV_POS.UStVPo_ReDat & "' and rmc_reNr='" & UStV_POS.UStVPo_ReNr & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_daId] is not null", "FMZOLL",,, -1)
|
||||
Case 4, 9 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblMSEInvoices] as inv inner join tblMSECustomers on inv.customer_number = customer_id where invoice_date='" & UStV_POS.UStVPo_ReDat & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & kdnr & " AND daId is not null", "FMZOLL",,, -1)
|
||||
Case 10 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & UStV_POS.UStVPo_ReDat & "' and Abrechnungsnummer='" & UStV_POS.UStVPo_ReNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1)
|
||||
Case 8 : da_id = sql.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & UStV_POS.UStVPo_ReDat & "' and ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) ='" & UStV_POS.UStVPo_ReNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL",,, -1) : scanSonstiges.Enabled = False
|
||||
Case 1 : da_id = 1 : scanSonstiges.Enabled = False 'VERAG-RECHNUGNEN werden immer direkt OHNE daid geöffnet!
|
||||
Case 1 : da_id = 1 'VERAG-RECHNUGNEN werden immer direkt OHNE daid geöffnet!
|
||||
Case -1 : IIf(UStV_POS.UStVPo_daId > 0, UStV_POS.UStVPo_daId, -1) : scanSonstiges.Enabled = True
|
||||
End Select
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@ Imports System.Reflection
|
||||
Imports System.ComponentModel
|
||||
Imports ClosedXML.Excel
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports iTextSharp.text.pdf
|
||||
Imports itextsharp.text.pdf
|
||||
Imports SDL.eu.europa.ec
|
||||
Imports Microsoft.Office.Interop
|
||||
|
||||
Public Class cBerechtignungenFunctions
|
||||
|
||||
@@ -1398,13 +1399,13 @@ Public Class cProgramFunctions
|
||||
found = search
|
||||
Else
|
||||
If _option = TXT.trs_Option Then
|
||||
found = search
|
||||
End If
|
||||
|
||||
found = search
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ Public Class usrcntlFakturierung
|
||||
|
||||
Private Sub Button14_Click(sender As Object, e As EventArgs) Handles Button14.Click
|
||||
|
||||
Label70.Text = "6. Hängt Mautgesamtbericht an Sammenrechnungen an."
|
||||
Label70.Text = "6. Hängt Mautgesamtbericht an Sammelrechnungen an."
|
||||
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
@@ -249,7 +249,6 @@ Public Class usrcntlFakturierung
|
||||
ok = SQL.doSQL("update [Rechnungsausgang] set Sachbearbeiter='" & Sachbearbeiter & "' where Firma_ID = 19 And Sammelrechnung = 6 And Abfertigungsdatum > DateAdd(Month, -3, GETDATE())", "FMZOLL")
|
||||
|
||||
showPic(ok, PictureBox1)
|
||||
'If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then Exit Sub
|
||||
|
||||
If Not ok Then Exit Sub
|
||||
|
||||
@@ -286,11 +285,10 @@ Public Class usrcntlFakturierung
|
||||
|
||||
End If
|
||||
|
||||
Dim steuersatz As Double = Math.Floor(r("Steuersatz %"))
|
||||
Dim steuersatz As Single = r("Steuersatz %") 'Single same as real-datatype in SQL (wichtig, sonst findet er den wert nicht!!!)
|
||||
|
||||
ok = SQL.doSQL("UPDATE [Rechnungsausgang] SET [BelegartenNr] = " & BelegartenNr & ", [BelegartenKz] = '" & BelegartenKz & "' , [BelegartenBez] = '" & BelegartenBez & "' , [Vorzeichen] = '" & Vorzeichen & "'
|
||||
WHERE [Firma_ID] = 19 AND [Status] = 0 AND [Sammelrechnung] = 6 AND UPPER([Sachbearbeiter])= '" & Sachbearbeiter & "' AND [RechnungsKundenNr] = " & r("RechnungsKundenNr") & " AND [Währungscode] = '" & r("Währungscode") & "' AND [Steuersatz %] = " & steuersatz & " AND [Lastschrift] = " & IIf(r("Lastschrift"), 1, 0) & "AND cast(Abfertigungsdatum as Date) = '" & rechnungsdatum & "'", "FMZOLL")
|
||||
|
||||
WHERE [Firma_ID] = 19 AND [Status] = 0 AND [Sammelrechnung] = 6 AND UPPER([Sachbearbeiter])= '" & Sachbearbeiter & "' AND [RechnungsKundenNr] = " & r("RechnungsKundenNr") & " AND [Währungscode] = '" & r("Währungscode") & "' AND [Steuersatz %] = " & steuersatz.ToString.Replace(",", ".") & " AND [Lastschrift] = " & IIf(r("Lastschrift"), 1, 0) & "AND cast(Abfertigungsdatum as Date) = '" & rechnungsdatum & "'", "FMZOLL")
|
||||
|
||||
If Not ok Then MsgBox("Rechnungsdruck wird abgebrochen." & vbCrLf & "Rechnungen/Gutschriften nicht gefunden.") : Exit Sub
|
||||
|
||||
@@ -405,8 +403,9 @@ Public Class usrcntlFakturierung
|
||||
End If
|
||||
If intZlr > 0 Then
|
||||
|
||||
Dim steuersatz As Double = Math.Round(r("Steuersatz %"), 2)
|
||||
Dim SteuersatzString As String = steuersatz.ToString.Replace(",", ".")
|
||||
|
||||
Dim steuersatz As Single = r("Steuersatz %") 'Single same as real-datatype in SQL (wichtig, sonst findet er den wert nicht!!!)
|
||||
'Dim SteuersatzString As String = steuersatz.ToString.Replace(",", ".")
|
||||
|
||||
' Die Abfrage liest in der Tabelle Rechnungsausgang,
|
||||
' passend zu den durch die vorherige Abfrage bereitgestellten Parametern.
|
||||
@@ -426,7 +425,7 @@ Public Class usrcntlFakturierung
|
||||
And Rechnungsausgang.RechnungsKundenNr = " & r("RechnungsKundenNr") & "
|
||||
And Rechnungsausgang.BelegartenNr = " & r("BelegartenNr") & "
|
||||
And Rechnungsausgang.Währungscode = '" & r("Währungscode") & "'
|
||||
And Rechnungsausgang.[Steuersatz %] = " & SteuersatzString & "
|
||||
And Rechnungsausgang.[Steuersatz %] = " & steuersatz.ToString.Replace(",", ".") & "
|
||||
And Rechnungsausgang.Lastschrift = " & IIf(r("Lastschrift"), 1, 0) & "
|
||||
AND cast(Rechnungsausgang.Abfertigungsdatum as Date) = '" & rechnungsdatum & "'
|
||||
ORDER by
|
||||
@@ -632,8 +631,8 @@ Public Class usrcntlFakturierung
|
||||
|
||||
For Each r In dtBB.Rows
|
||||
'spSelectReDruSchnSumBS415
|
||||
Dim steuersatz As Double = Math.Round(r("Steuersatz %"), 2)
|
||||
Dim SteuersatzString As String = steuersatz.ToString.Replace(",", ".")
|
||||
Dim steuersatz As Single = r("Steuersatz %") 'Single same as real-datatype in SQL (wichtig, sonst findet er den wert nicht!!!)
|
||||
'Dim SteuersatzString As String = steuersatz.ToString.Replace(",", ".")
|
||||
|
||||
Dim sum As DataTable = (New SQL).loadDgvBySql("SELECT ISNULL(SUM(dbo.RechnungsausgangPositionen.Preis * dbo.RechnungsausgangPositionen.Anzahl),0) AS [Summe von Preis]
|
||||
FROM dbo.Rechnungsausgang INNER JOIN
|
||||
@@ -646,7 +645,7 @@ Public Class usrcntlFakturierung
|
||||
AND (dbo.Rechnungsausgang.RechnungsKundenNr = " & r("RechnungsKundenNr") & ")
|
||||
AND (dbo.Rechnungsausgang.BelegartenNr =" & r("BelegartenNr") & ")
|
||||
AND (dbo.Rechnungsausgang.Währungscode = '" & r("Währungscode") & "')
|
||||
AND (dbo.Rechnungsausgang.[Steuersatz %] =" & SteuersatzString & ")
|
||||
AND (dbo.Rechnungsausgang.[Steuersatz %] =" & steuersatz.ToString.Replace(",", ".") & ")
|
||||
AND (dbo.Rechnungsausgang.Lastschrift =" & IIf(r("Lastschrift"), 1, 0) & ")
|
||||
AND (dbo.Leistungen.BS415 = 1)", "FMZOLL",)
|
||||
If sum.Rows.Count > 0 Then
|
||||
@@ -675,7 +674,7 @@ Public Class usrcntlFakturierung
|
||||
AND (RechnungsKundenNr = " & r("RechnungsKundenNr") & ")
|
||||
AND (BelegartenNr =" & r("BelegartenNr") & ")
|
||||
AND (Währungscode = '" & r("Währungscode") & "')
|
||||
AND ([Steuersatz %] =" & SteuersatzString & ")
|
||||
AND ([Steuersatz %] =" & steuersatz.ToString.Replace(",", ".") & ")
|
||||
AND (Lastschrift =" & IIf(r("Lastschrift"), 1, 0) & ")
|
||||
ORDER BY OffertenNr"
|
||||
|
||||
@@ -1057,7 +1056,8 @@ Public Class usrcntlFakturierung
|
||||
End If
|
||||
cnt += 1
|
||||
|
||||
'Exit For
|
||||
'todo nach test auskommentieren!!!
|
||||
If cnt > 3 Then Exit For
|
||||
|
||||
Next
|
||||
|
||||
@@ -1208,7 +1208,8 @@ Public Class usrcntlFakturierung
|
||||
Dim dtBerichtkunden_PDF As DataTable = (New SQL).loadDgvBySql("SELECT tblMautbericht.[Customer No], Adressen.Ordnungsbegriff AS [Customer name], tblMautbericht.[Licence Plate Number], tblMautbericht.[Transaction date], tblMautbericht.[Transaction Country], tblMautbericht.[Product description], tblMautbericht.[Card number], tblMautbericht.[Entry Terminal], tblMautbericht.[Exit Terminal], Sum(tblMautbericht.[Net Amount]) AS [Net Amount], Sum(tblMautbericht.[VAT Amount]) AS [VAT Amount], Sum(tblMautbericht.[Total Amount]) AS [Total Amount]
|
||||
FROM tblMautbericht INNER JOIN Adressen ON tblMautbericht.[Customer No] = Adressen.AdressenNr
|
||||
WHERE cast(BillingDate as Date) = '" & cbxDateMautbericht._value & "'
|
||||
GROUP BY tblMautbericht.[Customer No], Adressen.Ordnungsbegriff, tblMautbericht.[Licence Plate Number], tblMautbericht.[Transaction date], tblMautbericht.[Transaction Country], tblMautbericht.[Product description], tblMautbericht.[Card number], tblMautbericht.[Entry Terminal], tblMautbericht.[Exit Terminal] ", "FMZOLL")
|
||||
GROUP BY tblMautbericht.[Customer No], Adressen.Ordnungsbegriff, tblMautbericht.[Licence Plate Number], tblMautbericht.[Transaction date], tblMautbericht.[Transaction Country], tblMautbericht.[Product description], tblMautbericht.[Card number], tblMautbericht.[Entry Terminal], tblMautbericht.[Exit Terminal]
|
||||
ORDER BY tblMautbericht.[Licence Plate Number] , tblMautbericht.[Transaction Country], tblMautbericht.[Transaction date] ", "FMZOLL")
|
||||
|
||||
If dtBerichtkunden_PDF.Rows.Count = 0 Then
|
||||
MsgBox("Es wurden keine Daten bereitgestellt")
|
||||
@@ -1243,7 +1244,6 @@ Public Class usrcntlFakturierung
|
||||
|
||||
|
||||
|
||||
|
||||
createPDFMautbericht(pdf.Item(0), dt_PDF_selected, cbxDateMautbericht._value, PathMautberichte, dtLaender)
|
||||
|
||||
|
||||
|
||||
@@ -27,13 +27,13 @@ Partial Class usrcntlPDFScanList
|
||||
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.picAdd = New System.Windows.Forms.PictureBox()
|
||||
Me.MyListBox1 = New VERAG_PROG_ALLGEMEIN.MyListBox()
|
||||
Me.UmbenennenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.KopierenZwischenablageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.AlsEmailSendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.MyListBox1 = New VERAG_PROG_ALLGEMEIN.MyListBox()
|
||||
Me.cntxtMulti.SuspendLayout()
|
||||
CType(Me.picAdd, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.cntxt.SuspendLayout()
|
||||
@@ -71,19 +71,6 @@ Partial Class usrcntlPDFScanList
|
||||
Me.picAdd.TabIndex = 3
|
||||
Me.picAdd.TabStop = False
|
||||
'
|
||||
'MyListBox1
|
||||
'
|
||||
Me.MyListBox1._value = ""
|
||||
Me.MyListBox1.Cursor = System.Windows.Forms.Cursors.Default
|
||||
Me.MyListBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.MyListBox1.FormattingEnabled = True
|
||||
Me.MyListBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.MyListBox1.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.MyListBox1.Name = "MyListBox1"
|
||||
Me.MyListBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.MyListBox1.Size = New System.Drawing.Size(118, 64)
|
||||
Me.MyListBox1.TabIndex = 4
|
||||
'
|
||||
'UmbenennenToolStripMenuItem
|
||||
'
|
||||
Me.UmbenennenToolStripMenuItem.Name = "UmbenennenToolStripMenuItem"
|
||||
@@ -121,8 +108,22 @@ Partial Class usrcntlPDFScanList
|
||||
Me.cntxt.Name = "cntxt"
|
||||
Me.cntxt.Size = New System.Drawing.Size(218, 98)
|
||||
'
|
||||
'MyListBox1
|
||||
'
|
||||
Me.MyListBox1._value = ""
|
||||
Me.MyListBox1.Cursor = System.Windows.Forms.Cursors.Default
|
||||
Me.MyListBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.MyListBox1.FormattingEnabled = True
|
||||
Me.MyListBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.MyListBox1.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.MyListBox1.Name = "MyListBox1"
|
||||
Me.MyListBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.MyListBox1.Size = New System.Drawing.Size(118, 64)
|
||||
Me.MyListBox1.TabIndex = 4
|
||||
'
|
||||
'usrcntlPDFScanList
|
||||
'
|
||||
Me.AllowDrop = True
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.IO
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class usrcntlPDFScanList
|
||||
Public Property _DATENSERVER_KATEGORIE As String = "DOKUMENTE"
|
||||
@@ -27,6 +28,8 @@ Public Class usrcntlPDFScanList
|
||||
Public Event FileAdded(id As String, path As String, name As String)
|
||||
Public Event FileDeleted()
|
||||
|
||||
Private draggedFilePath As String = ""
|
||||
|
||||
Private Sub usrcntlPDFScan_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
' Me.txt.Text = _TEXT_PDF
|
||||
Me.MyListBox1.Dock = DockStyle.Fill
|
||||
@@ -401,9 +404,58 @@ Public Class usrcntlPDFScanList
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GetFolderUnderCursor() As String
|
||||
Try
|
||||
Dim cursorPos As Point = Cursor.Position
|
||||
Dim shell As Object = CreateObject("Shell.Application")
|
||||
Dim folder As Object = shell.Namespace(0) ' Desktop level
|
||||
|
||||
' Get all open Explorer windows
|
||||
For Each window In shell.Windows()
|
||||
Dim explorerPath As String = window.Document.Folder.Self.Path
|
||||
If Not String.IsNullOrEmpty(explorerPath) Then
|
||||
' Check if the cursor is within the window bounds
|
||||
Dim rect As Rectangle = New Rectangle(window.Left, window.Top, window.Width, window.Height)
|
||||
If rect.Contains(cursorPos) Then
|
||||
Return explorerPath ' Return detected folder path
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Return ""
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Private Sub cntxt_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles cntxt.Opening
|
||||
UmbenennenToolStripMenuItem.Visible = (MyListBox1.SelectedItems.Count = 1)
|
||||
End Sub
|
||||
|
||||
Private Sub usrcntlPDFScanList_DragLeave(sender As Object, e As EventArgs) 'Handles MyBase.DragLeave
|
||||
|
||||
|
||||
If Not String.IsNullOrEmpty(draggedFilePath) Then
|
||||
Try
|
||||
' Get the folder path where the cursor moved
|
||||
Dim cursorPath As String = GetFolderUnderCursor()
|
||||
|
||||
If Not String.IsNullOrEmpty(cursorPath) AndAlso Directory.Exists(cursorPath) Then
|
||||
' Copy file to the detected folder
|
||||
Dim destinationPath As String = Path.Combine(cursorPath, Path.GetFileName(draggedFilePath))
|
||||
File.Copy(draggedFilePath, destinationPath, True)
|
||||
|
||||
MessageBox.Show("PDF saved to: " & destinationPath, "File Saved", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
||||
Else
|
||||
MessageBox.Show("Could not determine the target folder.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MessageBox.Show("Error saving PDF: " & ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -7,12 +7,68 @@ Imports System.Windows.Forms
|
||||
Imports ClosedXML.Excel
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports ThoughtWorks.QRCode.Codec
|
||||
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
||||
|
||||
Public Class cProgramFunctions
|
||||
|
||||
|
||||
Shared SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Public Shared Function getdefaultOutlookAccount(outlookApp As Outlook.Application) As Outlook.Account
|
||||
|
||||
' Get the MAPI namespace
|
||||
Dim outlookNamespace As Outlook.NameSpace = outlookApp.GetNamespace("MAPI")
|
||||
|
||||
' Get the default store (default email account)
|
||||
Dim defaultStore As Outlook.Store = outlookNamespace.DefaultStore
|
||||
|
||||
' Find the corresponding account
|
||||
Dim defaultAccount As Outlook.Account = Nothing
|
||||
|
||||
For Each acc As Outlook.Account In outlookNamespace.Accounts
|
||||
If acc.DeliveryStore.StoreID = defaultStore.StoreID Then
|
||||
defaultAccount = acc
|
||||
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Return defaultAccount
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function printdefaultOutlookAccount(outlookApp As Outlook.Application) As String
|
||||
|
||||
' Get the MAPI namespace
|
||||
Dim outlookNamespace As Outlook.NameSpace = outlookApp.GetNamespace("MAPI")
|
||||
|
||||
' Get the default store (default email account)
|
||||
Dim defaultStore As Outlook.Store = outlookNamespace.DefaultStore
|
||||
|
||||
' Find the corresponding account
|
||||
Dim defaultAccount As Outlook.Account = Nothing
|
||||
|
||||
For Each acc As Outlook.Account In outlookNamespace.Accounts
|
||||
If acc.DeliveryStore.StoreID = defaultStore.StoreID Then
|
||||
defaultAccount = acc
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
' Display the default email account
|
||||
If defaultAccount IsNot Nothing Then
|
||||
Return "Default Email Account: " & defaultAccount.DisplayName
|
||||
Else
|
||||
Return "Default email account not found."
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function fktEuro(varBetrag As Object, varVonWährung As Object, varNachWährung As Object) As Object
|
||||
'(FixeTaxe, "ATS", RECHNUNG.Währungscode)
|
||||
'Dim varVonWährung As Object
|
||||
|
||||
Reference in New Issue
Block a user