Revision 12c24c2a
Von Bernd Blessmann vor fast 13 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
2088 | 2088 |
|
2089 | 2089 |
$pkr->{price} *= $form->{"basefactor_$i"}; |
2090 | 2090 |
$pkr->{price} *= $basefactor; |
2091 |
$pkr->{price_ufmt} = $pkr->{price}; |
|
2091 | 2092 |
$pkr->{price} = $form->format_amount($myconfig, $pkr->{price}, 5); |
2092 | 2093 |
|
2093 | 2094 |
if ($selectedpricegroup_id eq undef) { |
... | ... | |
2102 | 2103 |
if ($pkr->{pricegroup_id} eq $form->{"pricegroup_id_$i"} and defined $form->{"pricegroup_id_$i"}) { |
2103 | 2104 |
# Case A |
2104 | 2105 |
$pkr->{selected} = ' selected'; |
2105 |
|
|
2106 | 2106 |
} elsif ($pkr->{pricegroup_id} eq $form->{customer_klass} |
2107 | 2107 |
and not defined $form->{"pricegroup_id_$i"} |
2108 |
and $pkr->{price} != 0 # only use customer pricegroup price if it has a value, else use default_sellprice |
|
2109 |
# for the case where pricegroup prices haven't been set |
|
2108 |
and $pkr->{price_ufmt} != 0 # only use customer pricegroup price if it has a value, else use default_sellprice
|
|
2109 |
# for the case where pricegroup prices haven't been set
|
|
2110 | 2110 |
) { |
2111 | 2111 |
# Case B: use default pricegroup of customer |
2112 | 2112 |
|
2113 | 2113 |
$pkr->{selected} = ' selected'; # unless $form->{selected}; |
2114 |
|
|
2115 | 2114 |
# no customer pricesgroup set |
2116 |
if ($pkr->{price} == $pkr->{default_sellprice}) { |
|
2115 |
if ($pkr->{price_unfmt} == $pkr->{default_sellprice}) {
|
|
2117 | 2116 |
|
2118 | 2117 |
$pkr->{price} = $form->{"sellprice_$i"}; |
2119 | 2118 |
|
... | ... | |
2124 | 2123 |
$form->{"sellprice_$i"} = $pkr->{price}; |
2125 | 2124 |
} |
2126 | 2125 |
|
2127 |
} elsif ($pkr->{price} == $pkr->{default_sellprice} and $pkr->{default_sellprice} != 0) { |
|
2126 |
} elsif ($pkr->{price_unfmt} == $pkr->{default_sellprice} and $pkr->{default_sellprice} != 0) {
|
|
2128 | 2127 |
$pkr->{price} = $form->{"sellprice_$i"}; |
2129 | 2128 |
$pkr->{selected} = ' selected'; |
2130 | 2129 |
} |
Auch abrufbar als: Unified diff
Preise mit unformatierten Werten vergleichen.
Sonst wird bei Verwenden einer Währung mit Wechselkurs immer die letzte
Preisgruppe ausgewählt.