Difficulty in importing invoices

Buddha Buck blaisepascal at gmail.com
Thu Jul 31 21:27:05 EDT 2014


I'm trying to write out a CSV file suitable for importing as an invoice,
and I'm running into some difficulty.

System setup: Debian Jessie/Sid amd64, GnuCash 2.6.3

As a test, I have created a brand-new GnuCash file, based off the accounts
of my main file, added a customer with an ID of "EXA" (short for
"example"), and then had my external program generate a file that contained
the one line

EXA-1407,2014-07-31,EXA,,,2014-07-27,Extra membership for
2014-07-27,,Income:Membership
Dues,1,75.0,%,,25.0,,,,2014-07-27,2014-08-03,,,

My expectation was that importing this would create an invoice with ID
EXA-1407, with a single line item dated 7/27, providing income to the
Membership Dues account, with a unit cost of $75 and a 25% discount, for a
total invoice amount of $56.25. I expected it to be posted as of 7-27, with
a due date of 8-03.

I almost got that. There were a couple of issues:

* I had to make sure the date format preference in GnuCash matched what was
in the CSV (or I got weird dates).

* It didn't automatically post. I suspect this is because I didn't specify
a posted account I didn't know what to specify. Assets:Accounts Receivable?
(followup: Adding the account_posted field to Assets:Accounts Receivable
did the trick).

* The subtotal for the imported invoice line was $75, not $56.25. It listed
the unit price as $75, the discount as 25%, and the subtotal as $75.
Posting lead to Income credited by $75, not $56.25.

* When the invoice is unposted, clicking on the line (as if to edit)
changed the subtotal to $56.25, but only as long as focus was on that line.
Switching to a different line with the cursor keys, mouse, return, or enter
resulted in the subtotal switching back to $75. Only by manually
re-entering the discount amount was I able to get the subtotal to stick at
the discounted amount.

The date issue I dealt with. I'd prefer to auto-post because of the sheer
number of these things (50 members/month in a batch import), but that seems
to be resolved.

But the discounts issue seems like a bug. I can work-around it by
pre-applying the discount (exporting the CVS line saying it's $56.25 with
no discount, rather than $75 with a 25% discount), but it doesn't match my
historical process.

Am I missing something in how this is supposed to work, or is this a real
bug that should be reported to the bug tracker?


More information about the gnucash-user mailing list