X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/26c66e2caae4a9af6464223cbde41a74203f59ec..7dd42f875621bd0b26efecaeb1fbc87e72b84c9a:/SL/Presenter/GL.pm diff --git a/SL/Presenter/GL.pm b/SL/Presenter/GL.pm index 5a9c15b02..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 @@ -66,6 +67,8 @@ If falsish (the default) then the trans_id number will be linked to the "edit gl" dialog. +=back + =back =head1 BUGS