projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mappings und MetaSetup für Brieffunktion
[kivitendo-erp.git]
/
SL
/
DB
/
Unit.pm
diff --git
a/SL/DB/Unit.pm
b/SL/DB/Unit.pm
index
900558f
..
f5f1bc1
100644
(file)
--- a/
SL/DB/Unit.pm
+++ b/
SL/DB/Unit.pm
@@
-1,5
+1,8
@@
package SL::DB::Unit;
package SL::DB::Unit;
+use List::MoreUtils qw(any);
+
+
use strict;
use SL::DB::MetaSetup::Unit;
use strict;
use SL::DB::MetaSetup::Unit;
@@
-57,4
+60,10
@@
sub convert_to {
return $qty * $my_base_factor / $other_base_factor;
}
return $qty * $my_base_factor / $other_base_factor;
}
+sub is_time_based {
+ my ($self) = @_;
+
+ return any { $_->id == $self->id } @{ SL::DB::Manager::Unit->time_based_units };
+}
+
1;
1;