We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8823a7 commit b04fd0dCopy full SHA for b04fd0d
src/Invoice.php
@@ -151,12 +151,12 @@ public function parent(): BelongsTo
151
152
public function quote(): HasOne
153
{
154
- return $this->hasOne(Invoice::class)->where('type', InvoiceType::Quote->value);
+ return $this->hasOne(Invoice::class, 'parent_id')->where('type', InvoiceType::Quote->value);
155
}
156
157
public function credit(): HasOne
158
159
- return $this->hasOne(Invoice::class)->where('type', InvoiceType::Credit->value);
+ return $this->hasOne(Invoice::class, 'parent_id')->where('type', InvoiceType::Credit->value);
160
161
162
/**
0 commit comments