Add support for saving and loading tax account mappings to and from a template file
ClosedPublic

Authored by habacker on Nov 7 2018, 9:25 AM.

Details

Summary

A tax account mapping is stored in an xml tag of type 'flag' with
the attribute name='VatAccount'. The attribute 'value' contains a
reference to the corresponding tax account, which contains the
reference in the attribute 'id'.

When importing a template file with a tax account assignment, the
reference is first stored in a temporary key/value pair with the
name 'UnresolvedVatAccount' of the account concerned and after
completion of the load is stored in the key/value pair 'VatAccount'
based on the ID of the tax account now available.

Test Plan

Diff Detail

Repository
R261 KMyMoney
Branch
5.0
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4661
Build 4679: arc lint + arc unit
habacker requested review of this revision.Nov 7 2018, 9:25 AM
habacker created this revision.
habacker retitled this revision from Export account attribute 'VatRate' into a template file and read out again when importing to Add support for saving and loading tax account mappings to and from a template file.Nov 7 2018, 9:27 AM
habacker edited the summary of this revision. (Show Details)
habacker updated this revision to Diff 45015.Nov 7 2018, 9:34 AM
  • updated patch
wojnilowicz resigned from this revision.Nov 11 2018, 6:38 AM

I'm not familiar with that part of code. If you know what you're doing then please go for it.

kmymoney/converter/mymoneytemplate.cpp
380

I would not use foreach here as it will be deprecated soon.

383

I think it's better to do QString::fromLatin1("%1")

This revision was not accepted when it landed; it landed in state Needs Review.Nov 16 2018, 11:07 AM
This revision was automatically updated to reflect the committed changes.
habacker reopened this revision.Nov 16 2018, 11:18 AM
habacker updated this revision to Diff 45581.Nov 16 2018, 11:41 AM
habacker edited the summary of this revision. (Show Details)
habacker edited the test plan for this revision. (Show Details)
  • fixed issues
  • added test plan
tbaumgart accepted this revision.Nov 24 2018, 10:35 AM

Looks OK to me once D16725 is OK.

This revision is now accepted and ready to land.Nov 24 2018, 10:35 AM
This revision was automatically updated to reflect the committed changes.