Skip to content

Commit

Permalink
add derivative profit type for forms events pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vananiev committed Nov 18, 2024
1 parent a6a507f commit c856110
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ public void setStringType(String value) {
if (value.equals("TAX_IIS_A")) {
type = CashFlowType.CASH;
} else {
type = CashFlowType.valueOf(value.split("_")[0]);
String typeName = value.replace("_IN", "")
.replace("_OUT", "");
type = CashFlowType.valueOf(typeName);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/events/edit-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ <h1 th:unless="${event.id == null}">Редактировать событие</h
<option value="COUPON">Купон</option>
<option value="AMORTIZATION">Амортизация облигации</option>
<option value="REDEMPTION">Погашение облигации</option>
<option value="DERIVATIVE_PROFIT_OUT">Списание вариационной маржи</option>
<option value="DERIVATIVE_PROFIT_IN">Зачисление вариационной маржи</option>
<option value="FEE_OUT">Комиссия</option>
<option value="FEE_IN">Возврат комиссии</option>
<option value="TAX_OUT">Налог</option>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/events/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ <h1>События по счетам</h1>
<span th:case="COUPON">Купон</span>
<span th:case="AMORTIZATION">Амортизация облигации</span>
<span th:case="REDEMPTION">Погашение облигации</span>
<span th:case="DERIVATIVE_PROFIT">Вариационная маржа</span>
<span th:case="FEE">Комиссия</span>
<span th:case="TAX">Налог</span>
<span th:text="Пополнение" th:if="${e.type.name == 'CASH' && e.value >= 0}"/>
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/events/view-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ <h1>Сохранено событие</h1>
<span th:case="COUPON">Купон</span>
<span th:case="AMORTIZATION">Амортизация облигации</span>
<span th:case="REDEMPTION">Погашение облигации</span>
<span th:case="DERIVATIVE_PROFIT_OUT">Списание вариационной маржи</span>
<span th:case="DERIVATIVE_PROFIT_IN">Зачисление вариационной маржи</span>
<span th:case="FEE_OUT">Комиссия</span>
<span th:case="FEE_IN">Возврат комиссии</span>
<span th:case="TAX_OUT">Налог</span>
Expand Down

0 comments on commit c856110

Please sign in to comment.