Revision 804e16d1
Von Moritz Bunkus vor fast 12 Jahren hinzugefügt
SL/Controller/Project.pm | ||
---|---|---|
13 | 13 |
use SL::Controller::Helper::ReportGenerator; |
14 | 14 |
use SL::CVar; |
15 | 15 |
use SL::DB::Customer; |
16 |
use SL::DB::DeliveryOrder; |
|
17 |
use SL::DB::Invoice; |
|
18 |
use SL::DB::Order; |
|
16 | 19 |
use SL::DB::Project; |
20 |
use SL::DB::PurchaseInvoice; |
|
17 | 21 |
use SL::Helper::Flash; |
18 | 22 |
use SL::Locale::String; |
19 | 23 |
|
20 | 24 |
use Rose::Object::MakeMethods::Generic |
21 | 25 |
( |
22 |
scalar => [ qw(project db_args flat_filter) ], |
|
26 |
scalar => [ qw(project db_args flat_filter linked_records) ],
|
|
23 | 27 |
); |
24 | 28 |
|
25 | 29 |
__PACKAGE__->run_before('check_auth'); |
... | ... | |
88 | 92 |
|
89 | 93 |
sub action_edit { |
90 | 94 |
my ($self) = @_; |
95 |
|
|
96 |
$self->linked_records([ |
|
97 |
map { @{ $_ } } |
|
98 |
grep { $_ } ( |
|
99 |
SL::DB::Manager::Order-> get_all(where => [ globalproject_id => $self->project->id ], with_objects => [ 'customer', 'vendor' ], sort_by => 'transdate ASC'), |
|
100 |
SL::DB::Manager::DeliveryOrder-> get_all(where => [ globalproject_id => $self->project->id ], with_objects => [ 'customer', 'vendor' ], sort_by => 'transdate ASC'), |
|
101 |
SL::DB::Manager::Invoice-> get_all(where => [ globalproject_id => $self->project->id ], with_objects => [ 'customer' ], sort_by => 'transdate ASC'), |
|
102 |
SL::DB::Manager::PurchaseInvoice->get_all(where => [ globalproject_id => $self->project->id ], with_objects => [ 'vendor' ], sort_by => 'transdate ASC'), |
|
103 |
)]); |
|
104 |
|
|
91 | 105 |
$self->display_form(title => $::locale->text('Edit project #1', $self->project->projectnumber), |
92 | 106 |
callback => $::form->{callback} || $self->url_for(action => 'edit', id => $self->project->id)); |
93 | 107 |
} |
templates/webpages/project/form.html | ||
---|---|---|
1 | 1 |
[%- USE T8 %] |
2 |
[%- USE L %] |
|
2 |
[%- USE L %][%- USE P %]
|
|
3 | 3 |
[%- USE HTML %][%- USE LxERP %] |
4 | 4 |
|
5 | 5 |
[%- INCLUDE 'common/flash.html' %] |
... | ... | |
15 | 15 |
[%- IF CUSTOM_VARIABLES.size %] |
16 | 16 |
<li><a href="#" rel="custom_variables">[% 'Custom Variables' | $T8 %]</a></li> |
17 | 17 |
[%- END %] |
18 |
[%- IF SELF.project.id %] |
|
19 |
<li><a href="#" rel="linked_records">[% 'Linked Records' | $T8 %]</a></li> |
|
20 |
[%- END %] |
|
18 | 21 |
</ul> |
19 | 22 |
|
20 | 23 |
<div class="tabcontentstyle"> |
... | ... | |
83 | 86 |
</div> |
84 | 87 |
[%- END %] |
85 | 88 |
|
89 |
[%- IF SELF.project.id %] |
|
90 |
<div id="linked_records" class="tabcontent"> |
|
91 |
|
|
92 |
[% P.grouped_record_list(SELF.linked_records) %] |
|
93 |
|
|
94 |
<br style="clear: left" /> |
|
95 |
</div> |
|
96 |
[%- END %] |
|
97 |
|
|
86 | 98 |
</div> |
87 | 99 |
|
88 | 100 |
<p> |
Auch abrufbar als: Unified diff
Projektstammdaten: Liste verknüpfter Dokumente anzeigen
Conflicts:
SL/Controller/Project.pm