From a5389b65f79aa4a9dfd852b88dc10d9bb12fe118 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 31 Jan 2018 14:55:36 +0100 Subject: [PATCH] =?utf8?q?Auftr=C3=A4ge=20speichern:=20Warnung=20bzgl.=20e?= =?utf8?q?xistierender=20wiederkehrender=20Rechnungen=20gefixt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Behebt #341. --- bin/mozilla/oe.pl | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index c1ecf1958..2a57dcae5 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -297,14 +297,14 @@ sub setup_oe_action_bar { my $form = $::form; my $has_active_periodic_invoice; - if ($params{obj}) { + if ($params{oe_obj}) { $has_active_periodic_invoice = - $params{obj}->is_type('sales_order') - && $params{obj}->periodic_invoices_config - && $params{obj}->periodic_invoices_config->active - && ( !$params{obj}->periodic_invoices_config->end_date - || ($params{obj}->periodic_invoices_config->end_date > DateTime->today_local)) - && $params{obj}->periodic_invoices_config->get_previous_billed_period_start_date; + $params{oe_obj}->is_type('sales_order') + && $params{oe_obj}->periodic_invoices_config + && $params{oe_obj}->periodic_invoices_config->active + && ( !$params{oe_obj}->periodic_invoices_config->end_date + || ($params{oe_obj}->periodic_invoices_config->end_date > DateTime->today_local)) + && $params{oe_obj}->periodic_invoices_config->get_previous_billed_period_start_date; } my $allow_invoice = $params{is_req_quo} @@ -622,7 +622,11 @@ sub form_header { is_pur_ord => scalar($form->{type} =~ /purchase_order$/), ); - setup_oe_action_bar(%type_check_vars); + setup_oe_action_bar( + %type_check_vars, + oe_obj => $TMPL_VAR->{oe_obj}, + vc_obj => $TMPL_VAR->{vc_obj}, + ); $form->header; if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) { -- 2.20.1