Make sorting of invoice items reliable.
Some checks failed
Build project image / Build-and-release-image (push) Failing after 3m1s

This commit is contained in:
2025-08-02 12:12:57 +02:00
parent e1f579c7fd
commit 0a4089fe14
6 changed files with 33 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ class Invoice extends Model
*/
public function items(): HasMany
{
return $this->hasMany(Invoiceitem::class);
return $this->hasMany(Invoiceitem::class)->orderBy('sort');
}
/**

View File

@@ -22,6 +22,7 @@ class Invoiceitem extends Model
'total',
'name',
'description',
'sort'
];
}