Revision 41fd494a
Von Sven Schöling vor mehr als 15 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
471 | 471 |
|
472 | 472 |
# insert price records only if different to sellprice |
473 | 473 |
for my $i (1 .. $form->{price_rows}) { |
474 |
if ($form->{"price_$i"} eq "0") { |
|
474 |
my $price = $form->parse_amount($myconfig, $form->{"price_$i"}); |
|
475 |
if ($price == 0) { |
|
475 | 476 |
$form->{"price_$i"} = $form->{sellprice}; |
476 | 477 |
} |
477 | 478 |
if ( |
478 |
( $form->{"price_$i"}
|
|
479 |
( $price
|
|
479 | 480 |
|| $form->{"klass_$i"} |
480 | 481 |
|| $form->{"pricegroup_id_$i"}) |
481 |
and $form->{"price_$i"} != $form->{sellprice}
|
|
482 |
and $price != $form->{sellprice}
|
|
482 | 483 |
) { |
483 | 484 |
#$klass = $form->parse_amount($myconfig, $form->{"klass_$i"}); |
484 |
$price = $form->parse_amount($myconfig, $form->{"price_$i"}); |
|
485 | 485 |
$query = qq|INSERT INTO prices (parts_id, pricegroup_id, price) | . |
486 | 486 |
qq|VALUES(?, ?, ?)|; |
487 | 487 |
@values = (conv_i($form->{id}), conv_i($form->{"pricegroup_id_$i"}), $price); |
Auch abrufbar als: Unified diff
Erst parsen, dann numerisch vergleichen.
Fix für Bug 776.