From 11e40125f6730cafb2fc70459cc20bcb56824a54 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 5 Jun 2023 14:42:42 +0200 Subject: [PATCH] Fix quantities with "Tausendertrennpunkt" in Spar Didn't dare to ignore dots globally, as I discovered stuff like "500.000 GR" in MPREIS data. Fixes #71 --- stores/spar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stores/spar.js b/stores/spar.js index 057ab4e..7554ffb 100644 --- a/stores/spar.js +++ b/stores/spar.js @@ -23,7 +23,7 @@ exports.getCanonical = function (item, today) { else if (description.endsWith("im topf")) [quantity, unit] = [1, "kg"]; else [quantity, unit] = [1, "stk."]; } else { - const s = description.replace(" EINWEG", "").replace(" MEHRWEG", "").trim(); + const s = description.replace(" EINWEG", "").replace(" MEHRWEG", "").trim().replace(".", ""); const q = utils.parseUnitAndQuantityAtEnd(s); quantity = q[0]; unit = q[1];