parse_amount für qty bei Lager -> Einlagern
[kivitendo-erp.git] / SL / OE.pm
index 694732e..683bb0e 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -87,7 +87,7 @@ sub transactions {
     qq|  ex.$rate AS exchangerate, | .
     qq|  pr.projectnumber AS globalprojectnumber, | .
     qq|  e.name AS employee, s.name AS salesman, | .
-    qq|  ct.${vc}number AS vcnumber, ct.country, ct.ustid  | .
+    qq|  ct.${vc}number AS vcnumber, ct.country, ct.ustid, ct.business_id  | .
     $periodic_invoices_columns .
     qq|FROM oe o | .
     qq|JOIN $vc ct ON (o.${vc}_id = ct.id) | .
@@ -126,6 +126,11 @@ SQL
     push @values, "%" . $form->{"projectnumber"} . "%", "%" . $form->{"projectnumber"} . "%" ;
   }
 
+  if ($form->{"business_id"}) {
+    $query .= " AND ct.business_id = ?";
+    push(@values, $form->{"business_id"});
+  }
+
   if ($form->{"${vc}_id"}) {
     $query .= " AND o.${vc}_id = ?";
     push(@values, $form->{"${vc}_id"});