How to set Description on A/R when importing invoices

Mike Evans mikee at saxicola.co.uk
Sat Sep 13 06:23:10 EDT 2014


Hello Arnd

On Fri, 12 Sep 2014 12:00:29 +0800
Arnd Vehling <Arnd at Vehling.Com> wrote:

> Hello Mike,
> 
> i had 2 mails from you ending up in my "second spamfolder" which i 
> scanned today.
> 
> I did experiment with the import like 10 more times now and i am sure 
> that the importer is partially broken OR my home-compiled gnucash 2.6.3 
> is broken. I suspect the latter though.
Very likely broken for your use-case.

> 
> The importer definitely "has problems". It doesnt verify the format of 
> import fields versus the formats configured in gnucash.
Correct.

> 
> If i try to import an cash value/number like "151.10" ("," is delimiter) 
> but ive configured a number format of "###,##", i.e. "151,1" (";" is 
> delimiter) i can import it but the "Price" field will be empty after 
> import.
>
The importer probably assumes that numbers user dot for decimal and
doesn't know anything about locale settings.

I have no plans to improve the importer further than "It works for
me", time and money are limited.  The relevant files are:

src/plugins/bi-import/dialog-bi-import-gui.c the gui part that
contains overly long regexes for matching and assigning the import
fields.  There is no format checking in there, which is where it would
need to be to flag up malformed input.

src/plugins/bi-import/dialog-bi-import.c The function gnc_bi_import_fix_bis() 
deals with what checking there is. There is no check, or fix, for
number formats in there as far as I can see.  This function is far too
long and could stand substantial refactoring.  Also since we are moving
to C++ that should probably be done too. :)

> There should at least be a warning of the format of the "Price" field 
> beeing wrong OR it shouldnt be displayed in the import preview! I did 
> create a complete new account-chart setup with the wizard but i havent 
> been able to correctly import and auto-post anything.

It should really be checked and repaired in gnc_bi_import_fix_bis().

The source is open, please feel free to add patches to fix the issue.
You probably should file a bug, or several, for each of the problems
you are experiencing and add ant patches and further comments you have
in the relevant bug report.

The link I posted will have some more code soon for importing ebay
mails as invoices, I'm still testing and writing it though so I may be
a while. It will probably only work for (real) English and will break as
soon as ebay change their email format.  Again it's written with a
"works for me" caveat and I put it on GitHub as a source for for others
to take/borrow/steal as a base for their particular use-case, not as a
finished application.

I'm sorry the importer doesn't for you, but I have limited resources to
test for all use-cases.  The code is there to be improved by anyone
sufficiently motivated to do so.



Mike Evans



> > The Memo field can be set when posting the invoice to the A/R account.
> > I have some Python for parsing my ebay mails and creating invoices/bills, if I post the bill/invoice in Python I have:
> >
> > bill.PostToAccount(payable_account, bill_date, bill_date, "MEMO NOTES GO HERE", True, False)
> >
> > https://github.com/EvansMike/pycash/tree/master/ebay2gnuCash
> > Note: The code there is a little out of date and quite possibly broken.
> 
> 
> thx,
> 
>    Arnd
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



-- 
Anti NSA?  Use PGP.
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x00CDB13500D7AB53  


More information about the gnucash-user mailing list