public static bool CompareWithoutTaxBreakdown(VATBreakdown first, VATBreakdown second)
        {
            if (ReferenceEquals(first, second))
            {
                return(true);
            }

            if (first == null || second == null)
            {
                return(false);
            }

            return(PercentCurrencyAmount.Equals(first.Tariff, second.Tariff) &&
                   CurrencyAmount.Equals(first.TaxesBreakdown, second.TaxesBreakdown) &&
                   first.Total == second.Total);
        }
        public static bool Equals(PercentCurrencyAmount first, PercentCurrencyAmount second)
        {
            if (ReferenceEquals(first, second))
            {
                return(true);
            }

            if (first == null || second == null)
            {
                return(false);
            }

            return(CurrencyAmount.Equals(first, second) &&
                   first.Percent.HasValue && second.Percent.HasValue &&
                   Math.Abs(first.Percent.Value - second.Percent.Value) <= 0.001D);
        }