Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 98b64fe1

Von Kivitendo Admin vor fast 8 Jahren hinzugefügt

  • ID 98b64fe1e380c232428d63cea0eb5f44b1d1a2c3
  • Vorgänger 71041661
  • Nachfolger f5abed86

Ware/Erzeugnis/Dienstleistung per parts.part_type unterscheiden 2

kivitendo Code angepasst.

Unterschiede anzeigen:

SL/DB/Manager/Part.pm
33 33

  
34 34
  $prefix //= '';
35 35

  
36
  # this is to make selection like type => { part => 1, service => 1 } work
36
  # this is to make selections like part_type => { part => 1, service => 1 } work
37 37
  if ('HASH' eq ref $type) {
38 38
    $type = [ grep { $type->{$_} } keys %$type ];
39 39
  }
......
43 43

  
44 44
  for my $type (@types) {
45 45
    if ($type =~ m/^part/) {
46
      push @filter, (and => [ or                             => [ $prefix . assembly => 0, $prefix . assembly => undef ],
47
                              "!${prefix}inventory_accno_id" => 0,
48
                              "!${prefix}inventory_accno_id" => undef,
49
                     ]);
46
      push @filter, ($prefix . part_type => 'part');
50 47
    } elsif ($type =~ m/^service/) {
51
      push @filter, (and => [ or => [ $prefix . assembly           => 0, $prefix . assembly           => undef ],
52
                              or => [ $prefix . inventory_accno_id => 0, $prefix . inventory_accno_id => undef ],
53
                     ]);
54
    } elsif ($type =~ m/^assembl/) {
55
      push @filter, ($prefix . assembly => 1);
48
      push @filter, ($prefix . part_type => 'service');
49
    } elsif ($type =~ m/^assembly/) {
50
      push @filter, ($prefix . part_type => 'assembly');
56 51
    }
57 52
  }
58 53

  

Auch abrufbar als: Unified diff