Skip to content
Snippets Groups Projects
Commit 83ab5c00 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

refactoring

parent 74626d18
No related branches found
No related tags found
No related merge requests found
......@@ -13,17 +13,15 @@ import java.util.List;
@Service
public class RepeatingTransactionUpdater
{
@Autowired
private TransactionRepository transactionRepository;
@Autowired
private TransactionService transactionService;
private final TransactionService transactionService;
private final RepeatingOptionRepository repeatingOptionRepository;
@Autowired
private RepeatingOptionRepository repeatingOptionRepository;
@Autowired
private HelpersService helpers;
public RepeatingTransactionUpdater(TransactionService transactionService, RepeatingOptionRepository repeatingOptionRepository)
{
this.transactionService = transactionService;
this.repeatingOptionRepository = repeatingOptionRepository;
}
public void updateRepeatingTransactions(DateTime now)
{
......@@ -39,7 +37,7 @@ public class RepeatingTransactionUpdater
Transaction newTransaction = new Transaction(transactions.get(0));
newTransaction.setID(null);
newTransaction.setDate(currentDate);
transactionRepository.save(newTransaction);
transactionService.getRepository().save(newTransaction);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment