From 000ba9b8aba4ba5c32507544afd7d790b53e11a7 Mon Sep 17 00:00:00 2001 From: Ema-Andreea Ghiurca Date: Wed, 23 Oct 2019 11:41:19 +0200 Subject: [PATCH] =?utf8?q?Historie=20zeigt=20Eintr=C3=A4ge=20von=20anderen?= =?utf8?q?=20Belegen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ticket #11167 (cherry picked from commit 59eb76522127c336bdf68cacb84a83d49ab19f75) (cherry-pick von odyn) --- bin/mozilla/common.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 2f9df9ed3..8cbdac75c 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -239,10 +239,10 @@ sub show_history { my $callback = build_std_url(qw(action longdescription trans_id_type input_name)); my $restriction; - if ( $form->{trans_id_type} eq 'glid' ) { - $restriction = "AND ( snumbers LIKE 'invnumber%' OR what_done LIKE '%Buchungsnummer%' OR snumbers LIKE 'gltransaction%' OR snumbers LIKE 'emailjournal%' ) "; - } elsif ( $form->{trans_id_type} eq 'id' ) { - $restriction = " AND ( snumbers NOT LIKE 'invnumber_%' AND snumbers NOT LIKE 'gltransaction%' AND (what_done NOT LIKE '%Buchungsnummer%' OR what_done IS null))"; + if ( $form->{trans_id_type} eq 'glid' ) { # for invoices + $restriction = "AND ( snumbers LIKE 'invnumber%' OR what_done LIKE '%Buchungsnummer%' OR snumbers LIKE 'gltransaction%' OR (snumbers LIKE 'emailjournal%' AND what_done ~ 'invoice|credit_note') ) "; + } elsif ( $form->{trans_id_type} eq 'id' ) { # for non invoices + $restriction = " AND ( snumbers NOT LIKE 'invnumber_%' AND snumbers NOT LIKE 'gltransaction%' AND (what_done NOT LIKE '%Buchungsnummer%' AND what_done NOT LIKE '%invoice%' OR what_done IS null))"; } else { $restriction = ''; }; -- 2.20.1