]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/Controller/Order.pm
Auftrags-Controller: CVars auch vor Drucken/E-Mail initialisieren
[kivitendo-erp.git] / SL / Controller / Order.pm
index bd20669ac509beab42516ef9a35861b33a735c89..cc0f57e833466b59b6ca94aae615a7b5e31df91c 100644 (file)
@@ -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;