fix recurring invoice starts at condition

This commit is contained in:
harshjagad20
2021-12-06 12:47:53 +05:30
parent ed6268aa7b
commit b543f6d389

View File

@ -259,6 +259,7 @@ class RecurringInvoice extends Model
public function generateInvoice()
{
if (Carbon::now()->format('Y-m-d H:i:s') < $this->starts_at) {
if ($this->limit_by == 'DATE') {
$startDate = Carbon::today()->format('Y-m-d');
@ -287,6 +288,7 @@ class RecurringInvoice extends Model
$this->updateNextInvoiceDate();
}
}
}
public function createInvoice()
{