X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/56053021d98abfd85a033a12d642714d821b8847..4c9ae7fe80ec4b8bebca3935ac6c3d2cca788fae:/SL/SEPA.pm diff --git a/SL/SEPA.pm b/SL/SEPA.pm index cbea8417e..8e7306e31 100644 --- a/SL/SEPA.pm +++ b/SL/SEPA.pm @@ -364,6 +364,12 @@ sub list_exports { my $query = qq|SELECT se.id, se.employee_id, se.executed, se.closed, itime::date AS export_date, + (SELECT COUNT(*) + FROM sepa_export_items sei + WHERE (sei.sepa_export_id = se.id)) AS num_invoices, + (SELECT SUM(sei.amount) + FROM sepa_export_items sei + WHERE (sei.sepa_export_id = se.id)) AS sum_amounts, e.name AS employee FROM sepa_export se LEFT JOIN (