Mailbenachrichtigung, etc.

This commit is contained in:
2025-06-25 08:54:42 +02:00
parent 931154c931
commit f1698f8ee3
6 changed files with 71 additions and 55 deletions

View File

@@ -2429,8 +2429,8 @@ Public Class usrCntlFaktAbrechnung
RECHNUNG.Währungscode = cProgramFunctions.isLeerNothing(cboWaehrungUmrechnung._value)
Call przFixeTaxe(RECHNUNG) ' Fixe Taxe errechnen
Call przPP(RECHNUNG) ' Porto/Papiere errechnen
Call przBS415(RECHNUNG) ' Bankspesen errechnen
Call setFixeTaxeMin(RECHNUNG, 500, 20) ' Mind Fixe Taxe errechnen
'Me![SteuerpflichtigerGesamtbetrag] = 0.0#
'Me![SteuerfreierGesamtbetrag] = 0.0#
@@ -3052,30 +3052,44 @@ Public Class usrCntlFaktAbrechnung
End Sub
Shared Sub setFixeTaxeMin(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, ByRef minBetrag As Double, fixeTaxe As Double)
Dim FixeTaxe_Berechnungbetrag As Double = 0
If Not leistungExistsInPos(RECHNUNG, 441, 1) Then Exit Sub 'Schauen, ob die Leistung in den Positionen vorhanden ist
If (RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag) >= minBetrag Then Exit Sub
If fixeTaxe <= 0 Then Exit Sub
'Sucht, ob Fixetaxe schon vorhanden ist,...
Dim FixeTaxePOS = RECHNUNG.POSITIONEN.Find(Function(x) x.LeistungsNr = 441 And x.BerechnungsartNr = 1)
'... sonst wird eine neue Pos eingefügt...
If FixeTaxePOS IsNot Nothing Then
'FixeTaxePOS = New VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen
FixeTaxePOS.LeistungsNr = 441 '441 und nicht 440 laut Brigitte weil Steuerfrei!!
FixeTaxePOS.LeistungsBez = "P.P./Fixe Taxe"
FixeTaxePOS.BerechnungsartNr = 9
'RECHNUNG.POSITIONEN.Add(FixeTaxePOS)
'...und der Wert gesetzt.
FixeTaxePOS.Anzahl = 1
FixeTaxePOS.Preis = getVorzeichen(RECHNUNG) * fixeTaxe
initSteuerbetraege(RECHNUNG, FixeTaxePOS)
Dim PapirePorti As Double = 0
If Not CBool(SQL.DLookup("[PP441]", "Filialen", "[FilialenNr]=" & RECHNUNG.FilialenNr, "FMZOLL", False)) Then
Exit Sub
End If
If Not leistungExistsInPos(RECHNUNG, 441) Then Exit Sub 'Schauen, ob die Leistung in den Positionen vorhanden ist
For Each POS In RECHNUNG.POSITIONEN
If POS.LeistungsNr <> 441 Then
FixeTaxe_Berechnungbetrag += POS.[Preis] * POS.Anzahl
End If
Next
If FixeTaxe_Berechnungbetrag < 0 Then FixeTaxe_Berechnungbetrag *= -1
If FixeTaxe_Berechnungbetrag < minBetrag Then
'Sucht, ob Fixetaxe schon vorhanden ist,...
Dim FixeTaxePOS = RECHNUNG.POSITIONEN.Find(Function(x) x.LeistungsNr = 441)
'... sonst wird eine neue Pos eingefügt...
If FixeTaxePOS IsNot Nothing Then
'FixeTaxePOS = New VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen
FixeTaxePOS.LeistungsNr = 441 '441 und nicht 440 laut Brigitte weil Steuerfrei!!
FixeTaxePOS.LeistungsBez = "P.P./Fixe Taxe"
FixeTaxePOS.BerechnungsartNr = 1
'RECHNUNG.POSITIONEN.Add(FixeTaxePOS)
'...und der Wert gesetzt.
FixeTaxePOS.Anzahl = 1
FixeTaxePOS.Preis = getVorzeichen(RECHNUNG) * fixeTaxe 'Preis wird bewusst überschrieben!!!
initSteuerbetraege(RECHNUNG, FixeTaxePOS)
End If
End If
End Sub

