Skip to content

Commit 291be64

Browse files
committed
Refined remnaining asset count for archived
1 parent 72be171 commit 291be64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Transformers/AssetModelsTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function transformAssetModel(AssetModel $assetmodel)
5656
'assets_count' => (int) $assetmodel->assets_count,
5757
'assets_assigned_count' => (int) $assetmodel->assets_assigned_count,
5858
'assets_archived_count' => (int) $assetmodel->assets_archived_count,
59-
'remaining' => (int) ($assetmodel->assets_count - $assetmodel->assets_assigned_count),
59+
'remaining' => (int) ($assetmodel->assets_count - (int) $assetmodel->assets_assigned_count) - (int) $assetmodel->assets_archived_count,
6060
'category' => ($assetmodel->category) ? [
6161
'id' => (int) $assetmodel->category->id,
6262
'name'=> e($assetmodel->category->name),

0 commit comments

Comments
 (0)