Difference between revisions of "gnucash mysql invoice query"

From thelinuxwiki
Jump to: navigation, search
Line 13: Line 13:
 
get all entries for select columns from the invoice identified above...
 
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";'''
+
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";'''
 +
 
 +
+---------------------+----------------------------------------------------------------------------------------+---------+--------------+-    ------------+----------------+-------------+-----------+
 +
| date                | description                                                                            | action  | quantity_num |  i_price_num | i_discount_num | i_disc_type | i_taxable |
 +
+---------------------+----------------------------------------------------------------------------------------+---------+--------------+- ------------+----------------+-------------+-----------+
 +
| 2013-04-25 17:00:00 | upload Huntington photos to MLS                                                        | Hours  |      1000000 |    100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-01 17:00:00 | upload new huntington and abbey photos                                                | Hours  |      1000000 |    100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-08 17:00:00 | update tar-2001-residential_lease on website                                          | Hours  |      500000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-09 05:00:00 | upload axis deer run photos to MLS                                                    | Hours  |      1000000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-10 05:00:00 | Restore BPA Lessees address list                                                      | Hours  |      750000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-10 05:00:00 |  format and print form-medical-chart                                                  | Hours  |      750000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-11 17:00:00 | answer emails regarding popup blockers, credit reports, Huntington web site view, etc. | Hours  |      500000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-14 17:00:00 | assist with Internet connectivity problem                                              | Hours  |      750000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-14 17:00:00 | post Lease application to website                                                      | Hours  |      250000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-15 17:00:00 | zipforms access issue                                                                  | Hours  |      250000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-17 17:00:00 | correct mail sending error                                                            | Hours  |      500000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-20 05:00:00 | assist with email Axis Deer Run documents                                              | Hours  |      1000000 |  100000000 |      65000000 | PERCENT    |        1 |
 +
| 2013-05-01 05:00:00 | april email and web hosting                                                            | Project |      1000000 |    19950000 |              0 | PERCENT    |        1 |
 +
| 2013-05-01 05:00:00 | may email and web hosting                                                              | Project |      1000000 |    19950000 |              0 | PERCENT    |        1 |
 +
+---------------------+----------------------------------------------------------------------------------------+---------+--------------+-------------+----------------+-------------+-----------+
 +
14 rows in set (0.00 sec)
 +
 
  
 
[[category:gnucash]]
 
[[category:gnucash]]

Revision as of 14:57, 24 May 2013

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";
+---------------------+----------------------------------------------------------------------------------------+---------+--------------+-     ------------+----------------+-------------+-----------+
| date                | description                                                                            | action  | quantity_num |  i_price_num | i_discount_num | i_disc_type | i_taxable |
+---------------------+----------------------------------------------------------------------------------------+---------+--------------+- ------------+----------------+-------------+-----------+
| 2013-04-25 17:00:00 | upload Huntington photos to MLS                                                        | Hours   |      1000000 |    100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-01 17:00:00 | upload new huntington and abbey photos                                                 | Hours   |      1000000 |    100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-08 17:00:00 | update tar-2001-residential_lease on website                                           | Hours   |       500000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-09 05:00:00 | upload axis deer run photos to MLS                                                     | Hours   |      1000000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-10 05:00:00 | Restore BPA Lessees address list                                                       | Hours   |       750000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-10 05:00:00 |  format and print form-medical-chart                                                   | Hours   |       750000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-11 17:00:00 | answer emails regarding popup blockers, credit reports, Huntington web site view, etc. | Hours   |       500000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-14 17:00:00 | assist with Internet connectivity problem                                              | Hours   |       750000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-14 17:00:00 | post Lease application to website                                                      | Hours   |       250000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-15 17:00:00 | zipforms access issue                                                                  | Hours   |       250000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-17 17:00:00 | correct mail sending error                                                             | Hours   |       500000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-20 05:00:00 | assist with email Axis Deer Run documents                                              | Hours   |      1000000 |   100000000 |       65000000 | PERCENT     |         1 |
| 2013-05-01 05:00:00 | april email and web hosting                                                            | Project |      1000000 |    19950000 |              0 | PERCENT     |         1 |
| 2013-05-01 05:00:00 | may email and web hosting                                                              | Project |      1000000 |    19950000 |              0 | PERCENT     |         1 |
+---------------------+----------------------------------------------------------------------------------------+---------+--------------+-------------+----------------+-------------+-----------+
14 rows in set (0.00 sec)