X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6cf3f7762efd40bee49a2b8f11bb4ab6915d9071..5a7ae14c769710c1de947b115cf2cd0c38d3df7e:/SL/DB/Printer.pm diff --git a/SL/DB/Printer.pm b/SL/DB/Printer.pm index 2c3eaccf8..83f914806 100644 --- a/SL/DB/Printer.pm +++ b/SL/DB/Printer.pm @@ -3,7 +3,22 @@ package SL::DB::Printer; use strict; use SL::DB::MetaSetup::Printer; +use SL::DB::Manager::Printer; +use SL::DB::Helper::Util; -__PACKAGE__->meta->make_manager_class; +sub description { + goto &printer_description; +} + +sub validate { + my ($self) = @_; + + my @errors; + push @errors, $::locale->text('The description is missing.') if !$self->printer_description; + push @errors, $::locale->text('The command is missing.') if !$self->printer_command; + push @errors, $::locale->text('The description is not unique.') if !SL::DB::Helper::Util::is_unique($self, 'printer_description'); + + return @errors; +} 1;