public static AccountAllocation AddCashInBankEntry(this List <AccountAllocation> list, BankAccountDTO bankAccount, decimal amount) { var alloc = AccountAllocation.DefaultCashInBank(bankAccount, amount); list.Insert(0, alloc); return(alloc); }
private FundRequestDTO ValidSampleDTO() => new FundRequestDTO { Id = 0, SerialNum = 123, BankAccountId = 456, Payee = "Mr. Payee Dude", Purpose = "To be Purposeful", DateOffset = DateTime.Now.DaysSinceMin(), Amount = 789, Allocations = new List <AccountAllocation> { AccountAllocation.DefaultCashInBank (new BankAccountDTO(), 789), new AccountAllocation { Account = new GLAccountDTO { Id = 456, Name = "a GL Account" }, SubAmount = -789 }, } };