Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 004b43a3

Von Jan Büren vor mehr als 6 Jahren hinzugefügt

  • ID 004b43a3e882c17eabb918c38ca51df3e2833121
  • Vorgänger ca7dfd3e
  • Nachfolger a823f2b0

Lieferplan um Filter nach Abteilungen ergänzt

Unterschiede anzeigen:

SL/Controller/DeliveryPlan.pm
16 16

  
17 17
use Rose::Object::MakeMethods::Generic (
18 18
  scalar => [ qw(db_args flat_filter) ],
19
  'scalar --get_set_init' => [ qw(models all_edit_right vc use_linked_items all_employees all_businesses) ],
19
  'scalar --get_set_init' => [ qw(models all_edit_right vc use_linked_items all_employees all_businesses all_departments) ],
20 20
);
21 21

  
22 22
__PACKAGE__->run_before(sub { $::auth->assert('delivery_plan'); });
......
116 116
sub make_filter_summary {
117 117
  my ($self) = @_;
118 118
  my $vc     = $self->vc;
119
  my ($business, $employee);
119
  my ($business, $employee, $department);
120 120

  
121 121
  my $filter = $::form->{filter} || {};
122 122
  my @filter_strings;
123 123

  
124 124
  $business = SL::DB::Business->new(id => $filter->{order}{customer}{"business_id"})->load->description if $filter->{order}{customer}{"business_id"};
125 125
  $employee = SL::DB::Employee->new(id => $filter->{order}{employee_id})->load->name if $filter->{order}{employee_id};
126
  $department = SL::DB::Department->new(id => $filter->{order}{department_id})->load->description if $filter->{order}{department_id};
126 127

  
127 128
  my @filters = (
128 129
    [ $filter->{order}{"ordnumber:substr::ilike"},                    $::locale->text('Number')                                             ],
......
137 138
    [ $filter->{order}{customer}{"name:substr::ilike"},               $::locale->text('Customer')                                           ],
138 139
    [ $filter->{order}{customer}{"customernumber:substr::ilike"},     $::locale->text('Customer Number')                                    ],
139 140
    [ $business,                                                      $::locale->text('Customer type')                                      ],
141
    [ $department,                                                    $::locale->text('Department')                                         ],
140 142
    [ $employee,                                                      $::locale->text('Employee')                                           ],
141 143
  );
142 144

  
......
353 355
sub init_all_businesses {
354 356
  return SL::DB::Manager::Business->get_all_sorted;
355 357
}
358
sub init_all_departments {
359
  return SL::DB::Manager::Department->get_all_sorted;
360
}
356 361
sub link_to {
357 362
  my ($self, $object, %params) = @_;
358 363

  
doc/changelog
28 28

  
29 29
Kleinere neue Features und Detailverbesserungen:
30 30
  - Verknüpfte Belege um die Verknüpfung von Beleg nach E-Mail-Journal erweitert.
31

  
31
  - Filter nach Abteilungen für Lieferplan
32 32

  
33 33
2017-12-12 - Release 3.5.1
34 34

  
templates/webpages/delivery_plan/_filter.html
78 78
                     style      => 'width: 200px') %]
79 79
   </td>
80 80
  </tr>
81
  [%- IF SELF.all_departments.size %]
82
    <tr>
83
      <th align="right">[% 'Department' | $T8 %]</th>
84
      <td>
85
        [% L.select_tag('filter.order.department_id', SELF.all_departments, default=filter.order.department_id, title_key='description', with_empty=1, style='width:200px') %]
86
      </td>
87
    </tr>
88
  [%- END %]
81 89
  <tr>
82 90
   <th align="right">[% 'Type' | $T8 %]</th>
83 91
   <td>

Auch abrufbar als: Unified diff