Loan : how to use the "future value" in a scheduled transaction ?
Yann Le Mouel
yann.lemouel at free.fr
Fri Feb 24 05:30:52 EST 2012
Hi
Just an update on this old thread as I managed to test it thoroughly.
1) I created a bug on it. https://bugzilla.gnome.org/show_bug.cgi?id=670731
2) There is a workaround to use the future value: remove the lines in the
"gnucash" file that calculated the ipmt & pmt values, e.g. in the example
below, the lines
<slot>
<slot:key>debit-numeric</slot:key>
<slot:value type="numeric">240887/1000</slot:value>
</slot>
Maybe this workaround works because the _get_sx_formula_value function (in
gnx-sx-instance-model.c) checks first if there is already a calculated
numeric value before parsing the string. If not, then the string function is
evaluated. But I'm unsure of it.
Yann
-----Original Message-----
Yann Le Mouel <yann.lemouel at free.fr> wrote:
Hi Derrick
Well, no the instanceCount is equal to 14 for this gnc:schedxaction.
However, if I go to the corresponding gnc:transaction, here is an extract of
it :
<gnc:transaction version="2.0.0">
...
<split:slots>
<slot>
<slot:key>sched-xaction</slot:key>
<slot:value type="frame">
<slot>
<slot:key>account</slot:key>
<slot:value
type="guid">12d0da01a75eb03d77038191f07810fc</slot:value>
</slot>
<slot>
<slot:key>credit-formula</slot:key>
<slot:value type="string"></slot:value>
</slot>
<slot>
<slot:key>credit-numeric</slot:key>
<slot:value
type="numeric">0/1</slot:value>
</slot>
<slot>
<slot:key>debit-formula</slot:key>
<slot:value type="string">ppmt( 0,03450 / 12,00 : i : 240,00 :
130000,00 : -46666,01 : 0 )</slot:value>
</slot>
<slot>
<slot:key>debit-numeric</slot:key>
<slot:value type="numeric">240887/1000</slot:value>
</slot>
</slot:value>
</slot>
</split:slots>
...
</gnc:transaction>
which is really different from another with no future value :
<gnc:transaction version="2.0.0">
...
<split:slots>
<slot>
<slot:key>sched-xaction</slot:key>
<slot:value type="frame">
<slot>
<slot:key>account</slot:key>
<slot:valu
e
type="guid">559fb8a9032fc66002745c8d2edc37c9</slot:value>
</slot>
<slot>
<slot:key>debit-formula</slot:key>
<slot:value type="string">ppmt( 0,03350 / 12,00 : i : 240,00 :
70000,00 : 0 : 0 )</slot:value>
</slot>
</slot:value>
</slot>
</split:slots>
...
</gnc:transaction>
It looks like as if the "i" is not seen as a variable to be replaced by the
instanceCount when the future value is not equal to zero.
Yann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 12744 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20120224/02c56149/attachment.bin>
More information about the gnucash-user
mailing list