672367 lte gte fxx3
This commit is contained in:
parent
54ba85af3b
commit
e8318f094b
|
|
@ -43,9 +43,7 @@ public function create()
|
|||
],422);
|
||||
}
|
||||
//validate legalization number exists
|
||||
elseif( !empty($this->account->legalization_number) && //legalizasia nomeri bar bolsa
|
||||
(!empty( $this->account->expires_at) && //legalizasia srogy
|
||||
!$this->account->can_extend_legal_number)){//eger srogyn gutarmagyna 1 ay galmadyk bolsa
|
||||
elseif(!$this->account->can_extend_legal_number){//eger srogyn gutarmagyna 1 ay galmadyk bolsa
|
||||
$month = Config::get('settings.legalization_extend') ?? 1;
|
||||
return response([
|
||||
'success' => false,
|
||||
|
|
|
|||
|
|
@ -115,7 +115,11 @@ public function getCanExtendLegalNumberAttribute()
|
|||
|
||||
$month = Config::get('settings.legalization_extend') ?? 1;
|
||||
|
||||
return $application && $application->state == 'approved' && $this->expires_at->gte(Carbon::now()->subMonth($month));
|
||||
if($application){
|
||||
return $application->state == 'approved' && $this->expires_at->gte(Carbon::now()->subMonths($month));
|
||||
}
|
||||
|
||||
return !empty($this->legalization_number) && !empty( $this->expires_at) && $this->expires_at->gte(Carbon::now()->subMonths($month));
|
||||
}
|
||||
|
||||
public function getApplicationStatusAttribute(){
|
||||
|
|
|
|||
Loading…
Reference in New Issue