Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision db791046

Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt

  • ID db791046bcff820895321c617d66843f4c28aeae
  • Vorgänger 5d2ede53
  • Nachfolger 4ad886ef

Im Lagerstandsbericht nach Warengruppe filtern können.

Übernahme aus Kundenprojekt

Unterschiede anzeigen:

SL/WH.pm
554 554
    push @filter_vars, $filter{partsid};
555 555
  }
556 556

  
557
  if ($filter{partsgroup_id}) {
558
    push @filter_ary,  "p.partsgroup_id = ?";
559
    push @filter_vars, $filter{partsgroup_id};
560
  }
561

  
557 562
  if ($filter{chargenumber}) {
558 563
    push @filter_ary,  "i.chargenumber ILIKE ?";
559 564
    push @filter_vars, like($filter{chargenumber});
bin/mozilla/wh.pl
811 811
  my $locale   = $main::locale;
812 812

  
813 813
  $form->get_lists('warehouses' => { 'key'    => 'WAREHOUSES',
814
                                     'bins'   => 'BINS', });
814
                                     'bins'   => 'BINS', },
815
                   'partsgroup' => 'PARTSGROUPS');
815 816

  
816 817
  show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
817 818

  
......
827 828

  
828 829
  $form->header();
829 830
  print $form->parse_html_template("wh/report_filter",
830
                                   { "WAREHOUSES" => $form->{WAREHOUSES},
831
                                     "UNITS"      => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)),
831
                                   { "WAREHOUSES"  => $form->{WAREHOUSES},
832
                                     "PARTSGROUPS" => $form->{PARTSGROUPS},
833
                                     "UNITS"       => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)),
832 834
                                   });
833 835

  
834 836
  $main::lxdebug->leave_sub();
......
851 853
  my @columns = qw(warehousedescription bindescription partnumber type_and_classific partdescription chargenumber bestbefore comment qty partunit list_price purchase_price stock_value);
852 854

  
853 855
  # filter stuff
854
  map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id classification_id partnumber description chargenumber bestbefore date include_invalid_warehouses);
856
  map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id classification_id partnumber description partsgroup_id chargenumber bestbefore date include_invalid_warehouses);
855 857

  
856 858
  # show filter stuff also in report
857 859
  my @options;
......
868 870
   classification_id => sub { push @options, $locale->text('Parts Classification'). " : ".
869 871
                                               SL::DB::Manager::PartClassification->get_first(where => [ id => $form->{classification_id} ] )->description; },
870 872
   description    => sub { push @options, $locale->text('Description')    . " : $form->{description}"},
873
   partsgroup_id  => sub { push @options, $locale->text('Partsgroup')     . " : " .
874
                                            SL::DB::PartsGroup->new(id => $form->{partsgroup_id})->load->partsgroup},
871 875
   chargenumber   => sub { push @options, $locale->text('Charge Number')  . " : $form->{chargenumber}"},
872 876
   bestbefore     => sub { push @options, $locale->text('Best Before')    . " : $form->{bestbefore}"},
873 877
   include_invalid_warehouses    => sub { push @options, $locale->text('Include invalid warehouses ')},
......
924 928
  push @columns, map { "cvar_$_->{name}" } @includeable_custom_variables;
925 929

  
926 930
  my @hidden_variables = map { "l_${_}" } @columns;
927
  push @hidden_variables, qw(warehouse_id bin_id partnumber partstypes_id description chargenumber bestbefore qty_op qty qty_unit partunit l_warehousedescription l_bindescription);
931
  push @hidden_variables, qw(warehouse_id bin_id partnumber partstypes_id description partsgroup_id chargenumber bestbefore qty_op qty qty_unit partunit l_warehousedescription l_bindescription);
928 932
  push @hidden_variables, qw(include_empty_bins subtotal include_invalid_warehouses date);
929 933
  push @hidden_variables, qw(classification_id stock_value_basis allrows);
930 934
  push @hidden_variables, map({'cvar_'. $_->{name}}                                         @searchable_custom_variables);
templates/webpages/wh/report_filter.html
106 106
        <th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
107 107
        <td><input name="description" size=40></td>
108 108
       </tr>
109
       <tr>
110
        <th align="right" nowrap>[% 'Partsgroup' | $T8 %]:</th>
111
        <td>[% L.select_tag('partsgroup_id', PARTSGROUPS, value_key = 'id', title_key = 'partsgroup', with_empty = 1) %]</td>
112
       </tr>
109 113
       <tr>
110 114
        <th align="right" nowrap>[% 'Charge Number' | $T8 %]:</th>
111 115
        <td><input name="chargenumber" size=40></td>

Auch abrufbar als: Unified diff