invoice = $invoice; $this->balance_adjustment = $balance_adjustment; } public function run() { if ($this->invoice->is_deleted) { return; } $this->invoice->balance += floatval($this->balance_adjustment); if ($this->invoice->balance == 0) { $this->invoice->status_id = Invoice::STATUS_PAID; // $this->save(); // event(new InvoiceWasPaid($this, $this->company)); } return $this->invoice; } }