Fix on invoices, add delivery reference, wip on dashboard concurrency requests designed on template

This commit is contained in:
Ludovic CANDELLIER
2023-02-17 00:05:03 +01:00
parent 878ec7a8f2
commit 8e571de523
26 changed files with 555 additions and 130 deletions

View File

@@ -31,4 +31,14 @@ class Invoice extends Model
{
return $this->belongsToThrough(Customer::class, Order::class, null, '', [Customer::class => 'customer_id', Order::class => 'order_id']);
}
public function scopeByUUID($query, $uuid)
{
return $query->where('uuid', $uuid);
}
public function scopeByPeriod($query, $start, $end)
{
return $query->whereBetween('created_at', [$start, $end]);
}
}