Add tax relevant flag to transaction and recc. transaction

This commit is contained in:
2020-01-21 18:15:10 +01:00
parent fe94a2781f
commit 1cc7fdf052
22 changed files with 151 additions and 50 deletions

View File

@@ -22,6 +22,7 @@ public class RecurringTransaction {
private HolidayWeekendType holidayWeekendType; private HolidayWeekendType holidayWeekendType;
private boolean deleted; private boolean deleted;
private boolean remind; private boolean remind;
private boolean taxRelevant;
public Long getId() { public Long getId() {
return id; return id;
@@ -106,4 +107,12 @@ public class RecurringTransaction {
public void setRemind(boolean remind) { public void setRemind(boolean remind) {
this.remind = remind; this.remind = remind;
} }
public boolean isTaxRelevant() {
return taxRelevant;
}
public void setTaxRelevant(boolean taxRelevant) {
this.taxRelevant = taxRelevant;
}
} }

View File

@@ -27,6 +27,7 @@ public class Transaction {
inverseJoinColumns = @JoinColumn(name = "period_id")) inverseJoinColumns = @JoinColumn(name = "period_id"))
//@formatter:on //@formatter:on
private Set<Period> periods; private Set<Period> periods;
private boolean taxRelevant;
public Long getId() { public Long getId() {
return id; return id;
@@ -87,4 +88,12 @@ public class Transaction {
public void setPeriods(Set<Period> periods) { public void setPeriods(Set<Period> periods) {
this.periods = periods; this.periods = periods;
} }
public boolean isTaxRelevant() {
return taxRelevant;
}
public void setTaxRelevant(boolean taxRelevant) {
this.taxRelevant = taxRelevant;
}
} }

View File

@@ -17,7 +17,7 @@
<properties> <properties>
<packaging.type>jar</packaging.type> <packaging.type>jar</packaging.type>
<activeProfiles>hsqldb,dev</activeProfiles> <activeProfiles>postgres,dev</activeProfiles>
<deploymentProfile>mk</deploymentProfile> <deploymentProfile>mk</deploymentProfile>
</properties> </properties>

View File

@@ -53,7 +53,7 @@ public class RecurringTransactionController {
public ResponseEntity createRecurringTransaction(String fromAccountKey, String toAccountKey, Long amount, public ResponseEntity createRecurringTransaction(String fromAccountKey, String toAccountKey, Long amount,
String description, String holidayWeekendType, String description, String holidayWeekendType,
String intervalType, String firstOccurrence, String intervalType, String firstOccurrence,
String lastOccurrence, Boolean remind String lastOccurrence, Boolean remind, Boolean taxRelevant
) { ) {
final String decodedFrom = ControllerUtil.urlDecode(fromAccountKey); final String decodedFrom = ControllerUtil.urlDecode(fromAccountKey);
final String decodedTo = ControllerUtil.urlDecode(toAccountKey); final String decodedTo = ControllerUtil.urlDecode(toAccountKey);
@@ -62,13 +62,13 @@ public class RecurringTransactionController {
if (LOGGER.isDebugEnabled()) { if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String LOGGER.debug(String
.format("/recurringTransactions/createRecurringTransaction got parameters: %s, %s, %s, %s, %s, " + .format("/recurringTransactions/createRecurringTransaction got parameters: %s, %s, %s, %s, %s, " +
"%s, %s, %s, %s", decodedFrom, decodedTo, amount, decodedDesc, holidayWeekendType, "%s, %s, %s, %s, %s", decodedFrom, decodedTo, amount, decodedDesc, holidayWeekendType,
intervalType, firstOccurrence, lastOccurrence, remind)); intervalType, firstOccurrence, lastOccurrence, remind, taxRelevant));
} }
final ResponseReason responseReason = this.recurringTransactionService final ResponseReason responseReason = this.recurringTransactionService
.createRecurringTransaction(decodedFrom, decodedTo, amount, decodedDesc, holidayWeekendType, .createRecurringTransaction(decodedFrom, decodedTo, amount, decodedDesc, holidayWeekendType,
intervalType, firstOccurrence, lastOccurrence, remind); intervalType, firstOccurrence, lastOccurrence, remind, taxRelevant);
if (LOGGER.isDebugEnabled()) { if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String LOGGER.debug(String

View File

@@ -39,7 +39,7 @@ public class TransactionController {
@RequestMapping(value = "createTransaction") @RequestMapping(value = "createTransaction")
public ResponseEntity createTransaction(String fromAccountKey, String toAccountKey, Long amount, String date, public ResponseEntity createTransaction(String fromAccountKey, String toAccountKey, Long amount, String date,
String description String description, Boolean taxRelevant
) { ) {
final String decodedFrom = ControllerUtil.urlDecode(fromAccountKey); final String decodedFrom = ControllerUtil.urlDecode(fromAccountKey);
final String decodedTo = ControllerUtil.urlDecode(toAccountKey); final String decodedTo = ControllerUtil.urlDecode(toAccountKey);
@@ -47,12 +47,12 @@ public class TransactionController {
if (LOGGER.isDebugEnabled()) { if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String LOGGER.debug(String
.format("/transactions/createTransaction got parameters: %s, %s, %s, %s, %s", .format("/transactions/createTransaction got parameters: %s, %s, %s, %s, %s, %s",
decodedFrom, decodedTo, amount, date, decodedDesc)); decodedFrom, decodedTo, amount, date, decodedDesc, taxRelevant));
} }
final ResponseReason responseReason = this.transactionService final ResponseReason responseReason = this.transactionService
.createTransaction(decodedFrom, decodedTo, amount, date, decodedDesc); .createTransaction(decodedFrom, decodedTo, amount, date, decodedDesc, taxRelevant);
if (LOGGER.isDebugEnabled()) { if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String.format("/transactions/createTransaction returns with %s", responseReason.name())); LOGGER.debug(String.format("/transactions/createTransaction returns with %s", responseReason.name()));

View File

@@ -318,7 +318,7 @@ public class RecurringTransactionService {
public ResponseReason createRecurringTransaction(String fromAccountKey, String toAccountKey, Long amount, public ResponseReason createRecurringTransaction(String fromAccountKey, String toAccountKey, Long amount,
String description, String holidayWeekendType, String description, String holidayWeekendType,
String intervalType, String firstOccurrence, String intervalType, String firstOccurrence,
String lastOccurrence, Boolean remind String lastOccurrence, Boolean remind, Boolean taxRelevant
) { ) {
final Account fromAccount = this.accountService.getAccountByKey(fromAccountKey); final Account fromAccount = this.accountService.getAccountByKey(fromAccountKey);
final Account toAccount = this.accountService.getAccountByKey(toAccountKey); final Account toAccount = this.accountService.getAccountByKey(toAccountKey);
@@ -332,7 +332,7 @@ public class RecurringTransactionService {
try { try {
final RecurringTransaction transaction = buildRecurringTransaction(fromAccount, toAccount, amount, final RecurringTransaction transaction = buildRecurringTransaction(fromAccount, toAccount, amount,
description, holidayWeekendType, intervalType, firstOccurrence, lastOccurrence, remind); description, holidayWeekendType, intervalType, firstOccurrence, lastOccurrence, remind, taxRelevant);
this.recurringTransactionRepository.save(transaction); this.recurringTransactionRepository.save(transaction);
@@ -357,13 +357,15 @@ public class RecurringTransactionService {
* @param firstOccurrence the first occurrence * @param firstOccurrence the first occurrence
* @param lastOccurrence the last occurrence, may be <code>null</code> * @param lastOccurrence the last occurrence, may be <code>null</code>
* @param remind the remind flag * @param remind the remind flag
* @param taxRelevant whether the recurring transaction, respectively its transaction instances, are relevant for
* tax declaration
* *
* @return the build {@link RecurringTransaction} instance * @return the build {@link RecurringTransaction} instance
*/ */
private RecurringTransaction buildRecurringTransaction(Account fromAccount, Account toAccount, Long amount, private RecurringTransaction buildRecurringTransaction(Account fromAccount, Account toAccount, Long amount,
String description, String holidayWeekendType, String description, String holidayWeekendType,
String intervalType, String firstOccurrence, String intervalType, String firstOccurrence,
String lastOccurrence, Boolean remind String lastOccurrence, Boolean remind, Boolean taxRelevant
) { ) {
final RecurringTransaction recurringTransaction = new RecurringTransaction(); final RecurringTransaction recurringTransaction = new RecurringTransaction();
@@ -378,6 +380,7 @@ public class RecurringTransactionService {
// See 'resources/database/postgres/readme_V1_0_0__init.txt' // See 'resources/database/postgres/readme_V1_0_0__init.txt'
recurringTransaction.setDeleted(false); recurringTransaction.setDeleted(false);
recurringTransaction.setRemind(BooleanUtils.toBooleanDefaultIfNull(remind, true)); recurringTransaction.setRemind(BooleanUtils.toBooleanDefaultIfNull(remind, true));
recurringTransaction.setTaxRelevant(taxRelevant);
// lastOccurrence is optional // lastOccurrence is optional
if (StringUtils.isNotEmpty(lastOccurrence)) { if (StringUtils.isNotEmpty(lastOccurrence)) {
@@ -472,7 +475,8 @@ public class RecurringTransactionService {
amount.orElseGet(recurringTransaction::getAmount), amount.orElseGet(recurringTransaction::getAmount),
LocalDate.now().format(DateTimeFormatter.ofPattern(this.financerConfig.getDateFormat())), LocalDate.now().format(DateTimeFormatter.ofPattern(this.financerConfig.getDateFormat())),
recurringTransaction.getDescription(), recurringTransaction.getDescription(),
recurringTransaction); recurringTransaction,
recurringTransaction.isTaxRelevant());
} }
@Transactional(propagation = Propagation.REQUIRED) @Transactional(propagation = Propagation.REQUIRED)

View File

@@ -69,14 +69,15 @@ public class TransactionService {
@Transactional(propagation = Propagation.REQUIRED) @Transactional(propagation = Propagation.REQUIRED)
public ResponseReason createTransaction(String fromAccountKey, String toAccountKey, Long amount, String date, public ResponseReason createTransaction(String fromAccountKey, String toAccountKey, Long amount, String date,
String description String description, Boolean taxRelevant
) { ) {
return this.createTransaction(fromAccountKey, toAccountKey, amount, date, description, null); return this.createTransaction(fromAccountKey, toAccountKey, amount, date, description, null, taxRelevant);
} }
@Transactional(propagation = Propagation.REQUIRED) @Transactional(propagation = Propagation.REQUIRED)
public ResponseReason createTransaction(String fromAccountKey, String toAccountKey, Long amount, String date, public ResponseReason createTransaction(String fromAccountKey, String toAccountKey, Long amount, String date,
String description, RecurringTransaction recurringTransaction String description, RecurringTransaction recurringTransaction,
Boolean taxRelevant
) { ) {
final Account fromAccount = this.accountService.getAccountByKey(fromAccountKey); final Account fromAccount = this.accountService.getAccountByKey(fromAccountKey);
final Account toAccount = this.accountService.getAccountByKey(toAccountKey); final Account toAccount = this.accountService.getAccountByKey(toAccountKey);
@@ -88,7 +89,8 @@ public class TransactionService {
} }
try { try {
final Transaction transaction = buildTransaction(fromAccount, toAccount, amount, description, date, recurringTransaction); final Transaction transaction =
buildTransaction(fromAccount, toAccount, amount, description, date, recurringTransaction, taxRelevant);
transaction.setPeriods(getRelevantPeriods(transaction)); transaction.setPeriods(getRelevantPeriods(transaction));
@@ -143,11 +145,12 @@ public class TransactionService {
* @param date the date of the transaction * @param date the date of the transaction
* @param recurringTransaction the recurring transaction that caused the creation of this transaction, may be * @param recurringTransaction the recurring transaction that caused the creation of this transaction, may be
* <code>null</code> * <code>null</code>
* @param taxRelevant whether the transaction is relevant for tax declaration
* *
* @return the build {@link Transaction} instance * @return the build {@link Transaction} instance
*/ */
private Transaction buildTransaction(Account fromAccount, Account toAccount, Long amount, String description, private Transaction buildTransaction(Account fromAccount, Account toAccount, Long amount, String description,
String date, RecurringTransaction recurringTransaction String date, RecurringTransaction recurringTransaction, Boolean taxRelevant
) { ) {
final Transaction transaction = new Transaction(); final Transaction transaction = new Transaction();
@@ -157,6 +160,7 @@ public class TransactionService {
transaction.setDescription(description); transaction.setDescription(description);
transaction.setDate(LocalDate.parse(date, DateTimeFormatter.ofPattern(this.financerConfig.getDateFormat()))); transaction.setDate(LocalDate.parse(date, DateTimeFormatter.ofPattern(this.financerConfig.getDateFormat())));
transaction.setRecurringTransaction(recurringTransaction); transaction.setRecurringTransaction(recurringTransaction);
transaction.setTaxRelevant(taxRelevant);
return transaction; return transaction;
} }

View File

@@ -0,0 +1,7 @@
-- Add a new column to the transaction table that denotes whether this transaction is
-- relevant for tax declaration
ALTER TABLE "transaction"
ADD COLUMN tax_relevant BOOLEAN DEFAULT FALSE NOT NULL;
ALTER TABLE recurring_transaction
ADD COLUMN tax_relevant BOOLEAN DEFAULT FALSE NOT NULL;

View File

@@ -0,0 +1,7 @@
-- Add a new column to the transaction table that denotes whether this transaction is
-- relevant for tax declaration
ALTER TABLE "transaction"
ADD COLUMN tax_relevant BOOLEAN DEFAULT 'FALSE' NOT NULL;
ALTER TABLE recurring_transaction
ADD COLUMN tax_relevant BOOLEAN DEFAULT 'FALSE' NOT NULL;

View File

@@ -52,7 +52,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.FROM_AND_TO_ACCOUNT_NOT_FOUND, response); Assert.assertEquals(ResponseReason.FROM_AND_TO_ACCOUNT_NOT_FOUND, response);
@@ -72,7 +73,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.TO_ACCOUNT_NOT_FOUND, response); Assert.assertEquals(ResponseReason.TO_ACCOUNT_NOT_FOUND, response);
@@ -92,7 +94,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.FROM_ACCOUNT_NOT_FOUND, response); Assert.assertEquals(ResponseReason.FROM_ACCOUNT_NOT_FOUND, response);
@@ -113,7 +116,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.INVALID_BOOKING_ACCOUNTS, response); Assert.assertEquals(ResponseReason.INVALID_BOOKING_ACCOUNTS, response);
@@ -134,7 +138,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.MISSING_AMOUNT, response); Assert.assertEquals(ResponseReason.MISSING_AMOUNT, response);
@@ -155,7 +160,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.AMOUNT_ZERO, response); Assert.assertEquals(ResponseReason.AMOUNT_ZERO, response);
@@ -176,7 +182,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.MISSING_HOLIDAY_WEEKEND_TYPE, response); Assert.assertEquals(ResponseReason.MISSING_HOLIDAY_WEEKEND_TYPE, response);
@@ -197,7 +204,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.INVALID_HOLIDAY_WEEKEND_TYPE, response); Assert.assertEquals(ResponseReason.INVALID_HOLIDAY_WEEKEND_TYPE, response);
@@ -218,7 +226,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
null, null,
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.MISSING_INTERVAL_TYPE, response); Assert.assertEquals(ResponseReason.MISSING_INTERVAL_TYPE, response);
@@ -239,7 +248,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
"INTERVAL_TYPE", "INTERVAL_TYPE",
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.INVALID_INTERVAL_TYPE, response); Assert.assertEquals(ResponseReason.INVALID_INTERVAL_TYPE, response);
@@ -260,7 +270,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
IntervalType.DAILY.name(), IntervalType.DAILY.name(),
null, null,
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.MISSING_FIRST_OCCURRENCE, response); Assert.assertEquals(ResponseReason.MISSING_FIRST_OCCURRENCE, response);
@@ -281,7 +292,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
IntervalType.DAILY.name(), IntervalType.DAILY.name(),
"FIRST_OCCURRENCE", "FIRST_OCCURRENCE",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.INVALID_FIRST_OCCURRENCE_FORMAT, response); Assert.assertEquals(ResponseReason.INVALID_FIRST_OCCURRENCE_FORMAT, response);
@@ -302,7 +314,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
IntervalType.DAILY.name(), IntervalType.DAILY.name(),
"07.03.2019", "07.03.2019",
"LAST_OCCURRENCE", "LAST_OCCURRENCE",
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.INVALID_LAST_OCCURRENCE_FORMAT, response); Assert.assertEquals(ResponseReason.INVALID_LAST_OCCURRENCE_FORMAT, response);
@@ -324,7 +337,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
IntervalType.DAILY.name(), IntervalType.DAILY.name(),
"07.03.2019", "07.03.2019",
null, null,
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.UNKNOWN_ERROR, response); Assert.assertEquals(ResponseReason.UNKNOWN_ERROR, response);
@@ -345,7 +359,8 @@ public class RecurringTransactionService_createRecurringTransactionTest {
IntervalType.DAILY.name(), IntervalType.DAILY.name(),
"07.03.2019", "07.03.2019",
null, null,
Boolean.TRUE); Boolean.TRUE,
Boolean.FALSE);
// Assert // Assert
Assert.assertEquals(ResponseReason.OK, response); Assert.assertEquals(ResponseReason.OK, response);

View File

@@ -48,7 +48,7 @@ public class TransactionService_createTransactionTest {
// will not be found. // will not be found.
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.invalid", "account.invalid", Long.valueOf(150l), "24.02.2019", "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.invalid", "account.invalid", Long.valueOf(150l), "24.02.2019", "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.FROM_AND_TO_ACCOUNT_NOT_FOUND, response); Assert.assertEquals(ResponseReason.FROM_AND_TO_ACCOUNT_NOT_FOUND, response);
@@ -60,7 +60,7 @@ public class TransactionService_createTransactionTest {
Mockito.when(this.accountService.getAccountByKey(Mockito.anyString())).thenReturn(createAccount(), null); Mockito.when(this.accountService.getAccountByKey(Mockito.anyString())).thenReturn(createAccount(), null);
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.invalid", Long.valueOf(150l), "24.02.2019", "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.invalid", Long.valueOf(150l), "24.02.2019", "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.TO_ACCOUNT_NOT_FOUND, response); Assert.assertEquals(ResponseReason.TO_ACCOUNT_NOT_FOUND, response);
@@ -72,7 +72,7 @@ public class TransactionService_createTransactionTest {
Mockito.when(this.accountService.getAccountByKey(Mockito.anyString())).thenReturn(null, createAccount()); Mockito.when(this.accountService.getAccountByKey(Mockito.anyString())).thenReturn(null, createAccount());
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.invalid", "account.to", Long.valueOf(150l), "24.02.2019", "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.invalid", "account.to", Long.valueOf(150l), "24.02.2019", "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.FROM_ACCOUNT_NOT_FOUND, response); Assert.assertEquals(ResponseReason.FROM_ACCOUNT_NOT_FOUND, response);
@@ -85,7 +85,7 @@ public class TransactionService_createTransactionTest {
Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.FALSE); Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.FALSE);
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(150l), "24.02.2019", "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(150l), "24.02.2019", "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.INVALID_BOOKING_ACCOUNTS, response); Assert.assertEquals(ResponseReason.INVALID_BOOKING_ACCOUNTS, response);
@@ -98,7 +98,7 @@ public class TransactionService_createTransactionTest {
Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.TRUE); Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.TRUE);
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", null, "24.02.2019", "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", null, "24.02.2019", "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.MISSING_AMOUNT, response); Assert.assertEquals(ResponseReason.MISSING_AMOUNT, response);
@@ -111,7 +111,7 @@ public class TransactionService_createTransactionTest {
Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.TRUE); Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.TRUE);
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(0l), "24.02.2019", "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(0l), "24.02.2019", "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.AMOUNT_ZERO, response); Assert.assertEquals(ResponseReason.AMOUNT_ZERO, response);
@@ -124,7 +124,7 @@ public class TransactionService_createTransactionTest {
Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.TRUE); Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.TRUE);
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(125l), null, "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(125l), null, "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.MISSING_DATE, response); Assert.assertEquals(ResponseReason.MISSING_DATE, response);
@@ -137,7 +137,7 @@ public class TransactionService_createTransactionTest {
Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.TRUE); Mockito.when(this.ruleService.isValidBooking(Mockito.any(Account.class), Mockito.any(Account.class))).thenReturn(Boolean.TRUE);
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(125l), "2019-01-01", "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(125l), "2019-01-01", "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.INVALID_DATE_FORMAT, response); Assert.assertEquals(ResponseReason.INVALID_DATE_FORMAT, response);
@@ -156,7 +156,7 @@ public class TransactionService_createTransactionTest {
Mockito.when(toAccount.getCurrentBalance()).thenReturn(Long.valueOf(0l)); Mockito.when(toAccount.getCurrentBalance()).thenReturn(Long.valueOf(0l));
// Act // Act
final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(125l), "24.02.2019", "XXX"); final ResponseReason response = this.classUnderTest.createTransaction("account.from", "account.to", Long.valueOf(125l), "24.02.2019", "XXX", false);
// Assert // Assert
Assert.assertEquals(ResponseReason.OK, response); Assert.assertEquals(ResponseReason.OK, response);

