mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge pull request #6103 from turbo124/v5-develop
Change query parameter when querying datetimes
This commit is contained in:
commit
30a98dc011
@ -43,7 +43,7 @@ class RecurringInvoicesCron
|
||||
nlog("Sending recurring invoices ".Carbon::now()->format('Y-m-d h:i:s'));
|
||||
|
||||
if (! config('ninja.db.multi_db_enabled')) {
|
||||
$recurring_invoices = RecurringInvoice::whereDate('next_send_date', '<=', now()->toDateTimeString())
|
||||
$recurring_invoices = RecurringInvoice::where('next_send_date', '<=', now()->toDateTimeString())
|
||||
->whereNotNull('next_send_date')
|
||||
->where('status_id', RecurringInvoice::STATUS_ACTIVE)
|
||||
->where('remaining_cycles', '!=', '0')
|
||||
@ -64,7 +64,7 @@ class RecurringInvoicesCron
|
||||
foreach (MultiDB::$dbs as $db) {
|
||||
MultiDB::setDB($db);
|
||||
|
||||
$recurring_invoices = RecurringInvoice::whereDate('next_send_date', '<=', now()->toDateTimeString())
|
||||
$recurring_invoices = RecurringInvoice::where('next_send_date', '<=', now()->toDateTimeString())
|
||||
->whereNotNull('next_send_date')
|
||||
->where('status_id', RecurringInvoice::STATUS_ACTIVE)
|
||||
->where('remaining_cycles', '!=', '0')
|
||||
|
@ -55,7 +55,7 @@ class ReminderJob implements ShouldQueue
|
||||
{
|
||||
nlog("Sending invoice reminders " . now()->format('Y-m-d h:i:s'));
|
||||
|
||||
Invoice::whereDate('next_send_date', '<=', now()->toDateTimeString())
|
||||
Invoice::where('next_send_date', '<=', now()->toDateTimeString())
|
||||
->where('is_deleted', 0)
|
||||
->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL])
|
||||
->where('balance', '>', 0)
|
||||
|
Loading…
Reference in New Issue
Block a user