From 02850a97deb554fabf33a2d6f9b6fb3cf0486ea0 Mon Sep 17 00:00:00 2001 From: Vitalii Ananev Date: Thu, 1 Jun 2023 00:48:18 +0300 Subject: [PATCH 01/10] update spring to 3.0.7 --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d97c7421..ee9014b8 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ [![java-version](https://img.shields.io/badge/java-20-brightgreen?style=flat-square)](https://openjdk.org/) -[![spring-boot-version](https://img.shields.io/badge/spring--boot-3.0.6-brightgreen?style=flat-square)](https://github.com/spring-projects/spring-boot/releases) +[![spring-boot-version](https://img.shields.io/badge/spring--boot-3.0.7-brightgreen?style=flat-square)](https://github.com/spring-projects/spring-boot/releases) [![hits-of-code](https://img.shields.io/badge/dynamic/json?style=flat-square&color=lightblue&label=hits-of-code&url=https://hitsofcode.com/github/spacious-team/investbook/json?branch=develop&query=$.count)](https://hitsofcode.com/github/spacious-team/investbook/view?branch=develop) -![github-closed-pull-requests](https://img.shields.io/github/issues-pr-closed/spacious-team/investbook?style=flat-square&color=brightgreen) -![github-workflow-status](https://img.shields.io/github/actions/workflow/status/spacious-team/investbook/publish-docker.yml?style=flat-square&branch=master) +[![github-closed-pull-requests](https://img.shields.io/github/issues-pr-closed/spacious-team/investbook?style=flat-square&color=brightgreen)](https://github.com/spacious-team/investbook/pulls?q=is%3Apr+is%3Aclosed) +[![github-workflow-status](https://img.shields.io/github/actions/workflow/status/spacious-team/investbook/publish-docker.yml?style=flat-square&branch=master)](https://github.com/spacious-team/investbook/actions/workflows/publish-docker.yml) [![github-all-releases](https://img.shields.io/github/downloads/spacious-team/investbook/total?style=flat-square&logo=github&color=lightblue)](https://github.com/spacious-team/investbook/releases/latest) [![docker-pulls](https://img.shields.io/docker/pulls/spaciousteam/investbook?style=flat-square&logo=docker&color=lightblue&logoColor=white)](https://hub.docker.com/r/spaciousteam/investbook) [![telegram-channel](https://img.shields.io/endpoint?style=flat-square&color=2ca5e0&label=news&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Finvestbook_official)](https://t.me/investbook_official) diff --git a/pom.xml b/pom.xml index 4d7241e9..d5dcec61 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.6 + 3.0.7 ru.investbook From ee9a62f69a14af2d0c8d923965bec3847a730409 Mon Sep 17 00:00:00 2001 From: vananiev Date: Sat, 15 Jul 2023 22:52:09 +0300 Subject: [PATCH 02/10] allow zero accrued interest --- .../java/ru/investbook/web/forms/model/TransactionModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/investbook/web/forms/model/TransactionModel.java b/src/main/java/ru/investbook/web/forms/model/TransactionModel.java index 96d55783..8afeddea 100644 --- a/src/main/java/ru/investbook/web/forms/model/TransactionModel.java +++ b/src/main/java/ru/investbook/web/forms/model/TransactionModel.java @@ -89,7 +89,7 @@ public class TransactionModel { private BigDecimal price; @Nullable - @Positive + @PositiveOrZero private BigDecimal accruedInterest; /** From a10bf4c69e64ebd14b1dd5238ddb5ecd8edc5ff1 Mon Sep 17 00:00:00 2001 From: vananiev Date: Sun, 16 Jul 2023 00:38:11 +0300 Subject: [PATCH 03/10] increase precision to 6 decimal places --- .../db/migration/all/V2023_2_0_0.sql | 26 +++++++++++++++++++ .../resources/templates/events/edit-form.html | 2 +- .../templates/security-events/edit-form.html | 4 +-- .../templates/transactions/edit-form.html | 6 ++--- 4 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/db/migration/all/V2023_2_0_0.sql diff --git a/src/main/resources/db/migration/all/V2023_2_0_0.sql b/src/main/resources/db/migration/all/V2023_2_0_0.sql new file mode 100644 index 00000000..fe8025ea --- /dev/null +++ b/src/main/resources/db/migration/all/V2023_2_0_0.sql @@ -0,0 +1,26 @@ +/* + * InvestBook + * Copyright (C) 2023 Spacious Team + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +ALTER TABLE `event_cash_flow` CHANGE COLUMN `value` + `value` DECIMAL(12,6) NOT NULL COMMENT 'Размер' AFTER `type`; + +ALTER TABLE `security_event_cash_flow` CHANGE COLUMN `value` + `value` DECIMAL(12,6) NOT NULL COMMENT 'Размер' AFTER `type`; + +ALTER TABLE `transaction_cash_flow` CHANGE COLUMN `value` + `value` DECIMAL(12,6) NOT NULL COMMENT 'Размер' AFTER `type`; diff --git a/src/main/resources/templates/events/edit-form.html b/src/main/resources/templates/events/edit-form.html index a4c0a360..169c875d 100644 --- a/src/main/resources/templates/events/edit-form.html +++ b/src/main/resources/templates/events/edit-form.html @@ -100,7 +100,7 @@

Редактировать событие