From 771f3d6b7b8deaa77bc1a12c2a57fa362c40b3cd Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 29 Dec 2021 02:38:32 +0100 Subject: [PATCH] add fnc for new matcher --- InvenTree/InvenTree/helpers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/InvenTree/helpers.py b/InvenTree/InvenTree/helpers.py index 42dae832c8..e030d51abf 100644 --- a/InvenTree/InvenTree/helpers.py +++ b/InvenTree/InvenTree/helpers.py @@ -422,6 +422,10 @@ def extract_serial_numbers(serials, expected_quantity, next_number: int): serials = serials.strip() + # fill in the next serial number into the serial + if '~' in serials: + serials = serials.replace('~', next_number) + groups = re.split("[\s,]+", serials) numbers = []