From d7ca155122347833221c0f2ee084adc751a88f8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Thu, 21 Jan 2021 08:11:20 +0100 Subject: [PATCH] =?utf8?q?Standardlagerpl=C3=A4tze=20in=20Part=20sortiert?= =?utf8?q?=20anzeigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Part.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index f589a715a..a0ff1e700 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -556,7 +556,7 @@ sub action_warehouse_changed { die unless ref($self->warehouse) eq 'SL::DB::Warehouse'; if ( $self->warehouse->id and @{$self->warehouse->bins} ) { - $self->bin($self->warehouse->bins->[0]); + $self->bin($self->warehouse->bins_sorted->[0]); $self->js ->html('#bin', $self->build_bin_select) ->focus('#part_bin_id'); @@ -889,7 +889,7 @@ sub parse_form_customerprices { } sub build_bin_select { - select_tag('part.bin_id', [ $_[0]->warehouse->bins ], + select_tag('part.bin_id', [ @{ $_[0]->warehouse->bins_sorted } ], title_key => 'description', default => $_[0]->bin->id, ); -- 2.20.1