Unser eigenes "check all checkboxes" durch unsere eigene jQuery-Variante ersetzen
[kivitendo-erp.git] / SL / SEPA.pm
index 38341ec..ced75be 100644 (file)
@@ -21,8 +21,8 @@ sub retrieve_open_invoices {
 
   my $query =
     qq|
-       SELECT ${arap}.id, ${arap}.invnumber, ${arap}.${vc}_id, ${arap}.amount AS invoice_amount, ${arap}.invoice,
-         vc.name AS vcname, ${arap}.duedate as duedate,
+       SELECT ${arap}.id, ${arap}.invnumber, ${arap}.${vc}_id as vc_id, ${arap}.amount AS invoice_amount, ${arap}.invoice,
+         vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate,
 
          COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' AS vc_bank_info_ok,
 
@@ -305,7 +305,7 @@ sub list_exports {
   push @where,  'se.vc = ?';
   push @values, $vc;
 
-  my $where = ' WHERE ' . join(' AND ', map { "(${_})" } @where) if (@where);
+  my $where = @where ? ' WHERE ' . join(' AND ', map { "(${_})" } @where) : '';
 
   my $query =
     qq|SELECT se.id, se.employee_id, se.executed, se.closed, itime::date AS export_date,