public string NameOf(VoucherDetail detail) { m_CashQuery ??= CashAccounts.Select(sa => ParsingF.PureDetailQuery(sa.Query, new() { User = User, Today = DateTime.UtcNow.Date })).ToList(); var id = m_CashQuery.FindIndex(detail.IsMatch); return(CashAccount.NameOf(detail, id < 0 ? null : CashAccounts[id])); }
public bool IsNonCash(VoucherDetail detail) { m_CashQuery ??= CashAccounts.Select(sa => ParsingF.PureDetailQuery(sa.Query, new() { User = User, Today = DateTime.UtcNow.Date })).ToList(); return(detail.User == User && !m_CashQuery.Any(detail.IsMatch)); }