From 24a27ac1eb385d7736a9b727517f5d2341a6417d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Thu, 27 Jan 2022 09:38:58 +0100 Subject: [PATCH] =?utf8?q?CSV=20Lagerbewegungs-Import:=20Numberformat=20f?= =?utf8?q?=C3=BCr=20Flie=C3=9Fkommazahlen=20(qty)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/CsvImport/Inventory.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SL/Controller/CsvImport/Inventory.pm b/SL/Controller/CsvImport/Inventory.pm index 456963ba5..b7d2ce349 100644 --- a/SL/Controller/CsvImport/Inventory.pm +++ b/SL/Controller/CsvImport/Inventory.pm @@ -281,6 +281,15 @@ sub check_qty{ my $object = $entry->{object}; + # parse qty (may be float values) + if (exists $entry->{raw_data}->{target_qty}) { + $entry->{raw_data}->{target_qty} = $::form->parse_amount(\%::myconfig, $entry->{raw_data}->{target_qty}); + $object->target_qty($entry->{raw_data}->{target_qty}); + } + if (exists $entry->{raw_data}->{qty}) { + $entry->{raw_data}->{qty} = $::form->parse_amount(\%::myconfig, $entry->{raw_data}->{qty}); + $object->qty($entry->{raw_data}->{qty}); + } if (! exists $entry->{raw_data}->{target_qty} && ! exists $entry->{raw_data}->{qty}) { push @{ $entry->{errors} }, $::locale->text('Error: A quantity or a target quantity must be given.'); return 0; -- 2.20.1