Terminology Clarification requested

John Ralls jralls at ceridwen.us
Fri Dec 10 12:13:22 EST 2010


On Dec 10, 2010, at 4:34 AM, Thomas Bullock wrote:

>> -----Original Message-----
>> From: John Ralls [mailto:jralls at ceridwen.fremont.ca.us]
>> Sent: Thursday, December 09, 2010 4:37 PM
>> 
>> So we have a data structure called a "transaction" that includes a
>> variable number (but at least 2) of subordinate data structures called
>> "split", along with some date fields, and some "key-value" or KVP
>> data. 
> 
> I infer then that it does not matter which element of the transaction gets labeled 'transaction' with all the parts that it has in the code.  You are saying that whichever piece of the 'transaction' (as an accountant understands it) becomes the 'transaction' (as a programmer understands it) it is treated as the prime element of the activity being recorded.  It is prime because it has different coding treatment compared to the subordinate parts which have a programming status/treatment that identifies them as subordinate. 

A gnucash "transaction" structure is a container for the 2 or more splits that make up the accounting transaction, not a special split. It has some fields that apply to all of the splits, like the description, the date the (accounting) transaction occurred, and the date it was posted into Gnucash. In XML it looks like:

<gnc:transaction version="2.0.0">
  <trn:id type="guid">503db7a77e6b2e228708ace1e45a2748</trn:id>
  <trn:currency>
    <cmdty:space>ISO4217</cmdty:space>
    <cmdty:id>USD</cmdty:id>
  </trn:currency>
  <trn:date-posted>
    <ts:date>2002-03-14 16:00:00 -0800</ts:date>
  </trn:date-posted>
  <trn:date-entered>
    <ts:date>2003-01-04 05:13:42 -0800</ts:date>
  </trn:date-entered>
  <trn:description>Received from American Founders Life</trn:description>
  <trn:splits>
    <trn:split>
      <split:id type="guid">a81924b4c323bdf92626218cf987b68c</split:id>
      <split:reconciled-state>y</split:reconciled-state>
      <split:reconcile-date>
        <ts:date>2002-09-29 00:11:00 -0700</ts:date>
      </split:reconcile-date>
      <split:value>614311/100</split:value>
      <split:quantity>614311/100</split:quantity>
      <split:account type="guid">73cbee4da2acb9183e83ff639d615ffe</split:account>
    </trn:split>
    <trn:split>
      <split:id type="guid">49ab4796dc37c852923cf118c6b457ac</split:id>
      <split:reconciled-state>n</split:reconciled-state>
      <split:value>-614311/100</split:value>
      <split:quantity>-614311/100</split:quantity>
      <split:account type="guid">17b67fb50b4b228f9c2442a6debc271f</split:account>
    </trn:split>
  </trn:splits>
</gnc:transaction>

Regards,
John Ralls



More information about the gnucash-devel mailing list