Creating a file to import in GNUCash

Derek Atkins warlord at MIT.EDU
Tue May 31 11:32:51 EDT 2011


Thomas Goirand <thomas at goirand.fr> writes:

>> Yes, that would be one way. LMGTFY:
>> http://www.ofx.net/OFXExamplesPage/OFXExamples.aspx
>
> Thanks for this example, I've been able to do a basic export script.
>
> The issue I'm having is that these examples aren't covering what I need.
> In each transaction, I would have:
>
> - Total deposit in our $payment-gateway account (for example paypal)
> - Total cost of the payment gateway
> - Eventually, if in Europe, VAT (see below)
>
> With a company in Europe, we have 4 cases:
> - Sales in receiving company (includes VAT)
> - Sales in EU but not same country as receiving company, customer has
> VAT number (no VAT charge, customer pays in its country)
> - Sales in EU but not same country as receiving company, customer does
> *NOT* have a VAT number, VAT is charged
> - Sales in the rest of the world
>
> Depending on these 4 cases, things would be accounted on a different
> account in GNUCash.
>
> So, how do I do my export in that case? It's really not clear how...

Unfortunately OFX doesn't handle Split Transactions.  In that case
you're better off to export into QIF.

>> You could also use the Gnucash API (in C, Scheme, or Python) to add the
>> transactions directly
>
> Are there ways to do that in PHP?

No, we only have bindings into Scheme or Python.

>> though hat would entail more effort to support multiple Gnucash
>> versions and to keep up with future API changes.
>
> I only need to support GNUCash >= 2.4 for the moment.

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list