X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=20a9206128a761d88dab17c22e0697190f5ce11b;hb=b5c3b69626032bd48dfdce13d9795acf2eff89fd;hp=13e0a5ac285166c11f2eb3805b6023f7f8a45537;hpb=9434c14ab2cb7d10cbe20276d08771c43f9fffc1;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 13e0a5ac2..20a920612 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1207,7 +1207,8 @@ sub generate_report { map { $column_defs{$_}->{visible} = $form->{"l_$_"} ? 1 : 0 } @columns; map { $column_defs{$_}->{align} = 'right' } qw(onhand sellprice listprice lastcost linetotalsellprice linetotallastcost linetotallistprice rop weight soldtotal); - my @hidden_variables = (qw(l_subtotal l_linetotal searchitems itemstatus bom), @itemstatus_keys, @callback_keys, @searchable_custom_variables, map { "l_$_" } @columns); + my @hidden_variables = (qw(l_subtotal l_linetotal searchitems itemstatus bom), @itemstatus_keys, @callback_keys, + map({ "cvar_$_->{name}" } @searchable_custom_variables), map { "l_$_" } @columns); my $callback = build_std_url('action=generate_report', grep { $form->{$_} } @hidden_variables); my @sort_full = qw(partnumber description onhand soldtotal deliverydate); @@ -1527,7 +1528,9 @@ sub form_header { $auth->assert('part_service_assembly_edit'); - $form->{eur} = $::lx_office_conf{system}->{eur}; # config dumps into namespace - yuck + # what does eur set here? why is it in namespace? + # call of get_accounting_method preserves format of $form->{eur}, which expects 1 or 0 + $form->{eur} = $::instance_conf->get_accounting_method eq 'cash' ? 1 : 0; # config dumps into namespace - yuck $form->{pg_keys} = sub { "$_[0]->{partsgroup}--$_[0]->{id}" }; $form->{description_area} = ($form->{rows} = $form->numtextrows($form->{description}, 40)) > 1; $form->{notes_rows} = max 4, $form->numtextrows($form->{notes}, 40), $form->numtextrows($form->{formel}, 40); @@ -1611,9 +1614,9 @@ sub assembly_row { map { delete $form->{$_} } qw(action header); # save form variables in a previousform variable - $previousform = $form->escape($form->escape(join '&', map { - sprintf "%s=%s", Q($_), /^listprice|lastcost|sellprice$/ ? $form->format_amount(\%myconfig, $form->{$_}) : $form->{$_} - } grep { ref $form->{$_} eq '' && $form->{$_} } grep { !/^select/ } sort keys %$form )); + my %form_to_save = map { ($_ => m/^ (?: listprice | sellprice | lastcost ) $/x ? $form->format_amount(\%myconfig, $form->{$_}) : $form->{$_}) } + keys %{ $form }; + $previousform = $::auth->save_form_in_session(form => \%form_to_save); $form->{callback} = $callback; $form->{assemblytotal} = 0; @@ -1727,7 +1730,7 @@ sub update { if ($rows > 1) { $form->{makemodel_rows}--; - &select_item; + select_item(mode => 'IC'); ::end_of_request(); } else { map { $form->{item_list}[$i]{$_} =~ s/\"/"/g }