External Program
Wm
tcnw81 at tarrcity.demon.co.uk
Fri Jun 17 20:48:51 EDT 2016
On Fri, 10 Jun 2016 22:04:32 -0230, in gmane.comp.gnome.apps.gnucash.user,
Mark Mercer <markm at woodjoint.ca> wrote:
I don't think the first part of this was answered:
> Hi Aaron, I've tried exporting to sqlite but the file always comes out
> blank. I've also tried a csv file but it's also blank.
Should work.
> I'll give you a more detailed explanation here now. From what I can see
> there are only three tables in the database that have records in them
> (other than the "version" table). I've listed them below along with the
> records that are relevant to what I'm doing.
>
> Accounts
> guid, name, type, commodity_guid, commodity_scu, non_std_scu,
> parent_guid... etc...
> '5e5acaea00cf48203a8b44d58f96ffad', 'Sales', 'INCOME',
> 'f845d29aff6356d67df273c864277df2', '100', '0',
> '94d60e0b5a702628676e7791c2e019a5', '', 'Sales', '0', '0'
>
>
> Transactions
> guid, currency_guid, num, post_date, enter_date, description
> 'b3fae0a5fd1b5fbe6aac4ae840f38d3c', 'f845d29aff6356d67df273c864277df2',
> '3', '2016-06-08 02:30:00', '2016-06-09 01:55:55', 'Test'
>
>
> Splits
> guid, tx_guid, account_guid, memo, action, reconcile_state,
> reconcile_date, value_num, value_denom, quantity_num, quantity_denom,
> lot_guid
> '4ba293ddd80a04ed8510e61e6e3d40c2', 'b3fae0a5fd1b5fbe6aac4ae840f38d3c',
> '5e5acaea00cf48203a8b44d58f96ffad', '', '', 'n', NULL, '-1000', '100',
> '-1000', '100', NULL
> 'abd191aa748822fdac2112b629708ee5', 'b3fae0a5fd1b5fbe6aac4ae840f38d3c',
> '7d0fd461835281509cf260e8a1baa272', '', '', 'n', NULL, '1000', '100',
> '1000', '100', NULL
>
> So, its easy to see that the split table tx_guid refers to the
> transaction record and that the split table account_guid refers to the
> account record. The split table links it all together.
Not quite, the splits are children of the transaction, the transaction
holds the double entry together not the splits. Notice, for example, that
splits don't have a date and all accounting transactions have a point in
time.
> And it uses two
> records of opposing values because they have to be reconciled or
> something.
Add up to 0, that is how double entry works. The transaction is king (or
queen if you prefer). You can't, in accounting, mix up any bunch of splits
that add up to zero and call them a transaction.
> I don't know enough about accounting to know what a split is
> or exactly why we need to do all this reconciling business but I'm
> willing to live with it if that's the way it's supposed to be done.
> The denom field represents basically the number of cents in a dollar and
> the value field when divided by the denom shows the amount of the
> transaction (so I've entered a $10 sale).
Yes, it seems fiddly with 2 decimal currencies like Euro and USD but makes
a lot more sense when you start exchanging things between currencies and
dealing with things that include fractional results that don't easily
divide by 10.
To hopefully clarify:
Imagine this real world transaction: I went to a shop and bought a birthday
card and a bottle of wine on the 1st of June.
The date and description will be in transactions, the rest is in splits
which has the debits and credits (aka pluses and minuses) that make up the
double entry transaction. So the splits for my birthday purchase might be
ass:cash -20
exp:cards +5
exp:wine +15
--
Wm
More information about the gnucash-user
mailing list