function getDescription(){ if($this->task_activity_id > 0){ $ta = new SI_TaskActivity(); if($ta->get($this->task_activity_id) === FALSE){ $this->error = 'SI_InvoiceLineLink::getDescription(): Error getting task activity: '.$ta->getLastError(); return FALSE; } $task = $ta->getTask(); $project = $task->getProject(); return $project->name.":".$task->name; }elseif($this->expense_id > 0){ $ex = new SI_Expense(); if($ex->get($this->expense_id) === FALSE){ $this->error = 'SI_InvoiceLineLink::getDescription(): Error getting expense: '.$ex->getLastError(); return FALSE; } return $ex->description; }elseif($this->payment_schedule_id > 0){ $ps = new SI_PaymentSchedule(); if($ps->get($this->payment_schedule_id) === FALSE){ $this->error = 'SI_InvoiceLineLink::getDescription(): Error getting scheduled payment: '.$ps->getLastError(); return FALSE; } return $ps->description; } return 'Unknown'; }