Verwaltung von Kunden-/Lieferantentypen auf Controller umgestellt
[kivitendo-erp.git] / SL / DB / Business.pm
1 package SL::DB::Business;
2
3 use strict;
4
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;
15
16   return @errors;
17 }
18
19 1;