mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 02:39:35 -04: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')); |         nlog("Sending recurring invoices ".Carbon::now()->format('Y-m-d h:i:s')); | ||||||
| 
 | 
 | ||||||
|         if (! config('ninja.db.multi_db_enabled')) { |         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') |                                                         ->whereNotNull('next_send_date') | ||||||
|                                                         ->where('status_id', RecurringInvoice::STATUS_ACTIVE) |                                                         ->where('status_id', RecurringInvoice::STATUS_ACTIVE) | ||||||
|                                                         ->where('remaining_cycles', '!=', '0') |                                                         ->where('remaining_cycles', '!=', '0') | ||||||
| @ -64,7 +64,7 @@ class RecurringInvoicesCron | |||||||
|             foreach (MultiDB::$dbs as $db) { |             foreach (MultiDB::$dbs as $db) { | ||||||
|                 MultiDB::setDB($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') |                                                         ->whereNotNull('next_send_date') | ||||||
|                                                         ->where('status_id', RecurringInvoice::STATUS_ACTIVE) |                                                         ->where('status_id', RecurringInvoice::STATUS_ACTIVE) | ||||||
|                                                         ->where('remaining_cycles', '!=', '0') |                                                         ->where('remaining_cycles', '!=', '0') | ||||||
|  | |||||||
| @ -55,7 +55,7 @@ class ReminderJob implements ShouldQueue | |||||||
|     { |     { | ||||||
|         nlog("Sending invoice reminders " . now()->format('Y-m-d h:i:s')); |         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) |                  ->where('is_deleted', 0) | ||||||
|                  ->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]) |                  ->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]) | ||||||
|                  ->where('balance', '>', 0) |                  ->where('balance', '>', 0) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user