[Kmymoney-devel] Securities dialog

Alvaro Soliverez asoliverez at gmail.com
Thu Jun 24 14:21:17 CEST 2010


On Thu, Jun 24, 2010 at 6:44 AM, allan <aganderson at ukonline.co.uk> wrote:
> On 24/06/10 00:54, Alvaro Soliverez wrote:
>> On Wed, Jun 23, 2010 at 7:57 PM, allan <aganderson at ukonline.co.uk> wrote:
>>> On 23/06/10 17:37, allan wrote:
>>>> On 23/06/10 17:13, Alvaro Soliverez wrote:
>>>>> On Wed, Jun 23, 2010 at 9:04 AM, allan <aganderson at ukonline.co.uk> wrote:
>>>>>> On 23/06/10 03:59, Alvaro Soliverez wrote:
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Another 'Sorry,  I'm back', but this time with just a query.
>>>>>>
>>>>>> My Accounts List includes the following entries : -
>>>>>> Fund A, Fund A (ISA07/08), Fund A (ISA08/09), and Fund A (ISA09/10).
>>>>>> The Investments view Equities tab shows those same accounts.  The
>>>>>> Securities tab shows just a single, common security.  All that is fine
>>>>>> and how I set it up.
>>>>>>
>>>>>> Looking now at the Prices Editor, that security appears on one line, and
>>>>>> showing : -
>>>>>> Fund A, Fund A , Fund A (ISA08/09), and Fund A (ISA09/10).
>>>>>> So, Fund A (ISA07/08) seems to be missing the suffix part of its name,
>>>>>> or at least that is how it appears.
>>>>>>
>>>>>> Another account shows another similar anomaly, whereas a third set up in
>>>>>> the same way, does not.
>>>>>>
>>>>>> Why might that be (probably down to me!), but more importantly, how do I
>>>>>> sort it?
>>>>>>
>>>>>
>>>>> The code only retrieves the name for the account. There is no
>>>>> additional processing other than adding a ", " if there's more than
>>>>> one account for a price. Are you sure those are the account name and
>>>>> not the trading symbols?
>>>>>
>>>>> Regards,
>>>>> Alvaro
>>>>
>>>>
>>>> No, there is just the one symbol, '8AI', that all the investment
>>>> accounts use.   The names I quoted from the Prices Editor, are all in
>>>> the one Stock Name column.
>>>>
>>>> I was sort of expecting that name to correspond to the name that appears
>>>> in both the Securities tab and the Equities tab, so I don't quite
>>>> understand from where the Prices Editor can be picking them up.  The
>>>> names now are the ones provided by specifying the single common symbol
>>>> when creating the accounts.
>>>>
>>>> If there's not some subtle difference in how the Prices Editor extracts
>>>> the stock name, compared to how the tabs both do it, presumably from the
>>>> same table, then I'm a bit stumped.
>>>>
>>>> Either way, though, it looks like there are still some loose ends
>>>> lurking in my file.
>>>>
>>>> Allan
>>>
>>> Hopefully, this is now all put to bed.  All four funds use the same
>>> symbol, but for each of these there is a record with a pointer to the
>>> account id and to the parent account id.  Also, it includes the security
>>> name.  These names didn't all tally, and as the Prices Editor,
>>> presumably, has to scan the whole table, it finds all four names,
>>> including their differences.  The Securities tab, perhaps, just looks at
>>> each id in the list and reports the symbol, but doesn't need to look for
>>> duplicates.
>>>
>>> All now looks good, after the editing of three records in the xml file.
>>>
>>
>> Hello,
>> Just to be clear, this is the code used to retrieve the stock names
>> for each price:
>>
>> //load the currencies for investments, which we'll need later
>>   QList<MyMoneyAccount> accList;
>>   file->accountList(accList);
>>   QList<MyMoneyAccount>::const_iterator acc_it;
>>   for (acc_it = accList.constBegin(); acc_it != accList.constEnd(); ++acc_it) {
>>     if ((*acc_it).isInvest()) {
>>       if (m_stockNameMap.contains((*acc_it).currencyId())) {
>>         m_stockNameMap[(*acc_it).currencyId()] =
>> QString(m_stockNameMap.value((*acc_it).currencyId()) + ", " +
>> (*acc_it).name());
>>       } else {
>>         m_stockNameMap[(*acc_it).currencyId()] = (*acc_it).name();
>>       }
>>     }
>>   }
>>
>> m_stockName is a QMap<QString, QString> which keeps the currencyId
>> which will later be matched with the "from" component in the price
>> list. The value is the string which will be displayed on the stock
>> name column.
>>
>> As you can see, the code is pretty straightforward and there is no
>> further transformation of the stock names.
>>
>>
>> Regards,
>> Alvaro
>
>
> Hi Alvaro
>
> I really didn't think the unexpected names were being manufactured - I
> knew they had to be in the file.  What I didn't understand at first
> though was why the Prices Editor and the Securities tab were showing
> those differences.
>
> Once I examined the file, though, I could see that the Prices Editor
> would have to find and display the problem ones.  The Securities tab
> though only needs to find one of my four accounts with that id, and show
> its name.  It wouldn't be expecting what should have been identical
> names, to be in fact not identical.  It wouldn't therefore find the
> later erroneous ones.
>
> I'm happy and relaxed now!
>
> Thanks for your trouble.

Hello Allan,
Could you explain a little bit more what the problem was?
Do you think we could add this to the consistency checks?

Regards,
Alvaro


More information about the KMyMoney-devel mailing list