static public bool IsAllowedState(string state)
        {
            ITaxRateRepository repository = TaxRateRepositoryFactory.GetTaxRateRepository();
            var allTaxRates = repository.GetTaxRates();

            return(allTaxRates.Any(t => t.State == state));
        }
 public StripeController(
     GlobalSettings globalSettings,
     IOptions <BillingSettings> billingSettings,
     IWebHostEnvironment hostingEnvironment,
     IOrganizationService organizationService,
     IOrganizationRepository organizationRepository,
     ITransactionRepository transactionRepository,
     IUserService userService,
     IAppleIapService appleIapService,
     IMailService mailService,
     IReferenceEventService referenceEventService,
     ILogger <StripeController> logger,
     ITaxRateRepository taxRateRepository)
 {
     _billingSettings        = billingSettings?.Value;
     _hostingEnvironment     = hostingEnvironment;
     _organizationService    = organizationService;
     _organizationRepository = organizationRepository;
     _transactionRepository  = transactionRepository;
     _userService            = userService;
     _appleIapService        = appleIapService;
     _mailService            = mailService;
     _referenceEventService  = referenceEventService;
     _taxRateRepository      = taxRateRepository;
     _logger    = logger;
     _btGateway = new Braintree.BraintreeGateway
     {
         Environment = globalSettings.Braintree.Production ?
                       Braintree.Environment.PRODUCTION : Braintree.Environment.SANDBOX,
         MerchantId = globalSettings.Braintree.MerchantId,
         PublicKey  = globalSettings.Braintree.PublicKey,
         PrivateKey = globalSettings.Braintree.PrivateKey
     };
 }
        public CashJournalEntryViewModel(
            ILifetimeScope scope,
            IRegionManager regionManager,
            IEventAggregator eventAggregator,
            ICashJournalRepository cashJournalRepository,
            ICashJournalEntryRepository repository,
            ITaxRateRepository taxRateRepository,
            CashJournalViewModel parent)
            : base(scope, eventAggregator, regionManager)
        {
            _cashJournalRepository      = cashJournalRepository;
            _cashJournalEntryRepository = repository;
            _taxRateRepository          = taxRateRepository;
            Parent = parent;

            Parent.PropertyChanged += (sender, args) => {
                if (args.PropertyName == nameof(Parent.IsActive))
                {
                    RaisePropertyChanged(nameof(IsAnyActive));
                }
            };

            PropertyChanged += (sender, args) => {
                if (args.PropertyName == nameof(IsActive))
                {
                    RaisePropertyChanged(nameof(IsAnyActive));
                }
            };

            RefreshAvailableTaxRates();
            RefreshEnabledBindings();
        }
Beispiel #4
0
 public TaxController(
     ITaxRepository _Tax
     , IUserRepository _user
     , ITaxIncomePersonDetailRepository _taxpd
     , ITaxIncomePersonRepository _taxp
     , IStaffsRepository _staff
     , ISalaryTableDetailReportRepository _salaryReport
     , ICategoryRepository _cate
     , IThuNhapChiuThueRepository _thunhap
     , IGiamTruThueTNCNRepository _giamtru
     , ITaxRateRepository _taxrate
     , IStaffFamilyRepository _staff_f
     )
 {
     TaxRepository  = _Tax;
     userRepository = _user;
     taxIncomePersonDetailRepository = _taxpd;
     taxIncomePersonRepository       = _taxp;
     staffsRepository = _staff;
     salaryTableDetailReportRepository = _salaryReport;
     categoryRepository        = _cate;
     thuNhapChiuThueRepository = _thunhap;
     giamTruThueTNCNRepository = _giamtru;
     taxRateRepository         = _taxrate;
     staffFamilyRepository     = _staff_f;
 }
        static public TaxRate GetTaxRateFor(string state)
        {
            ITaxRateRepository repository = TaxRateRepositoryFactory.GetTaxRateRepository();
            var allTaxRates = repository.GetTaxRates();

            return(allTaxRates.FirstOrDefault(t => t.State == state));
        }
        public TaxRateViewModel(ILifetimeScope scope, IEventAggregator eventAggregator, ITaxRateRepository repository, IRegionManager regionManager)
            : base(scope, eventAggregator, regionManager)
        {
            _taxRateRepository = repository;
            _taxRates          = new ObservableCollection <TaxRate>();

            RefreshTaxRates();
        }
