Example #1
0
        private decimal RoundAmount(decimal amt, string currencyCode = null)
        {
            var curyID = currencyCode == GafRecordBuilderBase.ForeignCurrencyCodeForBaseCuryID || currencyCode == null
                                                        ? _gafRepository.GetCompany().BaseCuryID
                                                        : currencyCode;

            var curyList = _gafRepository.GetCurrencyList(curyID);

            return(Math.Round(amt, (int)curyList.DecimalPlaces, MidpointRounding.AwayFromZero));
        }