17 |
17 |
use Data::Dumper;
|
18 |
18 |
|
19 |
19 |
use Rose::Object::MakeMethods::Generic (
|
20 |
|
'scalar --get_set_init' => [ qw(models vc all_employees all_businesses) ],
|
|
20 |
'scalar --get_set_init' => [ qw(models vc all_employees all_businesses all_partsgroups) ],
|
21 |
21 |
);
|
22 |
22 |
|
23 |
23 |
__PACKAGE__->run_before(sub { $::auth->assert('delivery_value_report'); });
|
... | ... | |
141 |
141 |
sub make_filter_summary {
|
142 |
142 |
my ($self) = @_;
|
143 |
143 |
my $vc = $self->vc;
|
144 |
|
my ($business, $employee);
|
|
144 |
my ($business, $employee, $partsgroup);
|
145 |
145 |
|
146 |
146 |
my $filter = $::form->{filter} || {};
|
147 |
147 |
my @filter_strings;
|
148 |
148 |
|
149 |
|
$business = SL::DB::Business->new(id => $filter->{order}{customer}{"business_id"})->load->description if $filter->{order}{customer}{"business_id"};
|
150 |
|
$employee = SL::DB::Employee->new(id => $filter->{order}{employee_id})->load->name if $filter->{order}{employee_id};
|
|
149 |
$business = SL::DB::Business->new(id => $filter->{order}{customer}{"business_id"})->load->description if $filter->{order}{customer}{"business_id"};
|
|
150 |
$employee = SL::DB::Employee->new(id => $filter->{order}{employee_id})->load->name if $filter->{order}{employee_id};
|
|
151 |
$partsgroup = SL::DB::PartsGroup->new(id => $filter->{part}{partsgroup_id})->load->partsgroup if $filter->{part}{partsgroup_id};
|
151 |
152 |
|
152 |
153 |
my @filters = (
|
153 |
154 |
[ $filter->{order}{"ordnumber:substr::ilike"}, $::locale->text('Number') ],
|
... | ... | |
163 |
164 |
[ $filter->{order}{customer}{"customernumber:substr::ilike"}, $::locale->text('Customer Number') ],
|
164 |
165 |
[ $business, $::locale->text('Customer type') ],
|
165 |
166 |
[ $employee, $::locale->text('Employee') ],
|
|
167 |
[ $partsgroup, $::locale->text('Partsgroup') ],
|
166 |
168 |
);
|
167 |
169 |
|
168 |
170 |
# flags for with_object 'part'
|
... | ... | |
217 |
219 |
sub init_all_businesses {
|
218 |
220 |
return SL::DB::Manager::Business->get_all_sorted;
|
219 |
221 |
}
|
|
222 |
sub init_all_partsgroups {
|
|
223 |
return SL::DB::Manager::PartsGroup->get_all_sorted;
|
|
224 |
}
|
220 |
225 |
|
221 |
226 |
|
222 |
227 |
sub link_to {
|
Lieferwertbericht um Filter nach Warengruppen erweitert