From c66624d02068502ae8e7bc55f7ec2edbcd8a4702 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 25 Jun 2008 13:14:02 +0000 Subject: [PATCH] =?utf8?q?Auftr=C3=A4ge:=20Anzeige=20der=20gelieferten=20M?= =?utf8?q?enge=20mit=20der=20selben=20Einheit,=20die=20in=20der=20Zeile=20?= =?utf8?q?ausgew=C3=A4hlt=20wurde,=20um=20leichter=20vergleichbar=20zu=20s?= =?utf8?q?ein.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/io.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 524ccdb7e..16d51bba1 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -252,10 +252,15 @@ sub display_row { $column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)", -value => $locale->text('*/')) . $cgi->hidden(-name => "formel_$i", -value => $form->{"formel_$i"}) . $cgi->hidden("-name" => "alu_$i", "-value" => $form->{"alu_$i"}) if $form->{"formel_$i"}; - $column_data{ship} = !$form->{"id_$i"} ? '' : $form->format_amount_units('amount' => $form->{"ship_$i"} * 1, - 'part_unit' => $form->{"partunit_$i"}, - 'conv_units' => 'convertible_not_smaller', - 'max_places' => 2); + + $column_data{ship} = ''; + if ($form->{"id_$i"}) { + my $ship_qty = $form->{"ship_$i"} * 1; + $ship_qty *= $all_units->{$form->{"partunit_$i"}}->{factor}; + $ship_qty /= $all_units->{$form->{"unit_$i"}}->{factor}; + + $column_data{ship} = $form->format_amount(\%myconfig, $form->round_amount($ship_qty, 2) * 1) . ' ' . $form->{"unit_$i"}; + } # build in drop down list for pricesgroups if ($form->{"prices_$i"}) { -- 2.20.1