X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=c7d7b694a5ae1e54783876cb1ce11052fab70987;hb=501107ad47b6385a9986aab9048b98ed5784182e;hp=2e12294f7bc17ee9415ad7a817643e47f8c66e1c;hpb=54e4131e091831e00a861fe2c4f53e344b87ddca;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 2e12294f7..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(); @@ -1655,6 +1648,8 @@ sub print_form { $form->{invdate} = $form->{"${inv}date"} = $form->{transdate}; $form->{label} = $locale->text('Packing List'); $order = 1; + # set invnumber for template packing_list + $form->{invnumber} = $form->{ordnumber}; } if ($form->{formname} eq 'pick_list') { $inv = "ord"; @@ -1807,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);