X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FManager%2FPriceRuleItem.pm;h=28f4d6f514639610679cbb70a23e78162e872d53;hb=a6ce2c7f3f7ae10f7065fb86121c8d11049617ee;hp=f45db3d4e862580f0cb65f122a310a2c6fec4661;hpb=986282c191d6ad3c02608b2fd33d66a12779e401;p=kivitendo-erp.git diff --git a/SL/DB/Manager/PriceRuleItem.pm b/SL/DB/Manager/PriceRuleItem.pm index f45db3d4e..28f4d6f51 100644 --- a/SL/DB/Manager/PriceRuleItem.pm +++ b/SL/DB/Manager/PriceRuleItem.pm @@ -31,7 +31,7 @@ my %types = ( 'transdate' => { description => t8('Transdate'), customer => 1, vendor => 1, data_type => 'date', data => sub { $_[0]->transdate }, ops => 'date' }, 'part' => { description => t8('Part'), customer => 1, vendor => 1, data_type => 'int', data => sub { $_[1]->part->id }, }, 'pricegroup' => { description => t8('Pricegroup'), customer => 1, vendor => 1, data_type => 'int', data => sub { $_[1]->pricegroup_id }, exclude_nulls => 1 }, - 'partsgroup' => { description => t8('Group'), customer => 1, vendor => 1, data_type => 'int', data => sub { $_[1]->part->partsgroup_id }, exclude_nulls => 1 }, + 'partsgroup' => { description => t8('Partsgroup'), customer => 1, vendor => 1, data_type => 'int', data => sub { $_[1]->part->partsgroup_id }, exclude_nulls => 1 }, 'qty' => { description => t8('Qty'), customer => 1, vendor => 1, data_type => 'num', data => sub { $_[1]->qty }, ops => 'num' }, ); @@ -75,7 +75,9 @@ sub not_matching_sql_and_values { sub get_all_types { my ($class, $vc) = @_; - [ map { [ $_, $types{$_}{description} ] } grep { $types{$_}{$vc} } map { $_ } @types ]; + $vc + ? [ map { [ $_, $types{$_}{description} ] } grep { $types{$_}{$vc} } map { $_ } @types ] + : [ map { [ $_, $types{$_}{description} ] } map { $_ } @types ] } sub get_type {