Beispiel #7
0
 public TaxRateController(
     ITaxRateRepository _TaxRate
     , IUserRepository _user
     )
 {
     TaxRateRepository = _TaxRate;
     userRepository    = _user;
 }
Beispiel #8
0
 public CashJournalViewModel(
     ILifetimeScope scope, IEventAggregator eventAggregator, IRegionManager regionManager,
     ICashJournalRepository cashJournalRepository,
     ICashJournalEntryRepository cashJournalEntryRepository,
     ITaxRateRepository taxRateRepository)
     : base(scope, eventAggregator, regionManager)
 {
     _cashJournalRepository      = cashJournalRepository;
     _cashJournalEntryRepository = cashJournalEntryRepository;
 }
 public ScheduleTaxRateController(IFileProcessService fileProcessService,
                                  ITaxAddService taxAddService,
                                  ITaxRateService taxRateService,
                                  ITaxRateRepository taxRateRepository)
 {
     _fileProcessService = fileProcessService;
     _taxAddService      = taxAddService;
     _taxRateService     = taxRateService;
     _taxRateRepository  = taxRateRepository;
 }
Beispiel #10
0
        public StripePaymentServiceTests()
        {
            _transactionRepository = Substitute.For <ITransactionRepository>();
            _userRepository        = Substitute.For <IUserRepository>();
            _appleIapService       = Substitute.For <IAppleIapService>();
            _globalSettings        = new GlobalSettings();
            _logger            = Substitute.For <ILogger <StripePaymentService> >();
            _taxRateRepository = Substitute.For <ITaxRateRepository>();

            _sut = new StripePaymentService(
                _transactionRepository,
                _userRepository,
                _globalSettings,
                _appleIapService,
                _logger,
                _taxRateRepository
                );
        }
Beispiel #11
0
 public ToolsController(
     GlobalSettings globalSettings,
     IOrganizationRepository organizationRepository,
     IOrganizationService organizationService,
     IUserService userService,
     ITransactionRepository transactionRepository,
     IInstallationRepository installationRepository,
     IOrganizationUserRepository organizationUserRepository,
     ITaxRateRepository taxRateRepository,
     IPaymentService paymentService)
 {
     _globalSettings             = globalSettings;
     _organizationRepository     = organizationRepository;
     _organizationService        = organizationService;
     _userService                = userService;
     _transactionRepository      = transactionRepository;
     _installationRepository     = installationRepository;
     _organizationUserRepository = organizationUserRepository;
     _taxRateRepository          = taxRateRepository;
     _paymentService             = paymentService;
 }
Beispiel #12
0
 public PlansController(ITaxRateRepository taxRateRepository)
 {
     _taxRateRepository = taxRateRepository;
 }
 public TaxRateManager(ITaxRateRepository taxRateRepository)
 {
     _myTaxRateRepository = taxRateRepository;
 }
Beispiel #14
0
 public TaxRateService(ITaxRateRepository taxRateRepository)
 {
     _taxRateRepository = taxRateRepository;
 }
Beispiel #15
0
 public FileProcessService(ITaxRateRepository taxRateRepository)
 {
     _taxRateRepository = taxRateRepository;
 }
 public TaxRateManager(ITaxRateRepository taxRateRepository)
 {
     _myTaxRateRepository = taxRateRepository;
 }
        public static List <TaxRate> GetTaxRates()
        {
            ITaxRateRepository repository = TaxRateRepositoryFactory.GetTaxRateRepository();

            return(repository.GetTaxRates());
        }
Beispiel #18
0
 public CalculateMedicareTax(ITaxRateRepository repository)
 {
     _repository = repository;
 }