Revision db7a2e79
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/DB/Manager/Letter.pm | ||
---|---|---|
sub object_class { 'SL::DB::Letter' }
|
||
|
||
__PACKAGE__->make_manager_methods;
|
||
__PACKAGE__->add_filter_specs(
|
||
is_sales => sub {
|
||
my ($key, $value, $prefix) = @_;
|
||
__PACKAGE__->is_sales_filter($value, $prefix);
|
||
},
|
||
);
|
||
|
||
sub is_sales_filter {
|
||
my ($class, $value, $prefix) = @_;
|
||
|
||
return () if !defined $value;
|
||
return ($prefix . 'customer_id' => { gt => 0 }) if $value;
|
||
return ($prefix . 'vendor_id' => { gt => 0 }) if !$value;
|
||
}
|
||
|
||
sub _sort_spec {
|
||
return ( columns => { SIMPLE => 'ALL',
|
Auch abrufbar als: Unified diff
Briefe: Lieferantenbriefe