X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=SL%2FPresenter%2FGL.pm;fp=SL%2FPresenter%2FGL.pm;h=cf0998b053dcc6805e5f8a661f9c163436824a72;hp=d1c60eac3fc05983957d60eb3910262cb48aca3d;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/SL/Presenter/GL.pm b/SL/Presenter/GL.pm index d1c60eac3..cf0998b05 100644 --- a/SL/Presenter/GL.pm +++ b/SL/Presenter/GL.pm @@ -2,26 +2,27 @@ package SL::Presenter::GL; use strict; -use parent qw(Exporter); +use SL::Presenter::EscapedText qw(escape is_escaped); use Exporter qw(import); -our @EXPORT = qw(gl_transaction); +our @EXPORT_OK = qw(gl_transaction); use Carp; sub gl_transaction { - my ($self, $gl_transaction, %params) = @_; + my ($gl_transaction, %params) = @_; $params{display} ||= 'inline'; croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; my $text = join '', ( - $params{no_link} ? '' : '', - $self->escape($gl_transaction->id), + $params{no_link} ? '' : '', + escape($gl_transaction->reference), $params{no_link} ? '' : '', ); - return $self->escaped_text($text); + + is_escaped($text); } 1; @@ -39,7 +40,7 @@ SL::Presenter::GL - Presenter module for GL transaction =head1 SYNOPSIS my $object = SL::DB::Manager::GLTransaction->get_first(); - my $html = SL::Presenter->get->gl_transaction($object, display => 'inline'); + my $html = SL::Presenter::GL::gl_transaction($object, display => 'inline'); =head1 FUNCTIONS