Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 60ebd03b

Von Sven Schöling vor mehr als 14 Jahren hinzugefügt

  • ID 60ebd03b8391b3eeeb75a2c4408340346732d028
  • Vorgänger 0986ccab
  • Nachfolger 0ab14a8a

CVars über die Warenmaske auch in Belegen suchen.

Fix für Bug 1209.

Unterschiede anzeigen:

SL/CVar.pm
490 490
    }
491 491

  
492 492
    if (@sub_where) {
493
      push @sub_where,  qq|cvar.sub_module = ?|;
494
      push @sub_values, "$params{sub_module}";
493
      add_token(\@sub_where, \@sub_values, col => 'cvar.sub_module', val => $params{sub_module} || '');
495 494

  
496 495
      push @where,
497 496
        qq|$not EXISTS(
SL/IC.pm
35 35
package IC;
36 36

  
37 37
use Data::Dumper;
38
use List::MoreUtils qw(all any);
38
use List::MoreUtils qw(all any uniq);
39 39
use YAML;
40 40

  
41 41
use SL::CVar;
......
1005 1005
  my $where_clause  = join ' AND ', map { "($_)" } @where_tokens;
1006 1006
  my $group_clause  = ' GROUP BY ' . join ', ',    map { $token_builder->($_) } @group_tokens if scalar @group_tokens;
1007 1007

  
1008
  my ($cvar_where, @cvar_values) = CVar->build_filter_query('module'         => 'IC',
1009
                                                            'trans_id_field' => 'p.id',
1010
                                                            'filter'         => $form);
1008
  my %oe_flag_to_cvar = (
1009
    bought   => 'invoice',
1010
    sold     => 'invoice',
1011
    onorder  => 'orderitems',
1012
    ordered  => 'orderitems',
1013
    rfq      => 'orderitems',
1014
    quoted   => 'orderitems',
1015
  );
1016

  
1017
  my ($cvar_where, @cvar_values) = CVar->build_filter_query(
1018
    module         => 'IC',
1019
    trans_id_field => $bsooqr ? 'ioi.id': 'p.id',
1020
    filter         => $form,
1021
    sub_module     => $bsooqr ? [ uniq grep { $oe_flag_to_cvar{$form->{$_}} } @oe_flags ] : undef,
1022
  );
1023

  
1024
  $::lxdebug->dump(0,  "\@cvar_val", \@cvar_values);
1011 1025

  
1012 1026
  if ($cvar_where) {
1013 1027
    $where_clause .= qq| AND ($cvar_where)|;

Auch abrufbar als: Unified diff