mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Removed extra brace in assets for components
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
17d4e25e60
commit
c06a93ef13
|
@ -142,7 +142,7 @@ class AssetsTransformer
|
||||||
|
|
||||||
foreach ($asset->components as $component) {
|
foreach ($asset->components as $component) {
|
||||||
$array['components'][] = [
|
$array['components'][] = [
|
||||||
[
|
|
||||||
'id' => $component->id,
|
'id' => $component->id,
|
||||||
'pivot_id' => $component->pivot->id,
|
'pivot_id' => $component->pivot->id,
|
||||||
'name' => $component->name,
|
'name' => $component->name,
|
||||||
|
@ -150,7 +150,7 @@ class AssetsTransformer
|
||||||
'price_cost' => $component->purchase_cost,
|
'price_cost' => $component->purchase_cost,
|
||||||
'purchase_total' => $component->purchase_cost * $component->pivot->assigned_qty,
|
'purchase_total' => $component->purchase_cost * $component->pivot->assigned_qty,
|
||||||
'checkout_date' => Helper::getFormattedDateObject($component->pivot->created_at, 'datetime') ,
|
'checkout_date' => Helper::getFormattedDateObject($component->pivot->created_at, 'datetime') ,
|
||||||
]
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue