mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Added supplier to transformers
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
6e183f2ced
commit
ab7c75232b
|
@ -37,6 +37,7 @@ class ComponentsTransformer
|
|||
'id' => (int) $component->category->id,
|
||||
'name' => e($component->category->name),
|
||||
] : null,
|
||||
'supplier' => ($component->supplier) ? ['id' => $component->supplier->id, 'name'=> e($component->supplier->name)] : null,
|
||||
'order_number' => e($component->order_number),
|
||||
'purchase_date' => Helper::getFormattedDateObject($component->purchase_date, 'date'),
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($component->purchase_cost),
|
||||
|
|
|
@ -31,6 +31,7 @@ class ConsumablesTransformer
|
|||
'item_no' => e($consumable->item_no),
|
||||
'location' => ($consumable->location) ? ['id' => (int) $consumable->location->id, 'name' => e($consumable->location->name)] : null,
|
||||
'manufacturer' => ($consumable->manufacturer) ? ['id' => (int) $consumable->manufacturer->id, 'name' => e($consumable->manufacturer->name)] : null,
|
||||
'supplier' => ($consumable->supplier) ? ['id' => $consumable->supplier->id, 'name'=> e($consumable->supplier->name)] : null,
|
||||
'min_amt' => (int) $consumable->min_amt,
|
||||
'model_number' => ($consumable->model_number != '') ? e($consumable->model_number) : null,
|
||||
'remaining' => $consumable->numRemaining(),
|
||||
|
|
Loading…
Reference in a new issue