Beispiel #1
0
        private static NdsPercent GetAppSettingByKeyAsNdsPercent(string key, NdsPercent defaultValue)
        {
            var stringValue = GetAppSettingByKey(key, ((int)defaultValue).ToString());

            if (!Enum.TryParse <NdsPercent>(stringValue, out NdsPercent result))
            {
                result = defaultValue;
            }

            return(result);
        }
Beispiel #2
0
 public Check(string descriptorId, Dictionary <string, string> parameters, decimal cost,
              decimal totalCost, double quantity, string email, NdsPercent ndsPercent)
 {
     Descriptor = GetCheckDescriptorById(descriptorId);
     Parameters = parameters;
     Cost       = cost;
     TotalCost  = totalCost;
     Quantity   = quantity;
     Email      = email;
     NdsPercent = ndsPercent;
 }
Beispiel #3
0
        public static decimal GetNdsPart(decimal value, NdsPercent nds)
        {
            int ndsValue = (int)nds;

            return((value / (100 + ndsValue)) * ndsValue);
        }