From: Sven Schöling Date: Wed, 27 May 2009 13:25:22 +0000 (+0000) Subject: Erst parsen, dann numerisch vergleichen. X-Git-Tag: release-2.6.0~24 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=41fd494ac070de51ac7cecab15a2a84b38dffc04;p=kivitendo-erp.git Erst parsen, dann numerisch vergleichen. Fix für Bug 776. --- diff --git a/SL/IC.pm b/SL/IC.pm index 430f56520..ba3edfabb 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -471,17 +471,17 @@ sub save { # insert price records only if different to sellprice for my $i (1 .. $form->{price_rows}) { - if ($form->{"price_$i"} eq "0") { + my $price = $form->parse_amount($myconfig, $form->{"price_$i"}); + if ($price == 0) { $form->{"price_$i"} = $form->{sellprice}; } if ( - ( $form->{"price_$i"} + ( $price || $form->{"klass_$i"} || $form->{"pricegroup_id_$i"}) - and $form->{"price_$i"} != $form->{sellprice} + and $price != $form->{sellprice} ) { #$klass = $form->parse_amount($myconfig, $form->{"klass_$i"}); - $price = $form->parse_amount($myconfig, $form->{"price_$i"}); $query = qq|INSERT INTO prices (parts_id, pricegroup_id, price) | . qq|VALUES(?, ?, ?)|; @values = (conv_i($form->{id}), conv_i($form->{"pricegroup_id_$i"}), $price);