From: Stephan Köhler Date: Mon, 12 Dec 2005 16:08:12 +0000 (+0000) Subject: Merge von 685 aus unstable: Bugfix Preisgruppen X-Git-Tag: release-2.2.0~71 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9dd784ba657cfa9177742883effdbd065ce2525b;p=kivitendo-erp.git Merge von 685 aus unstable: Bugfix Preisgruppen Problem bei Preisgruppen und Kommabetraegen und individuellen Preisen geloest --- diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 1a2a9c335..608726ff4 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -425,7 +425,6 @@ sub set_pricegroup { my $rowcount = shift; $lxdebug->enter_sub(); for $j (1 .. $rowcount) { - my $pricegroup_old = $form->{"pricegroup_old_$i"}; if ($form->{PRICES}{$j}) { $len = 0; @@ -443,20 +442,26 @@ sub set_pricegroup { qq|\n|; $len += 1; + map { + $form->{"${_}_$j"} = + $form->format_amount(\%myconfig, $form->{"${_}_$j"}) + } qw(sellprice price_new price_old); # set new selectedpricegroup_id and prices for "Preis" - if ($item->{selected}) { + if ($item->{selected} && ($pricegroup_id != 0)) { $form->{"pricegroup_old_$j"} = $pricegroup_id; $form->{"price_new_$j"} = $price; $form->{"sellprice_$j"} = $price; } - if ($len >= 1) { + if ($pricegroup_id == 0) { + $form->{"price_new_$j"} = $form->{"sellprice_$j"}; + } + if ($len > 1) { $form->{"prices_$j"} = $prices; } } } } - $lxdebug->leave_sub(); }