View File

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

View File

@@ -24,8 +24,8 @@ Partial Class frmMDM_USTVAntrag
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMDM_USTVAntrag))
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.pnlBottom = New System.Windows.Forms.Panel()
Me.pb_Beleg = New System.Windows.Forms.PictureBox()
Me.Button5 = New System.Windows.Forms.Button()
@@ -387,9 +387,9 @@ Partial Class frmMDM_USTVAntrag
Me.lblGesamtUSteuer.Cursor = System.Windows.Forms.Cursors.Default
Me.lblGesamtUSteuer.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold)
Me.lblGesamtUSteuer.ForeColor = System.Drawing.Color.White
Me.lblGesamtUSteuer.Location = New System.Drawing.Point(840, 16)
Me.lblGesamtUSteuer.Location = New System.Drawing.Point(856, 16)
Me.lblGesamtUSteuer.Name = "lblGesamtUSteuer"
Me.lblGesamtUSteuer.Size = New System.Drawing.Size(133, 17)
Me.lblGesamtUSteuer.Size = New System.Drawing.Size(117, 20)
Me.lblGesamtUSteuer.TabIndex = 26
Me.lblGesamtUSteuer.Text = "000.000,00"
Me.lblGesamtUSteuer.TextAlign = System.Drawing.ContentAlignment.TopRight
@@ -401,9 +401,9 @@ Partial Class frmMDM_USTVAntrag
Me.lblDiffernezbetrag.Cursor = System.Windows.Forms.Cursors.Default
Me.lblDiffernezbetrag.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold)
Me.lblDiffernezbetrag.ForeColor = System.Drawing.Color.White
Me.lblDiffernezbetrag.Location = New System.Drawing.Point(840, 59)
Me.lblDiffernezbetrag.Location = New System.Drawing.Point(859, 59)
Me.lblDiffernezbetrag.Name = "lblDiffernezbetrag"
Me.lblDiffernezbetrag.Size = New System.Drawing.Size(133, 17)
Me.lblDiffernezbetrag.Size = New System.Drawing.Size(114, 15)
Me.lblDiffernezbetrag.TabIndex = 25
Me.lblDiffernezbetrag.Text = "000.000,00"
Me.lblDiffernezbetrag.TextAlign = System.Drawing.ContentAlignment.TopRight
@@ -415,9 +415,9 @@ Partial Class frmMDM_USTVAntrag
Me.lblGesamtErstattung.Cursor = System.Windows.Forms.Cursors.Default
Me.lblGesamtErstattung.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold)
Me.lblGesamtErstattung.ForeColor = System.Drawing.Color.White
Me.lblGesamtErstattung.Location = New System.Drawing.Point(840, 36)
Me.lblGesamtErstattung.Location = New System.Drawing.Point(859, 36)
Me.lblGesamtErstattung.Name = "lblGesamtErstattung"
Me.lblGesamtErstattung.Size = New System.Drawing.Size(133, 17)
Me.lblGesamtErstattung.Size = New System.Drawing.Size(114, 17)
Me.lblGesamtErstattung.TabIndex = 24
Me.lblGesamtErstattung.Text = "000.000,00"
Me.lblGesamtErstattung.TextAlign = System.Drawing.ContentAlignment.TopRight
@@ -1119,9 +1119,9 @@ Partial Class frmMDM_USTVAntrag
Me.lblGesamtUSteuerFW.Cursor = System.Windows.Forms.Cursors.Default
Me.lblGesamtUSteuerFW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold)
Me.lblGesamtUSteuerFW.ForeColor = System.Drawing.Color.White
Me.lblGesamtUSteuerFW.Location = New System.Drawing.Point(721, 16)
Me.lblGesamtUSteuerFW.Location = New System.Drawing.Point(733, 14)
Me.lblGesamtUSteuerFW.Name = "lblGesamtUSteuerFW"
Me.lblGesamtUSteuerFW.Size = New System.Drawing.Size(133, 17)
Me.lblGesamtUSteuerFW.Size = New System.Drawing.Size(117, 14)
Me.lblGesamtUSteuerFW.TabIndex = 17
Me.lblGesamtUSteuerFW.Text = "000.000,00 €"
Me.lblGesamtUSteuerFW.TextAlign = System.Drawing.ContentAlignment.TopRight
@@ -1147,9 +1147,9 @@ Partial Class frmMDM_USTVAntrag
Me.lblDiffernezbetragFW.Cursor = System.Windows.Forms.Cursors.Default
Me.lblDiffernezbetragFW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold)
Me.lblDiffernezbetragFW.ForeColor = System.Drawing.Color.White
Me.lblDiffernezbetragFW.Location = New System.Drawing.Point(721, 59)
Me.lblDiffernezbetragFW.Location = New System.Drawing.Point(733, 59)
Me.lblDiffernezbetragFW.Name = "lblDiffernezbetragFW"
Me.lblDiffernezbetragFW.Size = New System.Drawing.Size(133, 17)
Me.lblDiffernezbetragFW.Size = New System.Drawing.Size(117, 15)
Me.lblDiffernezbetragFW.TabIndex = 15
Me.lblDiffernezbetragFW.Text = "000.000,00 €"
Me.lblDiffernezbetragFW.TextAlign = System.Drawing.ContentAlignment.TopRight
@@ -1175,9 +1175,9 @@ Partial Class frmMDM_USTVAntrag
Me.lblGesamtErstattungFW.Cursor = System.Windows.Forms.Cursors.Default
Me.lblGesamtErstattungFW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold)
Me.lblGesamtErstattungFW.ForeColor = System.Drawing.Color.White
Me.lblGesamtErstattungFW.Location = New System.Drawing.Point(721, 36)
Me.lblGesamtErstattungFW.Location = New System.Drawing.Point(736, 36)
Me.lblGesamtErstattungFW.Name = "lblGesamtErstattungFW"
Me.lblGesamtErstattungFW.Size = New System.Drawing.Size(133, 17)
Me.lblGesamtErstattungFW.Size = New System.Drawing.Size(114, 15)
Me.lblGesamtErstattungFW.TabIndex = 13
Me.lblGesamtErstattungFW.Text = "000.000,00 €"
Me.lblGesamtErstattungFW.TextAlign = System.Drawing.ContentAlignment.TopRight
@@ -1478,8 +1478,8 @@ Partial Class frmMDM_USTVAntrag
Me.dgvUSTVPositionen.AKTUALISIERUNGS_INTERVALL = 500
Me.dgvUSTVPositionen.AllowUserToAddRows = False
Me.dgvUSTVPositionen.AllowUserToDeleteRows = False
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvUSTVPositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvUSTVPositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
Me.dgvUSTVPositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -1640,8 +1640,8 @@ Partial Class frmMDM_USTVAntrag
Me.dgvErstattungspositionen.AKTUALISIERUNGS_INTERVALL = 500
Me.dgvErstattungspositionen.AllowUserToAddRows = False
Me.dgvErstattungspositionen.AllowUserToDeleteRows = False
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvErstattungspositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvErstattungspositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
Me.dgvErstattungspositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)

