|
|
@@ -517,11 +517,12 @@ class RecordINOUT extends Component
|
|
|
->where(function ($query) {
|
|
|
$query->where('deleted', false)->orWhere('deleted', null);
|
|
|
})
|
|
|
-
|
|
|
- ->whereNotIn('member_id', $exclude_from_records)
|
|
|
+ ->where(function ($query) use ($exclude_from_records) {
|
|
|
+ $query->whereNull('member_id')
|
|
|
+ ->orWhereNotIn('member_id', $exclude_from_records);
|
|
|
+ })
|
|
|
->where('records_rows.when', 'like', '%"' . $filter . '"%')->get();
|
|
|
//$records = $records->orderBy('date', 'DESC')->get();
|
|
|
-
|
|
|
foreach($records as $record)
|
|
|
{
|
|
|
$amount = $record->amount;
|