mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
fix recurring invoice starts at condition
This commit is contained in:
@ -259,6 +259,7 @@ class RecurringInvoice extends Model
|
|||||||
|
|
||||||
public function generateInvoice()
|
public function generateInvoice()
|
||||||
{
|
{
|
||||||
|
if (Carbon::now()->format('Y-m-d H:i:s') < $this->starts_at) {
|
||||||
if ($this->limit_by == 'DATE') {
|
if ($this->limit_by == 'DATE') {
|
||||||
$startDate = Carbon::today()->format('Y-m-d');
|
$startDate = Carbon::today()->format('Y-m-d');
|
||||||
|
|
||||||
@ -287,6 +288,7 @@ class RecurringInvoice extends Model
|
|||||||
$this->updateNextInvoiceDate();
|
$this->updateNextInvoiceDate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function createInvoice()
|
public function createInvoice()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user