Skip to content

Commit b04fd0d

Browse files
committed
fix
1 parent d8823a7 commit b04fd0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Invoice.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ public function parent(): BelongsTo
151151

152152
public function quote(): HasOne
153153
{
154-
return $this->hasOne(Invoice::class)->where('type', InvoiceType::Quote->value);
154+
return $this->hasOne(Invoice::class, 'parent_id')->where('type', InvoiceType::Quote->value);
155155
}
156156

157157
public function credit(): HasOne
158158
{
159-
return $this->hasOne(Invoice::class)->where('type', InvoiceType::Credit->value);
159+
return $this->hasOne(Invoice::class, 'parent_id')->where('type', InvoiceType::Credit->value);
160160
}
161161

162162
/**

0 commit comments

Comments
 (0)