diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qif.rs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -66,7 +66,7 @@ impl QifEntry { } pub fn is_empty(&self) -> bool { - self.amount == String::from("0") + &self.amount == "0" || &self.amount == "0.00" } pub fn clean_description(&self) -> String { @@ -128,6 +128,7 @@ fn replace_common(text: &str) -> String { (r"(?i)checkers", "Checkers"), (r"(?i)WOOLWORTHS", "Woolworths"), (r"(?i)clicks", "Clicks"), + (r"(?i)dischem", "Dischem"), (r"(?i)spar", "Spar"), (r"(?i)(disc memb|disc prem)", "Discovery medical aid"), (r"(?i)10XRA", "10X Retirement Annuity"), @@ -137,6 +138,7 @@ fn replace_common(text: &str) -> String { (r"^PNA", "PNA"), (r"^BWH", "Builders Warehouse"), (r"^MCD ", "McDonalds"), + (r"^MRP ", "Mr Price"), (r"NakedIn", "Naked Insurance"), (r"(?i)sahl", "SA Home Loans"), (r"(?i)gautrain", "Gautrain"), @@ -148,6 +150,7 @@ fn replace_common(text: &str) -> String { (r"(?i)ELECTRICITY", "Electricity"), (r"(?i)(COUNTRY VIEW|STAR STOP|Shell|Sasol|Engen)", "Petrol"), (r"(?i)kung ?-?fu", "Kungfu Kitchen"), + (r"(?i)^atm cash", "Cash"), ) .into_iter() .map(|(from, to)| (Regex::new(from).unwrap(), to)) |