|
@@ -69,7 +69,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Models.Appendix
|
|
|
return new AppendixDataModel
|
|
return new AppendixDataModel
|
|
|
{
|
|
{
|
|
|
Id = -1,
|
|
Id = -1,
|
|
|
- Percentage = 50
|
|
|
|
|
|
|
+ Percentage = 100
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
if (appendixEntity == null && !newWhenIsNull)
|
|
if (appendixEntity == null && !newWhenIsNull)
|
|
@@ -80,8 +80,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Models.Appendix
|
|
|
Id = appendixEntity.Id,
|
|
Id = appendixEntity.Id,
|
|
|
CustomNumber = appendixEntity.CustomNumber,
|
|
CustomNumber = appendixEntity.CustomNumber,
|
|
|
Description = appendixEntity.Description,
|
|
Description = appendixEntity.Description,
|
|
|
- Percentage = appendixEntity.Percentage.HasValue
|
|
|
|
|
- ? appendixEntity.Percentage.Value
|
|
|
|
|
|
|
+ Percentage = appendixEntity.Percentage.HasValue
|
|
|
|
|
+ ? appendixEntity.Percentage.Value
|
|
|
: (decimal)0.5,
|
|
: (decimal)0.5,
|
|
|
PercentageValue = appendixEntity.Value.HasValue && appendixEntity.Percentage.HasValue
|
|
PercentageValue = appendixEntity.Value.HasValue && appendixEntity.Percentage.HasValue
|
|
|
? appendixEntity.Value.Value * appendixEntity.Percentage.Value
|
|
? appendixEntity.Value.Value * appendixEntity.Percentage.Value
|
|
@@ -92,9 +92,9 @@ namespace GreenTree.Nachtragsmanagement.Web.Models.Appendix
|
|
|
RelationOfferingToDeviations =
|
|
RelationOfferingToDeviations =
|
|
|
appendixEntity.Value.HasValue && appendixEntity.Deviations.Any()
|
|
appendixEntity.Value.HasValue && appendixEntity.Deviations.Any()
|
|
|
? (decimal?)Convert.ToDecimal(
|
|
? (decimal?)Convert.ToDecimal(
|
|
|
- appendixEntity.Value /
|
|
|
|
|
|
|
+ appendixEntity.Value /
|
|
|
(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
|
|
|
? appendixEntity.Deviations
|
|
? appendixEntity.Deviations
|
|
|
.Sum(r => r.Value.HasValue && r.Percentage.HasValue ? r.Value.Value * r.Percentage.Value : 0)
|
|
.Sum(r => r.Value.HasValue && r.Percentage.HasValue ? r.Value.Value * r.Percentage.Value : 0)
|
|
|
: 1))
|
|
: 1))
|
|
@@ -110,7 +110,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Models.Appendix
|
|
|
OrderDate = appendixEntity.OrderDate,
|
|
OrderDate = appendixEntity.OrderDate,
|
|
|
Comment = appendixEntity.Comment,
|
|
Comment = appendixEntity.Comment,
|
|
|
OrderInvoiceCreated = appendixEntity.OrderInvoiceCreated,
|
|
OrderInvoiceCreated = appendixEntity.OrderInvoiceCreated,
|
|
|
- OrderInvoiceCreatedDescription =
|
|
|
|
|
|
|
+ OrderInvoiceCreatedDescription =
|
|
|
appendixEntity.OrderInvoiceCreated
|
|
appendixEntity.OrderInvoiceCreated
|
|
|
? "Ja"
|
|
? "Ja"
|
|
|
: "Nein",
|
|
: "Nein",
|
|
@@ -167,7 +167,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Models.Appendix
|
|
|
appendixEntity.Deviations
|
|
appendixEntity.Deviations
|
|
|
.Select(r => r.CustomNumber)
|
|
.Select(r => r.CustomNumber)
|
|
|
.ToList(),
|
|
.ToList(),
|
|
|
- DeviationDescription =
|
|
|
|
|
|
|
+ DeviationDescription =
|
|
|
String.Join(", ",
|
|
String.Join(", ",
|
|
|
appendixEntity.Deviations
|
|
appendixEntity.Deviations
|
|
|
.Select(d => d.CustomNumber)),
|
|
.Select(d => d.CustomNumber)),
|