From 5428f5f6d9dbced453dcfc113f683ceacee6380a Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 16 Oct 2018 15:47:10 +0200 Subject: [PATCH] =?utf8?q?Angebote/Auftr=C3=A4ge:=20Benutzerdef.=20Variabl?= =?utf8?q?en=20in=20Lieferadressen=20gefixt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/oe.pl | 9 +++++++-- templates/webpages/oe/form_footer.html | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 940d07660..04cb6266c 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -633,8 +633,6 @@ sub form_header { $form->{shipto_id} = $form->{CFDD_shipto_id}; } - push @custom_hiddens, map { "shiptocvar_" . $_->name } @{ SL::DB::Manager::CustomVariableConfig->get_all(where => [ module => 'ShipTo' ]) }; - $TMPL_VAR->{HIDDENS} = [ map { name => $_, value => $form->{$_} }, qw(id type vc proforma queued printed emailed title creditlimit creditremaining tradediscount business @@ -731,6 +729,12 @@ sub form_footer { my $print_options_html = setup_sales_purchase_print_options(); + my $shipto_cvars = SL::DB::Shipto->new->cvars_by_config; + foreach my $var (@{ $shipto_cvars }) { + my $name = "shiptocvar_" . $var->config->name; + $var->value($form->{$name}) if exists $form->{$name}; + } + print $form->parse_html_template("oe/form_footer", { %$TMPL_VAR, print_options => $print_options_html, @@ -740,6 +744,7 @@ sub form_footer { is_req_quo => scalar ($form->{type} =~ /request_quotation$/), is_sales_ord => scalar ($form->{type} =~ /sales_order$/), is_pur_ord => scalar ($form->{type} =~ /purchase_order$/), + shipto_cvars => $shipto_cvars, }); $main::lxdebug->leave_sub(); diff --git a/templates/webpages/oe/form_footer.html b/templates/webpages/oe/form_footer.html index 6f510d5ea..a576fff56 100644 --- a/templates/webpages/oe/form_footer.html +++ b/templates/webpages/oe/form_footer.html @@ -139,7 +139,7 @@ [% END %] -- 2.20.1