class AbstractOrganisationFinanceService extends BaseTransactionalService implements OrganisationFinanceService {

    @Override
    @Transactional
    public ServiceResult<Void> updateOrganisationKtpYears(long targetId, long organisationId, OrganisationFinancesKtpYearsResource finances) {
        long competitionId = getCompetitionId(targetId);

        // finance
        Finance finance = getFinance(targetId, organisationId).getSuccess();
        updateOrganisationSize(finance, competitionId, finances.getOrganisationSize());
        KtpYearsResource ktpYearsResource = (KtpYearsResource) finance.getFinancialYearAccounts();
        ktpYearsResource.setYears(finances.getYears());
        ktpYearsResource.setGroupEmployees(finances.getGroupEmployees());
        ktpYearsResource.setFinancialYearEnd(ofNullable(finances.getFinancialYearEnd()).map(YearMonth::atEndOfMonth).orElse(null));

        updateFinance(finance).getSuccess();

        return serviceSuccess();
    }

}