Revision f15f5e43
Von Jan Büren vor fast 3 Jahren hinzugefügt
SL/Controller/DeliveryValueReport.pm | ||
---|---|---|
use Data::Dumper;
|
||
|
||
use Rose::Object::MakeMethods::Generic (
|
||
'scalar --get_set_init' => [ qw(models vc all_employees all_businesses) ],
|
||
'scalar --get_set_init' => [ qw(models vc all_employees all_businesses all_partsgroups) ],
|
||
);
|
||
|
||
__PACKAGE__->run_before(sub { $::auth->assert('delivery_value_report'); });
|
||
... | ... | |
sub make_filter_summary {
|
||
my ($self) = @_;
|
||
my $vc = $self->vc;
|
||
my ($business, $employee);
|
||
my ($business, $employee, $partsgroup);
|
||
|
||
my $filter = $::form->{filter} || {};
|
||
my @filter_strings;
|
||
|
||
$business = SL::DB::Business->new(id => $filter->{order}{customer}{"business_id"})->load->description if $filter->{order}{customer}{"business_id"};
|
||
$employee = SL::DB::Employee->new(id => $filter->{order}{employee_id})->load->name if $filter->{order}{employee_id};
|
||
$business = SL::DB::Business->new(id => $filter->{order}{customer}{"business_id"})->load->description if $filter->{order}{customer}{"business_id"};
|
||
$employee = SL::DB::Employee->new(id => $filter->{order}{employee_id})->load->name if $filter->{order}{employee_id};
|
||
$partsgroup = SL::DB::PartsGroup->new(id => $filter->{part}{partsgroup_id})->load->partsgroup if $filter->{part}{partsgroup_id};
|
||
|
||
my @filters = (
|
||
[ $filter->{order}{"ordnumber:substr::ilike"}, $::locale->text('Number') ],
|
||
... | ... | |
[ $filter->{order}{customer}{"customernumber:substr::ilike"}, $::locale->text('Customer Number') ],
|
||
[ $business, $::locale->text('Customer type') ],
|
||
[ $employee, $::locale->text('Employee') ],
|
||
[ $partsgroup, $::locale->text('Partsgroup') ],
|
||
);
|
||
|
||
# flags for with_object 'part'
|
||
... | ... | |
sub init_all_businesses {
|
||
return SL::DB::Manager::Business->get_all_sorted;
|
||
}
|
||
sub init_all_partsgroups {
|
||
return SL::DB::Manager::PartsGroup->get_all_sorted;
|
||
}
|
||
|
||
|
||
sub link_to {
|
templates/webpages/delivery_value_report/_filter.html | ||
---|---|---|
style => 'width: 200px') %]
|
||
</td>
|
||
</tr>
|
||
[%- IF SELF.all_partsgroups.size %]
|
||
<tr>
|
||
<th align="right">[% 'Partsgroup' | $T8 %]</th>
|
||
<td>[%- L.select_tag('filter.part.partsgroup_id', SELF.all_partsgroups, default=filter.part.partsgroup_id, title_key='partsgroup', value_key='id', with_empty=1 style='width: 200px') %]</td>
|
||
</tr>
|
||
[% END %]
|
||
<tr>
|
||
<th align="right">[% 'Type' | $T8 %]</th>
|
||
<td>
|
Auch abrufbar als: Unified diff
Lieferwertbericht um Filter nach Warengruppen erweitert