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 |
|
Lieferplan um Filter nach Abteilungen ergänzt