$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';
$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;
}