Fix for no due date set on recurring invoices
This commit is contained in:
parent
fccc98caa7
commit
a6234da23a
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue