Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 3
0
 public static bool Equals(VatTax first, VatTax second)
 {
     return(PercentCurrencyAmount.Equals(first, second) &&
            first.TaxCode == second.TaxCode);
 }
        protected void CopyTo(PercentCurrencyAmount other)
        {
            base.CopyTo(other);

            other.Percent = Percent;
        }