diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index 57cd4ccb96..dc343832d8 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -53,7 +53,7 @@ class QueryLogging Log::info($request->method().' - '.$request->url().": $count queries - ".$time); // if($count > 50) - Log::info($queries); + // Log::info($queries); } } diff --git a/app/Models/RecurringInvoice.php b/app/Models/RecurringInvoice.php index adb3c94935..70a9795c89 100644 --- a/app/Models/RecurringInvoice.php +++ b/app/Models/RecurringInvoice.php @@ -392,13 +392,13 @@ class RecurringInvoice extends BaseModel { // we don't add the days... we calc the day of the month!! $next_due_date = $this->calculateDueDate($next_send_date->copy()->format('Y-m-d')); + $next_due_date_string = $next_due_date ? $next_due_date->format('Y-m-d') : ''; $next_send_date = Carbon::parse($next_send_date); - // $next_due_date = Carbon::parse($next_due_date); $data[] = [ 'send_date' => $next_send_date->format('Y-m-d'), - 'due_date' => $next_due_date->format('Y-m-d'), + 'due_date' => $next_due_date_string ]; $next_send_date = $this->nextDateByFrequency($next_send_date->format('Y-m-d'));