public function markViewed() { if (!$this->isViewed()) { $this->invoice_status_id = INVOICE_STATUS_VIEWED; $this->save(); } }