[Kmymoney-devel] Re: New Java project and a currency query

Thomas Baumgart thb at net-bembel.de
Mon Feb 14 19:44:24 CET 2011


Hi,

on Monday 14 February 2011 16:27:41 Andrew Heald wrote:

>  Hi All,
> 
>  I've joined the list after becoming an avid KMyMoney user. Greetings to
>  you all. Great OSS product.   :-)
> 
>  I have a few "extras" that I want to implement, and being a Java
>  developer I've written some code to read and update the XML files used
>  by KMyMoney. The code (early days yet) is at
>  http://github.com/sappho/kmymoney4j if anyone else is interested in
>  using it or collaborating.

Can you explain a bit more what it does / is good for, please?

>  To this end I have a question about the
>  attributes of the CURRENCY items in the XML. Can anyone point me to
>  definitions of the "saf", "ppu" and "scf" attributes. I'll probably get
>  there by guessing in the end but it would be much easier if someone
>  could, in particular, let me know how I can use these attributes to code
>  up currency conversions.

I can certainly give it a try:

saf: smallest account fraction
scf: smallest cash fraction
ppu: parts per unit

scf and ppu are only used for currencies not other securities.  From what I 
remember the ppu information is currently unused but is setup.

They are not used for currency conversions but rather give you information 
about the smallest fraction that can be stored in a specific account. My 
favorite example is the Hungarian Forint:

 scf is 1
 ppu is 1
 saf is 100

which means they deal with one Forint as the smallest coin, but in your 
checking account, the bank maintains 100th of a Forint as well. Other non 
standard values can be found with some currencies used in the middle east.

The list of currencies can be found in kmymoney/views/kmymoneyview.cpp
 

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Linux & Open Source Software - aaah, the sweet smell of 'Free'dom
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20110214/b6357d45/attachment.sig 


More information about the KMyMoney-devel mailing list