gnucash mysql invoice query

From thelinuxwiki
Revision as of 14:52, 24 May 2013 by Nighthawk (Talk | contribs)

Jump to: navigation, search

CLI queries for gnucash invoice data

get invoice guid

mysql> SELECT guid FROM gnucash_database.invoices WHERE id = "2013018";
+----------------------------------+
| guid                             |
+----------------------------------+
| f32b43b6da2b19e4e9e838d30ffc1edb |
+----------------------------------+
1 row in set (0.00 sec)

get all entries for select columns from the invoice identified above...

mysql> SELECT date,description,action,quantity_num,i_price_num,i_discount_num,i_disc_type,i_taxable FROM gnucash_database.entries WHERE invoice = "f32b43b6da2b19e4e9e838d30ffc1edb";