public static async Task ClearTransactions()
        {
            IEnumerable <FinancialTransaction> transactions = TransactionRepository.GetUnclearedTransactions();

            foreach (FinancialTransaction transaction in transactions)
            {
                try {
                    await AccountLogic.AddTransactionAmount(transaction);
                }
                catch (Exception ex) {
                    InsightHelper.Report(ex);
                }
            }
        }
        public static async Task UpdateTransaction(FinancialTransaction transaction)
        {
            CheckIfRecurringWasRemoved(transaction);
            await AccountLogic.AddTransactionAmount(transaction);

            TransactionRepository.Save(transaction);

            RecurringTransaction recurringTransaction =
                RecurringTransactionLogic.GetRecurringFromFinancialTransaction(transaction);

            await
            CheckForRecurringTransaction(transaction,
                                         () => RecurringTransactionRepository.Save(recurringTransaction));

            AccountLogic.RefreshRelatedTransactions();
        }
        public static async Task SaveTransaction(FinancialTransaction transaction, bool refreshRelatedList = false,
                                                 bool skipRecurring = false)
        {
            if (transaction.IsRecurring && !skipRecurring)
            {
                RecurringTransaction recurringTransaction =
                    RecurringTransactionLogic.GetRecurringFromFinancialTransaction(transaction);
                RecurringTransactionRepository.Save(recurringTransaction);
                TransactionRepository.Save(transaction);
                transaction.RecurringTransaction = recurringTransaction;
            }

            TransactionRepository.Save(transaction);

            if (refreshRelatedList)
            {
                ServiceLocator.Current.GetInstance <TransactionListViewModel>()
                .SetRelatedTransactions(AccountRepository.Selected);
            }
            await AccountLogic.AddTransactionAmount(transaction);
        }