Skip to content

Commit b31daad

Browse files
committed
codinguser#876 - Enhance Code Quality
1 parent 52f59ef commit b31daad

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/src/main/java/org/gnucash/android/db/adapter/SplitsDbAdapter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,18 @@ private Money calculateSplitBalance(List<String> accountUIDList,
220220
+ " = 0";
221221

222222
if (startTimestamp != -1 && endTimestamp != -1) {
223+
223224
selection += " AND " + TransactionEntry.TABLE_NAME + "_" + TransactionEntry.COLUMN_TIMESTAMP + " BETWEEN ? AND ? ";
224225
selectionArgs = new String[]{String.valueOf(startTimestamp),
225226
String.valueOf(endTimestamp)};
227+
226228
} else if (startTimestamp == -1 && endTimestamp != -1) {
229+
227230
selection += " AND " + TransactionEntry.TABLE_NAME + "_" + TransactionEntry.COLUMN_TIMESTAMP + " <= ?";
228231
selectionArgs = new String[]{String.valueOf(endTimestamp)};
232+
229233
} else if (startTimestamp != -1/* && endTimestamp == -1*/) {
234+
230235
selection += " AND " + TransactionEntry.TABLE_NAME + "_" + TransactionEntry.COLUMN_TIMESTAMP + " >= ?";
231236
selectionArgs = new String[]{String.valueOf(startTimestamp)};
232237
}

app/src/main/java/org/gnucash/android/model/Money.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ public double asDouble(){
257257
public String asString(){
258258
return toPlainString();
259259
}
260-
260+
261+
// TODO TW C 2020-03-06 : A factoriser avec Split.getFormattedAmount
261262
/**
262263
* Returns a string representation of the Money object formatted according to
263264
* the <code>locale</code> and includes the currency symbol.

0 commit comments

Comments
 (0)