latest broker application fixed in account model
This commit is contained in:
parent
05e1d29fcd
commit
6e1815ed93
|
|
@ -149,7 +149,7 @@ public function getCanExtendBrokerAttribute()
|
||||||
{
|
{
|
||||||
$month = Config::get('settings.legalization_extend') ?? 1;
|
$month = Config::get('settings.legalization_extend') ?? 1;
|
||||||
|
|
||||||
if($application = $this->last_application()){
|
if($application = $this->last_broker_application()){
|
||||||
return $application->state == 'approved' && $this->expires_at->lte(Carbon::now()->subMonths($month));
|
return $application->state == 'approved' && $this->expires_at->lte(Carbon::now()->subMonths($month));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ public function getCanExtendBrokerAttribute()
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationBrokerStatusAttribute(){
|
public function getApplicationBrokerStatusAttribute(){
|
||||||
$application = $this->last_application();
|
$application = $this->last_broker_application();
|
||||||
|
|
||||||
return $application->state ?? null;
|
return $application->state ?? null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue