Bug 241322 - Automatic sales tax assignment during import
Summary: Automatic sales tax assignment during import
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Ralf Habacker
URL:
Keywords:
: 243671 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-10 18:40 UTC by Thomas Baumgart
Modified: 2013-11-12 12:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.5


Attachments
Add VAT split to file import (7.81 KB, patch)
2013-09-29 12:44 UTC, Ralf Habacker
Details
sample kmymony file (before import) (6.56 KB, application/x-kmymoney)
2013-11-11 18:51 UTC, Ralf Habacker
Details
sample csv file (137 bytes, text/csv)
2013-11-11 18:51 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Baumgart 2010-06-10 18:40:54 UTC
Version:           unspecified (using KDE 4.3.5) 
OS:                Linux

1) Categories are setup in KMyMoney before the import and have assignments to some tax categories
2) Import transactions via File or Online Statement Import
3) For all transactions which are not matched to an existing transaction but assigned to a taxable category and don't have multiple splits in the import source, the necessary split between category and tax category should be done automatically


Reproducible: Didn't try
Comment 1 Thomas Baumgart 2010-08-02 11:28:20 UTC
*** Bug 243671 has been marked as a duplicate of this bug. ***
Comment 2 Chris 2011-05-03 02:56:36 UTC
This is a show stopper for me. I don't see it as a wish list. 
Why would it not automatically split on import? 
Isn't it meant to be an automatic split?
Is there some logic to this that I am not aware of?

I have hundreds of transactions to import (moving from another system) its absolutely important that the split is done to save me the many hours of going into it and manually adding each split.

I am happy to tackle the code if I can be pointed to the correct spot. up until now I haven't ventured into the codebase but am happy to see if I can work up a patch.

DC
Comment 3 Thomas Baumgart 2011-05-03 08:51:21 UTC
Currently, the logic is only available to the UI parts of the program and not to the import logic.

OK, I try to give you those pointers:

- the logic to process the transaction should be located in MyMoneyStatementReader::processTransactionEntry() which can be found in kmymoney/converter/mymoneystatementreader.cpp

- the logic which does the tax calculation is currently part of the transaction editor at StdTransactionEditor::updateVAT(), StdTransactionEditor::addVatSplit() and StdTransactionEditor::removeVatSplit(). These methods can be found in kmymoney/dialog/transactioneditor.cpp. The latter is probably of no use for this use-case. This logic works partially on widgets so it must be changed. Maybe, we can refactor the whole logic so that both parts (UI and statement reader) can share parts of the logic. Please feel free to ask questions on kmymoney-devel@kde.org

In case you want to discuss a (working) patch, please use https://reviewboard.kde.org/ and attach it to the kmymoney group.

Hope that helps.
Comment 4 Cristian Oneț 2011-05-03 08:59:52 UTC
(In reply to comment #3)
> In case you want to discuss a (working) patch, please use
> https://reviewboard.kde.org/ and attach it to the kmymoney group.

I think since the move of some parts of KDE to git the review board URL is https://svn.reviewboard.kde.org
Comment 5 Ralf Habacker 2013-09-29 12:44:11 UTC
Created attachment 82539 [details]
Add VAT split to file import
Comment 6 Ralf Habacker 2013-11-11 18:51:19 UTC
Created attachment 83499 [details]
sample kmymony file (before import)
Comment 7 Ralf Habacker 2013-11-11 18:51:46 UTC
Created attachment 83500 [details]
sample csv file
Comment 8 Ralf Habacker 2013-11-11 19:00:07 UTC
Comment on attachment 82539 [details]
Add VAT split to file import

Patch moved to reviewboard https://git.reviewboard.kde.org/r/113011/