
<?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.created_at')}}</td>
                                <td> : {{date('d-m-Y',strtotime($data['created_at']))}} </td>
                            </tr>
                        </table>
                    </td>
                    <td width="30%">
                        <img src="{{findImg(\App\Model\product\ProductModel::find($data['product_id']))}}" width="70%">
                    </td>
                </tr>
            </table>
        </div>
        <div class="wrapper-table">
            <table class="table table-striped table-hover ">
                <thead>
                <tr>
                    <th>#</th>
                    <th>{{__('administrator.barcode')}}</th>
                    <th>{{__('administrator.size')}}</th>
                    <th>{{__('administrator.qty_per_unit')}}</th>
                    <th>{{__('administrator.cost')}}</th>
                    <th>{{__('administrator.barcode')}}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($cut_piece_unit as $key => $value)
                    <tr>
                        <td>{{$key+1}}</td>
                        <td>{{$value->barcode}} </td>
                        <td>{{findSize($value->size_id)->size}} </td>
                        <td>{{$value->qty_per_unit}} </td>
                        <td>{{$data['currency']}} {{  number_format($value->cost,2) }}</td>
                        <td class="print_barcode">@if($value->barcode)<img src="data:image/png;base64,{{DNS2D::getBarcodePNG($value->barcode, 'QRCODE')}}" alt="barcode" /> @endif</td>
                    </tr>

                @endforeach
                </tbody>
            </table>
        </div>
    </div>
</div>
