From a5ed8580fe7d717569c58067ab91b6a05bfa174e Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Mon, 6 Dec 2021 17:16:22 +0100 Subject: [PATCH] allow only 2 month in the past for creation transactions --- .../src/cpp/model/gradido/TransactionCreation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/login_server/src/cpp/model/gradido/TransactionCreation.cpp b/login_server/src/cpp/model/gradido/TransactionCreation.cpp index 7461b9bce..97fec92ee 100644 --- a/login_server/src/cpp/model/gradido/TransactionCreation.cpp +++ b/login_server/src/cpp/model/gradido/TransactionCreation.cpp @@ -74,8 +74,8 @@ namespace model { auto now = Poco::DateTime(); if (target_date.year() == now.year()) { - if (target_date.month() + 3 < now.month()) { - addError(new Error(function_name, "year is the same, target date month is more than 3 month in past")); + if (target_date.month() + 2 < now.month()) { + addError(new Error(function_name, "year is the same, target date month is more than 2 month in past")); return TRANSACTION_VALID_INVALID_TARGET_DATE; } if (target_date.month() > now.month()) { @@ -96,8 +96,8 @@ namespace model { else { // target_date.year +1 == now.year - if (target_date.month() + 3 < now.month() + 12) { - addError(new Error(function_name, "target date is more than 3 month in past")); + if (target_date.month() + 2 < now.month() + 12) { + addError(new Error(function_name, "target date is more than 2 month in past")); return TRANSACTION_VALID_INVALID_TARGET_DATE; } }