Revision a54fb4aa
Von Jan Büren vor fast 10 Jahren hinzugefügt
SL/Controller/DeliveryPlan.pm | ||
---|---|---|
13 | 13 |
|
14 | 14 |
use Rose::Object::MakeMethods::Generic ( |
15 | 15 |
scalar => [ qw(db_args flat_filter) ], |
16 |
'scalar --get_set_init' => [ qw(models all_edit_right mode vc) ], |
|
16 |
'scalar --get_set_init' => [ qw(models all_edit_right mode vc all_employees) ],
|
|
17 | 17 |
); |
18 | 18 |
|
19 | 19 |
__PACKAGE__->run_before(sub { $::auth->assert('delivery_plan'); }); |
... | ... | |
42 | 42 |
my $orderitems = $self->models->get; |
43 | 43 |
$self->{all_businesses} = SL::DB::Manager::Business->get_all_sorted; |
44 | 44 |
|
45 |
$self->report_generator_list_objects(report => $self->{report}, objects => $orderitems);
|
|
45 |
$self->report_generator_list_objects(report => $self->{report}, objects => $orderitems); |
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
# private functions |
... | ... | |
125 | 125 |
my @filter_strings; |
126 | 126 |
|
127 | 127 |
my $business = SL::DB::Business->new(id => $filter->{order}{customer}{"business_id"})->load->description if $filter->{order}{customer}{"business_id"}; |
128 |
my $employee = SL::DB::Employee->new(id => $filter->{order}{employee_id})->load->name if $filter->{order}{employee_id}; |
|
129 |
|
|
128 | 130 |
my @filters = ( |
129 | 131 |
[ $filter->{order}{"ordnumber:substr::ilike"}, $::locale->text('Number') ], |
130 | 132 |
[ $filter->{order}{globalproject}{"projectnumber:substr::ilike"}, $::locale->text('Document Project Number') ], |
... | ... | |
138 | 140 |
[ $filter->{order}{customer}{"name:substr::ilike"}, $::locale->text('Customer') ], |
139 | 141 |
[ $filter->{order}{customer}{"customernumber:substr::ilike"}, $::locale->text('Customer Number') ], |
140 | 142 |
[ $business, $::locale->text('Customer type') ], |
143 |
[ $employee, $::locale->text('Employee') ], |
|
141 | 144 |
); |
142 | 145 |
|
143 | 146 |
my %flags = ( |
... | ... | |
300 | 303 |
return $::form->{mode} if ($::form->{mode} eq 'delivery_value_report' || $::form->{mode} eq 'delivery_plan') || croak "self (DeliveryPlan) has no mode defined"; |
301 | 304 |
} |
302 | 305 |
|
306 |
sub init_all_employees { |
|
307 |
return SL::DB::Manager::Employee->get_all_sorted; |
|
308 |
} |
|
303 | 309 |
sub link_to { |
304 | 310 |
my ($self, $object, %params) = @_; |
305 | 311 |
|
Auch abrufbar als: Unified diff
Lieferplan / Lieferwertbericht um Filter Bearbeiter erweitert