mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 23:54:29 -04:00
Fix for renewel logic
This commit is contained in:
parent
88b9046ac7
commit
e619bacf66
@ -218,7 +218,9 @@ class PaymentService extends BaseService
|
||||
$account = Account::with('users')->find($invoice->client->public_id);
|
||||
if ($account->pro_plan_paid && $account->pro_plan_paid != '0000-00-00') {
|
||||
$date = DateTime::createFromFormat('Y-m-d', $account->pro_plan_paid);
|
||||
$account->pro_plan_paid = $date->modify('+1 year')->format('Y-m-d');
|
||||
$date->modify('+1 year');
|
||||
$date = max($date, date_create());
|
||||
$account->pro_plan_paid = $date->format('Y-m-d');
|
||||
} else {
|
||||
$account->pro_plan_paid = date_create()->format('Y-m-d');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user