From: Jan Büren Date: Fri, 31 May 2013 07:22:49 +0000 (+0200) Subject: Standardlagerplatz direkt beim Umlagern ändern, falls entsprechend angehakt X-Git-Tag: release-3.1.0beta1~397 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5a923b7934bc346f8e84199f29cdcb2080ce5f26;p=kivitendo-erp.git Standardlagerplatz direkt beim Umlagern ändern, falls entsprechend angehakt --- 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 %]: + +