[GNC] Gnucash-created "closing" entries

David Cousens davidcousens at bigpond.com
Fri Dec 28 21:57:27 EST 2018


Stan,

At the present moment there does not appear to be any way to do what you
need to do. There is no option in the current close book procedure for
optionally setting the close date to anything else but the close date for
the period +12 hrs. This is set as the time of the transactions generated to
close the books. 

I would raise a bug on bugs.gnucash.org describing your problem, if no-one
suggests an easier solution, This won't resolve your immediate problem but
will alert the main developers of the need to address your problem longer
term

Someone else may be able to come up with a better way of resolving your
problem so treat the below as a last resort. First you need to ensure your
data file is uncompressed(https://wiki.gnucash.org/wiki/GnuCash_XML_format).
Then exit GnuCash, make a backup of the original datafile before editing it.

The only suggestion I could make at this stage would be perhaps to use a
text editor to locate and edit your additional transactions in your data
file and set their transaction date-time to after the GnuCash generated
closing transaction time.
The hard part may be locating the correct transactions. If you note what the
memo fields are in GnuCash before you exit it for the transactions you need
to locate and/or alter you should be able to locate the splits containing
them which will be within the transactions. Verify carefully that you have
the right transactions though.  If you have any problems, restore a copy
from your backup of the datafile (keeping the original copy though) and try
again.

There is a copy of a transaction record from my datafile at the end of this
post so you have some idea fo what to look for.
You will need to first find one of the GnuCash closing transactions and note
the date-time it was posted i.e. see the section like: 

 <trn:date-posted>
    <ts:date>2015-08-02 20:59:00 +1000</ts:date>
  </trn:date-posted>

Looking quickly at the code, it appears the same date-time is used for all
closing transactions so it should be possible to
 then locate your additional transactions and change them to a date-time
after the date-time noted from the GnuCash closing transactions. Perhaps add
a minute but be careful that the time you add doesn't change the date i.e.
time goes past 23:59:59.

Save the file and then reopen with GnuCash.

David Cousens

transaction record form XML datafile

<gnc:transaction version="2.0.0">
  <trn:id type="guid">6003472e9a890cbd3724825ae8d95462</trn:id>
  <trn:currency>
    <cmdty:space>CURRENCY</cmdty:space>
    <cmdty:id>AUD</cmdty:id>
  </trn:currency>
  <trn:date-posted>
    <ts:date>2015-08-02 20:59:00 +1000</ts:date>
  </trn:date-posted>
  <trn:date-entered>
    <ts:date>2015-10-23 10:20:49 +1000</ts:date>
  </trn:date-entered>
  <trn:description>MORGANS SEAFOODS      SCARBOROUGH 
QLDAU</trn:description>
  <trn:slots>
    <slot>
      <slot:key>date-posted</slot:key>
      <slot:value type="gdate">
        <gdate>2015-08-02</gdate>
      </slot:value>
    </slot>
    <slot>
      <slot:key>notes</slot:key>
      <slot:value type="string">OFX ext. info: |Trans type:Generic
debit</slot:value>
    </slot>
  </trn:slots>
  <trn:splits>
    <trn:split>
      <split:id type="guid">a1bf65b2322f32623b5505e2b7a47ea7</split:id>
      <split:reconciled-state>n</split:reconciled-state>
      <split:value>2896/100</split:value>
      <split:quantity>2896/100</split:quantity>
      <split:account
type="guid">1ec460ba4ac0be56cc14b2a3319b2ff6</split:account>
    </trn:split>
    <trn:split>
      <split:id type="guid">c9fa643a812cd6fb177f0e2a62a30416</split:id>
      <split:memo>MORGANS SEAFOODS      SCARBOROUGH  QLDAU</split:memo>
      <split:reconciled-state>y</split:reconciled-state>
      <split:reconcile-date>
        <ts:date>2015-09-30 23:59:59 +1000</ts:date>
      </split:reconcile-date>
      <split:value>-2896/100</split:value>
      <split:quantity>-2896/100</split:quantity>
      <split:account
type="guid">b67f5b6d398e2e451743ba2359734428</split:account>
      <split:slots>
        <slot>
          <slot:key>online_id</slot:key>
          <slot:value type="string"></slot:value>
        </slot>
      </split:slots>
    </trn:split>
  </trn:splits>
</gnc:transaction> 



-----
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html


More information about the gnucash-user mailing list