makes requirement of exact match.

This commit is contained in:
2023-04-04 16:32:12 -07:00
parent b8d14233b5
commit 37995536d5
3 changed files with 13 additions and 4 deletions

View File

@@ -68,8 +68,8 @@
(filter (fn [[_ _ _ _ _ _ _ _ _ _ _ break-flag]]
(= "Y" break-flag)))
(map (fn [[vendor location-hint invoice-number ship-date invoice-total ]]
(let [[matching-client similarity] (and location-hint
(parse/best-match clients location-hint 0.0))]
(let [matching-client (and location-hint
(parse/exact-match clients location-hint))]
{:invoice/vendor vendor
:invoice/location (parse/best-location-match matching-client location-hint location-hint )
:invoice/date (coerce/to-date (atime/parse ship-date atime/normal-date))
@@ -115,7 +115,7 @@
first
:content
first)
[matching-client similarity] (and location-hint (parse/best-match clients location-hint 0.0))
matching-client (and location-hint (parse/exact-match clients location-hint))
]
(if matching-client