@extends('layouts.admin-main') @section('content')
@csrf
@can('product-create') {{ __('message.add new') }} @endcan
@foreach ($products as $index => $product) @if($product->fixed_price) @else @endif @endforeach
# {{ __('message.part number') }} {{ __('message.product category') }} {{ __('message.name') }} {{ __('message.price') }} {{ __('message.fixed price') }} {{ __('message.qty') }} {{ __('message.gold weight') }}
@if($product->image) @else @endif

{{__('message.cost')}}

: {{ number_format($product->cost($product->weight), 2) }} {{$currency_->currency_symbol??''}}

{{__('message.selling cost')}}

: {{ number_format($product->sellingCost(), 2) }} {{$currency_->currency_symbol??''}}
@if($product->productcategory && $product->productcategory->price()>0)

{{__('message.current rate')}}

: {{ number_format($product->productcategory->price(), 4) }} {{$currency_->currency_symbol??''}}
@endif @if($product->selling_wagesInWeight()??0)

{{__('message.wages')}}

: {{number_format($product->selling_wagesInWeight()??0 , 2)}} {{$currency_->currency_symbol}}
@endif @if($product->wages_in_weight)

{{__('message.wages')}} (គិតជាលី)

: {{number_format($product->wages_in_weight??0 , 2)}}
@endif

{{__('message.original wages')}}

: {{number_format($product->original_wages , 2)}} {{$currency_->currency_symbol}}

{{__('message.weight')}}

: {{number_format($product->weight , 2)}} @if($product->weight_description) ({{$product->weight_description}}) @endif
@if($product->purity_upgrade_to)

{{__('message.purity upgrade to')}}

: {{$product->purity_upgrade_to??''}}
@endif @if($product->selling_purity)

{{__('message.selling purity')}}

: {{$product->selling_purity??''}}
@endif
@if($product->original_invoice)

{{__('message.original invoice')}}

: {{$product->original_invoice??''}}
@endif

{{__('message.user')}}

{{__('message.is_active')}}

: @if ($product->is_active) @else @endif

{{__('message.created at')}}

: {{date('d-m-y H:i' , strtotime($product->created_at))}}
@if($product->old_code)

{{__('message.old code')}}

: {{$product->old_code??''}}
@endif @if($product->diamond_size)

{{__('message.diamond size')}}

:{!!$product->diamond_size??0!!}
@endif
@include('products.card-footer')

{{__('message.supplier')}}

: {{$product->supplier->name??''}}

{{__('message.supplier rate')}}

: {{number_format($product->supplier_rate??0 , 2)}} {{$currency_->currency_symbol}}

{{__('message.phone')}}

: {{$product->supplier->phone??''}}

{{__('message.note')}}

: {{$product->supplier->note??''}}
@if($product->productAttributes->count() > 0)

{{__('message.product attribute')}}

@foreach ($product->productAttributes as $i => $productAttribute) @endforeach
# {{ __('message.name') }} {{ __('message.price') }} {{ __('message.qty') }} {{ __('message.cost') }} {{ __('message.action') }}
{{ $i + 1 }} {{$productAttribute->name}} {{number_format($productAttribute->price , 2)}} {{$currency_->currency_symbol}} {{$productAttribute->qty}} {{number_format($productAttribute->cost ,2)}} {{$currency_->currency_symbol}}
{{ csrf_field() }}
@else

{{__('message.product attribute is empty')}}

@endif
@if($product->description)
{!!$product->description!!}
@else

{{__('message.description is empty')}}

@endif
@if($products->hasPages())
{{ $products->appends($_GET)->links() }}
@endif
{{-- --}} @endsection @section('scripts') @endsection @section('meta') {{ __('message.product') }} - {{$settings_->shop_name}} @endsection