From: Moritz Bunkus Date: Mon, 23 May 2011 08:46:06 +0000 (+0200) Subject: Verhindern, dass Lieferscheine mehrfach ein- bzw. ausgelagert werden können X-Git-Tag: release-2.6.3~25^2~8^2~8 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=251dc385d50e0aeddbdd47c5b472cc45525647db;p=kivitendo-erp.git Verhindern, dass Lieferscheine mehrfach ein- bzw. ausgelagert werden können Ging in 088bf5a0 kaputt. Fix für Bug 1660. --- diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 10deb0cc1..b9cfc02ab 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -1248,16 +1248,16 @@ sub set_stock_out { sub transfer_in { $main::lxdebug->enter_sub(); - save(no_redirect => 1); - my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - if (DO->is_marked_as_delivered('id' => $form->{id})) { + if ($form->{id} && DO->is_marked_as_delivered(id => $form->{id})) { $form->show_generic_error($locale->text('The parts for this delivery order have already been transferred in.'), 'back_button' => 1); } + save(no_redirect => 1); + my @part_ids = map { $form->{"id_${_}"} } grep { $form->{"id_${_}"} && $form->{"stock_in_${_}"} } (1 .. $form->{rowcount}); my @all_requests; @@ -1316,16 +1316,16 @@ sub transfer_in { sub transfer_out { $main::lxdebug->enter_sub(); - save(no_redirect => 1); - my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - if (DO->is_marked_as_delivered('id' => $form->{id})) { + if ($form->{id} && DO->is_marked_as_delivered(id => $form->{id})) { $form->show_generic_error($locale->text('The parts for this delivery order have already been transferred out.'), 'back_button' => 1); } + save(no_redirect => 1); + my @part_ids = map { $form->{"id_${_}"} } grep { $form->{"id_${_}"} && $form->{"stock_out_${_}"} } (1 .. $form->{rowcount}); my @all_requests;