[Kmymoney-devel] [kmymoney4] [Bug 345259] The date is ignored when matching

allan agander93 at gmail.com
Sun Mar 22 14:00:32 UTC 2015


https://bugs.kde.org/show_bug.cgi?id=345259

allan <agander93 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |4.7.2
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from allan <agander93 at gmail.com> ---
Fix applied as part of BUG:333949

M  +6    -0    kmymoney/dialogs/transactionmatcher.cpp

http://commits.kde.org/kmymoney/7e7a50e39170d03c9fe83ffcbe394d485cefaf52

diff --git a/kmymoney/dialogs/transactionmatcher.cpp
b/kmymoney/dialogs/transactionmatcher.cpp
index f211b5b..d0c7db8 100644
--- a/kmymoney/dialogs/transactionmatcher.cpp
+++ b/kmymoney/dialogs/transactionmatcher.cpp
@@ -21,6 +21,7 @@
 #include <klocale.h>

 #include "mymoneyfile.h"
+#include "kmymoneyglobalsettings.h"

 TransactionMatcher::TransactionMatcher(const MyMoneyAccount& acc) :
     m_account(acc)
@@ -73,6 +74,11 @@ void TransactionMatcher::match(MyMoneyTransaction tm,
MyMoneySplit sm, MyMoneyTr
     throw MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values
(%2,%3)", m_account.name(), MyMoneyUtils::formatMoney(sm.shares(), m_account,
sec), MyMoneyUtils::formatMoney(si.shares(), m_account, sec)));
   }

+  // check that dates are within user's setting
+  if (abs(tm.postDate().toJulianDay() - ti.postDate().toJulianDay()) >
KMyMoneyGlobalSettings::matchInterval()) {
+    throw MYMONEYEXCEPTION(i18n("The transaction post-dates are not within the
'matchInterval' setting."));
+  }
+

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list