Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneytransactionfilter.cpp
Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Line(s) | |||||
218 | const QList<MyMoneySplit>& MyMoneyTransactionFilter::matchingSplits() const | 218 | const QList<MyMoneySplit>& MyMoneyTransactionFilter::matchingSplits() const | ||
219 | { | 219 | { | ||
220 | return m_matchingSplits; | 220 | return m_matchingSplits; | ||
221 | } | 221 | } | ||
222 | 222 | | |||
223 | bool MyMoneyTransactionFilter::matchText(const MyMoneySplit * const sp) const | 223 | bool MyMoneyTransactionFilter::matchText(const MyMoneySplit * const sp) const | ||
224 | { | 224 | { | ||
225 | // check if the text is contained in one of the fields | 225 | // check if the text is contained in one of the fields | ||
226 | // memo, value, number, payee, tag, account, date | 226 | // memo, value, number, payee, tag, account | ||
227 | if (m_filterSet.singleFilter.textFilter) { | 227 | if (m_filterSet.singleFilter.textFilter) { | ||
228 | MyMoneyFile* file = MyMoneyFile::instance(); | 228 | MyMoneyFile* file = MyMoneyFile::instance(); | ||
229 | const MyMoneyAccount& acc = file->account(sp->accountId()); | 229 | const MyMoneyAccount& acc = file->account(sp->accountId()); | ||
230 | const MyMoneySecurity& sec = file->security(acc.currencyId()); | 230 | const MyMoneySecurity& sec = file->security(acc.currencyId()); | ||
231 | if (sp->memo().contains(m_text) | 231 | if (sp->memo().contains(m_text) | ||
232 | || sp->shares().formatMoney(acc.fraction(sec)).contains(m_text) | 232 | || sp->shares().formatMoney(acc.fraction(sec)).contains(m_text) | ||
233 | || sp->value().formatMoney(acc.fraction(sec)).contains(m_text) | 233 | || sp->value().formatMoney(acc.fraction(sec)).contains(m_text) | ||
234 | || sp->number().contains(m_text) | 234 | || sp->number().contains(m_text) | ||
▲ Show 20 Lines • Show All 672 Lines • Show Last 20 Lines |