From 4608f07db8f501d42b5fc16eba26fd6506976f83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 28 Sep 2015 22:24:04 +0200 Subject: [PATCH] Auftrags-Controller: CVars auch vor Drucken/E-Mail initialisieren --- SL/Controller/Order.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index bd20669ac..cc0f57e83 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -490,6 +490,10 @@ sub _get_unalterable_data { #$item->active_price_source(''); #$item->active_discount_source(''); } + + # autovivify all cvars that are not in the form (cvars_by_config can do it). + $item->cvars_by_config; + $item->parse_custom_variable_values; } } @@ -497,11 +501,6 @@ sub _get_unalterable_data { sub _save { my ($self) = @_; - # autovivify all cvars that are not in the form (cvars_by_config can do it) - foreach my $item (@{ $self->order->items }) { - $item->cvars_by_config; - } - my $errors = []; my $db = $self->order->db; -- 2.20.1