Procházet zdrojové kódy

fix excluded in prima nota

FabioFratini před 8 měsíci
rodič
revize
78b441aa43
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. 6 2
      app/Http/Livewire/Record.php

+ 6 - 2
app/Http/Livewire/Record.php

@@ -146,8 +146,12 @@ class Record extends Component
                     /*->where(function ($query)  {
                         $query->where('deleted', false)->orWhere('deleted', null);
                     })*/
-                    ->whereNotIn('member_id', $exclude_from_records);
-                    if ($this->filterCausals != null && sizeof($this->filterCausals) > 0)
+                    ->where(function ($query) use ($exclude_from_records) {
+                        $query->where('type', 'OUT')
+                              ->orWhere(function ($subquery) use ($exclude_from_records) {
+                                  $subquery->whereNotIn('member_id', $exclude_from_records);
+                              });
+                    });                    if ($this->filterCausals != null && sizeof($this->filterCausals) > 0)
                     {
                         $causals = array();
                         foreach($this->filterCausals as $z)