TXF categories for French tax system

Philip Haynes philip.john.haynes at googlemail.com
Thu Jan 7 18:59:01 EST 2010


2010/1/8 From: Parker Jones <zoubidoo at hotmail.com>

> To: <gnucash-devel at gnucash.org>
> Date: Thu, 7 Jan 2010 12:34:37 +1300
> Subject: TXF categories for French tax system
>
> Hello everyone,
>
> I saw that gnucash comes with German tax categories and at first glance
> this appears to be working when when gnucash is started with a German
> locale.  This led me to wonder whether it might be possible to create
> something similar for the French tax system.
>
> On IRC Warlord suggested I should contact Christian on this list.
>
> Digging around, the main changes seem to be:
>
> ./scm/txf.scm  ->  txf-de_DE.scm
> ./guile-modules/gnucash/report/taxtxf.scm  ->  taxtxf-de_DE.scm
> ./guile-modules/gnucash/report/locale-specific/us.scm  ->  de_DE.scm
> ./guile-modules/gnucash/tax/us.scm  -->  de_DE.scm
>
> Are there any others I missed?  The diffs don't look very large, but there
> seems to be a fair bit of duplicated code.
>
> I'm willing to try to create a French version but just wanted to see if

anything is already being done in this area.
>

I have been having a poke around in this area for my own purposes
(Australian Tax regime) and the approach used for the German tax codes is by
the authors own admission a horrible kludge. I have written some guile code
to modularize which tax codes are used and it has simplified the changes
required in the gnucash code base. Unfortunately;

*My time is severely constrained (a new baby) and so I have not finalised
nor tested my changes in the code base

*I am no guile programmer and so I have had to learn it, which means I may
be doing unguiley (guileless??) type things.

*I am not sure this actually works properly yet.

*This approach requires a larger amount of refactoring, but it is the
"right" approach as compared to just hacking the de_DE hack to include an
en_AU case as well which was my first proof of concept change.

You should search for the #define LOCALE_SPECIFIC_TAX which is wrapped
around the changes within the C code in gnucash proper that are needed to be
turned on to make this work. I also recall a recent message to this list
whereby the use of the LOCALE method to determine the tax jurisdiction is
recognised as less than ideal. I kinda agree. The method I am working on
should respond equally well to a new option in the settings for gnucash, but
I am just trying to get it working with  LOCALE for the moment.

I have attached diffs against the 2.2 code (a long story as to why I started
doing my changes there, but it should be very similar against the trunk) and
the guile code in case it is helpful. The testguile stuff is designed to
(when it's done) replace the src/tax directory.

I'd love to know what progress you make. I will try and get some more focus
on the work over the coming weeks and see if I can nail my changes on the
head and start to test them.

Best Regards,
Philip




-- 
Philip Haynes
Address: 2/33 Oakley Road. North Bondi. NSW. 2026. Australia
Email: philip.john.haynes at googlemail.com
Mobile: +61411050016
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnucash.2.2.diff
Type: application/octet-stream
Size: 11168 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100108/37e6c324/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testguile.tgz
Type: application/x-gzip
Size: 21292 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100108/37e6c324/attachment-0001.tgz>


More information about the gnucash-devel mailing list