From: Jan Büren Date: Thu, 27 Jan 2022 08:38:58 +0000 (+0100) Subject: CSV Lagerbewegungs-Import: Numberformat für Fließkommazahlen (qty) X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~231 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=24a27ac1eb385d7736a9b727517f5d2341a6417d;p=kivitendo-erp.git CSV Lagerbewegungs-Import: Numberformat für Fließkommazahlen (qty) --- 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;