From 0eea0d4d7d489f49a6451b01799bb9c7d77f358f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 15 Nov 2021 00:28:25 +0100 Subject: [PATCH] =?utf8?q?DeliveryOrder:=20=C3=9Cbergabe=20in/out=20verbes?= =?utf8?q?sert?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/DeliveryOrder.pm | 6 +++--- SL/Controller/DeliveryOrder/TypeData.pm | 4 ++++ templates/webpages/delivery_order/tabs/basic_data.html | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/SL/Controller/DeliveryOrder.pm b/SL/Controller/DeliveryOrder.pm index 547e3e2a0..505f9de2a 100644 --- a/SL/Controller/DeliveryOrder.pm +++ b/SL/Controller/DeliveryOrder.pm @@ -407,7 +407,7 @@ sub action_save_and_show_email_dialog { email_form => $email_form, show_bcc => $::auth->assert('email_bcc', 'may fail'), FILES => \%files, - is_customer => $self->cv eq 'customer', + is_customer => $self->type_data->is_customer, ALL_EMPLOYEES => $self->{all_employees}, ); @@ -1637,7 +1637,7 @@ sub pre_render { } } @all_objects; } - $self->{template_args}{inout} = $self->type_data->properties('transfer'); + $self->{template_args}{in_out} = $self->type_data->transfer; $self->get_item_cvpartnumber($_) for @{$self->order->items_sorted}; @@ -2007,7 +2007,7 @@ sub calculate_stock_in_out { return "" if !$item->part || !$item->part->unit || !$item->unit; - my $in_out = $self->type_data->properties("transfer"); + my $in_out = $self->type_data->transfer; my $do_qty = $item->qty; my $sum = sum0 map { diff --git a/SL/Controller/DeliveryOrder/TypeData.pm b/SL/Controller/DeliveryOrder/TypeData.pm index 5b7cfe949..8db84c441 100644 --- a/SL/Controller/DeliveryOrder/TypeData.pm +++ b/SL/Controller/DeliveryOrder/TypeData.pm @@ -65,6 +65,10 @@ sub nr_key { get3($_[0]->c->type, "properties", "nr_key"); } +sub transfer { + get3($_[0]->c->type, "properties", "transfer"); +} + sub part_classification_query { my ($self, $string) = @_; get($self->c->type, "part_classification_query"); diff --git a/templates/webpages/delivery_order/tabs/basic_data.html b/templates/webpages/delivery_order/tabs/basic_data.html index d3ff15518..2848532b3 100644 --- a/templates/webpages/delivery_order/tabs/basic_data.html +++ b/templates/webpages/delivery_order/tabs/basic_data.html @@ -222,10 +222,10 @@ [%- END -%] [%- 'Qty' | $T8 %] [%- 'Unit' | $T8 %] - [% IF inout == 'in' %] + [% IF in_out == 'in' %] [%- 'Transfer To Stock' | $T8 %] [% END %] - [% IF inout == 'out' %] + [% IF in_out == 'out' %] [%- 'Release From Stock' | $T8 %] [% END %] -- 2.20.1