[Kmymoney-devel] A bug in Git master
Chris Tucker
christucker500 at gmail.com
Mon Nov 25 01:49:11 UTC 2013
OFX import doesn't match securities with different names but same symbol. For example, I direct-connect to download OFX and pick up a security:
<SECURITY symbol="VOE" id="922908512" name="VANGUARD INDEX FDS MCAP VL IDXVIP"/>
The security exists already as VOE with name "Vanguard Index FDS Mid-Cap Value Index (VOE)".
mymoneystatementreader.cpp finds the existing security by ticker but the transaction import fails to find the security by name. The following patch to mymoneystatementreader.cpp solves the problem:
*** mymoneystatementreader.cpp.orig 2013-11-24 17:27:39.959812598 -0800
--- mymoneystatementreader.cpp 2013-11-24 17:27:44.436812841 -0800
***************
*** 630,636 ****
QList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList();
QList<MyMoneySecurity>::ConstIterator it = list.constBegin();
while (it != list.constEnd() && security.id().isEmpty()) {
! if (statementTransactionUnderImport.m_strSecurity.toLower() == (*it).tradingSymbol().toLower()
|| statementTransactionUnderImport.m_strSecurity.toLower() == (*it).name().toLower()) {
security = *it;
}
--- 630,636 ----
QList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList();
QList<MyMoneySecurity>::ConstIterator it = list.constBegin();
while (it != list.constEnd() && security.id().isEmpty()) {
! if (statementTransactionUnderImport.m_strSymbol.toLower() == (*it).tradingSymbol().toLower()
|| statementTransactionUnderImport.m_strSecurity.toLower() == (*it).name().toLower()) {
security = *it;
}
--
Chris
More information about the KMyMoney-devel
mailing list