prevent quotes from being converted twice, improved query

This commit is contained in:
David Bomba 2025-04-08 08:53:57 +10:00
parent 5f7d66b850
commit ec9f7f1bd4
1 changed files with 1 additions and 0 deletions

View File

@ -178,6 +178,7 @@ class QuoteController extends Controller
->where('client_id', auth()->guard('contact')->user()->client->id)
->where('company_id', auth()->guard('contact')->user()->client->company_id)
->whereIn('status_id', [Quote::STATUS_DRAFT, Quote::STATUS_SENT])
->whereNull('invoice_id')
->where(function ($q) {
$q->whereNull('due_date')->orWhere('due_date', '>=', now());
})