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

How to change the future scheduled payment dates for a loan?

Tags: None
(comma "," separated)
markhm
Registered Member
Posts
85
Karma
0
OS
I want to modify the future payment dates for a mortgage loan.
When I try any of the edit account or edit payment options, I cannot change the future scheduled payment dates.
Changing the dates does not appear anywhere as an option.
How can the date be changed?
(I am using the latest stable appimage for Linux.)
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Sorry to say that, but this function is not (yet) implemented. What do you need to change? Maybe we can tweak your data file directly to solve the problem.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
markhm
Registered Member
Posts
85
Karma
0
OS
Thanks for your reply, ipwizard.

I originally created the load with scheduled dates of monthly on the first of the month. That is when the lender posted the payments.
I realized that the scheduled dates should actually be the last calendar day of the preceding month when the payment is actually made.
So I need to adjust the scheduled date to be 1 day earlier.

Any help you can give to tweak the file to achieve this result would be appreciated.

Mark
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
I'll give it a try. First of all: keep a backup of your file in case anything goes wrong :-)

You did not mention which file format you use, so I assume nothing special, which results in a gzipped file which I call xxx.kmy for simplicity here. Replace this with your own filename. I also assume that the current working directory is where your file is stored. See the manual for details on file formats.

  • Convert file to uncompressed XML
    Code: Select all
    zcat xxx.kmy > xxx.xml
  • Figure out the internal ID of the schedule in question
    Replace the word pattern in the following with a (unique) part of the name of your schedule
    Code: Select all
    grep SCHEDULED_TX xxx.xml | grep pattern
    This will look like the following (I used Erstbeitr as the pattern)
    % grep SCHEDULED_TX xxx.xml | grep "Erstbeitr"
    <SCHEDULED_TX id="SCH000079" fixed="0" endDate="" startDate="2019-05-02" type="2" autoEnter="0" name="Einzug Erstbeiträge" paymentType="2" lastDayInMonth="0" weekendOption="1" occurenceMultiplier="1" lastPayment="2019-05-02" occurence="32">

    The id (in my example here SCH000079, yours is different) is what we need in the next steps. In case more than one line is printed, you only need to remember the id of the one you want to modify. Note: the order of the attributes may differ for you but that is not important.
  • Open the xxx.xml file in a text editor (vi/emacs/kate/...)
  • Search for the id of the schedule (a first match should be with the account data, but keep going until you reach the SCHEDULED_TX line). The lines following look similar to this (Your details will differ here, but I am sure you get the idea):
    <SCHEDULED_TX id="SCH000079" fixed="0" endDate="" startDate="2019-05-02" type="2" autoEnter="0" name="Einzug Erstbeiträge" paymentType="2" lastDayInMonth="0" weekendOption="1" occurenceMultiplier="1" lastPayment="2021-01-02" occurence="32">
    <PAYMENTS/>
    <TRANSACTION entrydate="" id="" memo="Some memo" commodity="EUR" postdate="2021-02-02">
    <SPLITS>
    <SPLIT reconcileflag="0" account="A000076" id="S0001" action="Withdrawal" memo="" number="" payee="P000011" reconciledate="" shares="-46/1" value="-46/1" price="1/1" bankid=""/>
    <SPLIT reconcileflag="0" account="A000048" id="S0002" action="Withdrawal" memo="" number="" payee="" reconciledate="" shares="46/1" value="46/1" price="1/1" bankid=""/>
    </SPLITS>
    </TRANSACTION>
    </SCHEDULED_TX>
  • Modify the attributes marked red in the above output so that
    • startDate is the first payment date ever
    • lastPayment is the last payment date and
    • postdate is the next payment date
    which in your case means subtract 1 day in each of the settings. Since the last day of the month varies you also want to change the lastDayInMonth="0" to lastDayInMonth="1"
  • Don't change anything else ;)
  • Save the file and quit the editor
  • Make sure you have that backup file and it is readable, since we replace the original in the next step
  • Rename the modified file with the following command
    Code: Select all
    mv xxx.xml xxx.kmy
    No need to compress it, KMyMoney can read uncompressed also and will compress the data automatically when you save it the next time.
Done. I hope, I did not forget anything. If something does not work out, you still have that backup. I suggest, you execute the above procedure just prior to entering the next payment for the loan so that you can verify that everything is working as you like and don't have to redo too much because the original file version is not recent enough. Of course, you can always try to enter the next schedule and close the file without saving :) In case something is unclear or does not work as expected, please come back here. Also a report about the outcome would be cool.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
markhm
Registered Member
Posts
85
Karma
0
OS
Since I hadn't heard from you for a couple of days, I had already decided to try doing exactly that.
It worked perfectly. All the info on the scheduled transaction is now the way I want it. I will confirm that the end of January payment enters correctly when made.

Although I needed to ship date back by only a day, it was important because it moved the payment coded as Jan. 1 to Dec. 31 and into the prior year for tax reporting purposes.

Since this change is so strait-forward to do, why doesn't the program allow it to be done the same as any other scheduled transaction? Why does editing a loan scheduled payment default to editing the loan instead of editing the payment (and possibly sending you to "edit the loan" if you try to edit the amount)?

Thanks,
Mark
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
These are good questions. Why it is the way it is? I can't remember. This part has not been touched in ages.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5


Bookmarks



Who is online

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