Пример #1
0
 public TaxCode(
     string code,
     ITaxableItem lineItem,
     string taxGroup,
     string currency,
     decimal value,
     decimal limitMin,
     decimal limitMax,
     bool exempt,
     TaxBase taxBase,
     TaxLimitBase limitBase,
     TaxCalculationMode method,
     string taxOnTax,
     string unit,
     decimal collectMin,
     decimal collectMax,
     bool groupRounding,
     TaxCodeProvider provider)
     : this(value, limitMin, limitMax, provider)
 {
     this.Code                 = code;
     this.LineItem             = lineItem;
     this.TaxGroup             = taxGroup;
     this.Currency             = currency;
     this.Exempt               = exempt;
     this.TaxBase              = taxBase;
     this.TaxLimitBase         = limitBase;
     this.TaxCalculationMethod = method;
     this.TaxOnTax             = taxOnTax;
     this.Unit                 = unit;
     this.CollectLimitMax      = collectMax;
     this.CollectLimitMin      = collectMin;
     this.TaxGroupRounding     = groupRounding;
 }
Пример #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public TaxCode(decimal value, decimal taxLimitMin, decimal taxLimitMax, TaxCodeProvider provider)
        {
            this.TaxIntervals = new Collection <TaxInterval>(new List <TaxInterval>(1));
            // should this be removed in favor of intervals?
            this.Value       = value;
            this.TaxLimitMin = taxLimitMin;
            this.TaxLimitMax = taxLimitMax;
            this.Provider    = provider;

            TaxIntervals.Add(new TaxInterval(taxLimitMin, taxLimitMax, value));
        }
 protected override System.Collections.ObjectModel.ReadOnlyCollection <TaxCode> SortCodes(IEnumerable <TaxCode> codes)
 {
     // Return codes to be processed in the following order:
     // Non-India codes
     // India codes ordered by Id
     return(new ReadOnlyCollection <TaxCode>(
                codes.OrderBy(code =>
     {
         TaxCodeIndia codeIndia = code as TaxCodeIndia;
         if (codeIndia != null)
         {
             return codeIndia.Formula.Id + MaxPriorityTaxCode + 1;
         }
         else
         {
             return TaxCodeProvider.TaxCodePriority(code);
         }
     }).ToList()));
 }
Пример #4
0
 public TaxCodeIndia(
     string code,
     ITaxableItem lineItem,
     string taxGroup,
     string currency,
     decimal value,
     decimal limitMin,
     decimal limitMax,
     bool exempt,
     TaxBase taxBase,
     TaxLimitBase limitBase,
     TaxCalculationMode method,
     string taxOnTax,
     string unit,
     decimal collectMin,
     decimal collectMax,
     decimal abatementPercent,
     TaxTypes taxType,
     TaxCodeProvider provider)
     : base(value, limitMin, limitMax, provider)
 {
     this.Code                 = code;
     this.LineItem             = lineItem;
     this.TaxGroup             = taxGroup;
     this.Currency             = currency;
     this.Exempt               = exempt;
     this.TaxBase              = taxBase;
     this.TaxLimitBase         = limitBase;
     this.TaxCalculationMethod = method;
     this.TaxOnTax             = taxOnTax;
     this.Unit                 = unit;
     this.CollectLimitMax      = collectMax;
     this.CollectLimitMin      = collectMin;
     this.AbatementPercent     = abatementPercent;
     this.TaxType              = taxType;
 }