X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/280261a5aeda0b21f1a0494151524d59cca8815e..f6ed86efee2a0a38b6e88e98fd9d4403fa64ff5e:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index f0f3d0a1d..d734003a1 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -17,6 +17,7 @@ use SL::DB::Helper::LinkedRecords; use SL::DB::Helper::PriceTaxCalculator; use SL::DB::Helper::PriceUpdater; use SL::DB::Helper::TransNumberGenerator; +use SL::Locale::String qw(t8); __PACKAGE__->meta->add_relationship( invoiceitems => { @@ -317,6 +318,17 @@ sub displayable_state { return $self->closed ? $::locale->text('closed') : $::locale->text('open'); } +sub abbreviation { + my $self = shift; + + return t8('AR Transaction (abbreviation)') if !$self->invoice; + return t8('Credit note (one letter abbreviation)') if $self->type eq 'credit_note' && $self->amount < 0 && !$self->storno; + return t8('Invoice (one letter abbreviation)') . "(" . t8('Storno (one letter abbreviation)') . ")" if $self->type ne 'credit_note' && $self->amount < 0 && $self->storno; + return t8('Credit note (one letter abbreviation)') . "(" . t8('Storno (one letter abbreviation)') . ")" if $self->type eq 'credit_note' && $self->amount > 0 && $self->storno; + return t8('Invoice (one letter abbreviation)'); + +} + sub date { goto &transdate; }