View File

@@ -62,7 +62,8 @@ public class RecurringTransactionController {
.queryParam("holidayWeekendType", form.getHolidayWeekendType()) .queryParam("holidayWeekendType", form.getHolidayWeekendType())
.queryParam("intervalType", form.getIntervalType()) .queryParam("intervalType", form.getIntervalType())
.queryParam("description", form.getDescription()) .queryParam("description", form.getDescription())
.queryParam("remind", form.getRemind()); .queryParam("remind", form.getRemind())
.queryParam("taxRelevant", form.getTaxRelevant());
final ResponseEntity<String> response = new StringTemplate().exchange(builder); final ResponseEntity<String> response = new StringTemplate().exchange(builder);

View File

@@ -60,7 +60,8 @@ public class TransactionController {
.queryParam("toAccountKey", form.getToAccountKey()) .queryParam("toAccountKey", form.getToAccountKey())
.queryParam("amount", form.getAmount()) .queryParam("amount", form.getAmount())
.queryParam("date", ControllerUtils.formatDate(this.financerConfig, form.getDate())) .queryParam("date", ControllerUtils.formatDate(this.financerConfig, form.getDate()))
.queryParam("description", form.getDescription()); .queryParam("description", form.getDescription())
.queryParam("taxRelevant", form.getTaxRelevant());
final ResponseEntity<String> response = new StringTemplate().exchange(builder); final ResponseEntity<String> response = new StringTemplate().exchange(builder);
final ResponseReason responseReason = ResponseReason.fromResponseEntity(response); final ResponseReason responseReason = ResponseReason.fromResponseEntity(response);

View File

@@ -10,6 +10,7 @@ public class NewRecurringTransactionForm {
private String intervalType; private String intervalType;
private String holidayWeekendType; private String holidayWeekendType;
private Boolean remind; private Boolean remind;
private Boolean taxRelevant;
public String getFromAccountKey() { public String getFromAccountKey() {
return fromAccountKey; return fromAccountKey;
@@ -82,4 +83,12 @@ public class NewRecurringTransactionForm {
public void setRemind(Boolean remind) { public void setRemind(Boolean remind) {
this.remind = remind; this.remind = remind;
} }
public Boolean getTaxRelevant() {
return taxRelevant;
}
public void setTaxRelevant(Boolean taxRelevant) {
this.taxRelevant = taxRelevant;
}
} }

View File

@@ -6,6 +6,7 @@ public class NewTransactionForm {
private String amount; private String amount;
private String date; private String date;
private String description; private String description;
private Boolean taxRelevant;
public String getFromAccountKey() { public String getFromAccountKey() {
return fromAccountKey; return fromAccountKey;
@@ -46,4 +47,12 @@ public class NewTransactionForm {
public void setDescription(String description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
public Boolean getTaxRelevant() {
return taxRelevant;
}
public void setTaxRelevant(Boolean taxRelevant) {
this.taxRelevant = taxRelevant;
}
} }

View File

@@ -42,6 +42,7 @@ financer.transaction-new.label.to-account=To account\:
financer.transaction-new.label.amount=Amount\: financer.transaction-new.label.amount=Amount\:
financer.transaction-new.label.date=Date\: financer.transaction-new.label.date=Date\:
financer.transaction-new.label.description=Description\: financer.transaction-new.label.description=Description\:
financer.transaction-new.label.taxRelevant=Tax relevant\:
financer.transaction-new.submit=Create transaction financer.transaction-new.submit=Create transaction
financer.transaction-new.account-type.BANK={0}|Bank|{1}{2} financer.transaction-new.account-type.BANK={0}|Bank|{1}{2}
financer.transaction-new.account-type.CASH={0}|Cash|{1}{2} financer.transaction-new.account-type.CASH={0}|Cash|{1}{2}
@@ -60,6 +61,7 @@ financer.recurring-transaction-new.label.interval-type=Interval\:
financer.recurring-transaction-new.label.holiday-weekend-type=Holiday/weekend rule\: financer.recurring-transaction-new.label.holiday-weekend-type=Holiday/weekend rule\:
financer.recurring-transaction-new.label.description=Description\: financer.recurring-transaction-new.label.description=Description\:
financer.recurring-transaction-new.label.remind=Remind if due\: financer.recurring-transaction-new.label.remind=Remind if due\:
financer.recurring-transaction-new.label.taxRelevant=Tax relevant\:
financer.recurring-transaction-new.submit=Create recurring transaction financer.recurring-transaction-new.submit=Create recurring transaction
financer.recurring-transaction-new.account-type.BANK={0}|Bank|{1}{2} financer.recurring-transaction-new.account-type.BANK={0}|Bank|{1}{2}
financer.recurring-transaction-new.account-type.CASH={0}|Cash|{1}{2} financer.recurring-transaction-new.account-type.CASH={0}|Cash|{1}{2}
@@ -80,11 +82,14 @@ financer.recurring-transaction-list.table-header.amount=Amount
financer.recurring-transaction-list.table-header.description=Description financer.recurring-transaction-list.table-header.description=Description
financer.recurring-transaction-list.table-header.intervalType=Interval financer.recurring-transaction-list.table-header.intervalType=Interval
financer.recurring-transaction-list.table-header.holidayWeekendType=Holiday/weekend rule financer.recurring-transaction-list.table-header.holidayWeekendType=Holiday/weekend rule
financer.recurring-transaction-list.table-header.taxRelevant=Tax relevant
financer.recurring-transaction-list.table-header.actions=Actions financer.recurring-transaction-list.table-header.actions=Actions
financer.recurring-transaction-list.table.actions.createTransaction=Create transaction financer.recurring-transaction-list.table.actions.createTransaction=Create transaction
financer.recurring-transaction-list.table.actions.createTransactionWithAmount=Create transaction with amount financer.recurring-transaction-list.table.actions.createTransactionWithAmount=Create transaction with amount
financer.recurring-transaction-list.table.actions.editRecurringTransaction=Edit financer.recurring-transaction-list.table.actions.editRecurringTransaction=Edit
financer.recurring-transaction-list.table.actions.deleteRecurringTransaction=Delete financer.recurring-transaction-list.table.actions.deleteRecurringTransaction=Delete
financer.recurring-transaction-list.table.taxRelevant.true=Yes
financer.recurring-transaction-list.table.taxRelevant.false=No
financer.recurring-transaction-list.back-to-overview=Back to overview financer.recurring-transaction-list.back-to-overview=Back to overview
financer.account-details.title=financer\: account details financer.account-details.title=financer\: account details
@@ -99,7 +104,8 @@ financer.account-details.table-header.toAccount=To account
financer.account-details.table-header.date=Date financer.account-details.table-header.date=Date
financer.account-details.table-header.amount=Amount financer.account-details.table-header.amount=Amount
financer.account-details.table-header.description=Description financer.account-details.table-header.description=Description
financer.account-details.table-header.byRecurring=Recurring? financer.account-details.table-header.byRecurring=Recurring
financer.account-details.table-header.taxRelevant=Tax relevant
financer.account-details.details.type=Type\: financer.account-details.details.type=Type\:
financer.account-details.details.balance=Current balance\: financer.account-details.details.balance=Current balance\:
financer.account-details.details.group=Group\: financer.account-details.details.group=Group\:
@@ -107,6 +113,8 @@ financer.account-details.table-header.actions=Actions
financer.account-details.table.actions.deleteTransaction=Delete financer.account-details.table.actions.deleteTransaction=Delete
financer.account-details.table.recurring.yes=Yes financer.account-details.table.recurring.yes=Yes
financer.account-details.table.recurring.no=No financer.account-details.table.recurring.no=No
financer.account-details.table.taxRelevant.true=Yes
financer.account-details.table.taxRelevant.false=No
financer.recurring-to-transaction-with-amount.title=financer\: create transaction from recurring with amount financer.recurring-to-transaction-with-amount.title=financer\: create transaction from recurring with amount
financer.recurring-to-transaction-with-amount.label.amount=Amount\: financer.recurring-to-transaction-with-amount.label.amount=Amount\:
@@ -116,12 +124,12 @@ financer.chart-select.title=Select a chart to generate
financer.chart-select.submit=Select financer.chart-select.submit=Select
financer.chart-config-account-group-expenses-for-period.title=Configure account group expenses for period chart financer.chart-config-account-group-expenses-for-period.title=Configure account group expenses for period chart
financer.chart-config-account-group-expenses-for-period.label.from-date=From date\: financer.chart-config-account-group-expenses-for-period.label.from-date=From date\:
financer.chart-config-account-group-expenses-for-period.label.to-date=To date\: financer.chart-config-account-group-expenses-for-period.label.to-date=To date\:
financer.chart-config-account-group-expenses-for-period.submit=Generate financer.chart-config-account-group-expenses-for-period.submit=Generate
financer.chart-config-account-expenses-for-period.title=Configure account expenses for period chart financer.chart-config-account-expenses-for-period.title=Configure account expenses for period chart
financer.chart-config-account-expenses-for-period.label.from-date=From date\: financer.chart-config-account-expenses-for-period.label.from-date=From date\:
financer.chart-config-account-expenses-for-period.label.to-date=To date\: financer.chart-config-account-expenses-for-period.label.to-date=To date\:
financer.chart-config-account-expenses-for-period.submit=Generate financer.chart-config-account-expenses-for-period.submit=Generate

View File

@@ -40,6 +40,7 @@ financer.transaction-new.label.to-account=An Konto\:
financer.transaction-new.label.amount=Betrag\: financer.transaction-new.label.amount=Betrag\:
financer.transaction-new.label.date=Datum\: financer.transaction-new.label.date=Datum\:
financer.transaction-new.label.description=Beschreibung\: financer.transaction-new.label.description=Beschreibung\:
financer.transaction-new.label.taxRelevant=Relevant f\u00FCr Steuererkl\u00E4rung\:
financer.transaction-new.submit=Buchung erstellen financer.transaction-new.submit=Buchung erstellen
financer.transaction-new.account-type.BANK={0}|Bank|{1}{2} financer.transaction-new.account-type.BANK={0}|Bank|{1}{2}
financer.transaction-new.account-type.CASH={0}|Bar|{1}{2} financer.transaction-new.account-type.CASH={0}|Bar|{1}{2}
@@ -58,6 +59,7 @@ financer.recurring-transaction-new.label.interval-type=Intervall\:
financer.recurring-transaction-new.label.holiday-weekend-type=Feiertag-/Wochenendregel\: financer.recurring-transaction-new.label.holiday-weekend-type=Feiertag-/Wochenendregel\:
financer.recurring-transaction-new.label.description=Beschreibung\: financer.recurring-transaction-new.label.description=Beschreibung\:
financer.recurring-transaction-new.label.remind=Erinnern wenn f\u00E4llig\: financer.recurring-transaction-new.label.remind=Erinnern wenn f\u00E4llig\:
financer.recurring-transaction-new.label.taxRelevant=Relevant f\u00FCr Steuererkl\u00E4rung\:
financer.recurring-transaction-new.submit=Wiederkehrende Buchung erstellen financer.recurring-transaction-new.submit=Wiederkehrende Buchung erstellen
financer.recurring-transaction-new.account-type.BANK={0}|Bank|{1}{2} financer.recurring-transaction-new.account-type.BANK={0}|Bank|{1}{2}
financer.recurring-transaction-new.account-type.CASH={0}|Bar|{1}{2} financer.recurring-transaction-new.account-type.CASH={0}|Bar|{1}{2}
@@ -78,11 +80,14 @@ financer.recurring-transaction-list.table-header.amount=Betrag
financer.recurring-transaction-list.table-header.description=Beschreibung financer.recurring-transaction-list.table-header.description=Beschreibung
financer.recurring-transaction-list.table-header.intervalType=Intervall financer.recurring-transaction-list.table-header.intervalType=Intervall
financer.recurring-transaction-list.table-header.holidayWeekendType=Feiertag-/Wochenendregel financer.recurring-transaction-list.table-header.holidayWeekendType=Feiertag-/Wochenendregel
financer.recurring-transaction-list.table-header.taxRelevant=Relevant f\u00FCr Steuererkl\u00E4rung
financer.recurring-transaction-list.table-header.actions=Aktionen financer.recurring-transaction-list.table-header.actions=Aktionen
financer.recurring-transaction-list.table.actions.createTransaction=Erstelle Buchung financer.recurring-transaction-list.table.actions.createTransaction=Erstelle Buchung
financer.recurring-transaction-list.table.actions.createTransactionWithAmount=Erstelle Buchung mit Betrag financer.recurring-transaction-list.table.actions.createTransactionWithAmount=Erstelle Buchung mit Betrag
financer.recurring-transaction-list.table.actions.editRecurringTransaction=Bearbeiten financer.recurring-transaction-list.table.actions.editRecurringTransaction=Bearbeiten
financer.recurring-transaction-list.table.actions.deleteRecurringTransaction=L\u00F6schen financer.recurring-transaction-list.table.actions.deleteRecurringTransaction=L\u00F6schen
financer.recurring-transaction-list.table.taxRelevant.true=Ja
financer.recurring-transaction-list.table.taxRelevant.false=Nein
financer.recurring-transaction-list.back-to-overview=Zur\u00FCck zur \u00DCbersicht financer.recurring-transaction-list.back-to-overview=Zur\u00FCck zur \u00DCbersicht
financer.account-details.title=financer\: Kontodetails financer.account-details.title=financer\: Kontodetails
@@ -97,7 +102,8 @@ financer.account-details.table-header.toAccount=An Konto
financer.account-details.table-header.date=Datum financer.account-details.table-header.date=Datum
financer.account-details.table-header.amount=Betrag financer.account-details.table-header.amount=Betrag
financer.account-details.table-header.description=Beschreibung financer.account-details.table-header.description=Beschreibung
financer.account-details.table-header.byRecurring=Wiederkehrend? financer.account-details.table-header.byRecurring=Wiederkehrend
financer.account-details.table-header.taxRelevant=Relevant f\u00FCr Steuererkl\u00E4rung
financer.account-details.details.type=Typ\: financer.account-details.details.type=Typ\:
financer.account-details.details.balance=Kontostand\: financer.account-details.details.balance=Kontostand\:
financer.account-details.details.group=Gruppe\: financer.account-details.details.group=Gruppe\:
@@ -105,6 +111,8 @@ financer.account-details.table-header.actions=Aktionen
financer.account-details.table.actions.deleteTransaction=L\u00F6schen financer.account-details.table.actions.deleteTransaction=L\u00F6schen
financer.account-details.table.recurring.yes=Ja financer.account-details.table.recurring.yes=Ja
financer.account-details.table.recurring.no=Nein financer.account-details.table.recurring.no=Nein
financer.account-details.table.taxRelevant.true=Ja
financer.account-details.table.taxRelevant.false=Nein
financer.recurring-to-transaction-with-amount.title=financer\: Buchung mit Betrag aus wiederkehrender Buchung erstellen financer.recurring-to-transaction-with-amount.title=financer\: Buchung mit Betrag aus wiederkehrender Buchung erstellen
financer.recurring-to-transaction-with-amount.label.amount=Betrag\: financer.recurring-to-transaction-with-amount.label.amount=Betrag\:
@@ -114,12 +122,12 @@ financer.chart-select.title=Ein Diagramm zum Erzeugen ausw\u00E4hlen
financer.chart-select.submit=Ausw\u00E4hlen financer.chart-select.submit=Ausw\u00E4hlen
financer.chart-config-account-group-expenses-for-period.title=Konfigurieren von Ausgaben f\u00FCr Periode gruppiert nach Konto-Gruppe Diagramm financer.chart-config-account-group-expenses-for-period.title=Konfigurieren von Ausgaben f\u00FCr Periode gruppiert nach Konto-Gruppe Diagramm
financer.chart-config-account-group-expenses-for-period.label.from-date=Von Datum\: financer.chart-config-account-group-expenses-for-period.label.from-date=Von Datum\:
financer.chart-config-account-group-expenses-for-period.label.to-date=Bis Datum\: financer.chart-config-account-group-expenses-for-period.label.to-date=Bis Datum\:
financer.chart-config-account-group-expenses-for-period.submit=Erzeugen financer.chart-config-account-group-expenses-for-period.submit=Erzeugen
financer.chart-config-account-expenses-for-period.title=Konfigurieren von Ausgaben f\u00FCr Periode gruppiert nach Konto Diagramm financer.chart-config-account-expenses-for-period.title=Konfigurieren von Ausgaben f\u00FCr Periode gruppiert nach Konto Diagramm
financer.chart-config-account-expenses-for-period.label.from-date=Von Datum\: financer.chart-config-account-expenses-for-period.label.from-date=Von Datum\:
financer.chart-config-account-expenses-for-period.label.to-date=Bis Datum\: financer.chart-config-account-expenses-for-period.label.to-date=Bis Datum\:
financer.chart-config-account-expenses-for-period.submit=Erzeugen financer.chart-config-account-expenses-for-period.submit=Erzeugen

View File

@@ -1,6 +1,8 @@
v26 -> v27: v26 -> v27:
- Changed sort order of accounts in overview page. The accounts are now sorted by the account type first (BCILES), then - Changed sort order of accounts in overview page. The accounts are now sorted by the account type first (BCILES), then
by the account group name and then by the account ID, leading to an overall more organic order of accounts by the account group name and then by the account ID, leading to an overall more organic order of accounts
- Add tax relevance flag to transaction and recurring transaction creation. This flag denotes whether a transaction or
the instances of a recurring transaction are relevant for a tax declaration. This is preparation for extended reports.
v25 -> v26: v25 -> v26:
- Close of the current expense period now creates null statistic entries for accounts that have not been used in - Close of the current expense period now creates null statistic entries for accounts that have not been used in

View File

@@ -44,6 +44,7 @@
<th th:text="#{financer.account-details.table-header.amount}"/> <th th:text="#{financer.account-details.table-header.amount}"/>
<th th:text="#{financer.account-details.table-header.description}"/> <th th:text="#{financer.account-details.table-header.description}"/>
<th th:text="#{financer.account-details.table-header.byRecurring}"/> <th th:text="#{financer.account-details.table-header.byRecurring}"/>
<th th:text="#{financer.account-details.table-header.taxRelevant}"/>
<th th:text="#{financer.account-details.table-header.actions}"/> <th th:text="#{financer.account-details.table-header.actions}"/>
</tr> </tr>
<tr th:each="transaction : ${transactions}"> <tr th:each="transaction : ${transactions}">
@@ -55,6 +56,7 @@
<td th:text="${transaction.description}" /> <td th:text="${transaction.description}" />
<td th:if="${transaction.recurringTransaction != null}" th:text="#{financer.account-details.table.recurring.yes}" /> <td th:if="${transaction.recurringTransaction != null}" th:text="#{financer.account-details.table.recurring.yes}" />
<td th:if="${transaction.recurringTransaction == null}" th:text="#{financer.account-details.table.recurring.no}" /> <td th:if="${transaction.recurringTransaction == null}" th:text="#{financer.account-details.table.recurring.no}" />
<td th:text="#{'financer.account-details.table.taxRelevant.' + ${transaction.taxRelevant}}" />
<td> <td>
<div id="account-transaction-table-actions-container"> <div id="account-transaction-table-actions-container">
<a th:href="@{/deleteTransaction(transactionId=${transaction.id}, accountKey=${account.key})}" <a th:href="@{/deleteTransaction(transactionId=${transaction.id}, accountKey=${account.key})}"

View File

@@ -41,6 +41,8 @@
</select> </select>
<label for="inputDescription" th:text="#{financer.recurring-transaction-new.label.description}"/> <label for="inputDescription" th:text="#{financer.recurring-transaction-new.label.description}"/>
<input type="text" id="inputDescription" th:field="*{description}"/> <input type="text" id="inputDescription" th:field="*{description}"/>
<label for="inputTaxRelevant" th:text="#{financer.recurring-transaction-new.label.taxRelevant}" />
<input type="checkbox" id="inputTaxRelevant" th:field="*{taxRelevant}" />
<label for="inputRemind" th:text="#{financer.recurring-transaction-new.label.remind}" /> <label for="inputRemind" th:text="#{financer.recurring-transaction-new.label.remind}" />
<input type="checkbox" id="inputRemind" th:field="*{remind}" /> <input type="checkbox" id="inputRemind" th:field="*{remind}" />
<input type="submit" th:value="#{financer.recurring-transaction-new.submit}"/> <input type="submit" th:value="#{financer.recurring-transaction-new.submit}"/>

View File

@@ -22,6 +22,7 @@
<th th:text="#{financer.recurring-transaction-list.table-header.description}"/> <th th:text="#{financer.recurring-transaction-list.table-header.description}"/>
<th th:text="#{financer.recurring-transaction-list.table-header.intervalType}"/> <th th:text="#{financer.recurring-transaction-list.table-header.intervalType}"/>
<th th:text="#{financer.recurring-transaction-list.table-header.holidayWeekendType}"/> <th th:text="#{financer.recurring-transaction-list.table-header.holidayWeekendType}"/>
<th th:text="#{financer.recurring-transaction-list.table-header.taxRelevant}"/>
<th th:text="#{financer.recurring-transaction-list.table-header.actions}"/> <th th:text="#{financer.recurring-transaction-list.table-header.actions}"/>
</tr> </tr>
<tr th:each="rt : ${recurringTransactions}"> <tr th:each="rt : ${recurringTransactions}">
@@ -38,6 +39,7 @@
<td th:text="${rt.description}"/> <td th:text="${rt.description}"/>
<td th:text="#{'financer.interval-type.' + ${rt.intervalType}}"/> <td th:text="#{'financer.interval-type.' + ${rt.intervalType}}"/>
<td th:text="#{'financer.holiday-weekend-type.' + ${rt.holidayWeekendType}}"/> <td th:text="#{'financer.holiday-weekend-type.' + ${rt.holidayWeekendType}}"/>
<td th:text="#{'financer.recurring-transaction-list.table.taxRelevant.' + ${rt.taxRelevant}}" />
<td> <td>
<div id="recurring-transaction-list-table-actions-container"> <div id="recurring-transaction-list-table-actions-container">
<a th:href="@{/recurringToTransaction(recurringTransactionId=${rt.id}, sub=${subTitle})}" <a th:href="@{/recurringToTransaction(recurringTransactionId=${rt.id}, sub=${subTitle})}"

View File

@@ -29,6 +29,8 @@
<input type="date" id="inputDate" th:field="*{date}"/> <input type="date" id="inputDate" th:field="*{date}"/>
<label for="inputDescription" th:text="#{financer.transaction-new.label.description}"/> <label for="inputDescription" th:text="#{financer.transaction-new.label.description}"/>
<input type="text" id="inputDescription" th:field="*{description}"/> <input type="text" id="inputDescription" th:field="*{description}"/>
<label for="inputTaxRelevant" th:text="#{financer.transaction-new.label.taxRelevant}" />
<input type="checkbox" id="inputTaxRelevant" th:field="*{taxRelevant}" />
<input type="submit" th:value="#{financer.transaction-new.submit}"/> <input type="submit" th:value="#{financer.transaction-new.submit}"/>
</form> </form>
<div th:replace="includes/footer :: footer"/> <div th:replace="includes/footer :: footer"/>