|
@@ -30,11 +30,12 @@ STORE_CODES = {
|
|
'countdown': 'CD',
|
|
'countdown': 'CD',
|
|
'pak n save': 'PnS',
|
|
'pak n save': 'PnS',
|
|
'SEAFOOD BAZAAR': 'SB',
|
|
'SEAFOOD BAZAAR': 'SB',
|
|
- 'THE ORGANIC FOOD SHOP HAMILTON': 'TOFS',
|
|
|
|
|
|
+ 'GORDONTON FARM SHOP': 'GFS',
|
|
|
|
+ 'THE FARM SHOP': 'GFS',
|
|
|
|
+ 'THE ORGANIC FOOD SHOP': 'TOFS',
|
|
'TOFS' : 'TOFS',
|
|
'TOFS' : 'TOFS',
|
|
'WHATAWHATA BERRY FARM': 'Farm',
|
|
'WHATAWHATA BERRY FARM': 'Farm',
|
|
'TAUPIRI DAIRY TAUPIRI': 'TD',
|
|
'TAUPIRI DAIRY TAUPIRI': 'TD',
|
|
- 'THE FARM SHOP': 'GFS',
|
|
|
|
'Dreamview Cre': 'DV',
|
|
'Dreamview Cre': 'DV',
|
|
'new world': 'NW',
|
|
'new world': 'NW',
|
|
'BIN INN': 'BI',
|
|
'BIN INN': 'BI',
|
|
@@ -45,6 +46,9 @@ STORE_CODES = {
|
|
'REDUCED' : 'RTC',
|
|
'REDUCED' : 'RTC',
|
|
'Summerglow' : 'SG',
|
|
'Summerglow' : 'SG',
|
|
'IHERB' : 'iHerb',
|
|
'IHERB' : 'iHerb',
|
|
|
|
+ 'Health Post' : 'HP',
|
|
|
|
+ 'Scotsburn' : 'SF',
|
|
|
|
+ 'Fruit King' : 'FK',
|
|
}
|
|
}
|
|
|
|
|
|
user = os.getenv('USER')
|
|
user = os.getenv('USER')
|
|
@@ -64,7 +68,7 @@ def get_record_from_database(date, store, tags):
|
|
|
|
|
|
def get_store_code(store, value, user_data=dict()):
|
|
def get_store_code(store, value, user_data=dict()):
|
|
for k, v in STORE_CODES.items():
|
|
for k, v in STORE_CODES.items():
|
|
- if k.lower() in store.lower():
|
|
|
|
|
|
+ if k.lower() in store.lower() or k.lower().replace(' ', '') in store.lower():
|
|
return v
|
|
return v
|
|
|
|
|
|
if store not in user_data:
|
|
if store not in user_data:
|
|
@@ -151,6 +155,8 @@ if __name__ == '__main__':
|
|
('Root Account:Liabilities', True),
|
|
('Root Account:Liabilities', True),
|
|
('Root Account:Equity', True),
|
|
('Root Account:Equity', True),
|
|
('Root Account:Income', True),
|
|
('Root Account:Income', True),
|
|
|
|
+ ('Root Account:Expenses:NZD:Food:Groceries:Fee', True),
|
|
|
|
+ ('Root Account:Expenses:NZD:Food:Groceries:Rebates', True),
|
|
]
|
|
]
|
|
whitelist = [
|
|
whitelist = [
|
|
# name, also_children
|
|
# name, also_children
|