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); }
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; }
public static decimal GetNdsPart(decimal value, NdsPercent nds) { int ndsValue = (int)nds; return((value / (100 + ndsValue)) * ndsValue); }