From: Bernd Bleßmann Date: Mon, 28 Sep 2015 20:26:46 +0000 (+0200) Subject: Auftrags-Controller: CVars parse-number-Workaround X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1b16406a883d9fa5c86c951e596a5ae549272dd4;p=kivitendo-erp.git Auftrags-Controller: CVars parse-number-Workaround --- 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; } }