Revision 1b6ded9f
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
1736 | 1736 |
# fresh row, for inserting later |
1737 | 1737 |
my $row = { map { $_ => { 'data' => $ref->{$_} } } @columns }; |
1738 | 1738 |
|
1739 |
$ref->{exchangerate} ||= 1; |
|
1740 |
$ref->{price_factor} ||= 1; |
|
1741 |
$ref->{sellprice} *= $ref->{exchangerate} / $ref->{price_factor}; |
|
1742 |
$ref->{listprice} *= $ref->{exchangerate} / $ref->{price_factor}; |
|
1743 |
$ref->{lastcost} *= $ref->{exchangerate} / $ref->{price_factor}; |
|
1739 |
$ref->{exchangerate} = 1 unless $ref->{exchangerate}; |
|
1740 |
$ref->{sellprice} *= $ref->{exchangerate}; |
|
1741 |
$ref->{listprice} *= $ref->{exchangerate}; |
|
1742 |
$ref->{lastcost} *= $ref->{exchangerate}; |
|
1744 | 1743 |
|
1745 | 1744 |
# use this for assemblies |
1746 | 1745 |
my $onhand = $ref->{onhand}; |
... | ... | |
1987 | 1986 |
my ($notdiscountableok, $notdiscountable); |
1988 | 1987 |
my ($formula, $formula_label, $imagelinks, $obsolete, $shopok, $shop); |
1989 | 1988 |
|
1990 |
$form->get_lists('price_factors' => 'ALL_PRICE_FACTORS'); |
|
1991 | 1989 |
|
1992 | 1990 |
map({ $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}, -2) } |
1993 | 1991 |
qw(sellprice listprice lastcost gv)); |
... | ... | |
2328 | 2326 |
$unit_select .= AM->unit_select_html($units, "unit", $form->{"unit"}); |
2329 | 2327 |
} |
2330 | 2328 |
|
2331 |
my $price_factor; |
|
2332 |
if (0 < scalar @{ $form->{ALL_PRICE_FACTORS} }) { |
|
2333 |
my @values = ('', map { $_->{id} } @{ $form->{ALL_PRICE_FACTORS} }); |
|
2334 |
my %labels = map { $_->{id} => $_->{description} } @{ $form->{ALL_PRICE_FACTORS} }; |
|
2335 |
|
|
2336 |
$price_factor = |
|
2337 |
qq|<tr><th align="right">| |
|
2338 |
. $locale->text('Price Factor') |
|
2339 |
. qq|</th><td>| |
|
2340 |
. NTI($cgi->popup_menu('-name' => 'price_factor_id', |
|
2341 |
'-default' => $form->{price_factor_id}, |
|
2342 |
'-values' => \@values, |
|
2343 |
'-labels' => \%labels)) |
|
2344 |
. qq|</td></tr>|; |
|
2345 |
} |
|
2346 |
|
|
2347 | 2329 |
$form->{fokus} = "ic.partnumber"; |
2348 | 2330 |
$form->header; |
2349 | 2331 |
|
... | ... | |
2457 | 2439 |
<td><input name=sellprice size=11 value=$form->{sellprice}></td> |
2458 | 2440 |
</tr> |
2459 | 2441 |
$lastcost |
2460 |
$price_factor |
|
2461 | 2442 |
<tr> |
2462 | 2443 |
<th align="right" nowrap="true">| . $locale->text('Unit') . qq|</th> |
2463 | 2444 |
<td>$unit_select</td> |
... | ... | |
2911 | 2892 |
|
2912 | 2893 |
# now take it apart and restore original values |
2913 | 2894 |
foreach my $item (split /&/, $previousform) { |
2914 |
my ($key, $value) = split m/=/, $item, 2;
|
|
2895 |
my ($key, $value) = split /=/, $item, 2; |
|
2915 | 2896 |
$value =~ s/%26/&/g; |
2916 | 2897 |
$form->{$key} = $value; |
2917 | 2898 |
} |
Auch abrufbar als: Unified diff
Revert von Revision 2795: ic.pl enthielt Änderungen, die ich noch nicht committen wollte.