X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5067d7bd31514962af9730b33323b831d87164f8..c364e43efab3ac6f0f0c20cd6f8f89a85ab45280:/bin/mozilla/ic.pl diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index fdd7a822d..d3cd91094 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -100,12 +100,11 @@ sub search { $form->{lastsort} = ""; # memory for which table was sort at last time $form->{ndxs_counter} = 0; # counter for added entries to top100 - # for seach all possibibilities, is_service only used as UNLESS so == 0 - my %is_xyz = ("is_part" => 1, "is_service" => 0, "is_assembly" =>1 ); + my %is_xyz = map { +"is_$_" => ($form->{searchitems} eq $_) } qw(part service assembly); $form->{title} = (ucfirst $form->{searchitems}) . "s"; - $form->{title} =~ s/ys$/ies/; $form->{title} = $locale->text($form->{title}); + $form->{title} = $locale->text('Assemblies') if ($is_xyz{is_assembly}); $form->{CUSTOM_VARIABLES} = CVar->get_configs('module' => 'IC'); ($form->{CUSTOM_VARIABLES_FILTER_CODE}, @@ -234,7 +233,7 @@ sub top100 { # searchitems=part revers=0 lastsort='' # # filter: -# partnumber ean description partsgroup classification serialnumber make model drawing microfiche +# partnumber ean description partsgroup serialnumber make model drawing microfiche # transdatefrom transdateto # # radio: @@ -301,7 +300,6 @@ sub generate_report { 'unit' => { 'text' => $locale->text('Unit'), }, 'weight' => { 'text' => $locale->text('Weight'), }, 'shop' => { 'text' => $locale->text('Shop article'), }, - 'type_and_classific' => { 'text' => $locale->text('Type'), }, 'projectnumber' => { 'text' => $locale->text('Project Number'), }, 'projectdescription' => { 'text' => $locale->text('Project Description'), }, ); @@ -426,9 +424,8 @@ sub generate_report { $form->{l_linetotallastcost} = $form->{searchitems} eq 'assembly' && !$form->{bom} ? "" : 'Y' if $form->{l_lastcost}; $form->{l_linetotallistprice} = "Y" if $form->{l_listprice}; } - $form->{"l_type_and_classific"} = "Y"; - if ($form->{l_service} && !$form->{l_assembly} && !$form->{l_part}) { + if ($form->{searchitems} eq 'service') { # remove bin, weight and rop from list map { $form->{"l_$_"} = "" } qw(bin weight rop); @@ -475,7 +472,7 @@ sub generate_report { IC->all_parts(\%myconfig, \%$form); my @columns = qw( - partnumber type_and_classific description notes partsgroup bin onhand rop soldtotal unit listprice + partnumber description notes partsgroup bin onhand rop soldtotal unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber transdate name serialnumber deliverydate ean projectnumber projectdescription @@ -508,7 +505,6 @@ sub generate_report { my @hidden_variables = ( qw(l_subtotal l_linetotal searchitems itemstatus bom l_pricegroups insertdatefrom insertdateto), - qw(l_type_and_classific classification_id), @itemstatus_keys, @callback_keys, map({ "cvar_$_->{name}" } @searchable_custom_variables), @@ -535,14 +531,13 @@ sub generate_report { 'part' => $locale->text('part_list'), 'service' => $locale->text('service_list'), 'assembly' => $locale->text('assembly_list'), - 'article' => $locale->text('article_list'), ); $report->set_options('raw_top_info_text' => $form->parse_html_template('ic/generate_report_top', { options => \@options }), 'raw_bottom_info_text' => $form->parse_html_template('ic/generate_report_bottom'), 'output_format' => 'HTML', 'title' => $form->{title}, - 'attachment_basename' => 'article_list' . strftime('_%Y%m%d', localtime time), + 'attachment_basename' => $attachment_basenames{$form->{searchitems}} . strftime('_%Y%m%d', localtime time), ); $report->set_options_from_form(); $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; @@ -652,8 +647,6 @@ sub generate_report { map { $row->{$_}{link} = $ref->{$_} } qw(drawing microfiche); $row->{notes}{data} = SL::HTML::Util->strip($ref->{notes}); - $row->{type_and_classific}{data} = $::request->presenter->type_abbreviation($ref->{part_type}). - $::request->presenter->classification_abbreviation($ref->{classification_id}); $report->add_data($row); @@ -665,7 +658,7 @@ sub generate_report { (!$next_ref->{assemblyitem} && ($same_item ne $next_ref->{ $form->{sort} })))) { my $row = { map { $_ => { 'class' => 'listsubtotal', } } @columns }; - if ( !$form->{l_assembly} || !$form->{bom}) { + if (($form->{searchitems} ne 'assembly') || !$form->{bom}) { $row->{soldtotal}->{data} = $form->format_amount(\%myconfig, $subtotals{soldtotal}); } @@ -703,7 +696,7 @@ sub parts_subtotal { my ($column_index, $subtotalonhand, $subtotalsellprice, $subtotallastcost, $subtotallistprice) = @_; map { $column_data{$_} = "