KaskoNmperGrColumn

This commit is contained in:
Chika 2020-10-15 16:23:39 +03:00
parent b745a7b307
commit b127baeeef
6 changed files with 532 additions and 68 deletions

View File

@ -40,6 +40,7 @@
<e p="Columns" t="Include">
<e p="DateColumn.cs" t="Include" />
<e p="DateTempColumn.cs" t="Include" />
<e p="KaskoNmperGrColumn.cs" t="Include" />
<e p="PercentPaymentColumn.cs" t="Include" />
</e>
<e p="EvoCalculator.Core.Calculation.csproj" t="IncludeRecursive" />
@ -108,6 +109,7 @@
<e p="Columns" t="Include">
<e p="DateColumnTests.cs" t="Include" />
<e p="DateTempTests.cs" t="Include" />
<e p="KaskoNmperGrTests.cs" t="Include" />
<e p="PercentPaymentTests.cs" t="Include" />
</e>
<e p="FinanceFormulasTests.cs" t="Include" />

View File

@ -14,11 +14,12 @@
</component>
<component name="ChangeListManager">
<list default="true" id="2c3b0650-5589-43d4-b4b7-2979612bb30f" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/PercentPaymentColumn.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/PercentPaymentTests.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/KaskoNmperGrColumn.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/KaskoNmperGrTests.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/contentModel.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedPayments.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedPayments.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateTempColumn.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateTempColumn.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Interfaces/IColumn.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Interfaces/IColumn.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -31,11 +32,16 @@
<component name="HighlightingSettingsPerFile">
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/18D5A60D-361A-4AFD-A431-F772FA87FCC3/d9/b0109e6d/TestInvoker`1.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/Chika/Projects/EvoCalculator.Core/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateColumnTests.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/Chika/Projects/EvoCalculator.Core/EvoCalculator.Core.Calculation/Columns/DateTempColumn.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/EvoCalculator.Core.Constants/Calculation.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="mock://C:/Users/Chika/Projects/EvoCalculator.Core/EvoCalculator.Core.Calculation/Columns/DateColumn.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/9D995D4A-0EBE-4A93-85A6-BE06CB7C70EE/f6/ada9c10c/FactAttribute.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/Chika/Projects/EvoCalculator.Core/EvoCalculator.Core.Models/Calculation/Interfaces/IColumn.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/Chika/Projects/EvoCalculator.Core/EvoCalculator.Core.Calculation/Columns/PercentPaymentColumn.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/9152434B-0FAC-463B-87F2-DD9AF798817F/2e/201d3c41/Assert.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/Chika/Projects/EvoCalculator.Core/EvoCalculator.Core.Calculation/Columns/DateColumn.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/AD61CA47-F8B7-4CC6-93A0-BA44CC73B5C7/49/DateTime.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/Chika/Projects/EvoCalculator.Core/EvoCalculator.Core.Calculation/Columns/DateTempColumn.cs" root0="SKIP_HIGHLIGHTING" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
@ -70,15 +76,18 @@
<option value="$PROJECT_DIR$/Constants/Calculation/Constants.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Constants/Calculation/Constants.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/ColumnsTests.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateColumn.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateColumnTests.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Constants/Calculation.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateTempTests.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateTempColumn.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedPayments.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Interfaces/IColumn.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/PercentPaymentTests.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/KaskoNmperGr.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/PercentPaymentColumn.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Interfaces/IColumn.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateColumn.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateTempColumn.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/KaskoNmperGrTests.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/KaskoNmperGrColumn.cs" />
</list>
</option>
</component>
@ -143,7 +152,7 @@
<workItem from="1602504354370" duration="6573000" />
<workItem from="1602584653395" duration="12605000" />
<workItem from="1602678304213" duration="9304000" />
<workItem from="1602754684591" duration="4318000" />
<workItem from="1602754684591" duration="12926000" />
</task>
<task id="LOCAL-00001" summary="rename: flow">
<created>1602593830686</created>
@ -187,102 +196,102 @@
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="734" y="355" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602508288549" />
<state width="472" height="464" key="DebuggerActiveHint" timestamp="1602758863728">
<state width="897" height="464" key="DebuggerActiveHint" timestamp="1602767525601">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="472" height="464" key="DebuggerActiveHint/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602758863728" />
<state width="2517" height="464" key="GridCell.Tab.0.bottom" timestamp="1602759019652">
<state width="897" height="464" key="DebuggerActiveHint/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767525601" />
<state width="2517" height="437" key="GridCell.Tab.0.bottom" timestamp="1602767710354">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.0.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019652" />
<state width="2517" height="464" key="GridCell.Tab.0.center" timestamp="1602759019651">
<state width="2517" height="437" key="GridCell.Tab.0.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710354" />
<state width="2517" height="437" key="GridCell.Tab.0.center" timestamp="1602767710354">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.0.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019651" />
<state width="2517" height="464" key="GridCell.Tab.0.left" timestamp="1602759019651">
<state width="2517" height="437" key="GridCell.Tab.0.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710354" />
<state width="2517" height="437" key="GridCell.Tab.0.left" timestamp="1602767710354">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.0.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019651" />
<state width="2517" height="464" key="GridCell.Tab.0.right" timestamp="1602759019651">
<state width="2517" height="437" key="GridCell.Tab.0.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710354" />
<state width="2517" height="437" key="GridCell.Tab.0.right" timestamp="1602767710354">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.0.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019651" />
<state width="2517" height="464" key="GridCell.Tab.1.bottom" timestamp="1602759019653">
<state width="2517" height="437" key="GridCell.Tab.0.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710354" />
<state width="2517" height="437" key="GridCell.Tab.1.bottom" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.1.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
<state width="2517" height="464" key="GridCell.Tab.1.center" timestamp="1602759019652">
<state width="2517" height="437" key="GridCell.Tab.1.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.1.center" timestamp="1602767710354">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.1.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019652" />
<state width="2517" height="464" key="GridCell.Tab.1.left" timestamp="1602759019652">
<state width="2517" height="437" key="GridCell.Tab.1.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710354" />
<state width="2517" height="437" key="GridCell.Tab.1.left" timestamp="1602767710354">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.1.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019652" />
<state width="2517" height="464" key="GridCell.Tab.1.right" timestamp="1602759019652">
<state width="2517" height="437" key="GridCell.Tab.1.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710354" />
<state width="2517" height="437" key="GridCell.Tab.1.right" timestamp="1602767710354">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.1.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019652" />
<state width="2517" height="464" key="GridCell.Tab.2.bottom" timestamp="1602759019653">
<state width="2517" height="437" key="GridCell.Tab.1.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710354" />
<state width="2517" height="437" key="GridCell.Tab.2.bottom" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.2.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
<state width="2517" height="464" key="GridCell.Tab.2.center" timestamp="1602759019653">
<state width="2517" height="437" key="GridCell.Tab.2.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.2.center" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.2.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
<state width="2517" height="464" key="GridCell.Tab.2.left" timestamp="1602759019653">
<state width="2517" height="437" key="GridCell.Tab.2.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.2.left" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.2.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
<state width="2517" height="464" key="GridCell.Tab.2.right" timestamp="1602759019653">
<state width="2517" height="437" key="GridCell.Tab.2.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.2.right" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.2.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
<state width="2517" height="464" key="GridCell.Tab.3.bottom" timestamp="1602759019655">
<state width="2517" height="437" key="GridCell.Tab.2.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.3.bottom" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.3.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
<state width="2517" height="464" key="GridCell.Tab.3.center" timestamp="1602759019654">
<state width="2517" height="437" key="GridCell.Tab.3.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.3.center" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.3.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019654" />
<state width="2517" height="464" key="GridCell.Tab.3.left" timestamp="1602759019654">
<state width="2517" height="437" key="GridCell.Tab.3.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.3.left" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.3.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019654" />
<state width="2517" height="464" key="GridCell.Tab.3.right" timestamp="1602759019655">
<state width="2517" height="437" key="GridCell.Tab.3.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.3.right" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.3.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
<state width="2517" height="464" key="GridCell.Tab.4.bottom" timestamp="1602759019655">
<state width="2517" height="437" key="GridCell.Tab.3.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.4.bottom" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.4.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
<state width="2517" height="464" key="GridCell.Tab.4.center" timestamp="1602759019655">
<state width="2517" height="437" key="GridCell.Tab.4.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.4.center" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.4.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
<state width="2517" height="464" key="GridCell.Tab.4.left" timestamp="1602759019655">
<state width="2517" height="437" key="GridCell.Tab.4.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.4.left" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.4.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
<state width="2517" height="464" key="GridCell.Tab.4.right" timestamp="1602759019655">
<state width="2517" height="437" key="GridCell.Tab.4.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state width="2517" height="437" key="GridCell.Tab.4.right" timestamp="1602767710355">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="464" key="GridCell.Tab.4.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
<state width="2517" height="437" key="GridCell.Tab.4.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602767710355" />
<state x="872" y="432" key="Rider.ProjectTemplateDialog.Size" timestamp="1602683469535">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="872" y="432" key="Rider.ProjectTemplateDialog.Size/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602683469535" />
<state x="1108" y="385" key="RiderGenerateDialog" timestamp="1602757068236">
<state x="1108" y="385" key="RiderGenerateDialog" timestamp="1602761716982">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="1108" y="385" key="RiderGenerateDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602757068236" />
<state x="1078" y="410" key="RollbackChangesDialog" timestamp="1602585122733">
<state x="1108" y="385" key="RiderGenerateDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602761716982" />
<state x="1078" y="410" key="RollbackChangesDialog" timestamp="1602761804757">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="1078" y="410" key="RollbackChangesDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602585122733" />
<state x="1078" y="410" key="RollbackChangesDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602761804757" />
<state x="781" y="345" key="SettingsEditor" timestamp="1602593091446">
<screen x="0" y="0" width="2560" height="1400" />
</state>
@ -291,40 +300,49 @@
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="498" height="446" key="SwitcherDM/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602684835910" />
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog" timestamp="1602758396155">
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog" timestamp="1602762600043">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602758396155" />
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602762600043" />
<state x="872" y="433" key="Vcs.Push.Dialog.v2" timestamp="1602755745888">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="872" y="433" key="Vcs.Push.Dialog.v2/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755745888" />
<state x="898" y="0" width="1161" height="1387" key="dock-window-1" timestamp="1602760039715">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="898" y="0" width="1161" height="1387" key="dock-window-1/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602760039715" />
<state x="930" y="299" width="700" height="801" key="find.popup" timestamp="1602593714122">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="930" y="299" width="700" height="801" key="find.popup/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602593714122" />
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup" timestamp="1602684080977">
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup" timestamp="1602764852634">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602684080977" />
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602764852634" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/PercentPaymentTests.cs</url>
<line>152</line>
<properties documentPath="C:\Users\Chika\Projects\EvoCalculator.Core\EvoCalculator.Core.Tests\Calculation\Suite\Columns\PercentPaymentTests.cs" initialLine="152">
<url>file://$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/KaskoNmperGrTests.cs</url>
<line>254</line>
<properties documentPath="C:\Users\Chika\Projects\EvoCalculator.Core\EvoCalculator.Core.Tests\Calculation\Suite\Columns\KaskoNmperGrTests.cs" initialLine="254">
<startOffsets>
<option value="4506" />
<option value="9276" />
</startOffsets>
<endOffsets>
<option value="4534" />
<option value="9304" />
</endOffsets>
</properties>
<option name="timeStamp" value="12" />
<option name="timeStamp" value="17" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
<pin-to-top-manager>
<pinned-members>
<PinnedItemInfo parentTag="Frame#EvoCalculator.Core.Tests.Calculation.Suite.Columns.KaskoNmperGrTests.KaskoNmperGrTest2" memberName="preparedValues" />
</pinned-members>
</pin-to-top-manager>
</component>
</project>

View File

@ -8,6 +8,7 @@ namespace EvoCalculator.Core.Calculation.Columns
{
public DateTime[] Values { get; set; }
//TODO: extract 67
public DateTempColumn(int count = 67)
{
Values = new DateTime[count];

View File

@ -0,0 +1,56 @@
using System;
using EvoCalculator.Core.Calculation.FinanceFormulas;
using EvoCalculator.Core.Models.Calculation.Interfaces;
using EvoCalculator.Core.Models.Calculation.Models;
using EvoCalculator.Core.Models.Calculation.Models.Prepared;
namespace EvoCalculator.Core.Calculation.Columns
{
public class KaskoNmperGrColumn : IColumn<double>
{
public double[] Values { get; set; }
public KaskoNmperGrColumn(int count)
{
Values = new double[count];
}
public void ComputeValues(PreparedValues preparedValues, IColumn<DateTime> dateTempColumn)
{
for (var i = 0; i < Values.Length; i++)
{
Values[i] = 0;
}
for (var i = 1; i < Values.Length; i += 12)
{
if (i <= preparedValues.NmperInsurance)
{
if (preparedValues.NmperInsurance - i < 16 - 1)
{
Values[i] = preparedValues.InsuranceKasko / 12 * (preparedValues.NmperInsurance - i + 1);
}
else
{
Values[i] = preparedValues.InsuranceKasko;
}
}
}
Flow[] flows = new Flow[Values.Length - 1];
for (var i = 1; i < Values.Length; i++)
{
flows[i - 1] = new Flow()
{
Date = dateTempColumn.Values[i].Date,
Value = Values[i]
};
}
var XNPV = new XNPV(flows, preparedValues.IrrExpected);
Values[0] = -XNPV.GetResult();
}
}
}

View File

@ -5,10 +5,8 @@ namespace EvoCalculator.Core.Models.Calculation.Interfaces
public interface IColumn<T>
{
public T[] Values { get; set; }
public void ComputeValues(PreparedValues preparedValues, PreparedPayments preparedPayments,
Constants.Calculation constants,
params IColumn<T>[] columns);
// public void ComputeValues(PreparedValues preparedValues, PreparedPayments preparedPayments,
// Constants.Calculation constants,
// params IColumn<object>[] columns);
}
}

View File

@ -0,0 +1,389 @@
using System;
using EvoCalculator.Core.Calculation.Columns;
using EvoCalculator.Core.Models.Calculation.Models.Prepared;
using Xunit;
namespace EvoCalculator.Core.Tests.Calculation.Suite.Columns
{
public class KaskoNmperGrTests
{
[Fact]
public void KaskoNmperGrTest1()
{
var preparedValues =
new PreparedValues()
{
InsuranceKasko = 53000,
NmperInsurance = 17,
IrrExpected = 0.22,
Nmper = 30
};
var dateTempColumn = new DateTempColumn()
{
Values = new[]
{
new DateTime(2018, 10, 31),
new DateTime(2018, 10, 31),
new DateTime(2018, 12, 11),
new DateTime(2019, 1, 11),
new DateTime(2019, 2, 11),
new DateTime(2019, 3, 11),
new DateTime(2019, 4, 11),
new DateTime(2019, 5, 11),
new DateTime(2019, 6, 11),
new DateTime(2019, 7, 11),
new DateTime(2019, 8, 11),
new DateTime(2019, 9, 11),
new DateTime(2019, 10, 11),
new DateTime(2019, 11, 11),
new DateTime(2019, 12, 11),
new DateTime(2020, 1, 11),
new DateTime(2020, 2, 11),
new DateTime(2020, 3, 11),
new DateTime(2020, 4, 11),
new DateTime(2020, 5, 11),
new DateTime(2020, 6, 11),
new DateTime(2020, 7, 11),
new DateTime(2020, 8, 11),
new DateTime(2020, 9, 11),
new DateTime(2020, 10, 11),
new DateTime(2020, 11, 11),
new DateTime(2020, 12, 11),
new DateTime(2021, 1, 11),
new DateTime(2021, 2, 11),
new DateTime(2021, 3, 11),
new DateTime(2021, 4, 11),
new DateTime(2021, 5, 11),
new DateTime(2021, 6, 11),
new DateTime(2021, 7, 11),
new DateTime(2021, 8, 11),
new DateTime(2021, 9, 11),
new DateTime(2021, 10, 11),
new DateTime(2021, 11, 11),
new DateTime(2021, 12, 11),
new DateTime(2022, 1, 11),
new DateTime(2022, 2, 11),
new DateTime(2022, 3, 11),
new DateTime(2022, 4, 11),
new DateTime(2022, 5, 11),
new DateTime(2022, 6, 11),
new DateTime(2022, 7, 11),
new DateTime(2022, 8, 11),
new DateTime(2022, 9, 11),
new DateTime(2022, 10, 11),
new DateTime(2022, 11, 11),
new DateTime(2022, 12, 11),
new DateTime(2023, 1, 11),
new DateTime(2023, 2, 11),
new DateTime(2023, 3, 11),
new DateTime(2023, 4, 11),
new DateTime(2023, 5, 11),
new DateTime(2023, 6, 11),
new DateTime(2023, 7, 11),
new DateTime(2023, 8, 11),
new DateTime(2023, 9, 11),
new DateTime(2023, 10, 11),
new DateTime(2023, 11, 11),
new DateTime(2023, 12, 11),
new DateTime(2024, 1, 11),
new DateTime(2024, 2, 11),
new DateTime(2024, 3, 11),
new DateTime(2024, 4, 11),
}
};
var kaskoNmperGrColumn = new KaskoNmperGrColumn(preparedValues.Nmper + 1);
kaskoNmperGrColumn.ComputeValues(preparedValues, dateTempColumn);
var expected = new[]
{
-70992.94167536501,
53000.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
22083.333333333336,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00
};
var res = kaskoNmperGrColumn.Values;
Assert.Equal(expected, res);
}
[Fact]
public void KaskoNmperGrTest2()
{
var preparedValues =
new PreparedValues()
{
InsuranceKasko = 53000,
NmperInsurance = 16,
IrrExpected = 0.22,
Nmper = 16
};
var dateTempColumn = new DateTempColumn()
{
Values = new[]
{
new DateTime(2018, 10, 31),
new DateTime(2018, 10, 31),
new DateTime(2018, 11, 30),
new DateTime(2018, 12, 31),
new DateTime(2019, 1, 31),
new DateTime(2019, 2, 28),
new DateTime(2019, 3, 31),
new DateTime(2019, 4, 30),
new DateTime(2019, 5, 31),
new DateTime(2019, 6, 30),
new DateTime(2019, 7, 31),
new DateTime(2019, 8, 31),
new DateTime(2019, 9, 30),
new DateTime(2019, 10, 31),
new DateTime(2019, 11, 30),
new DateTime(2019, 12, 31),
new DateTime(2020, 1, 31),
new DateTime(2020, 2, 29),
new DateTime(2020, 3, 31),
new DateTime(2020, 4, 30),
new DateTime(2020, 5, 31),
new DateTime(2020, 6, 30),
new DateTime(2020, 7, 31),
new DateTime(2020, 8, 31),
new DateTime(2020, 9, 30),
new DateTime(2020, 10, 31),
new DateTime(2020, 11, 30),
new DateTime(2020, 12, 31),
new DateTime(2021, 1, 31),
new DateTime(2021, 2, 28),
new DateTime(2021, 3, 31),
new DateTime(2021, 4, 30),
new DateTime(2021, 5, 31),
new DateTime(2021, 6, 30),
new DateTime(2021, 7, 31),
new DateTime(2021, 8, 31),
new DateTime(2021, 9, 30),
new DateTime(2021, 10, 31),
new DateTime(2021, 11, 30),
new DateTime(2021, 12, 31),
new DateTime(2022, 1, 31),
new DateTime(2022, 2, 28),
new DateTime(2022, 3, 31),
new DateTime(2022, 4, 30),
new DateTime(2022, 5, 31),
new DateTime(2022, 6, 30),
new DateTime(2022, 7, 31),
new DateTime(2022, 8, 31),
new DateTime(2022, 9, 30),
new DateTime(2022, 10, 31),
new DateTime(2022, 11, 30),
new DateTime(2022, 12, 31),
new DateTime(2023, 1, 31),
new DateTime(2023, 2, 28),
new DateTime(2023, 3, 31),
new DateTime(2023, 4, 30),
new DateTime(2023, 5, 31),
new DateTime(2023, 6, 30),
new DateTime(2023, 7, 31),
new DateTime(2023, 8, 31),
new DateTime(2023, 9, 30),
new DateTime(2023, 10, 31),
new DateTime(2023, 11, 30),
new DateTime(2023, 12, 31),
new DateTime(2024, 1, 31),
new DateTime(2024, 2, 29),
new DateTime(2024, 3, 31),
}
};
var kaskoNmperGrColumn = new KaskoNmperGrColumn(preparedValues.Nmper + 1);
kaskoNmperGrColumn.ComputeValues(preparedValues, dateTempColumn);
var expected = new[]
{
-67480.874316939895,
53000.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
17666.666666666668,
0.00,
0.00,
0.00,
};
var res = kaskoNmperGrColumn.Values;
Assert.Equal(expected, res);
}
[Fact]
public void KaskoNmperGrTest3()
{
var preparedValues =
new PreparedValues()
{
InsuranceKasko = 53000,
NmperInsurance = 30,
IrrExpected = 0.22,
Nmper = 30
};
var dateTempColumn = new DateTempColumn()
{
Values = new[]
{
new DateTime(2018, 10, 31),
new DateTime(2018, 10, 31),
new DateTime(2018, 11, 30),
new DateTime(2018, 12, 31),
new DateTime(2019, 1, 31),
new DateTime(2019, 2, 28),
new DateTime(2019, 3, 31),
new DateTime(2019, 4, 30),
new DateTime(2019, 5, 31),
new DateTime(2019, 6, 30),
new DateTime(2019, 7, 31),
new DateTime(2019, 8, 31),
new DateTime(2019, 9, 30),
new DateTime(2019, 10, 31),
new DateTime(2019, 11, 30),
new DateTime(2019, 12, 31),
new DateTime(2020, 1, 31),
new DateTime(2020, 2, 29),
new DateTime(2020, 3, 31),
new DateTime(2020, 4, 30),
new DateTime(2020, 5, 31),
new DateTime(2020, 6, 30),
new DateTime(2020, 7, 31),
new DateTime(2020, 8, 31),
new DateTime(2020, 9, 30),
new DateTime(2020, 10, 31),
new DateTime(2020, 11, 30),
new DateTime(2020, 12, 31),
new DateTime(2021, 1, 31),
new DateTime(2021, 2, 28),
new DateTime(2021, 3, 31),
new DateTime(2021, 4, 30),
new DateTime(2021, 5, 31),
new DateTime(2021, 6, 30),
new DateTime(2021, 7, 31),
new DateTime(2021, 8, 31),
new DateTime(2021, 9, 30),
new DateTime(2021, 10, 31),
new DateTime(2021, 11, 30),
new DateTime(2021, 12, 31),
new DateTime(2022, 1, 31),
new DateTime(2022, 2, 28),
new DateTime(2022, 3, 31),
new DateTime(2022, 4, 30),
new DateTime(2022, 5, 31),
new DateTime(2022, 6, 30),
new DateTime(2022, 7, 31),
new DateTime(2022, 8, 31),
new DateTime(2022, 9, 30),
new DateTime(2022, 10, 31),
new DateTime(2022, 11, 30),
new DateTime(2022, 12, 31),
new DateTime(2023, 1, 31),
new DateTime(2023, 2, 28),
new DateTime(2023, 3, 31),
new DateTime(2023, 4, 30),
new DateTime(2023, 5, 31),
new DateTime(2023, 6, 30),
new DateTime(2023, 7, 31),
new DateTime(2023, 8, 31),
new DateTime(2023, 9, 30),
new DateTime(2023, 10, 31),
new DateTime(2023, 11, 30),
new DateTime(2023, 12, 31),
new DateTime(2024, 1, 31),
new DateTime(2024, 2, 29),
new DateTime(2024, 3, 31),
}
};
var kaskoNmperGrColumn = new KaskoNmperGrColumn(preparedValues.Nmper + 1);
kaskoNmperGrColumn.ComputeValues(preparedValues, dateTempColumn);
var expected = new[]
{
-114237.27950469786,
53000.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
53000.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
26500.00,
0.00,
0.00,
0.00,
0.00,
0.00,
};
var res = kaskoNmperGrColumn.Values;
Assert.Equal(expected, res);
}
}
}