register, Grundpreis
This commit is contained in:
parent
f06d2d15a5
commit
8e4bb0c2f6
32 changed files with 965 additions and 216 deletions
|
|
@ -239,7 +239,9 @@ class User extends Authenticatable
|
|||
|
||||
|
||||
|
||||
|
||||
public function isAboOption(){
|
||||
return ($this->abo_options && $this->account && $this->account->payment_data) ? true : false;
|
||||
}
|
||||
public function isActiveAccount(){
|
||||
return $this->payment_account ? Carbon::parse($this->payment_account)->gt(Carbon::now()) : false;
|
||||
}
|
||||
|
|
@ -251,15 +253,15 @@ class User extends Authenticatable
|
|||
public function isRenewalAccount()
|
||||
{
|
||||
if ($this->payment_account) {
|
||||
return Carbon::parse($this->payment_account)->modify('-'.config('mivita.renewal_days').' days')->lt(Carbon::now());
|
||||
return Carbon::parse($this->payment_account)->modify('-'.(config('mivita.renewal_days')+1).' days')->lt(Carbon::now());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function nextRenewalAccount(){
|
||||
return $this->payment_account ? Carbon::parse($this->payment_account)->modify('-'.config('mivita.renewal_days').' days')->format(\Util::formatDateTimeDB()) : false ;
|
||||
}
|
||||
|
||||
|
||||
public function daysActiveAccount(){
|
||||
return Carbon::now()->diffInDays(Carbon::parse($this->payment_account), false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue