Merge branch 'master' of ssh://lx-office/~/lx-office-erp
[kivitendo-erp.git] / SL / CT.pm
index 12df265..a661e8c 100644 (file)
--- a/SL/CT.pm
+++ b/SL/CT.pm
@@ -941,7 +941,7 @@ sub get_delivery {
     qq|SELECT s.shiptoname, i.qty $qty_sign, | .
     qq|  ${arap}.id, ${arap}.transdate, ${arap}.invnumber, ${arap}.ordnumber, | .
     qq|  i.description, i.unit, i.sellprice, | .
-    qq|  oe.id AS oe_id | .
+    qq|  oe.id AS oe_id, invoice | .
     qq|FROM $arap | .
     qq|LEFT JOIN shipto s ON | .
     ($arap eq "ar"
@@ -1071,7 +1071,7 @@ sub get_bank_info {
 
   my $table        = $params{vc} eq 'customer' ? 'customer' : 'vendor';
   my @ids          = ref $params{id} eq 'ARRAY' ? @{ $params{id} } : ($params{id});
-  my $placeholders = ('?') x scalar @ids;
+  my $placeholders = join ", ", ('?') x scalar @ids;
   my $query        = qq|SELECT id, name, account_number, bank, bank_code, iban, bic
                         FROM ${table}
                         WHERE id IN (${placeholders})|;