mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 06:34:34 -04:00
Fix for no due date set on recurring invoices
This commit is contained in:
parent
fccc98caa7
commit
a6234da23a
@ -394,7 +394,7 @@ class RecurringInvoice extends BaseModel
|
||||
$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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user