epic-ts
[kivitendo-erp.git] / SL / DB / Default.pm
1 package SL::DB::Default;
2
3 use strict;
4
5 use SL::DB::MetaSetup::Default;
6
7 __PACKAGE__->meta->initialize;
8
9 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
10 __PACKAGE__->meta->make_manager_class;
11
12 sub get_default_currency {
13   my $self = shift->get;
14   return $self->currency->name || '' if $self->currency_id;
15   return '';
16 }
17
18 sub get {
19   my ($class_or_self) = @_;
20   return $class_or_self if ref($class_or_self);
21   return SL::DB::Manager::Default->get_all(limit => 1)->[0];
22 }
23
24 1;