base_repository = new BaseRepository(); } /** * Execute the job. * * @return void */ public function handle() { $this->client = $this->invoice->client; if ($this->client->getSetting('auto_archive_invoice')) { /* Throws: Payment amount xxx does not match invoice totals. */ $this->base_repository->archive($this->invoice); } } }