#5 Having no periods breaks the "expenses per period" graph on the account overview page
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<packaging.type>jar</packaging.type>
|
<packaging.type>jar</packaging.type>
|
||||||
<activeProfiles>postgres,dev</activeProfiles>
|
<activeProfiles>hsqldb,dev</activeProfiles>
|
||||||
<deploymentProfile>mk</deploymentProfile>
|
<deploymentProfile>mk</deploymentProfile>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|||||||
@@ -286,9 +286,14 @@ public class TransactionService {
|
|||||||
* @see TransactionService#getExpensesCurrentPeriod()
|
* @see TransactionService#getExpensesCurrentPeriod()
|
||||||
*/
|
*/
|
||||||
public List<Long> getExpensesAllPeriods() {
|
public List<Long> getExpensesAllPeriods() {
|
||||||
|
try {
|
||||||
return this.transactionRepository
|
return this.transactionRepository
|
||||||
.getExpensesForAllPeriods(PeriodType.EXPENSE, AccountType.START, AccountType.EXPENSE, AccountType.LIABILITY);
|
.getExpensesForAllPeriods(PeriodType.EXPENSE, AccountType.START, AccountType.EXPENSE, AccountType.LIABILITY);
|
||||||
}
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
return Collections.singletonList(Long.valueOf(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method gets the total values of all expense periods of the given year; that is
|
* This method gets the total values of all expense periods of the given year; that is
|
||||||
|
|||||||
Reference in New Issue
Block a user