Fix balance not being displayed properly for some fee format

This commit is contained in:
Tanguy Herbron 2018-08-16 02:50:40 +02:00
parent f32270cc4b
commit 727e803b8b

View File

@ -543,10 +543,18 @@ public class DatabaseManager extends SQLiteOpenHelper{
List<Currency> currencyList = new ArrayList<>();
while(resultatList.moveToNext())
{
if(resultatList.getString(resultatList.getColumnIndex(KEY_TRANSACTION_SYMBOL)).equals(resultatList.getString(resultatList.getColumnIndex(KEY_TRANSACTION_FEE_CURRENCY))))
{
currencyList.add(new Currency(resultatList.getString(resultatList.getColumnIndex(KEY_TRANSACTION_SYMBOL))
, resultatList.getDouble(resultatList.getColumnIndex(KEY_TRANSACTION_AMOUNT)) - resultatList.getDouble(resultatList.getColumnIndex(KEY_TRANSACTION_FEES))));
}
else
{
currencyList.add(new Currency(resultatList.getString(resultatList.getColumnIndex(KEY_TRANSACTION_SYMBOL))
, resultatList.getDouble(resultatList.getColumnIndex(KEY_TRANSACTION_AMOUNT))));
}
}
resultatList.close();