Calc Limit
This commit is contained in:
@@ -23,9 +23,9 @@ class MemberResources extends JsonResource
|
||||
'status' => $this->active
|
||||
]),
|
||||
'limit' => [
|
||||
'current' => 2000000,
|
||||
'total' => 4000000,
|
||||
'percentage' => (2000000 / 4000000) * 100
|
||||
'current' => $this->claims_sum_total_claim,
|
||||
'total' => $this->currentPlan->limit_rules ?? 0,
|
||||
'percentage' => (!empty($this->currentPlan->limit_rules ?? 0)) ? (($this->claims_sum_total_claim / $this->currentPlan->limit_rules) * 100) : 0
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user