X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=d799a0c1c382cb0195a179f90aef02a392fd7bb8;hb=fe73e0d261229f181e8133283b530509773d2151;hp=b796a7b1027bf8fb27eca98edcd37c955a042595;hpb=57bf9c89a037036fcf433de39643778854defe51;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index b796a7b10..d799a0c1c 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -151,7 +151,7 @@ sub display_row { { id => 'serialnr', width => 10, value => $locale->text('Serial No.'), display => 0, }, { id => 'projectnr', width => 10, value => $locale->text('Project'), display => 0, }, { id => 'sellprice', width => 15, value => $locale->text('Price'), display => !$is_delivery_order, }, - { id => 'sellprice_pg', width => 8, value => $locale->text('Pricegroup'), display => ($form->{type} =~ /^sales_/) && !$is_delivery_order, }, + { id => 'sellprice_pg', width => 8, value => $locale->text('Pricegroup'), display => ($form->{type} =~ /^(sales_|invoice)/) && !$is_delivery_order, }, { id => 'discount', width => 5, value => $locale->text('Discount'), display => !$is_delivery_order, }, { id => 'linetotal', width => 10, value => $locale->text('Extended'), display => !$is_delivery_order, }, { id => 'bin', width => 10, value => $locale->text('Bin'), display => 0, }, @@ -245,8 +245,7 @@ sub display_row { $column_data{"unit"} = AM->unit_select_html($all_units, "unit_$i", $this_unit, $form->{"id_$i"} ? $form->{"unit_$i"} : undef); # / unit ending - $form->{"sellprice_$i"} =~ /\.(\d+)/; - my $decimalplaces = max 2, length $1; + my $decimalplaces = ($form->{"sellprice_$i"} =~ /\.(\d+)/) ? max 2, length $1 : 2; my $price_factor = $price_factors{$form->{"price_factor_id_$i"}} || 1; my $discount = $form->round_amount($form->{"qty_$i"} * $form->{"sellprice_$i"} * $form->{"discount_$i"} / 100 / $price_factor, 2); @@ -260,8 +259,7 @@ sub display_row { : $cgi->textfield(-name => "description_$i", -size => 30, -value => $form->{"description_$i"})) . $cgi->button(-value => $locale->text('L'), -onClick => "set_longdescription_window('longdescription_$i')"); - $form->{"qty_$i"} =~ /\.(\d+)/; - my $qty_dec = length $1; + my $qty_dec = ($form->{"qty_$i"} =~ /\.(\d+)/) ? length $1 : 2; $column_data{qty} = $cgi->textfield(-name => "qty_$i", -size => 5, -value => $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec)); $column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)", -value => $locale->text('*/')) @@ -1210,7 +1208,7 @@ sub print_options { ); my %template_vars = ( - display_copies => scalar @{ $form->{printers} } && $main::latex_templates && $form->{media} ne 'email', + display_copies => scalar @{ $form->{printers} || [] } && $main::latex_templates && $form->{media} ne 'email', display_remove_draft => (!$form->{id} && $form->{draft_id}), display_groupitems => !$dont_display_groupitems{$form->{type}}, groupitems_checked => $form->{groupitems} ? "checked" : '',