Bug 369852 - xea2kmt does not import account flags
Summary: xea2kmt does not import account flags
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.8.0
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-04 07:18 UTC by Ralf Habacker
Modified: 2019-09-02 11:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.8.1,5.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2016-10-04 07:18:46 UTC
gnucash template files from which kmymoney template files are currently generated provide account flags (from https://github.com/Gnucash/gnucash/blob/master/accounts/de_DE/acctchrt_skr03.gnucash-xea) for example: 
   <act:slots>
      <slot>
	<slot:key>placeholder</slot:key>
        <slot:value type="string">true</slot:value>
      </slot>
      <slot>
	<slot:key>tax-related</slot:key>
        <slot:value type="integer">1</slot:value>
      </slot>
</act:slots>

A collected list of keywords follows: 
<slot:key>account-id</slot:key>
<slot:key>bank-code</slot:key>
<slot:key>code</slot:key>
<slot:key>color</slot:key>
<slot:key>country-code</slot:key>
<slot:key>hbci</slot:key>
<slot:key>hidden</slot:key>
<slot:key>last-num</slot:key>
<slot:key>notes</slot:key>
<slot:key>placeholder</slot:key>
<slot:key>reconcile-info</slot:key>
<slot:key>tax-related</slot:key>
<slot:key>tax-US</slot:key>

While some flags may be unrelated, other may be for interest like notes, tax-related, placeholder also for kmymoney.

xea2kmt, which is used to import those templates into kmymoney template file format currently does not import those flags and should be extended to support this. 

KMymoney template file format provides a tag named <flag> to specify account options (https://github.com/KDE/kmymoney/blob/master/kmymoney/templates/kmt.dtd) in the form 

<account type="9" name="account name">
    <flag name="aname">avalue></flag>
</account>

or 

<account type="9" name="account name">
    <flag name="aname" />
</account>

which could be used to map gnucash flags to kmymoney flags. 


Reproducible: Always

Steps to Reproduce:
1.  run xea2kmt on the mentioned gnucash account template file


Actual Results:  
The KMymoney template file does not include any of the mentioned flags.


Expected Results:  
The KMymoney template file should include the mentioned flags.

KMymoney source code shows that currently the 'Tax' flag is import from an account template, but is not specified in any account template.
Comment 1 Ralf Habacker 2016-10-06 07:10:33 UTC
Git commit 3495037aef2d98af340e905943a95b02612816ff by Ralf Habacker.
Committed on 06/10/2016 at 07:07.
Pushed by habacker into branch '4.8'.

xea2kmt: Parse and export gnucash account flag 'tax-related'.

KMymoney supports the account flag 'Tax' indicating that the related
account is tax related.

When enabled with --with-tax-related on xea2kmt command line the
gnucash related xml tag 'tax-related' will be exported to the kmt file
as <flag name="Tax" value="1"/> as child of he related account.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>

M  +63   -7    tools/xea2kmt.cpp

http://commits.kde.org/kmymoney/3495037aef2d98af340e905943a95b02612816ff