From 5a923b7934bc346f8e84199f29cdcb2080ce5f26 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 31 May 2013 09:22:49 +0200 Subject: [PATCH] =?utf8?q?Standardlagerplatz=20direkt=20beim=20Umlagern=20?= =?utf8?q?=C3=A4ndern,=20falls=20entsprechend=20angehakt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/WH.pm | 8 +++++++- bin/mozilla/wh.pl | 1 + templates/webpages/wh/transfer_parts_selection.html | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/SL/WH.pm b/SL/WH.pm index 28e836e48..f7ca693e3 100644 --- a/SL/WH.pm +++ b/SL/WH.pm @@ -132,7 +132,13 @@ sub transfer { bin => $dst_bin->id, qty => $qty, )->save; - } + # Standardlagerplatz in Stammdaten gleich mitverschieben + if (defined($transfer->{change_default_bin})){ + my $part = SL::DB::Part->new(id => conv_i($transfer->{parts_id}))->load; + $part->update_attributes(warehouse_id => conv_i($transfer->{dst_warehouse_id})); + $part->update_attributes(bin_id => conv_i($transfer->{dst_bin_id})); + } + } push @trans_ids, $trans_id; } diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 5caee5437..f76b4e969 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -282,6 +282,7 @@ sub transfer_parts { } $transfer->{comment} = $form->{comment}; + $transfer->{change_default_bin} = $form->{change_default_bin}; push @transfers, $transfer; diff --git a/templates/webpages/wh/transfer_parts_selection.html b/templates/webpages/wh/transfer_parts_selection.html index 62ded76ff..5a7aabf86 100644 --- a/templates/webpages/wh/transfer_parts_selection.html +++ b/templates/webpages/wh/transfer_parts_selection.html @@ -56,6 +56,10 @@ [% 'Optional comment' | $T8 %]: + + [% 'Change default bin for this parts' | $T8 %]: + +

-- 2.20.1