mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
- fix invoice status not updating issue
- date range selection issues on report for non-english languages - fix invoice all tab issue (always showing draft even in all tab)
This commit is contained in:
committed by
Mohit Panjwani
parent
7202fdcbf2
commit
1322ed15dc
@ -40,7 +40,9 @@ class CheckInvoiceStatus extends Command
|
||||
public function handle()
|
||||
{
|
||||
$date = Carbon::now();
|
||||
$invoices = Invoice::where('status', '<>', Invoice::STATUS_COMPLETED)->whereDate('due_date', '<', $date)->get();
|
||||
$invoices = Invoice::whereNotIn('status', [Invoice::STATUS_COMPLETED, Invoice::STATUS_DRAFT])
|
||||
->whereDate('due_date', '<', $date)
|
||||
->get();
|
||||
|
||||
foreach ($invoices as $invoice) {
|
||||
$invoice->status = Invoice::STATUS_OVERDUE;
|
||||
|
||||
Reference in New Issue
Block a user