From: Sven Schöling Date: Sun, 14 Nov 2021 23:28:25 +0000 (+0100) Subject: DeliveryOrder: Übergabe in/out verbessert X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~216^2~57 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0eea0d4d7d489f49a6451b01799bb9c7d77f358f;p=kivitendo-erp.git DeliveryOrder: Übergabe in/out verbessert --- 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 %]