Add daily reset

This commit is contained in:
David Bomba 2021-04-08 20:38:31 +10:00
parent d5e0e4335b
commit d9d042724e
2 changed files with 8 additions and 0 deletions

View File

@ -182,6 +182,11 @@ class SubscriptionService
} }
public function createChangePlanInvoice($data)
{
}
public function createInvoice($data): ?\App\Models\Invoice public function createInvoice($data): ?\App\Models\Invoice
{ {

View File

@ -426,6 +426,9 @@ trait GeneratesCounter
} }
switch ($client->company->reset_counter_frequency_id) { switch ($client->company->reset_counter_frequency_id) {
case RecurringInvoice::FREQUENCY_DAILY:
$reset_date->addDay();
break;
case RecurringInvoice::FREQUENCY_WEEKLY: case RecurringInvoice::FREQUENCY_WEEKLY:
$reset_date->addWeek(); $reset_date->addWeek();
break; break;