Abrechnung

This commit is contained in:
2025-05-12 08:43:10 +02:00
parent 19008a38ec
commit 8250014773

View File

@@ -1,8 +1,6 @@
 
Imports System.IO Imports System.IO
Imports System.Web.UI.WebControls.Expressions Imports System.Web.UI.WebControls.Expressions
Imports Chilkat
Imports com.sun.org.apache.bcel.internal.generic
Imports VERAG_PROG_ALLGEMEIN Imports VERAG_PROG_ALLGEMEIN
Public Class usrCntlFaktAbrechnung Public Class usrCntlFaktAbrechnung
@@ -2364,7 +2362,7 @@ Public Class usrCntlFaktAbrechnung
If RECHNUNG.RechnungSprache = "DE" Or FindPOS.LeistungsBez Is Nothing Then FindPOS.LeistungsBez = "Vorlageprovision" If RECHNUNG.RechnungSprache = "DE" Or FindPOS.LeistungsBez Is Nothing Then FindPOS.LeistungsBez = "Vorlageprovision"
'RECHNUNG.POSITIONEN.Add(FindPOS) 'RECHNUNG.POSITIONEN.Add(FindPOS)
FindPOS.Anzahl = 1 FindPOS.Anzahl = 1
FindPOS.Preis = Math.Round(Vorlageprovision_Berechnungbetrag * (RECHNUNG.Vorlageprovision_Proz), 2) 'Int(Vorlageprovision_Berechnungbetrag * (RECHNUNG.Vorlageprovision_Proz) * 10 + 0.5) / 10 FindPOS.Preis = Math.round(Vorlageprovision_Berechnungbetrag * (RECHNUNG.Vorlageprovision_Proz), 2) 'Int(Vorlageprovision_Berechnungbetrag * (RECHNUNG.Vorlageprovision_Proz) * 10 + 0.5) / 10
'...und der Wert gesetzt. '...und der Wert gesetzt.
initSteuerbetraege(RECHNUNG, FindPOS) initSteuerbetraege(RECHNUNG, FindPOS)
@@ -2409,7 +2407,7 @@ Public Class usrCntlFaktAbrechnung
If RECHNUNG.RechnungSprache = "DE" Or FindPOS.LeistungsBez Is Nothing Then FindPOS.LeistungsBez = "Kapitalbereitstellung" If RECHNUNG.RechnungSprache = "DE" Or FindPOS.LeistungsBez Is Nothing Then FindPOS.LeistungsBez = "Kapitalbereitstellung"
'RECHNUNG.POSITIONEN.Add(FindPOS) 'RECHNUNG.POSITIONEN.Add(FindPOS)
FindPOS.Anzahl = 1 FindPOS.Anzahl = 1
FindPOS.Preis = Math.Round(Vorlageprovision_Berechnungbetrag * (RECHNUNG.Vorlageprovision_Proz), 2) ' Int(Vorlageprovision_Berechnungbetrag * (RECHNUNG.Vorlageprovision_Proz) * 10 + 0.5) / 10 FindPOS.Preis = Math.round(Vorlageprovision_Berechnungbetrag * (RECHNUNG.Vorlageprovision_Proz), 2) ' Int(Vorlageprovision_Berechnungbetrag * (RECHNUNG.Vorlageprovision_Proz) * 10 + 0.5) / 10
'...und der Wert gesetzt. '...und der Wert gesetzt.
initSteuerbetraege(RECHNUNG, FindPOS) initSteuerbetraege(RECHNUNG, FindPOS)
@@ -2447,7 +2445,7 @@ Public Class usrCntlFaktAbrechnung
For Each POS In RECHNUNG.POSITIONEN For Each POS In RECHNUNG.POSITIONEN
' Dim BGebErrBetrag As Double = Int(If(If(POS.BGebBgl, 0), If(POS.Preis, 0) * If(POS.Anzahl, 0)) * If(POS.BGebProzent, 0) * 10 + 0.5) / 10 ' Dim BGebErrBetrag As Double = Int(If(If(POS.BGebBgl, 0), If(POS.Preis, 0) * If(POS.Anzahl, 0)) * If(POS.BGebProzent, 0) * 10 + 0.5) / 10
Dim BGebErrBetrag As Double = Math.Round(If(POS.BGebBgl IsNot Nothing, POS.BGebBgl, getNumeric(POS.Preis) * getNumeric(POS.Anzahl)) * getNumeric(POS.BGebProzent), 2) 'Int(If(POS.BGebBgl IsNot Nothing, POS.BGebBgl, getNumeric(POS.Preis) * getNumeric(POS.Anzahl)) * getNumeric(POS.BGebProzent) * 10 + 0.5) / 10 Dim BGebErrBetrag As Double = Math.round(If(POS.BGebBgl IsNot Nothing, POS.BGebBgl, getNumeric(POS.Preis) * getNumeric(POS.Anzahl)) * getNumeric(POS.BGebProzent), 2) 'Int(If(POS.BGebBgl IsNot Nothing, POS.BGebBgl, getNumeric(POS.Preis) * getNumeric(POS.Anzahl)) * getNumeric(POS.BGebProzent) * 10 + 0.5) / 10
curBGebBetrag = 0 curBGebBetrag = 0
@@ -2531,7 +2529,7 @@ Public Class usrCntlFaktAbrechnung
If (BGebLeistungsNr > 0 AndAlso BGebProzent > 0 AndAlso BGebBgl <> 0) Then If (BGebLeistungsNr > 0 AndAlso BGebProzent > 0 AndAlso BGebBgl <> 0) Then
Dim Betrag As Double = Math.Round(BGebBgl * BGebProzent, 1) Dim Betrag As Double = Math.round(BGebBgl * BGebProzent, 1)
For Each o In OFFERTE.POSITIONEN For Each o In OFFERTE.POSITIONEN
If o.LeistungsNr = BGebLeistungsNr Then If o.LeistungsNr = BGebLeistungsNr Then
@@ -2799,7 +2797,7 @@ Public Class usrCntlFaktAbrechnung
If Kreditaufwendungen_Berechnungbetrag <> 0 Then If Kreditaufwendungen_Berechnungbetrag <> 0 Then
' MsgBox("1: " & Kreditaufwendungen_Berechnungbetrag) ' MsgBox("1: " & Kreditaufwendungen_Berechnungbetrag)
If Kreditaufwendungen_Berechnungbetrag < 0 Then Kreditaufwendungen_Berechnungbetrag *= -1 If Kreditaufwendungen_Berechnungbetrag < 0 Then Kreditaufwendungen_Berechnungbetrag *= -1
Kreditaufwendungen = Math.Round(Kreditaufwendungen_Berechnungbetrag * KD.Kreditaufwendungen, 2) '(Int(Kreditaufwendungen_Berechnungbetrag * KD.Kreditaufwendungen) * 10 + 0.5) / 10 Kreditaufwendungen = Math.round(Kreditaufwendungen_Berechnungbetrag * KD.Kreditaufwendungen, 2) '(Int(Kreditaufwendungen_Berechnungbetrag * KD.Kreditaufwendungen) * 10 + 0.5) / 10
End If End If
End If End If
@@ -3144,7 +3142,7 @@ Public Class usrCntlFaktAbrechnung
If cboFiliale.Text.EndsWith("/") And cboFiliale.Text.Contains("-") Then If cboFiliale.Text.EndsWith("/") And cboFiliale.Text.Contains("-") Then
Dim t As String = cboFiliale.Text Dim t As String = cboFiliale.Text
t = t.Replace("/", "") t = t.Replace("/", "")
Dim v() = t.Split("-") Dim v() = t.split("-")
If v.Length > 1 Then If v.Length > 1 Then
txtAbfertigungsnummer.Text = v(1) txtAbfertigungsnummer.Text = v(1)
@@ -4450,9 +4448,9 @@ Nächste_Textzeile_lesen:
If LeistungsBez <> "" Then If LeistungsBez <> "" Then
Dim isMWST As Boolean = False Dim isMWST As Boolean = False
If LandBez <> "" AndAlso LandNr <> "" Then If LandBez <> "" AndAlso LandNr <> "" Then
If SPEDBUCH.Packstücke.ToString.Replace("Mehrwertsteuerrückerstattung " & LandNr, "MWSt-Rückerstattung " & LandBez).StartsWith(LeistungsBez.ToString) Then isMWST = True If SPEDBUCH.Packstücke.ToString.Replace("Mehrwertsteuerrückerstattung " & LandNr, "MWSt-Rückerstattung " & LandBez).StartsWith(LeistungsBez.ToString) AndAlso LeistungsBez.ToString.StartsWith("MWSt-Rückerstattung") Then isMWST = True
Else Else
If SPEDBUCH.Packstücke.ToString().Replace("Mehrwertsteuerrückerstattung ", "MWSt-Rückerstattung ").StartsWith(LeistungsBez.ToString) Then isMWST = True If SPEDBUCH.Packstücke.ToString().Replace("Mehrwertsteuerrückerstattung ", "MWSt-Rückerstattung ").StartsWith(LeistungsBez.ToString) AndAlso LeistungsBez.ToString.StartsWith("MWSt-Rückerstattung") Then isMWST = True
End If End If
If isMWST Then If isMWST Then