diff --git a/csf_za/__init__.py b/csf_za/__init__.py index 493f741..260c070 100644 --- a/csf_za/__init__.py +++ b/csf_za/__init__.py @@ -1 +1 @@ -__version__ = "0.3.0" +__version__ = "0.3.1" diff --git a/csf_za/overrides/accounts/bank_statement_import.py b/csf_za/overrides/accounts/bank_statement_import.py index de71be7..93b51a9 100644 --- a/csf_za/overrides/accounts/bank_statement_import.py +++ b/csf_za/overrides/accounts/bank_statement_import.py @@ -159,6 +159,10 @@ def parse_csv_file_bankzero(self, file_doc): "Balance", "Has Attachments", ] + # remove UTF-8 BOM from first header cell if present + if data and data[0] and isinstance(data[0][0], str): + data[0][0] = data[0][0].lstrip("\ufeff") + if data[0][:9] != expected_headers[:9]: frappe.throw( _("Unexpected headers in CSV. Expected: {0} in first row").format( diff --git a/package.json b/package.json index 319a040..0ebc526 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "csf_za", - "version": "0.3.0", + "version": "0.3.1", "author": "Starktail (Pty) Ltd ", "main": "index.js", "devDependencies": {