Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0f491583

Von Sven Schöling vor etwa 11 Jahren hinzugefügt

  • ID 0f4915834072e2f689ad80709b0801f46d786de9
  • Vorgänger ec3a4636
  • Nachfolger d5cb059b

weitere umstrukturierung

Unterschiede anzeigen:

SL/Controller/DeliveryPlan.pm
16 16

  
17 17
__PACKAGE__->run_before(sub { $::auth->assert('sales_order_edit'); });
18 18

  
19
#__PACKAGE__->make_filtered(
20
#  MODEL             => 'OrderItem',
21
#  LAUNDER_TO        => 'filter'
22
#);
23
#__PACKAGE__->make_paginated(
24
#  MODEL         => 'OrderItem',
25
#  ONLY          => [ qw(list) ],
26
#);
27
#
28
#__PACKAGE__->make_sorted(
29
#  MODEL             => 'OrderItem',
30
#  ONLY              => [ qw(list) ],
31
#
32
#  DEFAULT_BY        => 'reqdate',
33
#  DEFAULT_DIR       => 1,
34
#
35
#  reqdate           => t8('Reqdate'),
36
#  description       => t8('Description'),
37
#  partnumber        => t8('Part Number'),
38
#  qty               => t8('Qty'),
39
#  shipped_qty       => t8('shipped'),
40
#  not_shipped_qty   => t8('not shipped'),
41
#  ordnumber         => t8('Order'),
42
#  customer          => t8('Customer'),
43
#);
44

  
45 19
my %sort_columns = (
46 20
  reqdate           => t8('Reqdate'),
47 21
  description       => t8('Description'),
......
129 103
  my ($self) = @_;
130 104

  
131 105
  $self->make_filter_summary;
106
  $self->prepare_report;
132 107

  
133 108
  my $orderitems = $self->models->get;
134 109

  
135
  $self->prepare_report;
136 110
  $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems);
137 111
}
138 112

  
......
164 138

  
165 139
  $column_defs{$_}->{text} = $sort_columns{$_} for keys %column_defs;
166 140

  
141
  $self->models->disable_plugin('paginated') if $report->{options}{output_format} =~ /^(pdf|csv)$/i;
142
  $self->models->finalize; # for filter laundering
167 143
  $report->set_options(
168 144
    std_column_visibility => 1,
169 145
    controller_class      => 'DeliveryPlan',
......
179 155
  $report->set_column_order(@columns);
180 156
  $report->set_export_options(qw(list filter));
181 157
  $report->set_options_from_form;
182
  $self->models->sorted->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable);
183

  
184
  $self->models->paginated->disable_pagination if $report->{options}{output_format} =~ /^(pdf|csv)$/i;
158
  $self->models->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable);
185 159
}
186 160

  
187 161
sub make_filter_summary {
......
223 197

  
224 198
  SL::Controller::Helper::GetModels->new(
225 199
    controller => $self,
226
    model  => 'OrderItem', # defaults to controller
200
    model  => 'OrderItem',
227 201
    filtered => {
228 202
      launder_to => 'filter',
229 203
    },

Auch abrufbar als: Unified diff