<table class="table table-striped table-bordered">
  <thead>
    <tr >
      <th>#</th>
      <th>{{Trans("products.sku")}}</th>
      <th>{{Trans("products.name")}}</th>
      <th>{{Trans("products.name_kh")}}</th>
      <th>{{Trans("products.product_category")}}</th>
      <th>{{Trans("products.ref_id")}}</th>
      <th>{{Trans("products.amount")}}</th>
      <th>{{Trans("products.by")}}</th>
      <th>{{Trans("dashboard.crud.created_at")}}</th>
      <td>{{Trans('products.operation_type') }}</td>
    </tr>
  </thead>
  <tbody>
    <?php $i = 1; ?>
    @foreach($histories as $history)
      <tr data-history="{{$history->id}}" data-url="{{Route('update_ref',$history->id)}}">
        <td>{{ $i }}</td>
        <td>{{ $history->sku }}</td>
        <td>{{ $history->pname }}</td>
        <td>{{ $history->name_kh }}</td>
        <td>{{ $history->cname }}</td>
        <td>{{ $history->ref_id }}</td>
        <td>{{$history->amount }} {{$history->uname }}</td>
        <td>{{ getField("User","id",$history->user_id,"first_name") }}</td>
        <td>{{ $history->created_at }}</td>
        <td>{{ Trans('products.'.$history->operation_type) }}</td>
      </tr>
      <?php $i ++; ?>
    @endforeach
  </tbody>
</table>
