Revision a0a30f41
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
264 | 264 |
|
265 | 265 |
if ($form->{id}) { |
266 | 266 |
|
267 |
|
|
268 |
# # get pricegroups for parts |
|
269 |
# IS->get_pricegroups_for_parts(\%myconfig, \%$form); |
|
270 |
|
|
271 | 267 |
my $i = 0; |
272 | 268 |
|
273 | 269 |
foreach my $ref (@{ $form->{invoice_details} }) { |
274 | 270 |
$i++; |
275 | 271 |
|
276 | 272 |
map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref}; |
277 |
$form->{"discount_$i"} = |
|
278 |
$form->format_amount(\%myconfig, $form->{"discount_$i"} * 100); |
|
279 |
my ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/); |
|
280 |
$dec = length $dec; |
|
281 |
my $decimalplaces = ($dec > 2) ? $dec : 2; |
|
282 | 273 |
|
283 |
$form->{"sellprice_$i"} = |
|
284 |
$form->format_amount(\%myconfig, $form->{"sellprice_$i"}, |
|
285 |
$decimalplaces); |
|
274 |
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100); |
|
275 |
my ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/); |
|
276 |
$dec = length $dec; |
|
277 |
my $decimalplaces = ($dec > 2) ? $dec : 2; |
|
286 | 278 |
|
287 |
(my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/); |
|
288 |
$dec_qty = length $dec_qty; |
|
279 |
$form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces); |
|
280 |
(my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/); |
|
281 |
$dec_qty = length $dec_qty; |
|
289 | 282 |
|
290 |
$form->{"qty_$i"} = |
|
291 |
$form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty); |
|
283 |
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty); |
|
292 | 284 |
|
293 |
$form->{rowcount} = $i; |
|
285 |
$form->{rowcount} = $i;
|
|
294 | 286 |
|
295 | 287 |
} |
288 |
|
|
289 |
# get pricegroups for parts |
|
290 |
IS->get_pricegroups_for_parts(\%myconfig, \%$form); |
|
291 |
set_pricegroup($_) for 1 .. $form->{rowcount}; |
|
296 | 292 |
} |
297 | 293 |
$main::lxdebug->leave_sub(); |
298 | 294 |
} |
Auch abrufbar als: Unified diff
Pricegruppen in Verkaufsrechnungen anzeigen.