Revision e2b15672
Von Niclas Zimmermann vor etwa 12 Jahren hinzugefügt
bin/mozilla/io.pl | ||
---|---|---|
248 | 248 |
$column_data{"unit"} = AM->unit_select_html($all_units, "unit_$i", $this_unit, $form->{"id_$i"} ? $form->{"unit_$i"} : undef); |
249 | 249 |
# / unit ending |
250 | 250 |
|
251 |
#count the max of decimalplaces of sellprice and lastcost, so the same number of decimalplaces |
|
252 |
#is shown for lastcost and sellprice. |
|
251 | 253 |
my $decimalplaces = ($form->{"sellprice_$i"} =~ /\.(\d+)/) ? max 2, length $1 : 2; |
254 |
$decimalplaces = ($form->{"lastcost_$i"} =~ /\.(\d+)/) ? max $decimalplaces, length $1 : $decimalplaces; |
|
252 | 255 |
|
253 | 256 |
my $price_factor = $price_factors{$form->{"price_factor_id_$i"}} || 1; |
254 | 257 |
my $discount = $form->round_amount($form->{"qty_$i"} * $form->{"sellprice_$i"} * $form->{"discount_$i"} / 100 / $price_factor, 2); |
... | ... | |
377 | 380 |
<b>%s</b> <input size="5" name="lastcost_$i" value="%s">|, |
378 | 381 |
$marge_color, $locale->text('Ertrag'),$form->{"marge_absolut_$i"}, $form->{"marge_percent_$i"}, |
379 | 382 |
$locale->text('LP'), $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2), |
380 |
$locale->text('EK'), $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, 2) }
|
|
383 |
$locale->text('EK'), $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, $decimalplaces) }
|
|
381 | 384 |
if $form->{"id_$i"} && ($form->{type} =~ /^sales_/ || $form->{type} =~ /invoice/ || $form->{type} =~ /^credit_note$/ ) && !$is_delivery_order; |
382 | 385 |
|
383 | 386 |
$form->{"listprice_$i"} = $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2) |
Auch abrufbar als: Unified diff
Rundung in Verkaufsrechnung
In der Verkaufsrechnung wird jetzt beim EK Preis und beim Verkaufspreis
die gleicht Anzahl an Nachkommastellen angezeigt.