Fix for recurring invoice null next_send_date

This commit is contained in:
= 2020-12-31 09:18:29 +11:00
parent 0650f066e2
commit 02e535b5a1

View File

@ -367,9 +367,13 @@ class RecurringInvoice extends BaseModel
$iterations = 10; $iterations = 10;
} }
$data = [];
if(!$this->next_send_date)
return $data;
$next_send_date = Carbon::parse($this->next_send_date)->copy(); $next_send_date = Carbon::parse($this->next_send_date)->copy();
$data = [];
for ($x=0; $x<$iterations; $x++) { for ($x=0; $x<$iterations; $x++) {
// we don't add the days... we calc the day of the month!! // we don't add the days... we calc the day of the month!!