X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a34c05f386bc2abb45a097dcb4d68e8ab2f5af94..cd8b56f2ec945264132d443ad8f412699d1a8a1b:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 3e6c65a49..3ed6cd34e 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -9,9 +9,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::FlattenToForm; use SL::DB::Helper::LinkedRecords; @@ -19,6 +19,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 => { @@ -366,6 +367,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__