[Kmymoney-devel] Fwd: Re: A bug in Git master
Chris Tucker
christucker500 at gmail.com
Thu Dec 5 15:19:16 UTC 2013
I have not yet. I moved last week and am still unpacking. I will try to
take a peek this weekend.
On Dec 5, 2013 3:54 AM, "Allan" <agander93 at gmail.com> wrote:
> Hi Chris
>
> Just wondering if you've been able to do any tests for my query, below.
>
> <snip>
>
>> Another bug found when importing from OFX direct connect. The reader
>> trying to create splits cannot find the brokerage account for a split using
>> statementTransactionUnderImport so all the imported transactions are
>> broken. This is likely because the transaction doesn't know the account
>> name, but m_account does. A patch:
>>
>> *** mymoneystatementreader.cpp.orig 2013-11-24 17:27:39.959812598
>> -0800
>> --- mymoneystatementreader.cpp 2013-11-24 20:01:40.339204121 -0800
>> ***************
>> *** 565,570 ****
>> --- 565,573 ----
>> if (brokerageactid.isEmpty()) {
>> brokerageactid = file->nameToAccount(
>> statementTransactionUnderImport.m_strBrokerageAccount);
>> }
>> + if (brokerageactid.isEmpty()) {
>> + brokerageactid = file->nameToAccount(
>> thisaccount.brokerageName());
>> + }
>>
>> // find the security transacted, UNLESS this transaction didn't
>> // involve any security.
>>
>
> --
>>
>> Chris
>>
> ____________________________________________________________________
> Hi Chris
>
> Thanks for this patch, too. I've found here, though, that
> brokerageactid gets over-written a bit later, circa line 1086 in
> mymoneystatementreader.cpp -
>
> // Add the 'account' split if it's needed
> if (! transfervalue.isZero()) {
> // in case the transaction has a reference to the brokerage
> account, we use it
>
>> if (!statementTransactionUnderImport.m_strBrokerageAccount.isEmpty()
>>>> && brokerageactid.isEmpty()) {<<<
>>>>
>>> brokerageactid =
> file->nameToAccount(statementTransactionUnderImpor
> t.m_strBrokerageAccount);
> }
> if (brokerageactid.isEmpty()) {
> brokerageactid =
> file->accountByName(statementTransactionUnderImpor
> t.m_strBrokerageAccount).id();
> }
> // There is no BrokerageAccount so have to nowhere to put this split.
> if (!brokerageactid.isEmpty()) {
>
> and I needed to make the change on the line indicated by >>>....<<<, to
> avoid that happening.
>
> I'm importing via CSV and there is no mapping of OFX source to an
> account for the brokerage/checking account so the user gets asked to
> enter this. If he specifies an existing account, all is well. If,
> however, because he makes a mistake or abbreviates a long name, the
> transfer will go to the investment account's associated brokerage
> account. Generally, personally, I don't use these brokerage accounts
> because for me, they are not real and I would then have to make a manual
> transfer.
>
> It might be interesting to know what happens with your OFX transfers
> if/when they reach this code.
>
> Allan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20131205/a1cb2df7/attachment.html>
More information about the KMyMoney-devel
mailing list