public function subEntityType() { if ($this->is_recurring) { return ENTITY_RECURRING_INVOICE; } else { return $this->getEntityType(); } }