improve filters
This commit is contained in:
@@ -19,6 +19,11 @@ class Bills extends ModelFilter
|
||||
return $this->whereLike('vendor_name', $query);
|
||||
}
|
||||
|
||||
public function vendor($vendor)
|
||||
{
|
||||
return $this->where('vendor_id', $vendor);
|
||||
}
|
||||
|
||||
public function status($status)
|
||||
{
|
||||
return $this->where('bill_status_code', $status);
|
||||
|
||||
@@ -19,6 +19,11 @@ class Payments extends ModelFilter
|
||||
return $this->whereLike('description', $query);
|
||||
}
|
||||
|
||||
public function vendor($vendor)
|
||||
{
|
||||
return $this->where('vendor_id', $vendor);
|
||||
}
|
||||
|
||||
public function category($category)
|
||||
{
|
||||
return $this->where('category_id', $category);
|
||||
|
||||
@@ -19,6 +19,11 @@ class Invoices extends ModelFilter
|
||||
return $this->whereLike('customer_name', $query);
|
||||
}
|
||||
|
||||
public function customer($customer)
|
||||
{
|
||||
return $this->where('customer_id', $customer);
|
||||
}
|
||||
|
||||
public function status($status)
|
||||
{
|
||||
return $this->where('invoice_status_code', $status);
|
||||
|
||||
@@ -14,6 +14,11 @@ class Revenues extends ModelFilter
|
||||
*/
|
||||
public $relations = [];
|
||||
|
||||
public function search($query)
|
||||
{
|
||||
return $this->whereLike('description', $query);
|
||||
}
|
||||
|
||||
public function customer($customer)
|
||||
{
|
||||
return $this->where('customer_id', $customer);
|
||||
|
||||
Reference in New Issue
Block a user