Import Invoice Entries by Database Trigger

John Ralls jralls at ceridwen.fremont.ca.us
Wed Mar 12 09:51:58 EDT 2014


On Mar 12, 2014, at 3:47 AM, Adrian Hodson <no.bicycle.subscriptions at gmail.com> wrote:

> Hello,
> I am using Partkeepr for inventory and Gnucash on the same Mysql server
> instance. 
> 
> I plan for customers to sign off on an initial invoice from Gnucash.
> A Partkeepr Materials List ID will be identical to the Gnucash Invoice
> number.
> 
> I would like to create a database trigger  on Partkeeper that inserts
> Materials entries (quantity, price, etc) into the Entries table in
> Gnucash using the invoice number (pre-created in Gnucash). 
> 
> I see the entries in the Gnucash Entries table have guid,date and
> date_entered fields as not null. Followed by invoice related fields
> i_acct ... i_discount_denom ... , followed by billing related fields
> and finally order_guid. 
> 
> Could this mechanism work from Gnucash point of view? 

No.

None of GnuCash's business logic is embedded in the database, so the only way to write to the database is via one of GnuCash's APIs: C, Scheme, or Python.

> 
> If so,  I would like to know how to obtain a new instance of guid for
> the records that I insert. Also Which of the Entries table fields are
> foreign keys?
> 
> 
> Such a mechanism would be of general benefit to anyone using an
> external inventory system.

Which isn't a supported use of GnuCash. You'd be better off with an ERP program. Searching "ERP' on SourceForge will turn up several.

Regards,
John Ralls




More information about the gnucash-devel mailing list