Revision b9dbc9e3
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/DB/Default.pm | ||
---|---|---|
8 | 8 |
__PACKAGE__->meta->make_manager_class; |
9 | 9 |
|
10 | 10 |
sub get_default_currency { |
11 |
my $self = _selfify(@_);
|
|
11 |
my $self = shift->get;
|
|
12 | 12 |
my @currencies = grep { $_ } split(/:/, $self->curr || ''); |
13 | 13 |
return $currencies[0] || ''; |
14 | 14 |
} |
15 | 15 |
|
16 |
sub _selfify {
|
|
16 |
sub get {
|
|
17 | 17 |
my ($class_or_self) = @_; |
18 | 18 |
return $class_or_self if ref($class_or_self); |
19 | 19 |
return SL::DB::Manager::Default->get_all(limit => 1)->[0]; |
Auch abrufbar als: Unified diff
Helfer-Modul zum Erzeugen von eindeutigen Belegnummern
Conflicts: