DeliveryOrder: prefix in type filter
authorSven Schöling <s.schoeling@googlemail.com>
Sun, 5 Dec 2021 18:34:21 +0000 (19:34 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 14 Feb 2022 14:02:19 +0000 (15:02 +0100)
SL/DB/Manager/DeliveryOrder.pm

index 3880bcf..e9c1ee7 100644 (file)
@@ -28,8 +28,9 @@ __PACKAGE__->add_filter_specs(
 sub type_filter {
   my $class = shift;
   my $type  = lc(shift || '');
+  my $prefix = shift // '';
 
-  return order_type => validate_type($type);
+  return "${prefix}order_type" => validate_type($type);
 }
 
 sub _sort_spec {