Fix purchase order import form

This commit is contained in:
Oliver committed 2021-07-15 23:11:59 +10:00
1 parent c61fc7c1df
commit 09d175f7cf
4 files changed
+11 -9

No files matched your search

+6 -1
View File
@@ -99,13 +99,18 @@ class FileManager:
self.update_headers()
def guess_header(self, header, threshold=80):
""" Try to match a header (from the file) to a list of known headers
"""
Try to match a header (from the file) to a list of known headers
Args:
header - Header name to look for
threshold - Match threshold for fuzzy search
"""
# Replace null values with empty string
if header is None:
header = ''
# Try for an exact match
for h in self.HEADERS:
if h == header: