From 7d2c69950a1d3bf8a516a7d8df01be491319e264 Mon Sep 17 00:00:00 2001 From: bernd Date: Tue, 28 Dec 2010 14:45:27 +0100 Subject: [PATCH] =?utf8?q?Preis=20=C3=BCberschreiben=20bei=20Preisgruppe.?= =?utf8?q?=20Fix=20f.=20Bug=201185?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Aber: im Code f. die Preisgruppen sind noch mehr Bugs, da muss nochmal umfassender nachgeschaut werden. --- SL/IS.pm | 8 ++++---- bin/mozilla/is.pl | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/SL/IS.pm b/SL/IS.pm index d1358dec5..e9e4711b1 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -2076,14 +2076,14 @@ sub get_pricegroups_for_parts { $pkr->{price} = $form->{"sellprice_$i"}; $pkr->{selected} = ' selected'; } - } - - if ($selectedpricegroup_id or $selectedpricegroup_id == 0) { + } else { if ($selectedpricegroup_id ne $pricegroup_old) { if ($pkr->{pricegroup_id} eq $selectedpricegroup_id) { $pkr->{selected} = ' selected'; } - } elsif (($price_new != $form->{"sellprice_$i"}) and ($price_new ne 0)) { + } elsif ( ( $form->parse_amount($myconfig, $price_new) + != $form->parse_amount($myconfig, $form->{"sellprice_$i"})) + and ($price_new ne 0)) { if ($pkr->{pricegroup_id} == 0) { $pkr->{price} = $form->{"sellprice_$i"}; $pkr->{selected} = ' selected'; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 9ec9becb8..f83560334 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -266,6 +266,8 @@ sub prepare_invoice { $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty); + $form->{"sellprice_pg_$i"} = join ('--', $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"}); + $form->{rowcount} = $i; } -- 2.20.1