Fix sell fees equation
This commit is contained in:
parent
1efbaea351
commit
cdff187910
@ -301,11 +301,11 @@ public class SellFragment extends CustomRecordFragment {
|
|||||||
{
|
{
|
||||||
if(isAmountLastUpdated)
|
if(isAmountLastUpdated)
|
||||||
{
|
{
|
||||||
totalValueEditText.setText(String.valueOf(totalValue + fees));
|
totalValueEditText.setText(String.valueOf(totalValue - fees));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
amoutEditText.setText(String.valueOf(amount - (fees / purchasePrice)));
|
amoutEditText.setText(String.valueOf(amount + (fees / purchasePrice)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -314,22 +314,22 @@ public class SellFragment extends CustomRecordFragment {
|
|||||||
{
|
{
|
||||||
if(isAmountLastUpdated)
|
if(isAmountLastUpdated)
|
||||||
{
|
{
|
||||||
totalValueEditText.setText(String.valueOf(totalValue + (fees * purchasePrice)));
|
totalValueEditText.setText(String.valueOf(totalValue - (fees * purchasePrice)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
amoutEditText.setText(String.valueOf((totalValue / purchasePrice) - fees));
|
amoutEditText.setText(String.valueOf((totalValue / purchasePrice) + fees));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(isAmountLastUpdated)
|
if(isAmountLastUpdated)
|
||||||
{
|
{
|
||||||
totalValueEditText.setText(String.valueOf(totalValue + fees));
|
totalValueEditText.setText(String.valueOf(totalValue - fees));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
amoutEditText.setText(String.valueOf((totalValue - fees) / purchasePrice));
|
amoutEditText.setText(String.valueOf((totalValue + fees) / purchasePrice));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user