From 137c9df38763ec61f4d459f798a69b47db7dd009 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 19 Mar 2008 18:00:52 +0000 Subject: [PATCH] Fehler in der Berechnung des angezeigten Lagerausgangs/Lagereingangs in Lieferscheinen. --- bin/mozilla/do.pl | 4 +++- bin/mozilla/io.pl | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 911c90edb..2eee9ed96 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -756,6 +756,8 @@ sub calculate_stock_in_out { return ''; } + AM->retrieve_all_units(); + my $in_out = $form->{type} =~ /^sales/ ? 'out' : 'in'; my $sinfo = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_${i}"}); @@ -763,7 +765,7 @@ sub calculate_stock_in_out { my $content = $form->format_amount_units('amount' => $sum * 1, 'part_unit' => $form->{"partunit_$i"}, - 'amount_unit' => $units->{$form->{"partunit_$i"}}->{base_unit}, + 'amount_unit' => $all_units->{$form->{"partunit_$i"}}->{base_unit}, 'conv_units' => 'convertible_not_smaller', 'max_places' => 2); $content .= qq| |; diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 4ae095648..a87e684f8 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -122,6 +122,8 @@ sub display_row { $stock_in_out_title = $locale->text('Transfer To Stock'); $stock_in_out = 'in'; } + + retrieve_partunits(); } # column_index @@ -333,8 +335,6 @@ sub display_row { push @hidden_vars, "stock_${stock_in_out}_sum_qty", "stock_${stock_in_out}"; } - push @hidden_vars, qw(partunit) if ($is_purchase); - my @HIDDENS = map { value => $_}, ( $cgi->hidden("-name" => "unit_old_$i", "-value" => $form->{"selected_unit_$i"}), $cgi->hidden("-name" => "price_new_$i", "-value" => $form->format_amount(\%myconfig, $form->{"price_new_$i"})), -- 2.20.1