Break splits
Jack
ostroffjh at users.sourceforge.net
Mon Mar 25 21:57:05 GMT 2024
On 2024.03.25 16:07, Louis-Philippe Allard via KMyMoney wrote:
> Hello Mailist,
>
> I have over 100 split transactions that were assigned to a specific
> payee.
>
> THese transactions should not have been split transactions but TWO
> independent transactions because the payees were different. I need
> to segregate the split 2 of each of these transactions and assign
> them to a different payee otherwise it is impossible for me to make a
> report and track tax contributions...
>
> It seems impossible to "break" splits like this:
You are correct, there is no automatic way to to do what you want.
First, I point out your example is not quite correct. All transactions
have at least two splits. We only call it a "split" transaction if
there is more than one split for the category. (That's not quite 100%
true, but close enough for purposes of this discussion.)
>
> Split transaction
>
> Payee A
> |
> ------- Split 1: Category X
> ------- Split 2: Category Y
You are missing the split for the account the money comes from
(assuming these are payments.) The amount of that split would be the
sum of the amounts for the other two splits (in the negative.)
>
> to
>
> Payee A
> |
> ------- Split 1: Category X
This would also need a split for the account, but in the reduced amount
of split 1.
>
> Payee A
> |
> ------- Split 2: Category Y
This would also need a split for the account, but in the reduced amount
of split 2.
>
> Am I missing something?
I can't think of any easy way to do this, but I can think of a not
horribly painful way. I would definitely NOT try to do it by editing
the kmy (or xml) file directly. Assuming all these transactions are in
a single account, and easily identifiable, start by creating a new,
temporary account. In the original account, select all the
transactions and move them to the new account. Export that account as
a csv file. You should be able to write a script/program to modify
that file to separate each split into it's own transaction. Import
that modified file. I would probably import it into a new, empty
account, just to be able to easily confirm the new transactions are how
you want them. If so, you can either redo the import into the actual
account, or select all the transactions in the new account and move
them back to the original account. Not at all trivial, but fairly
straightforward. Also, it's non-destructive until you delete the
original transactions.
Definitely ask more questions if you need any clarification.
> Louis-Philippe Allard
> lp.allard.1 at gmail.com
> Sent using Horde Groupware on GNU/Linux
Jack
More information about the KMyMoney
mailing list