Zinsnachberechnung, KundeBearbeiten

This commit is contained in:
2025-10-30 15:53:23 +01:00
parent 7b84b64bee
commit bcb15f1086
6 changed files with 99 additions and 45 deletions

View File

@@ -35,12 +35,29 @@ Public Class rptRechnungMDM_AnlagenDruck_Zinsennachberechnung
txtZinsen.Text = ""
txtVZ.Text = ""
txtFaellig.Text = ""
txt_Anmerkung.Text = ""
If Me.Fields.Item("clmnReNr") IsNot Nothing AndAlso Me.Fields.Item("clmnReNr").Value IsNot Nothing Then txtREnr.Text &= Me.Fields.Item("clmnReNr").Value.ToString
If Me.Fields.Item("clmnReDatum") IsNot Nothing AndAlso Me.Fields.Item("clmnReDatum").Value IsNot Nothing AndAlso IsDate(Me.Fields.Item("clmnReDatum").Value) Then txtReDat.Text &= CDate(Me.Fields.Item("clmnReDatum").Value).ToShortDateString
If Me.Fields.Item("clmnReBetrag") IsNot Nothing AndAlso Me.Fields.Item("clmnReBetrag").Value IsNot Nothing AndAlso IsNumeric(Me.Fields.Item("clmnReBetrag").Value) AndAlso CDbl(Me.Fields.Item("clmnReBetrag").Value) <> 0 Then txtReBetrag.Text &= CDbl(Me.Fields.Item("clmnReBetrag").Value).ToString("N2")
If Me.Fields.Item("clmnFaellig") IsNot Nothing AndAlso Me.Fields.Item("clmnFaellig").Value IsNot Nothing AndAlso IsDate(Me.Fields.Item("clmnFaellig").Value) Then txtFaellig.Text &= CDate(Me.Fields.Item("clmnFaellig").Value).ToShortDateString
If Me.Fields.Item("clmnZE") IsNot Nothing AndAlso Me.Fields.Item("clmnZE").Value IsNot Nothing AndAlso IsDate(Me.Fields.Item("clmnZE").Value) Then txtZE.Text &= CDate(Me.Fields.Item("clmnZE").Value).ToShortDateString
If Me.Fields.Item("clmnZE") IsNot Nothing AndAlso Me.Fields.Item("clmnZE").Value IsNot Nothing Then
If IsDate(Me.Fields.Item("clmnZE").Value) Then
txtZE.Text &= CDate(Me.Fields.Item("clmnZE").Value).ToShortDateString
txt_Anmerkung.Visible = False
txtZE.Visible = True
txtFaellig.Visible = True
txtTage.Visible = True
txtReBetrag.Visible = True
Else
txt_Anmerkung.Text &= Me.Fields.Item("clmnZE").Value
txt_Anmerkung.Visible = True
txtZE.Visible = False
txtFaellig.Visible = False
txtTage.Visible = False
txtReBetrag.Visible = False
End If
End If
If Me.Fields.Item("clmnTage") IsNot Nothing AndAlso Me.Fields.Item("clmnTage").Value IsNot Nothing Then txtTage.Text &= Me.Fields.Item("clmnTage").Value.ToString
If Me.Fields.Item("clmnZinsen") IsNot Nothing AndAlso Me.Fields.Item("clmnZinsen").Value IsNot Nothing AndAlso IsNumeric(Me.Fields.Item("clmnZinsen").Value) AndAlso CDbl(Me.Fields.Item("clmnZinsen").Value) <> 0 Then txtZinsen.Text &= CDbl(Me.Fields.Item("clmnZinsen").Value).ToString("N2")
If Me.Fields.Item("clmnVZ") IsNot Nothing AndAlso Me.Fields.Item("clmnVZ").Value IsNot Nothing AndAlso IsNumeric(Me.Fields.Item("clmnVZ").Value) Then txtVZ.Text &= Me.Fields.Item("clmnVZ").Value.ToString() & " %"
@@ -67,9 +84,10 @@ Public Class rptRechnungMDM_AnlagenDruck_Zinsennachberechnung
If RECHNUNG.POSITIONEN.Any() Then
If Anzahl > 0 AndAlso LeistungsText.Contains("Zinsnachbelastung") AndAlso LeistungsText.Contains("Rabatt") AndAlso Betrag <> 0 Then
If Anzahl > 0 AndAlso Betrag < 0 Then
dt.Rows.Add("0", "Rabatt", RECHNUNG.Abfertigungsdatum.ToShortDateString, LeistungsText, "", "", "", Betrag.ToString, "", "")
dt.Rows.Add("0", "Rabatt", RECHNUNG.Abfertigungsdatum.ToShortDateString, "", "", LeistungsText.ToString, "", Betrag.ToString, "", "")
'dt.Rows.Add(rg.Item("clmnID"), rg.Item("clmnReNr"), rg.Item("clmnReDatum"), rg.Item("clmnAbfNr"), rg.Item("clmnReBetrag"), rg.Item("clmnZE"), rg.Item("clmnTage"), rg.Item("clmnZinsen"), rg.Item("clmnVZ"), rg.Item("clmnFaellig"))
Else