use trait instead of function

This commit is contained in:
denisdulici 2020-04-07 14:43:23 +03:00
parent a2b17eaab5
commit 9fd9677a2f

View File

@ -82,17 +82,17 @@ abstract class Report
public function getCustomers()
{
return $this->getContacts('customer');
return $this->getContacts($this->getCustomerTypes());
}
public function getVendors()
{
return $this->getContacts('vendor');
return $this->getContacts($this->getVendorTypes());
}
public function getContacts($type)
public function getContacts($types)
{
return Contact::$type()->orderBy('name')->pluck('name', 'id')->toArray();
return Contact::type($types)->orderBy('name')->pluck('name', 'id')->toArray();
}
public function applyDateFilter($event)