added multi-select filters everywhere

This commit is contained in:
denisdulici
2018-11-02 11:32:42 +03:00
parent b0a7e98e4e
commit 9a85bb9f5a
25 changed files with 202 additions and 86 deletions

View File

@ -19,14 +19,19 @@ class Invoices extends ModelFilter
return $this->whereLike('customer_name', $query);
}
public function customer($customer)
public function customers($customers)
{
return $this->where('customer_id', $customer);
return $this->whereIn('customer_id', (array) $customers);
}
public function status($status)
public function categories($categories)
{
return $this->where('invoice_status_code', $status);
return $this->whereIn('category_id', (array) $categories);
}
public function statuses($statuses)
{
return $this->whereIn('invoice_status_code', (array) $statuses);
}
public function invoiceDate($date)

View File

@ -19,19 +19,19 @@ class Revenues extends ModelFilter
return $this->whereLike('description', $query);
}
public function customer($customer)
public function customers($customers)
{
return $this->where('customer_id', $customer);
return $this->whereIn('customer_id', (array) $customers);
}
public function category($category)
public function categories($categories)
{
return $this->where('category_id', $category);
return $this->whereIn('category_id', (array) $categories);
}
public function account($account)
public function accounts($accounts)
{
return $this->where('account_id', $account);
return $this->whereIn('account_id', (array) $accounts);
}
public function date($date)