AW: Closing books: reference date

Jannick Asmus jannick.news at gmail.com
Mon Jan 11 14:11:04 EST 2010


Derek Atkins wrote:

>> It seems to me that the reference date for picking txns in the 
>> closing
>> book module is "date-entered". I suspect it should be "date-posted" 
>> to
>> have revenues and expenses appropriately attributed to the closed
>> period.
>>
>> Working with GC 2.2.9 on Win Vista.
>
> Um, the code in question just calls xaccAccountGetBalanceAsOfDate()
> which should use the Post date of the transactions.  In other words,
> it shouldn't matter *when* you enter a transaction, but rather 
> whatever
> date you put into the register.

This concerns manual inputs only. GnuCash does not behave like this 
with HBCI txns.

> And indeed, looking at the code it DOES use DatePosted, so it's 
> behaving
> correctly.

Actually I cannot follow you here. Please see the following HBCI 
transaction which is EXCLUDED from the book closing as at 31.12.2009:

<gnc:transaction version="2.0.0">
   <trn:id type="guid">2cc57ec0384495a6f2626aebf844728c</trn:id>
   <trn:currency>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>EUR</cmdty:id>
   </trn:currency>
   <trn:date-posted>
     <ts:date>2009-12-31 13:00:00 +0100</ts:date>
   </trn:date-posted>
   <trn:date-entered>
     <ts:date>2010-01-08 23:51:11 +0100</ts:date>
   </trn:date-entered>
[snip]
</gnc:transaction>

I think what is happening here is a transaction is entered (via HBCI) 
at t1 with value date t0 BEFORE t1. And this is not just an acedamic 
situation.

Best wishes,
J. 




More information about the gnucash-devel mailing list