X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44..53593baa211863fbf66540cf1bcc36c8fb37257f:/SL/DB/Manager/PriceRuleItem.pm diff --git a/SL/DB/Manager/PriceRuleItem.pm b/SL/DB/Manager/PriceRuleItem.pm index 83a4bf169..ba3694c47 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' }, ); @@ -65,7 +65,7 @@ sub not_matching_sql_and_values { push @values, $value; } - push @tokens, "type = '$type' AND " . join ' OR ', map "($_)", @sub_tokens; + push @tokens, "type = '$type' AND (@{[ join(' OR ', map qq|($_)|, @sub_tokens) ]})"; } }