epic-ts
[kivitendo-erp.git] / SL / DB / Printer.pm
1 package SL::DB::Printer;
2
3 use strict;
4
5 use SL::DB::MetaSetup::Printer;
6 use SL::DB::Manager::Printer;
7 use SL::DB::Helper::Util;
8
9 __PACKAGE__->meta->initialize;
10
11 sub description {
12   goto &printer_description;
13 }
14
15 sub validate {
16   my ($self) = @_;
17
18   my @errors;
19   push @errors, $::locale->text('The description is missing.')    if !$self->printer_description;
20   push @errors, $::locale->text('The command is missing.')        if !$self->printer_command;
21   push @errors, $::locale->text('The description is not unique.') if !SL::DB::Helper::Util::is_unique($self, 'printer_description');
22
23   return @errors;
24 }
25
26 1;