Cosmetic fix

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
public virtual decimal ConvertCurrency(decimal amount, Currency sourceCurrencyCode, Currency targetCurrencyCode)

Remove the double checking  - sourceCurrencyCode.Id == targetCurrencyCode.Id

            if (sourceCurrencyCode.Id == targetCurrencyCode.Id)
                return result;

            if (result == decimal.Zero || sourceCurrencyCode.Id == targetCurrencyCode.Id)
                return result;


Remove the first condition
  if (sourceCurrencyCode.Id == targetCurrencyCode.Id)
                return result;
and leave the second line
            if (result == decimal.Zero || sourceCurrencyCode.Id == targetCurrencyCode.Id)
                return result;
4 years ago
Hi foxnetsoft. Thank you for help. I implemented necessary changes, please see this commit for more details.

foxnetsoft wrote:
public virtual decimal ConvertCurrency(decimal amount, Currency sourceCurrencyCode, Currency targetCurrencyCode)

Remove the double checking  - sourceCurrencyCode.Id == targetCurrencyCode.Id

            if (sourceCurrencyCode.Id == targetCurrencyCode.Id)
                return result;

            if (result == decimal.Zero || sourceCurrencyCode.Id == targetCurrencyCode.Id)
                return result;


Remove the first condition
  if (sourceCurrencyCode.Id == targetCurrencyCode.Id)
                return result;
and leave the second line
            if (result == decimal.Zero || sourceCurrencyCode.Id == targetCurrencyCode.Id)
                return result;
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.