Fixes for statements
This commit is contained in:
parent
ced1e1198a
commit
67f3107a3e
|
|
@ -212,6 +212,7 @@ class Statement
|
||||||
$this->client->settings = $settings;
|
$this->client->settings = $settings;
|
||||||
|
|
||||||
$this->entity = \App\Models\Invoice::factory()->make(); //@phpstan-ignore-line
|
$this->entity = \App\Models\Invoice::factory()->make(); //@phpstan-ignore-line
|
||||||
|
$this->entity->client_id = $this->client->id;//@phpstan-ignore-line
|
||||||
$this->entity->client = $this->client;//@phpstan-ignore-line
|
$this->entity->client = $this->client;//@phpstan-ignore-line
|
||||||
$ii = \App\Models\InvoiceInvitation::factory()->make(); //@phpstan-ignore-line
|
$ii = \App\Models\InvoiceInvitation::factory()->make(); //@phpstan-ignore-line
|
||||||
$ii->setRelation('invoice', $this->entity); //@phpstan-ignore-line
|
$ii->setRelation('invoice', $this->entity); //@phpstan-ignore-line
|
||||||
|
|
@ -219,17 +220,10 @@ class Statement
|
||||||
$ii->setRelation('company', $this->client->company);
|
$ii->setRelation('company', $this->client->company);
|
||||||
$ii->setRelation('user', $this->client->user);
|
$ii->setRelation('user', $this->client->user);
|
||||||
$this->entity->client->setRelation('company', $this->client->company);
|
$this->entity->client->setRelation('company', $this->client->company);
|
||||||
$this->entity->setRelation('invitations', $ii); //@phpstan-ignore-line
|
$this->entity->setRelation('invitations', collect([$ii])); //@phpstan-ignore-line
|
||||||
$this->entity->setRelation('company', $this->client->company);
|
$this->entity->setRelation('company', $this->client->company);
|
||||||
$this->entity->setRelation('user', $this->client->user);
|
$this->entity->setRelation('user', $this->client->user);
|
||||||
|
|
||||||
// $this->entity = \App\Models\Invoice::factory()->make(); //@phpstan-ignore-line
|
|
||||||
// $this->entity->client = \App\Models\Client::factory()->make(['settings' => $settings]); //@phpstan-ignore-line
|
|
||||||
// $this->entity->client->setRelation('company', $this->client->company);
|
|
||||||
// $this->entity->setRelation('invitations', \App\Models\InvoiceInvitation::factory()->make()); //@phpstan-ignore-line
|
|
||||||
// $this->entity->setRelation('company', $this->client->company);
|
|
||||||
// $this->entity->setRelation('user', $this->client->user);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue