Skip to content

Commit

Permalink
Rabatt in BelegDruckDTO
Browse files Browse the repository at this point in the history
  • Loading branch information
ewu-nma committed Aug 23, 2023
1 parent df6834f commit 2fff118
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Gandalan.IDAS.WebApi.Client/DTOs/Belege/BelegDruckDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,19 +259,21 @@ public BelegSaldoDruckDTO() { }

public BelegSaldoDruckDTO(BelegSaldoDTO saldo)
{
CultureInfo culture = new CultureInfo("de-de");
var culture = new CultureInfo("de-de");
if (saldo != null)
{
this.Reihenfolge = saldo.Reihenfolge;
this.Text = saldo.Text;
Reihenfolge = saldo.Reihenfolge;
Text = saldo.Text;
var vorzeichen = saldo.Typ == "Abschlag" ? '-' : ' ';
this.Betrag = vorzeichen + saldo.Betrag.ToString(culture);
Betrag = vorzeichen + saldo.Betrag.ToString(culture);
Rabatt = saldo.Rabatt > 0 ? saldo.Rabatt.ToString(culture) : "";
}
}

public int Reihenfolge { get; set; }
public string Text { get; set; }
public string Betrag { get; set; }
public string Rabatt { get; set; }
public bool IsLastElement { get; set; } = false;
}

Expand Down

0 comments on commit 2fff118

Please sign in to comment.