Finding Invoice Type "?" / CSV Import Help

Geert Janssens geert.gnucash at kobaltwit.be
Mon Jan 18 11:53:06 EST 2016


On Thursday 14 January 2016 10:01:37 Benjamin Soffer wrote:
> Geert,
> 
> 
> 
> Thank you for offering to inspect the subject data file.  The data
> file is for a law firm and therefore, in some instances, it reflects
> confidential client information which may not be revealed.  However,
> I could send you a sanitized version, stripped of all data except for
> the messed up records and a few others.  Would that be sufficient?
> 
> 
> 
> Regards,
> 
> 
> 
Benjamin,

I have looked at your data file just now. You said you can't find the missing invoices when 
searching for them in the gnucash program. Unfortunately I can confirm this is so because they 
are not even in the data file itself anymore.

I have no idea how this has happened and it's the first time I hear about this.

The only cure I could propose is to make a few minimal changes to the data file directly and 
then clean up via gnucash. Basically what the below steps will make you do is
- remove the read-only restriction from the bad invoice transactions
- then delete the bad transactions via gnucash

The datafile is a compressed xml file. The first step to fix this is to save is as *uncompressed* 
xml. For this you
- open your data file with gnucash
- go to Edit->Preferences
- click on the "General" tab and uncheck "Compress files"
- go to File->Save As
- use a different name to save your book now, so we will be working on a copy of your data. If all 
worked out well, you can replace your original data file afterwards with the corrected one.
- quit gnucash
- now open your data file in a decent text editor (not notepad!), something like notepad++, 
wordpad, ...
- search for this xml snippet:

    <slot>
      <slot:key>trans-read-only</slot:key>
      <slot:value type="string">Generated from an invoice. Try unposting the 
invoice.</slot:value>
    </slot>

(there's a line break inserted by my mail client right after unposting. That line break is not in 
your data file)
You will find several of them, namely for each invoice transaction in your Accounts Receivable 
account. For a proper invoice transaction this snippet will be followed by this snippet:

    <slot>
      <slot:key>trans-txn-type</slot:key>
      <slot:value type="string">I</slot:value>
    </slot>

However for your bad transactions, this snippet is missing. I'm explaining this so you can locate 
your bad transactions directly in the data file. 

- Now to make the bad transactions editable in gnucash (and hence removable), remove 
exactly this snippet from the bad transactions:

    <slot>
      <slot:key>trans-read-only</slot:key>
      <slot:value type="string">Generated from an invoice. Try unposting the 
invoice.</slot:value>
    </slot>

No more, no less (again, my mail client has added a line break after unposting that's not in your 
data file).

- Now save your data file and close the text editor.
- Open the altered file with gnucash
- Go to your A/R account and delete the bad transactions. If all went well, gnucash shouldn't 
complain anymore.

If all of this went ok, you can enable file compression again if you like.

Is this something you can do ?

Regards,

Geert


More information about the gnucash-user mailing list