package SL::Template::Plugin::LxERP;
use base qw( Template::Plugin );
+use Scalar::Util qw();
use Template::Plugin;
use List::Util qw(min);
bless { }, $class;
}
+sub is_rdbo {
+ my ($self, $obj, $wanted_class) = @_;
+
+ $wanted_class = !$wanted_class ? 'Rose::DB::Object'
+ : $wanted_class =~ m{::} ? $wanted_class
+ : "SL::DB::${wanted_class}";
+
+ return Scalar::Util::blessed($obj) ? $obj->isa($wanted_class) : 0;
+}
+
sub format_amount {
my ($self, $var, $places, $skip_zero, $dash) = @_;
sub t8 {
my ($self, $text, @args) = @_;
- $self->{locale} ||= Locale->new($::myconfig{countrycode}, 'all');
- return $self->{locale}->text($text, @args) || $text;
+ return $::locale->text($text, @args) || $text;
}
1;