public IEnumerable <APTran> GetTransactions(APRegister payment) { Transactions = TransactionRetriever.GetTransactions().ToList(); return(Transactions.IsEmpty() || ShouldStopForOutstandingLienWaivers(payment) ? Enumerable.Empty <APTran>() : Transactions.Where(transaction => IsApplicable(transaction, payment))); }
public IEnumerable <JointPayee> GetValidJointPayees() { Transactions = TransactionRetriever.GetTransactions().ToList(); var extension = Graph.GetExtension <ApPaymentEntryExt>(); var insertedJointPayeePayments = extension.JointPayeePayments.Cache.Inserted.RowCast <JointPayeePayment>(); var jointPayeePayments = extension.JointPayeePayments.Select().FirstTableItems .Concat(insertedJointPayeePayments).ToList(); var jointPayeePaymentsToPay = jointPayeePayments.Where(jpp => jpp.JointAmountToPay > 0); var jointPayeesToPay = JointPayeeDataProvider.GetJointPayees(Graph, jointPayeePaymentsToPay); return(jointPayeesToPay.Where(IsValidJointPayee)); }
public TransactionRetrieverTests() { this.supportedId = 1; this.defaultRetriever = Substitute.For <IExodusTransactionRetriever>(); this.defaultRetriever.SupportedId.Returns(this.supportedId); var transactionRetrievers = new Collection <IExodusTransactionRetriever> { this.defaultRetriever, }; this.subject = new TransactionRetriever(transactionRetrievers); }