X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=c7d7b694a5ae1e54783876cb1ce11052fab70987;hb=101a5e1f45b26386025a130be304a333ee8b64b7;hp=b71ca90b71b5adf0ad2f9611d85b82d53e3be2b7;hpb=39c62c1bb68cd520cccc2889aeaed2601d1a7c93;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index b71ca90b7..c7d7b694a 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -112,7 +112,7 @@ sub display_row { or (($form->{level} =~ /Sales/) and ($form->{type} =~ /invoice/)) or (($form->{level} eq undef) and ($form->{type} =~ /invoice/)) or ($form->{type} =~ /sales_order/)) { - push @column_index, qw(sellprice_drag); + push @column_index, qw(sellprice_pg); } push @column_index, qw(sellprice); @@ -172,7 +172,7 @@ sub display_row { qq|| . $locale->text('Price') . qq||; - $column_data{sellprice_drag} = + $column_data{sellprice_pg} = qq|| . $locale->text('Pricegroup') . qq||; @@ -300,7 +300,7 @@ sub display_row { $column_data{qty} = qq|format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec) .qq|>|; - if ($form->{formel}) { + if ($form->{"formel_$i"}) { $column_data{qty} .= qq| |; } @@ -329,7 +329,7 @@ sub display_row { $is_assigned ? $form->{"unit_$i"} : undef)) . ""; - # build in dragdrop for pricesgroups + # build in drop down list for pricesgroups if ($form->{"prices_$i"}) { if ($form->{"new_pricegroup_$i"} != $form->{"old_pricegroup_$i"}) { $price_tmp = $form->format_amount(\%myconfig, $form->{"price_new_$i"}, $decimalplaces); @@ -337,33 +337,28 @@ sub display_row { $price_tmp = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces); } - $column_data{sellprice_drag} = - qq||; + $column_data{sellprice_pg} = + qq||; $column_data{sellprice} = qq||; } else { # for last row and report - # set pricegroup dragdrop from report menu + # set pricegroup drop down list from report menu if ($form->{"sellprice_$i"} != 0) { $prices = qq|\n|; $form->{"pricegroup_old_$i"} = $form->{"pricegroup_id_$i"}; - $column_data{sellprice_drag} = - qq||; + $column_data{sellprice_pg} = + qq||; } else { # for last row - $column_data{sellprice_drag} = - qq|format_amount(\%myconfig, $form->{"prices_$i"}, - $decimalplaces) - . qq|>|; + $column_data{sellprice_pg} = qq| |; } - print(STDERR "Sellprice vor Ausgabe: ",$form->{"sellprice_$i"},"\n"); $column_data{sellprice} = qq|{prices_$j} sub set_pricegroup { - my $rowcount = shift; $lxdebug->enter_sub(); + my $rowcount = shift; for $j (1 .. $rowcount) { my $pricegroup_old = $form->{"pricegroup_old_$i"}; if ($form->{PRICES}{$j}) { $len = 0; - $prices = ''; + $prices = ''; $price = 0; foreach $item (@{ $form->{PRICES}{$j} }) { @@ -521,7 +516,7 @@ sub set_pricegroup { $pricegroup_id = $item->{pricegroup_id}; $pricegroup = $item->{pricegroup}; - # build dragdrop for pricegroups + # build drop down list for pricegroups $prices .= qq|\n|; @@ -541,10 +536,8 @@ sub set_pricegroup { if ($pricegroup_id == 0) { $form->{"price_new_$j"} = $form->{"sellprice_$j"}; } - if ($len > 1) { - $form->{"prices_$j"} = $prices; - } } + $form->{"prices_$j"} = $prices; } } $lxdebug->leave_sub(); @@ -1809,6 +1802,8 @@ sub print_form { $form->{notes} =~ s/^\s+//g; + map({ $form->{$_} =~ s/\\n/\n/g; } qw(company address)); + $form->{templates} = "$myconfig{templates}"; $form->{language} = $form->get_template_language(\%myconfig);