Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/dialogs/transactionmatcher.cpp
Show All 19 Lines | |||||
20 | #include "transactionmatcher.h" | 20 | #include "transactionmatcher.h" | ||
21 | 21 | | |||
22 | #include <QDate> | 22 | #include <QDate> | ||
23 | 23 | | |||
24 | #include <KLocalizedString> | 24 | #include <KLocalizedString> | ||
25 | 25 | | |||
26 | #include "mymoneyaccount.h" | 26 | #include "mymoneyaccount.h" | ||
27 | #include "mymoneymoney.h" | 27 | #include "mymoneymoney.h" | ||
28 | #include "mymoneysecurity.h" | ||||
28 | #include "mymoneysplit.h" | 29 | #include "mymoneysplit.h" | ||
29 | #include "mymoneytransaction.h" | 30 | #include "mymoneytransaction.h" | ||
30 | #include "mymoneyutils.h" | 31 | #include "mymoneyutils.h" | ||
31 | #include "mymoneyfile.h" | 32 | #include "mymoneyfile.h" | ||
32 | #include "mymoneyexception.h" | 33 | #include "mymoneyexception.h" | ||
33 | #include "mymoneyenums.h" | 34 | #include "mymoneyenums.h" | ||
34 | 35 | | |||
35 | class TransactionMatcherPrivate | 36 | class TransactionMatcherPrivate | ||
Show All 19 Lines | |||||
55 | { | 56 | { | ||
56 | Q_D(TransactionMatcher); | 57 | Q_D(TransactionMatcher); | ||
57 | delete d; | 58 | delete d; | ||
58 | } | 59 | } | ||
59 | 60 | | |||
60 | void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTransaction ti, MyMoneySplit si, bool allowImportedTransactions) | 61 | void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTransaction ti, MyMoneySplit si, bool allowImportedTransactions) | ||
61 | { | 62 | { | ||
62 | Q_D(TransactionMatcher); | 63 | Q_D(TransactionMatcher); | ||
63 | const MyMoneySecurity& sec = MyMoneyFile::instance()->security(d->m_account.currencyId()); | 64 | auto sec = MyMoneyFile::instance()->security(d->m_account.currencyId()); | ||
64 | 65 | | |||
65 | // Now match the transactions. | 66 | // Now match the transactions. | ||
66 | // | 67 | // | ||
67 | // 'Matching' the transactions entails DELETING the end transaction, | 68 | // 'Matching' the transactions entails DELETING the end transaction, | ||
68 | // and MODIFYING the start transaction as needed. | 69 | // and MODIFYING the start transaction as needed. | ||
69 | // | 70 | // | ||
70 | // There are a variety of ways that a transaction can conflict. | 71 | // There are a variety of ways that a transaction can conflict. | ||
71 | // Post date, splits, amount are the ones that seem to matter. | 72 | // Post date, splits, amount are the ones that seem to matter. | ||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |