@extends('layouts.app') @section('title','Shared Product Library') @section('content')
One product identity across companies. Activation and prices belong to the selected company.
| Product identity | Barcodes | Current company | Company prices (AED, VAT included) |
|---|---|---|---|
| @if($p->company_product_id){{ $p->sku }}@else{{ $p->sku }}@endif {{ $p->name }} {{ $p->brand }} {{ $p->model }} {{ $p->color }}{{ $p->status }} |
@forelse($barcodes->get($p->id,collect()) as $barcode) {{ $barcode->barcode }} @if(in_array($barcode->barcode,$duplicateCodes,true))Shared barcode@endif @emptyNot provided@endforelse |
@if($p->company_product_id){{ $p->company_active?'Enabled':'Inactive' }}@elseif($canCreate)@elseNot enabled@endif | @if($p->company_product_id)
@php($currentPrices=$prices->get($p->company_product_id,collect())->unique('price_type'))
@forelse($currentPrices as $price) {{ ucfirst($price->price_type) }}: {{ \App\Support\ProductRegistry::formatUnitPrice((string)$price->gross_amount) }} from {{ $price->effective_date }} @emptyNo prices recorded. @endforelse @if($canEdit)Set company price |
| No shared products found. Existing company products are unchanged. | |||