Skip to content

Commit 3b3b41c

Browse files
committed
1 parent bf06e6e commit 3b3b41c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/Livewire/PurchasesQuotationIndex.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public function render()
5858
private function getPurchasesQuotations()
5959
{
6060
return PurchasesQuotation::withCount('PurchaseQuotationLines')
61-
->where('label', 'like', '%' . $this->search . '%')
62-
->orderBy($this->sortField, $this->sortAsc ? 'asc' : 'desc')
63-
->paginate(15);
61+
->where('label', 'like', '%' . $this->search . '%')
62+
->orderBy($this->sortField, $this->sortAsc ? 'asc' : 'desc')
63+
->paginate(15);
6464
}
6565
}

app/Models/Purchases/PurchasesQuotation.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ public function UserManagement()
4747
return $this->belongsTo(User::class, 'user_id');
4848
}
4949

50+
public function PurchaseQuotationLines()
51+
{
52+
return $this->hasMany(PurchaseQuotationLines::class)->orderBy('ordre');
53+
}
54+
5055
public function GetshortCreatedAttribute()
5156
{
5257
return date('d F Y', strtotime($this->created_at));

0 commit comments

Comments
 (0)