Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision afd44e0e

Von Sven Schöling vor mehr als 12 Jahren hinzugefügt

  • ID afd44e0e34b30c997bbe496a981d70aa9ccff617
  • Vorgänger 45f68536
  • Nachfolger 70969a47

Lieferplan: filter string

Unterschiede anzeigen:

SL/Controller/DeliveryPlan.pm
22 22
  my $db_args = $self->setup_for_list(%list_params);
23 23
  $self->{pages} = SL::DB::Manager::OrderItem->paginate(%list_params, args => $db_args);
24 24
  $self->{flat_filter} = { map { $_->{key} => $_->{value} } $::form->flatten_variables('filter') };
25
  $self->make_filter_summary;
25 26

  
26 27
  my $top    = $::form->parse_html_template('delivery_plan/report_top', { FORM => $::form, SELF => $self });
27 28
  my $bottom = $::form->parse_html_template('delivery_plan/report_bottom', { SELF => $self });
......
217 218

  
218 219
  my $filter = $::form->{filter};
219 220
  my @filter_strings;
220
  push @filter_strings, $::locale->text('Search Style') . ' ' . ($filter->{searchstyle} eq 'open' ? $::locale->text('Search for undelivered parts') : $::locale->text('Search for delivered parts')) if $filter->{searchstyle} =~ /open|delivered/;
221

  
222
  my @filters = (
223
    [ $filter->{order}{"ordnumber:substr::ilike"}, $::locale->text('Number') ],
224
    [ $filter->{part}{"partnumber:substr::ilike"}, $::locale->text('Part Number') ],
225
    [ $filter->{"description:substr::ilike"}, $::locale->text('Part Description') ],
226
    [ $filter->{"reqdate:date::ge"}, $::locale->text('Delivery Date') . " " . $::locale->text('From Date') ],
227
    [ $filter->{"reqdate:date::le"}, $::locale->text('Delivery Date') . " " . $::locale->text('To Date') ],
228
    [ $filter->{"qty:number"}, $::locale->text('Quantity') ],
229
    [ $filter->{order}{customer}{"name:substr::ilike"}, $::locale->text('Customer') ],
230
    [ $filter->{order}{customer}{"customernumber:substr::ilike"}, $::locale->text('Customer Number') ],
231
  );
232

  
233
  my @flags = (
234
    [ $filter->{part}{type}{part}, $::locale->text('Parts') ],
235
    [ $filter->{part}{type}{service}, $::locale->text('Services') ],
236
    [ $filter->{part}{type}{assembly}, $::locale->text('Assemblies') ],
237
  );
238

  
239
  for (@flags) {
240
    push @filter_strings, "$_->[1]" if $_->[0];
241
  }
242
  for (@filters) {
243
    push @filter_strings, "$_->[1]: $_->[0]" if $_->[0];
244
  }
221 245

  
222 246
  $self->{filter_summary} = join ', ', @filter_strings;
223 247
}

Auch abrufbar als: Unified diff