X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FSEPA.pm;h=94579179bc559ab1def7075adafea7468d1aef77;hb=73a78da630ce363f70062447dd82a8a0ece8cd89;hp=f2599a8b681b08562f34b4c7e9c357b14cb5221c;hpb=5ede0770885e493389494cf3be00511962d823a8;p=kivitendo-erp.git diff --git a/SL/SEPA.pm b/SL/SEPA.pm index f2599a8b6..94579179b 100644 --- a/SL/SEPA.pm +++ b/SL/SEPA.pm @@ -326,6 +326,17 @@ sub list_exports { $joins_sub{$arap} = 1; } + if ($filter->{message_id}) { + push @values, '%' . $filter->{message_id} . '%'; + push @where, <{vc}) { push @where_sub, "vc.name ILIKE ?"; push @values_sub, '%' . $filter->{vc} . '%'; @@ -370,6 +381,9 @@ sub list_exports { (SELECT SUM(sei.amount) FROM sepa_export_items sei WHERE (sei.sepa_export_id = se.id)) AS sum_amounts, + (SELECT string_agg(semi.message_id, ', ') + FROM sepa_export_message_ids semi + WHERE semi.sepa_export_id = se.id) AS message_ids, e.name AS employee FROM sepa_export se LEFT JOIN (