Sort transactions by date within a day

John Ralls jralls at ceridwen.us
Thu Jul 2 19:22:23 EDT 2015


> On Jul 2, 2015, at 3:38 PM, GT-I9070 H <gti9070h at gmail.com> wrote:
> 
> 2015-07-02 14:12 GMT-04:00 John Ralls <jralls at ceridwen.us>:
> 
> OK, but you’re really much better off using the GnuCash API to process your import. It’s in C with bindings for Scheme and Python. There’s a lot of computation and checking that goes on in the GnuCash engine and you’d be much better off taking advantage of that than trying to reproduce it or deciding that it’s not necessary in your case.
> 
> Yes, of course, but I think so I would have to study the GnuCash API. You know where to find some documentation?

http://code.gnucash.org/docs/head

The function comments are reasonably up to date but some of the module descriptions and additional matter needs work.

>  
> 
> You also need to know that splits don’t explicitly store prices/exchange rates. A split has two fields, amount and value. Amount is the quantity in the split’s account’s currency and value is the the quantity in the transaction currency. The ratio of the two is the price/exchange rate. There’s a separate price database that keeps prices by date and time, which is used for computing market value in some reports. It’s updated by the GUI when a two-commodity split is recorded or modified, but that’s not automatically done by the engine.
> 
> Further discussion about this would be better in gnucash-devel.
> 
> I had already noticed that exchange rates are not explicit and that it was possibly a division:
> ...
>   <trn:splits>
>     <trn:split>
>       <split:id type="guid">77d889acf5aa05402b0227efedd401f4</split:id>
>       <split:reconciled-state>c</split:reconciled-state>
>       <split:value>490000/100</split:value>
>       <split:quantity>317/100</split:quantity>
>       <split:account type="guid">e08300268208119ce2e5b301ca0a7df5</split:account>
>     </trn:split>
>     <trn:split>
>       <split:id type="guid">f0bb1593ad9d742576220a10dd3515ff</split:id>
>       <split:reconciled-state>n</split:reconciled-state>
>       <split:value>-490000/100</split:value>
>       <split:quantity>-490000/100</split:quantity>
>       <split:account type="guid">6757b8b409a3d348c9b1702d018cd96c</split:account>
>     </trn:split>
>  ...
> Your information about the divisions are very useful. Thanks.
> 
> I don't dominate C, Python or Scheme. I'm not a developer, I'm an enthusiastic and there are limits to what I'm willing to do. If complicate a lot I abandoned the idea and seek another path.
> 

dominate? 

Have you done any programming at all? If so, in what languages? What sort of XML experience do you have?

Regards,
John Ralls




More information about the gnucash-user mailing list