X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f63af42d0b025b20a5836dad9da6c07388b5da7a..0e470b13db4ca16d13d406ad56f9b1714d8c831b:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 0added1c0..065d2b3cd 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -6,9 +6,9 @@ use Carp; use List::Util qw(first); use Rose::DB::Object::Helpers (); - use SL::DB::MetaSetup::Invoice; use SL::DB::Manager::Invoice; +use SL::DB::Helper::Payment qw(:ALL); use SL::DB::Helper::AttrHTML; use SL::DB::Helper::AttrSorted; use SL::DB::Helper::FlattenToForm; @@ -17,6 +17,7 @@ use SL::DB::Helper::PriceTaxCalculator; use SL::DB::Helper::PriceUpdater; use SL::DB::Helper::TransNumberGenerator; use SL::Locale::String qw(t8); +use SL::DB::CustomVariable; __PACKAGE__->meta->add_relationship( invoiceitems => { @@ -359,6 +360,16 @@ sub customervendor { goto &customer; } +sub link { + my ($self) = @_; + + my $html; + $html = SL::Presenter->get->sales_invoice($self, display => 'inline') if $self->invoice; + $html = SL::Presenter->get->ar_transaction($self, display => 'inline') if !$self->invoice; + + return $html; +} + 1; __END__