[#17] CreditNote: Overhaul CreditNote

This commit is contained in:
2023-12-22 15:30:39 +01:00
parent 82f93746ab
commit b9a2893d80
10 changed files with 226 additions and 79 deletions

View File

@ -13,9 +13,33 @@ namespace Elwig.Models.Entities {
[Column("mgnr")]
public int MgNr { get; set; }
[Column("net_amount")]
public long NetAmountValue { get; set; }
[NotMapped]
public decimal NetAmount {
get => Variant.Season.DecFromDb(NetAmountValue);
set => NetAmountValue = Variant.Season.DecToDb(value);
}
[Column("mod_abs")]
public long ModAbsValue { get; set; }
[NotMapped]
public decimal ModAbs {
get => Variant.Season.DecFromDb(ModAbsValue);
set => ModAbsValue = Variant.Season.DecToDb(value);
}
[Column("mod_rel")]
public double ModRelValue { get; set; }
[NotMapped]
public decimal ModRel {
get => (decimal)ModRelValue;
set => ModRelValue = (double)value;
}
[Column("amount")]
public long AmountValue { get; set; }
[NotMapped]
public decimal Amount {
get => Variant.Season.DecFromDb(AmountValue);