Browse Source

Move rules, categories etc out of main data file

master
Chris Smith 13 years ago
parent
commit
333ba4ca18
2 changed files with 9 additions and 57 deletions
  1. 1
    0
      .gitignore
  2. 8
    57
      data.php

+ 1
- 0
.gitignore View File

@@ -1 +1,2 @@
1 1
 /Statements
2
+*.local.*

+ 8
- 57
data.php View File

@@ -1,70 +1,21 @@
1 1
 <?PHP
2 2
 
3 3
  // Description prefixes used to indicate types
4
- $types = array(
5
-  'SO - ' => 'Standing Order',
6
-  'DD - Hbos Card Services' => 'Internal Transfer',
7
-  'DD - ' => 'Direct Debit',
8
-  'CHQ - ' => 'Cheque',
9
-  'Bank Credit - ' => 'Bank Credit',
10
-  'Bill Payment - Hfx Credit Card' => 'Internal Transfer',
11
-  'Bill Payment - ' => 'Bill Payment',
12
-  'DC - ' => 'Debit Card',
13
-  'DC Cashback - ' => 'Debit Card Cashback',
14
-  'DC Refund - ' => 'Debit Card Refund',
15
-  'Link ATM - ' => 'Cash Withdrawal',
16
-  'ATM - ' => 'Cash Withdrawal',
17
-  'Faster Payment - ' => 'Transfer',
18
-  'PAYMENT REC\'D - THANK YOU' => 'Internal Transfer',
19
-  'DIRECT DEBIT THANK YOU' => 'Internal Transfer',
20
- );
4
+ // e.g. 'DD -' => 'Direct Debit'
5
+ $types = array();
21 6
 
22 7
  // Types where the real description should be discarded in favour
23 8
  // of the type name
24
- $genericTypes = array(
25
-  'Internal Transfer',
26
-  'Cash Withdrawal',
27
-  'Cheque',
28
- );
9
+ // e.g. 'Cash Withdrawal'
10
+ $genericTypes = array();
29 11
 
30 12
  // Custom user rules for grouping different descriptions
31
- $rules = array(
32
-  '^(?i)tesco' => 'Tesco',
33
-  '^(?i)(sacat )?sainsbury\'?s' => 'Sainsbury\'s',
34
-  '^(?i)marks & spencer' => 'M&S',
35
-  '^(?i)argos' => 'Argos',
36
-  '^(?i)subway' => 'Subway',
37
-  '^(?i)specsavers' => 'Specsavers',
38
-  '^(?i)adsl24' => 'ADSL 24',
39
-  '^(?i)foxtons' => 'Foxtons',
40
-  '^(?i)(eve online|ccp games)' => 'CCP Games',
41
-  '^(?i)nandos' => 'Nandos',
42
-  '^(?i)pizza express' => 'Pizza Express',
43
-  '^(?i)steam(games|powered)\.com' => 'Steam',
44
-  '^(?i)spotify(\.com|subs|\s)' => 'Spotify',
45
-  '^(?i)t-\s?mobile' => 'T-Mobile',
46
-  '^(?i)TGI Friday\'s' => 'TGI Friday\'s',
47
-  '^(?i)wh smith' => 'WH Smiths',
48
-  '^(?i)Codeweavers' => 'Codeweavers',
49
-  '^(?i)Cineworld' => 'Cineworld',
50
-  '^(?i)123-reg\.co\.uk' => '123-reg.co.uk',
51
-  '866-321-8851' => 'Amazon Kindle',
52
-  '(?i)Amazon Digital Dwnlds\s*amazon.co.uk' => 'Amazon MP3',
53
-  '^(?i)Ocado' => 'Ocado',
54
- );
13
+ // e.g. '(?i)^(company|service123)' => 'Company'
14
+ $rules = array();
55 15
 
56 16
  // Categories
57
- $categories = array(
58
-  'Groceries' => array('Tesco', 'Ocado', 'M&S'),
59
-  'Home expenses' => array('T-Mobile', 'Bt Group Plc', 'Edf Energy', 'Foxtons', 'ADSL 24', 'Lb Southwark', '(?i)0800 Repair'),
60
-  'Entertainment' => array('Amazon', 'Spotify', 'Cineworld', '(?i)sky payments', 'Steam', '(?i)play.com'),
61
-  'Online' => array('(?i)giganews', 'Shane', '(?i)^github'),
62
-  'Cash' => array('Cash Withdrawal'),
63
-  'Going out' => array('(?i)tayyab', '(?i)founders arms', 'Nandos', '(?i)all bar one', 'TGI Friday\'s', '(?i)^piccolino', 'EAT & DRINK', '(?i)www.urbanbite.com'),
64
-  'Transport' => array('(?i)ec mainline'),
65
-  'Health/Medical' => array('Specsavers'),
66
-  '(Ignored)' => array('Internal Transfer'),
67
- );
17
+ // e.g. 'Groceries' => array('Shop1', 'Shop2', '(?i)regex')
18
+ $categories = array();
68 19
 
69 20
  @include('data.local.php');
70 21
 

Loading…
Cancel
Save