Skip to content

Commit

Permalink
codinguser#876 - Enhance Code Quality
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanGarf committed Mar 6, 2020
1 parent 52f59ef commit b31daad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,18 @@ private Money calculateSplitBalance(List<String> accountUIDList,
+ " = 0";

if (startTimestamp != -1 && endTimestamp != -1) {

selection += " AND " + TransactionEntry.TABLE_NAME + "_" + TransactionEntry.COLUMN_TIMESTAMP + " BETWEEN ? AND ? ";
selectionArgs = new String[]{String.valueOf(startTimestamp),
String.valueOf(endTimestamp)};

} else if (startTimestamp == -1 && endTimestamp != -1) {

selection += " AND " + TransactionEntry.TABLE_NAME + "_" + TransactionEntry.COLUMN_TIMESTAMP + " <= ?";
selectionArgs = new String[]{String.valueOf(endTimestamp)};

} else if (startTimestamp != -1/* && endTimestamp == -1*/) {

selection += " AND " + TransactionEntry.TABLE_NAME + "_" + TransactionEntry.COLUMN_TIMESTAMP + " >= ?";
selectionArgs = new String[]{String.valueOf(startTimestamp)};
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/org/gnucash/android/model/Money.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ public double asDouble(){
public String asString(){
return toPlainString();
}


// TODO TW C 2020-03-06 : A factoriser avec Split.getFormattedAmount
/**
* Returns a string representation of the Money object formatted according to
* the <code>locale</code> and includes the currency symbol.
Expand Down

0 comments on commit b31daad

Please sign in to comment.