View File

@@ -1,6 +1,5 @@
Imports System.Data.OleDb
Imports System.IO
Imports com.sun.xml.internal.ws.api.message
Imports itextsharp.text.pdf
Imports MDM_Worker
Imports VERAG_PROG_ALLGEMEIN

View File

@@ -545,17 +545,20 @@ Public Class usrcntlFakturierung
If Not IsDBNull(r("BetragExclusivFT")) AndAlso r("BetragExclusivFT") > 0 Then
'If r("BetragExclusivFT") < 500 Then
'intZlr = r("AnzahlFT") - 1
'Else
intZlr = r("AnzahlFT")
'End If
'Else
' If (0 - r("BetragExclusivFT")) < 500 Then
' intZlr = r("AnzahlFT") - 1
' Else
' intZlr = r("AnzahlFT") - 1
' End If
If Not IsDBNull(r("BetragExclusivPP")) AndAlso r("BetragExclusivPP") > 0 Then
If r("BetragExclusivPP") < 500 Then
intZlr = r("AnzahlPP") - 1
Else
intZlr = r("AnzahlPP")
End If
Else
If (0 - r("BetragExclusivPP")) < 500 Then
intZlr = r("AnzahlPP") - 1
Else
intZlr = r("AnzahlPP") - 1
End If
End If
End If
If intZlr > 0 Then