15 |
15 |
use SL::DB::Invoice;
|
16 |
16 |
use SL::DB::Order;
|
17 |
17 |
use SL::DB::Project;
|
|
18 |
use SL::DB::ProjectType;
|
|
19 |
use SL::DB::ProjectStatus;
|
18 |
20 |
use SL::DB::PurchaseInvoice;
|
19 |
21 |
use SL::DB::ProjectType;
|
20 |
22 |
use SL::Helper::Flash;
|
... | ... | |
27 |
29 |
);
|
28 |
30 |
|
29 |
31 |
__PACKAGE__->run_before('check_auth');
|
30 |
|
__PACKAGE__->run_before('load_project', only => [ qw(edit update destroy) ]);
|
|
32 |
__PACKAGE__->run_before('load_project', only => [ qw(edit update destroy) ]);
|
|
33 |
__PACKAGE__->run_before('load_project_types', only => [ qw(search edit new) ]);
|
|
34 |
__PACKAGE__->run_before('load_project_status', only => [ qw(search edit new) ]);
|
31 |
35 |
|
32 |
36 |
#
|
33 |
37 |
# actions
|
... | ... | |
38 |
42 |
|
39 |
43 |
my %params;
|
40 |
44 |
|
41 |
|
$params{ALL_PROJECT_TYPES} = SL::DB::Manager::ProjectType->get_all_sorted;
|
42 |
45 |
$params{CUSTOM_VARIABLES} = CVar->get_configs(module => 'Projects');
|
43 |
46 |
($params{CUSTOM_VARIABLES_FILTER_CODE}, $params{CUSTOM_VARIABLES_INCLUSION_CODE})
|
44 |
47 |
= CVar->render_search_options(variables => $params{CUSTOM_VARIABLES},
|
... | ... | |
116 |
119 |
my ($self, %params) = @_;
|
117 |
120 |
|
118 |
121 |
$params{ALL_CUSTOMERS} = SL::DB::Manager::Customer->get_all_sorted(where => [ or => [ obsolete => 0, obsolete => undef, id => $self->project->customer_id ]]);
|
119 |
|
$params{ALL_PROJECT_TYPES} = SL::DB::Manager::ProjectType->get_all_sorted;
|
120 |
122 |
$params{CUSTOM_VARIABLES} = CVar->get_custom_variables(module => 'Projects', trans_id => $self->project->id);
|
121 |
123 |
|
122 |
124 |
if ($params{keep_cvars}) {
|
... | ... | |
202 |
204 |
my $report = SL::ReportGenerator->new(\%::myconfig, $::form);
|
203 |
205 |
$self->{report} = $report;
|
204 |
206 |
|
205 |
|
my @columns = qw(projectnumber description customer active valid project_type);
|
206 |
|
my @sortable = qw(projectnumber description customer project_type);
|
|
207 |
my @columns = qw(projectnumber description customer active valid project_type project_status);
|
|
208 |
my @sortable = qw(projectnumber description customer project_type project_status);
|
207 |
209 |
|
208 |
210 |
my %column_defs = (
|
209 |
211 |
projectnumber => { obj_link => sub { $self->url_for(action => 'edit', id => $_[0]->id, callback => $callback) } },
|
210 |
212 |
description => { obj_link => sub { $self->url_for(action => 'edit', id => $_[0]->id, callback => $callback) } },
|
211 |
213 |
project_type => { sub => sub { $_[0]->project_type->description } },
|
|
214 |
project_status => { sub => sub { $_[0]->project_status->description }, text => t8('Project Status') },
|
212 |
215 |
customer => { sub => sub { $_[0]->customer ? $_[0]->customer->name : '' } },
|
213 |
216 |
active => { sub => sub { $_[0]->active ? $::locale->text('Active') : $::locale->text('Inactive') },
|
214 |
217 |
text => $::locale->text('Active') },
|
... | ... | |
259 |
262 |
);
|
260 |
263 |
}
|
261 |
264 |
|
|
265 |
sub load_project_types {
|
|
266 |
$_[0]{ALL_PROJECT_TYPES} = SL::DB::Manager::ProjectType->get_all_sorted;
|
|
267 |
}
|
|
268 |
|
|
269 |
sub load_project_status {
|
|
270 |
$_[0]{ALL_PROJECT_STATUS} = SL::DB::Manager::ProjectStatus->get_all_sorted;
|
|
271 |
}
|
|
272 |
|
262 |
273 |
1;
|
Status in der Projektverwaltung