From 40c9aca9e47b00b77af27704d7b0cfb16f3b7c59 Mon Sep 17 00:00:00 2001 From: bosd Date: Sat, 25 Nov 2023 13:56:25 +0100 Subject: [PATCH] Update nl.makro.json --- .../extract/templates/nl/nl.makro.json | 52 ++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/src/invoice2data/extract/templates/nl/nl.makro.json b/src/invoice2data/extract/templates/nl/nl.makro.json index 98b18eb2..7bb26384 100644 --- a/src/invoice2data/extract/templates/nl/nl.makro.json +++ b/src/invoice2data/extract/templates/nl/nl.makro.json @@ -12,7 +12,7 @@ "amount_untaxed": { "parser": "regex", "regex": [ - "Netto totaal[:]\\s+(\\d+[,]\\d{2})" + "Netto totaal[:]\\s+(\\d+[.,]\\d{2})" ], "type": "float" }, @@ -106,11 +106,11 @@ ] }, { - "start": ",\\d{3}\\n-{134}", + "start": "[.,]\\d{3}\\n-{134}", "end": "\\Z", "line": [ - "(?P((?:\\S+\\s)?\\w+(?:\\s\\S+)*))\\s+(?P\\d+[,.]\\d{2}[-])\\s+(?P\\d)\\s+(?P(\\d+))?" - ] + "(?P((?:\\S+\\s)?\\w+(?:\\s\\S+)*))\\s+(?P[-]?\\d+.\\d{2}[-]?)\\s+(?P\\d)\\s+(?P(\\d+))?" + ] } ], "types": { @@ -149,7 +149,47 @@ [ "\\s(?P(\\d+.\\d+))(?P(\\s+))(?P(\\d+(.\\d{3})?))\\s(?P\\w+)\\s+(?P\\d+.\\d{2})\\s+(?P\\d)\\s+(?P\\d+.\\d{2})\\s+(?P5)\\s", " \\g\\g\\g \\g \\g \\g \\g 9 " - ] + ], + [ + "(?P(\\s{18}))(?P((?:\\S+\\s)?\\w+(?:\\s\\S+)*))(?P(\\s+))(?P\\d+.\\d{2})(?P[-]?)\\s+(?P5)\\s+(?P(\\d+))?", + "\\g\\g\\g\\g\\g 9 \\g" + ], + [ + "(?P(\\s{18}))(?P((?:\\S+\\s)?\\w+(?:\\s\\S+)*))(?P(\\s+))(?P\\d+.\\d{2})(?P[-]?)\\s+(?P1)\\s+(?P(\\d+))?", + "\\g\\g\\g\\g\\g 21 \\g" + ], + [ + " ST ", + " Units " + ], + [ + " BX ", + " Units " + ], + [ + " BL ", + " Units " + ], + [ + " ZK ", + " Units " + ], + [ + " FL ", + " Units " + ], + [ + " PK ", + " Units " + ], + [ + " BS ", + " Units " + ], + [ + " DS ", + " Units " + ] ] } -} \ No newline at end of file +}