
    <?php Fun::lang() ?>
    <div class="page-purchases">
        <div class="container-fluid">
            <div class="top-content">
                <div class="row1">
                    <div class="col-sm-12 col-xs-12">
                        <h2 class="show-product">{{__('administrator.info_detail')}} </h2>
                        <hr>
                    </div>
                </div>
            </div>
            <hr>
            <hr>

            <div class="summary-header">
                <table>
                    <tr>
                        <td>
                            <table class="text-left">
                                <tr>
                                    <td>
                                        {{__('administrator.item_name')}}
                                    </td>
                                    <td>
                                        : {{$data['product_name']}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        {{__('administrator.barcode')}}
                                    </td>
                                    <td>
                                        : {{$data['barcode']}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{__('administrator.category')}}</td>
                                    <td> : {{$data['category']}}</td>
                                </tr>
                                <tr>
                                    <td>{{__('administrator.created_at')}}</td>
                                    <td> : {{date('d-m-Y',strtotime($data['created_at']))}} </td>
                                </tr>
                            </table>
                        </td>
                        <td width="30%">
                            <img src="{{$data['image']}}" width="70%">
                        </td>
                    </tr>
                </table>
            </div>
            <table class="table table-striped table-hover ">
                <thead>
                <tr>
                    <th>#</th>
                    <th>{{__('administrator.unit_name')}}</th>
                    <th>{{__('administrator.qty_per_unit')}}</th>
                    <th>{{__('administrator.tailor_price')}}</th>
                    <th>{{__('administrator.cost')}}</th>
                </tr>


                </thead>
                <tbody>
                @foreach($product_unit as $key => $value)
                    <tr>
                        <td>{{$key+1}}</td>
                        <td>{{findUnit($value->unit_id)->unit}} </td>
                        <td>{{$value->qty_per_unit}} </td>
                        <td>{!!  '៛'.number_format($value->tailor_price_riel,2).'<br>$'.number_format($value->tailor_price_usd,2)  !!}</td>
                        <td>{!!  '៛'.number_format($value->cost_riel,2).'<br>$'.number_format($value->cost_usd,2)  !!}</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
