X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=2deb9cb5f10586f2b66de3790e7c2840ca1f3906;hb=05fd99ac835a9ffa6b1fefc768b460f207e6f578;hp=895fa0305da57db7e6a35289c839deeb5d5308e0;hpb=2dc09cf507b099b014a405001a6d67aa58cd124d;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 895fa0305..2deb9cb5f 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1451,10 +1451,10 @@ sub ap_transactions { push @options, $locale->text('Transaction description') . " : $form->{transaction_description}"; } if ($form->{transdatefrom}) { - push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1); + push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1); } if ($form->{transdateto}) { - push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1); + push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1); } if ($form->{open}) { push @options, $locale->text('Open'); @@ -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 = { };