Просмотр исходного кода

0-Teilungsfehler in AppendixDataModel behoben!

Arne Diekmann 7 лет назад
Родитель
Сommit
f49070e0b0

+ 1 - 1
GreenTree.Nachtragsmanagement.Core/AppendixVersion.cs

@@ -15,7 +15,7 @@ namespace GreenTree.Nachtragsmanagement.Core
         {
             get
             {
-                return "1.0.0.2";
+                return "1.0.0.3";
             }
         }
     }

+ 2 - 2
GreenTree.Nachtragsmanagement.Core/Properties/AssemblyInfo.cs

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
 // indem Sie "*" wie unten gezeigt eingeben:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.1")]
-[assembly: AssemblyFileVersion("1.0.0.1")]
+[assembly: AssemblyVersion("1.0.0.3")]
+[assembly: AssemblyFileVersion("1.0.0.3")]

+ 1 - 1
GreenTree.Nachtragsmanagement.Plugin.MonitionList/Description.txt

@@ -2,7 +2,7 @@
 FriendlyName: Nachtragsmanagement MonitionList
 SystemName: GreenTree.Nachtragsmanagement.MonitionList
 Version: 1.0
-SupportedVersions: 1.0.0.2
+SupportedVersions: 1.0.0.3
 Author: GreenTree Studios
 DisplayOrder: 1
 FileName: GreenTree.Nachtragsmanagement.Plugin.MonitionList.dll

+ 1 - 1
GreenTree.Nachtragsmanagement.Web.Framework/GreenTree.Nachtragsmanagement.Web.Framework.csproj

@@ -34,7 +34,7 @@
       <HintPath>..\packages\Autofac.4.0.1\lib\net45\Autofac.dll</HintPath>
     </Reference>
     <Reference Include="Autofac.Extras.Quartz">
-      <HintPath>..\..\Autofac.Extras.Quartz\Autofac.Extras.Quartz\bin\Debug\Autofac.Extras.Quartz.dll</HintPath>
+      <HintPath>..\packages\Autofac.Extras.Quartz4.0.0.0\lib\Autofac.Extras.Quartz.dll</HintPath>
     </Reference>
     <Reference Include="Autofac.Integration.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
       <HintPath>..\packages\Autofac.Mvc5.4.0.2\lib\net45\Autofac.Integration.Mvc.dll</HintPath>

+ 7 - 4
GreenTree.Nachtragsmanagement.Web/GreenTree.Nachtragsmanagement.Web.csproj

@@ -21,9 +21,12 @@
     <OldToolsVersion>4.0</OldToolsVersion>
     <UseIISExpress>true</UseIISExpress>
     <IISExpressSSLPort />
-    <IISExpressAnonymousAuthentication>disabled</IISExpressAnonymousAuthentication>
-    <IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
-    <IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
+    <IISExpressAnonymousAuthentication>
+    </IISExpressAnonymousAuthentication>
+    <IISExpressWindowsAuthentication>
+    </IISExpressWindowsAuthentication>
+    <IISExpressUseClassicPipelineMode>
+    </IISExpressUseClassicPipelineMode>
     <UseGlobalApplicationHostFile />
     <UpgradeBackupLocation />
     <Use64BitIISExpress />
@@ -53,7 +56,7 @@
       <HintPath>..\packages\Autofac.4.0.1\lib\net45\Autofac.dll</HintPath>
     </Reference>
     <Reference Include="Autofac.Extras.Quartz">
-      <HintPath>..\..\Autofac.Extras.Quartz\Autofac.Extras.Quartz\bin\Debug\Autofac.Extras.Quartz.dll</HintPath>
+      <HintPath>..\packages\Autofac.Extras.Quartz4.0.0.0\lib\Autofac.Extras.Quartz.dll</HintPath>
     </Reference>
     <Reference Include="Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
       <HintPath>..\packages\Common.Logging.3.3.1\lib\net40\Common.Logging.dll</HintPath>

+ 11 - 5
GreenTree.Nachtragsmanagement.Web/Models/Appendix/AppendixDataModel.cs

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

+ 2 - 2
GreenTree.Nachtragsmanagement.Web/Properties/AssemblyInfo.cs

@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
 //
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.2")]
-[assembly: AssemblyFileVersion("1.0.0.2")]
+[assembly: AssemblyVersion("1.0.0.3")]
+[assembly: AssemblyFileVersion("1.0.0.3")]