Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6eb84397

Von Moritz Bunkus vor etwa 1 Jahr hinzugefügt

  • ID 6eb843977077aabdf5f9e488916ab3ad0c58fed9
  • Vorgänger 46282860

Buchungsgruppen ungültig setzen können

Unterschiede anzeigen:

SL/DB/Buchungsgruppe.pm
21 21
    push(@errors, $::locale->text('Booking group #1 needs a valid inventory account', $self->description)) unless $inventory_accno;
22 22
  } else {
23 23
    push @errors, $::locale->text('The booking group needs an inventory account.');
24
  };
24
  }
25

  
26
  if ($self->id && $self->obsolete) {
27
    require SL::DB::Part;
28

  
29
    my $in_use = SL::DB::Manager::Part->get_first(
30
      where => [
31
        buchungsgruppen_id => $self->id,
32
        obsolete           => 0,
33
      ]);
34

  
35
    if ($in_use) {
36
      push @errors, $::locale->text('The booking group cannot be marked obsolete while still being used by active parts.');
37
    }
38
  }
25 39

  
26 40
  return @errors;
27 41
}

Auch abrufbar als: Unified diff