fix DateColumn

This commit is contained in:
Chika 2020-10-15 12:55:39 +03:00
parent 0d1e419938
commit 111696b488
3 changed files with 59 additions and 60 deletions

View File

@ -13,19 +13,10 @@
</select>
</component>
<component name="ChangeListManager">
<list default="true" id="2c3b0650-5589-43d4-b4b7-2979612bb30f" name="Default Changelist" comment="rename: flow">
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Constants/Calculation.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Constants/EvoCalculator.Core.Constants.csproj" afterDir="false" />
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Interfaces/IColumn.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedParams.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedPayments.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateColumnTests.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" />
<list default="true" id="2c3b0650-5589-43d4-b4b7-2979612bb30f" name="Default Changelist" comment="">
<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.Calculation/FinanceFormulas/XIRR.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/FinanceFormulas/XIRR.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/FinanceFormulas/XNPV.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/FinanceFormulas/XNPV.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.Models/EvoCalculator.Core.Models.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/EvoCalculator.Core.Models.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.sln" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.sln" afterDir="false" />
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateColumn.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateColumn.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateColumnTests.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateColumnTests.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -77,8 +68,8 @@
<option value="$PROJECT_DIR$/EvoCalculator.Core.Constants/Calculation/Constants.cs" />
<option value="$PROJECT_DIR$/EvoCalculator.Core.Constants/Calculation.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.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" />
</list>
</option>
@ -143,7 +134,8 @@
<updated>1602504351800</updated>
<workItem from="1602504354370" duration="6573000" />
<workItem from="1602584653395" duration="12605000" />
<workItem from="1602678304213" duration="9045000" />
<workItem from="1602678304213" duration="9304000" />
<workItem from="1602754684591" duration="1007000" />
</task>
<task id="LOCAL-00001" summary="rename: flow">
<created>1602593830686</created>
@ -187,90 +179,90 @@
<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="454" height="464" key="DebuggerActiveHint" timestamp="1602686251797">
<state width="454" height="464" key="DebuggerActiveHint" timestamp="1602687556127">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="454" height="464" key="DebuggerActiveHint/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602686251797" />
<state width="2517" height="292" key="GridCell.Tab.0.bottom" timestamp="1602687293781">
<state width="454" height="464" key="DebuggerActiveHint/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687556127" />
<state width="2517" height="301" key="GridCell.Tab.0.bottom" timestamp="1602755114435">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.0.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.0.center" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.0.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114435" />
<state width="2517" height="301" key="GridCell.Tab.0.center" timestamp="1602755114433">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.0.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.0.left" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.0.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114433" />
<state width="2517" height="301" key="GridCell.Tab.0.left" timestamp="1602755114432">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.0.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.0.right" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.0.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114432" />
<state width="2517" height="301" key="GridCell.Tab.0.right" timestamp="1602755114434">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.0.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.1.bottom" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.0.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114434" />
<state width="2517" height="301" key="GridCell.Tab.1.bottom" timestamp="1602755114436">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.1.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.1.center" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.1.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114436" />
<state width="2517" height="301" key="GridCell.Tab.1.center" timestamp="1602755114436">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.1.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.1.left" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.1.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114436" />
<state width="2517" height="301" key="GridCell.Tab.1.left" timestamp="1602755114435">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.1.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.1.right" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.1.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114435" />
<state width="2517" height="301" key="GridCell.Tab.1.right" timestamp="1602755114436">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.1.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.2.bottom" timestamp="1602687293782">
<state width="2517" height="301" key="GridCell.Tab.1.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114436" />
<state width="2517" height="301" key="GridCell.Tab.2.bottom" timestamp="1602755114440">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.2.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293782" />
<state width="2517" height="292" key="GridCell.Tab.2.center" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.2.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114440" />
<state width="2517" height="301" key="GridCell.Tab.2.center" timestamp="1602755114438">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.2.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.2.left" timestamp="1602687293781">
<state width="2517" height="301" key="GridCell.Tab.2.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114438" />
<state width="2517" height="301" key="GridCell.Tab.2.left" timestamp="1602755114437">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.2.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293781" />
<state width="2517" height="292" key="GridCell.Tab.2.right" timestamp="1602687293782">
<state width="2517" height="301" key="GridCell.Tab.2.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114437" />
<state width="2517" height="301" key="GridCell.Tab.2.right" timestamp="1602755114439">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.2.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293782" />
<state width="2517" height="292" key="GridCell.Tab.3.bottom" timestamp="1602687293782">
<state width="2517" height="301" key="GridCell.Tab.2.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114439" />
<state width="2517" height="301" key="GridCell.Tab.3.bottom" timestamp="1602755114442">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.3.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293782" />
<state width="2517" height="292" key="GridCell.Tab.3.center" timestamp="1602687293782">
<state width="2517" height="301" key="GridCell.Tab.3.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114442" />
<state width="2517" height="301" key="GridCell.Tab.3.center" timestamp="1602755114440">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.3.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293782" />
<state width="2517" height="292" key="GridCell.Tab.3.left" timestamp="1602687293782">
<state width="2517" height="301" key="GridCell.Tab.3.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114440" />
<state width="2517" height="301" key="GridCell.Tab.3.left" timestamp="1602755114440">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.3.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293782" />
<state width="2517" height="292" key="GridCell.Tab.3.right" timestamp="1602687293782">
<state width="2517" height="301" key="GridCell.Tab.3.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114440" />
<state width="2517" height="301" key="GridCell.Tab.3.right" timestamp="1602755114441">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.3.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293782" />
<state width="2517" height="292" key="GridCell.Tab.4.bottom" timestamp="1602687293783">
<state width="2517" height="301" key="GridCell.Tab.3.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114441" />
<state width="2517" height="301" key="GridCell.Tab.4.bottom" timestamp="1602755114444">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.4.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293783" />
<state width="2517" height="292" key="GridCell.Tab.4.center" timestamp="1602687293783">
<state width="2517" height="301" key="GridCell.Tab.4.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114444" />
<state width="2517" height="301" key="GridCell.Tab.4.center" timestamp="1602755114443">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.4.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293783" />
<state width="2517" height="292" key="GridCell.Tab.4.left" timestamp="1602687293782">
<state width="2517" height="301" key="GridCell.Tab.4.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114443" />
<state width="2517" height="301" key="GridCell.Tab.4.left" timestamp="1602755114442">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.4.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293782" />
<state width="2517" height="292" key="GridCell.Tab.4.right" timestamp="1602687293783">
<state width="2517" height="301" key="GridCell.Tab.4.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114442" />
<state width="2517" height="301" key="GridCell.Tab.4.right" timestamp="1602755114444">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="292" key="GridCell.Tab.4.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687293783" />
<state width="2517" height="301" key="GridCell.Tab.4.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755114444" />
<state x="872" y="432" key="Rider.ProjectTemplateDialog.Size" timestamp="1602683469535">
<screen x="0" y="0" width="2560" height="1400" />
</state>
@ -295,10 +287,10 @@
<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="1602678875251" />
<state x="872" y="433" key="Vcs.Push.Dialog.v2" timestamp="1602593833581">
<state x="872" y="433" key="Vcs.Push.Dialog.v2" timestamp="1602687629956">
<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="1602593833581" />
<state x="872" y="433" key="Vcs.Push.Dialog.v2/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687629956" />
<state x="930" y="299" width="700" height="801" key="find.popup" timestamp="1602593714122">
<screen x="0" y="0" width="2560" height="1400" />
</state>

View File

@ -34,7 +34,14 @@ namespace EvoCalculator.Core.Calculation.Columns
for (var i = 3; i < preparedValues.Nmper + 1; i++)
{
Values[i] = Values[i - 1].AddMonths(1);
Values[i] = preparedValues.DeliveryTime switch
{
100000000 => preparedValues.PaymentDateNew == null
? Values[1].AddMonths(i - 1)
: Values[2].AddMonths(i - 2),
100000001 => Values[2].AddMonths(i - 2),
_ => Values[2]
};
}
}
}

View File

@ -225,7 +225,7 @@ namespace EvoCalculator.Core.Tests.Calculation.Suite.Columns
new DateTime(2020, 12, 31),
new DateTime(2021, 01, 31),
new DateTime(2021, 02, 28),
new DateTime(2021, 03, 28),
new DateTime(2021, 03, 31),
};
var res = dateColumn.Values;