entity->name ?: $this->entity->primary_contact->first()->first_name . ' '. $this->entity->primary_contact->first()->last_name;
    }
    public function primary_contact_name()
    {
        return $this->entity->primary_contact->first() !== null ? $this->entity->primary_contact->first()->first_name . ' '. $this->entity->primary_contact->first()->last_name : 'No primary contact set';
    }
    public function address()
    {
        $str = '';
        $client = $this->entity;
        if ($address1 = $client->address1) {
            $str .= e($address1) . '
';
        }
        if ($address2 = $client->address2) {
            $str .= e($address2) . '
';
        }
        if ($cityState = $this->getCityState()) {
            $str .= e($cityState) . '
';
        }
        if ($country = $client->country) {
            $str .= e($country->name) . '
';
        }
        return $str;
    }
    public function shipping_address()
    {
        $str = '';
        $client = $this->entity;
        if ($address1 = $client->shipping_address1) {
            $str .= e($address1) . '
';
        }
        if ($address2 = $client->shipping_address2) {
            $str .= e($address2) . '
';
        }
        if ($cityState = $this->getCityState()) {
            $str .= e($cityState) . '
';
        }
        if ($country = $client->country) {
            $str .= e($country->name) . '
';
        }
        return $str;
    }
    public function phone()
    {
        return $this->entity->phone ?: '';
    }
    public function website()
    {
        return $this->entity->website ?: '';
    }
}