X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/64c4e3c6b99559d33a9e7c29799f001bb64a58d7..40d52f50:/bin/mozilla/ap.pl diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 086980d7f..2deb9cb5f 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1493,9 +1493,20 @@ sub ap_transactions { map { $ap->{$_} = $form->format_amount(\%myconfig, $ap->{$_}, 2) } qw(netamount tax amount paid due); - $ap->{type} = - $ap->{invoice} ? $locale->text("Invoice (one letter abbreviation)") : - $locale->text("AP Transaction (abbreviation)"); + my $is_storno = $ap->{storno} && $ap->{storno_id}; + my $has_storno = $ap->{storno} && !$ap->{storno_id}; + + if ($ap->{invoice}) { + $ap->{type} = + $has_storno ? $locale->text("Invoice with Storno (abbreviation)") + : $is_storno ? $locale->text("Storno (one letter abbreviation)") + : $locale->text("Invoice (one letter abbreviation)"); + } else { + $ap->{type} = + $has_storno ? $locale->text("AP Transaction with Storno (abbreviation)") + : $is_storno ? $locale->text("AP Transaction Storno (one letter abbreviation)") + : $locale->text("AP Transaction (abbreviation)"); + } my $row = { };