From 1b6ded9f5b9dcd1367f803592786a8df48992a7d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 2 Aug 2007 07:16:24 +0000 Subject: [PATCH] =?utf8?q?Revert=20von=20Revision=202795:=20ic.pl=20enthie?= =?utf8?q?lt=20=C3=84nderungen,=20die=20ich=20noch=20nicht=20committen=20w?= =?utf8?q?ollte.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ic.pl | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 86bddaa70..abd36a84d 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1736,11 +1736,10 @@ sub generate_report { # fresh row, for inserting later my $row = { map { $_ => { 'data' => $ref->{$_} } } @columns }; - $ref->{exchangerate} ||= 1; - $ref->{price_factor} ||= 1; - $ref->{sellprice} *= $ref->{exchangerate} / $ref->{price_factor}; - $ref->{listprice} *= $ref->{exchangerate} / $ref->{price_factor}; - $ref->{lastcost} *= $ref->{exchangerate} / $ref->{price_factor}; + $ref->{exchangerate} = 1 unless $ref->{exchangerate}; + $ref->{sellprice} *= $ref->{exchangerate}; + $ref->{listprice} *= $ref->{exchangerate}; + $ref->{lastcost} *= $ref->{exchangerate}; # use this for assemblies my $onhand = $ref->{onhand}; @@ -1987,7 +1986,6 @@ sub form_header { my ($notdiscountableok, $notdiscountable); my ($formula, $formula_label, $imagelinks, $obsolete, $shopok, $shop); - $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS'); map({ $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}, -2) } qw(sellprice listprice lastcost gv)); @@ -2328,22 +2326,6 @@ sub form_header { $unit_select .= AM->unit_select_html($units, "unit", $form->{"unit"}); } - my $price_factor; - if (0 < scalar @{ $form->{ALL_PRICE_FACTORS} }) { - my @values = ('', map { $_->{id} } @{ $form->{ALL_PRICE_FACTORS} }); - my %labels = map { $_->{id} => $_->{description} } @{ $form->{ALL_PRICE_FACTORS} }; - - $price_factor = - qq|| - . $locale->text('Price Factor') - . qq|| - . NTI($cgi->popup_menu('-name' => 'price_factor_id', - '-default' => $form->{price_factor_id}, - '-values' => \@values, - '-labels' => \%labels)) - . qq||; - } - $form->{fokus} = "ic.partnumber"; $form->header; @@ -2457,7 +2439,6 @@ sub form_header { {sellprice}> $lastcost - $price_factor | . $locale->text('Unit') . qq| $unit_select @@ -2911,7 +2892,7 @@ sub save { # now take it apart and restore original values foreach my $item (split /&/, $previousform) { - my ($key, $value) = split m/=/, $item, 2; + my ($key, $value) = split /=/, $item, 2; $value =~ s/%26/&/g; $form->{$key} = $value; } -- 2.20.1