3 Commits 3a22ea46a4 ... e03c205c71

Author SHA1 Message Date
  Daniel Sheffield 3a22ea46a4 add examples 6 months ago
  Daniel Sheffield 158c2a334c Added mapping for online Woolworths orders and TOFS orders 6 months ago
  Daniel Sheffield 8e59d32f68 Added 2T tag to exclude in example usage 6 months ago
2 changed files with 1 additions and 17 deletions
  1. 0 14
      example.sql
  2. 1 3
      reconcile.py

+ 0 - 14
example.sql

@@ -1,20 +1,6 @@
 -- Insert a tag if it got missed
 --INSERT INTO tags_map (transaction_id, tag_id) VALUES(2247, 11);
-
--- Check your filter is correct first!
 SELECT * FROM transactions t
 	JOIN tags_map ON (transaction_id = t.id)
 	JOIN tags tg ON (tag_id = tg.id)
 	WHERE transaction_id = 2247;
-
-
--- Move from date to datej
---UPDATE public.transactions
---    -- Set the correct date on all rows that match the filter: Noon NZ time on 30 April 2024 (use exact time if known)
---    SET  ts=('2024-04-30 12:00'::timestamp with time zone AT TIME ZONE 'UTC')
---    -- Filter to the rows you want to alter: Noon NZ time on 15 April 2024 (use exact time if knwon)
---    WHERE ts::date = ('2024-04-15 12:00'::timestamp with time zone AT TIME ZONE 'UTC')::date;
-
--- Check your filter is correct first!
-SELECT *, sum(price) OVER () FROM  public.transactions
-WHERE ts::date = ('2024-04-15 12:00'::timestamp with time zone AT TIME ZONE 'UTC')::date and store_id = 8;

+ 1 - 3
reconcile.py

@@ -10,7 +10,7 @@
 import sys
 if sys.argv[1] == '-h':
     print("""
-  usage:  ./reconcile.py ~/gnucash/merged.gnucash 2024-02-01 2024-06-10 1 Alcohol Sundries CatFood Cleaning 2T
+  usage:  ./reconcile.py ~/gnucash/merged.gnucash 2021-11-01 2021-12-10 1 Alcohol Sundries CatFood Cleaning
 """)
     sys.exit(0)
 
@@ -59,8 +59,6 @@ STORE_CODES = {
     'Fruit King' : 'FK',
     'Fresh Choice': 'FC',
     'FC12-3189-0013895-00': 'DV',
-    'ORGANIC FOOD SH' : 'TOFS',
-    'WWNZ' : 'CD',
 }
 
 user = os.getenv('USER')