This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Setting up splits on multiple transactions

Tags: None
(comma "," separated)
stevea
Registered Member
Posts
21
Karma
0
I have maybe 20 transactions each with same payee but a different amount.

Each txn has to be split in the same proportion: 0.28:0.78
Is there any way to do this other than setting up each split one by one?

I guess this has probably been asked before
Thanks!
User avatar
Hei Ku
Registered Member
Posts
784
Karma
3
OS
Unfortunately, there is no way to set it up to do it automatically from within KMyMoney.

You could do it in another app and import the transactions via csv


Hei Ku, proud to be a member of the KMyMoney Development Team since January-2008
stevea
Registered Member
Posts
21
Karma
0
OK, thanks Hei Ku

I have written a small autohotkey script which does the job very well.
User avatar
izento
Registered Member
Posts
29
Karma
0
OS
@Steve: Could you please share the script.

I sometimes have similar work to do manually. :(


izento, proud to be a member of the KMyMoney forum since 2009
Better make things right than make things twice.
stevea
Registered Member
Posts
21
Karma
0
Hi Izento - here it is - saves a lot of time!

Edit the script to contain the names of the two categories and the factor of the split.
In KMM set the shortcut for Edit Scripts to Shift+S (or whatever you like)
Could be extended to work for splits of more than just two categories.
Hope it works!


Code: Select all
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
;
;For use with KMyMoney to split a transaction across 2 categories by a fixed percentage
;run script with alt f

#NoTrayIcon

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#SingleInstance force

!f::
x = 300 ;length of sleep required for KMM to process the input stream
send +s ;in configure shortcuts, set Edit Splits to Shift+S
MouseClick, Left, 70, 70, 2
send Electricty ; enter first category of the split   
send {Tab}
send {Tab}
send {Right} ; navigate to amount field
send {numpadmult} ; multiply operator
sleep x
send {.} ;enter the factor of the split eg 0.26
sleep x
send 2
sleep x
send 6
sleep x
send {Enter} ;or use MouseClick, Left, 335, 225
sleep x
send {Enter}
MouseClick, Left, 70, 94, 2 ;open second category field
send ElectricityP ; enter second category of the split
send {enter}
sleep x
send {enter}
sleep x
send {enter} ;or use MouseClick, Left, 600, 50
stevea
Registered Member
Posts
21
Karma
0
ps, could also be done on linux systems with xdotool orautokey ...


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]