From 49f5b7f70599c029e87c494f559a6da5fde0d0c7 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Thu, 11 Dec 2014 10:29:20 +0100 Subject: [PATCH] =?utf8?q?SL/DB/Invoice->abbreviation=20pr=C3=BCft=20jetzt?= =?utf8?q?=20invoice=5Ftype?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Invoice.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index a84324c40..6af70994b 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -330,14 +330,13 @@ sub displayable_type { } sub abbreviation { - my $self = shift; + my ($self) = @_; - 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('AR Transaction (abbreviation)') if $self->invoice_type eq 'ar_transaction'; + return t8('Credit note (one letter abbreviation)') if $self->invoice_type eq 'credit_note'; + return t8('Invoice (one letter abbreviation)') . "(" . t8('Storno (one letter abbreviation)') . ")" if $self->invoice_type eq 'invoice_storno'; + return t8('Credit note (one letter abbreviation)') . "(" . t8('Storno (one letter abbreviation)') . ")" if $self->invoice_type eq 'credit_note_storno'; return t8('Invoice (one letter abbreviation)'); - } sub date { -- 2.20.1