From 1b16406a883d9fa5c86c951e596a5ae549272dd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 28 Sep 2015 22:26:46 +0200 Subject: [PATCH] Auftrags-Controller: CVars parse-number-Workaround --- SL/Controller/Order.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index cc0f57e83..334d2557f 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -492,7 +492,10 @@ sub _get_unalterable_data { } # autovivify all cvars that are not in the form (cvars_by_config can do it). - $item->cvars_by_config; + # workaround to pre-parse number-cvars (parse_custom_variable_values does not parse number values). + foreach my $var (@{ $item->cvars_by_config }) { + $var->unparsed_value($::form->parse_amount(\%::myconfig, $var->{__unparsed_value})) if ($var->config->type eq 'number' && exists($var->{__unparsed_value})); + } $item->parse_custom_variable_values; } } -- 2.20.1