From a6234da23a9fbc72d2680c20998869ab2565e6e4 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 4 Oct 2020 20:47:38 +1100 Subject: [PATCH] Fix for no due date set on recurring invoices --- app/Models/RecurringInvoice.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Models/RecurringInvoice.php b/app/Models/RecurringInvoice.php index 44d3f68028bb..adb3c949350f 100644 --- a/app/Models/RecurringInvoice.php +++ b/app/Models/RecurringInvoice.php @@ -392,9 +392,9 @@ 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_send_date = Carbon::parse($next_send_date); - $next_due_date = Carbon::parse($next_due_date); + // $next_due_date = Carbon::parse($next_due_date); $data[] = [ 'send_date' => $next_send_date->format('Y-m-d'), @@ -406,12 +406,12 @@ class RecurringInvoice extends BaseModel } /*If no due date is set - unset the due_date value */ - if(!$this->due_date_days || $this->due_date_days == 0){ + // if(!$this->due_date_days || $this->due_date_days == 0){ - foreach($data as $key => $value) - $data[$key]['due_date'] = ''; + // foreach($data as $key => $value) + // $data[$key]['due_date'] = ''; - } + // } return $data;