src/providers/BillTypesProvider.php
public function getTypes()
    {
        $options = ['select' => 'full', 'orderby' => 'name_asc', 'with_hierarchy' => true];
        $types = Ref::findCached('type,bill', 'hipanel:finance', $options);

        if (!$this->app->user->can('support')) {
            $types = $this->removeUnusedTypes($types);
        }

        return $types;
    }
public function getTypes()
    {
        $options = ['select' => 'full', 'orderby' => 'name_asc', 'with_hierarchy' => true];
        $types = Ref::findCached('type,bill', 'hipanel:finance', $options);

        if (!$this->app->user->can('support')) {
            $types = $this->removeUnusedTypes($types);
        }

        return $types;
    }
public function getTypes ( ) { $ options = [ 'select' => 'full' , 'orderby' => 'name_asc' , 'with_hierarchy' => true ] ; $ types = Ref :: findCached ( 'type,bill' , 'hipanel:finance' , $ options ) ; if ( ! $ this -> app -> user -> can ( 'support' ) ) { $ types = $ this -> removeUnusedTypes ( $ types ) ; } return $ types ; }
Returns array of types.
When user can not support, filters out unused types.
@return Ref[]
Returns array of types . When user can not support filters out unused types .