|
@@ -100,10 +100,16 @@ namespace GreenTree.Nachtragsmanagement.Web.Models.Appendix
|
|
|
? appendixEntity.Deviations
|
|
? appendixEntity.Deviations
|
|
|
.Sum(r => r.Value.HasValue && r.Percentage.HasValue ? r.Value.Value * r.Percentage.Value : 0) != 0
|
|
.Sum(r => r.Value.HasValue && r.Percentage.HasValue ? r.Value.Value * r.Percentage.Value : 0) != 0
|
|
|
? (decimal?)Convert.ToDecimal(
|
|
? (decimal?)Convert.ToDecimal(
|
|
|
- (appendixEntity.Value.Value * appendixEntity.Percentage.Value) / appendixEntity.Deviations
|
|
|
|
|
- .Sum(r => r.Value.HasValue && r.Percentage.HasValue
|
|
|
|
|
- ? r.Value.Value * r.Percentage.Value
|
|
|
|
|
- : 0))
|
|
|
|
|
|
|
+ (appendixEntity.Value.Value * appendixEntity.Percentage.Value) /
|
|
|
|
|
+ (appendixEntity.Deviations
|
|
|
|
|
+ .Sum(r => r.Value.HasValue && r.Percentage.HasValue
|
|
|
|
|
+ ? r.Value.Value * r.Percentage.Value
|
|
|
|
|
+ : 0) == 0
|
|
|
|
|
+ ? 1
|
|
|
|
|
+ : appendixEntity.Deviations
|
|
|
|
|
+ .Sum(r => r.Value.HasValue && r.Percentage.HasValue
|
|
|
|
|
+ ? r.Value.Value * r.Percentage.Value
|
|
|
|
|
+ : 0)))
|
|
|
: null
|
|
: null
|
|
|
: null,
|
|
: null,
|
|
|
NegotiationDate = appendixEntity.NegotiationDate,
|
|
NegotiationDate = appendixEntity.NegotiationDate,
|
|
@@ -111,7 +117,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Models.Appendix
|
|
|
RelationOfferingToNegotiation =
|
|
RelationOfferingToNegotiation =
|
|
|
appendixEntity.Percentage.HasValue && appendixEntity.NegotiationValue.HasValue
|
|
appendixEntity.Percentage.HasValue && appendixEntity.NegotiationValue.HasValue
|
|
|
? appendixEntity.NegotiationValue /
|
|
? appendixEntity.NegotiationValue /
|
|
|
- (appendixEntity.Value == 0
|
|
|
|
|
|
|
+ ((appendixEntity.Value.Value * appendixEntity.Percentage.Value) == 0
|
|
|
? 1
|
|
? 1
|
|
|
: (appendixEntity.Value.Value * appendixEntity.Percentage.Value))
|
|
: (appendixEntity.Value.Value * appendixEntity.Percentage.Value))
|
|
|
: null,
|
|
: null,
|