Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 508801bb

Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt

Verwaltung von Kunden-/Lieferantentypen auf Controller umgestellt

Unterschiede anzeigen:

SL/DB/Business.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4 1
package SL::DB::Business;
5 2

  
6 3
use strict;
7 4

  
8 5
use SL::DB::MetaSetup::Business;
6
use SL::DB::Manager::Business;
7

  
8
sub validate {
9
  my ($self) = @_;
10

  
11
  my @errors;
12
  push @errors, $::locale->text('The description is missing.')          if !$self->description;
13
  push @errors, $::locale->text('The discount must not be negative.')   if $self->discount <  0;
14
  push @errors, $::locale->text('The discount must be less than 100%.') if $self->discount >= 1;
9 15

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
16
  return @errors;
17
}
12 18

  
13 19
1;

Auch abrufbar als: Unified diff