public function getAllitemspmb(Request $req)
 {
     $result = [];
     if ($req->ajax()) {
         $items = data_barang::srcpmb($req->all(), $this->ids)->paginate($req->limit);
         $out = '';
         if (count($items) > 0) {
             foreach ($items as $item) {
                 $out .= '
                     <tr class="item_' . $item->id_barang . '">
                         <td width="20%">
                             <a href="#" data-toggle="modal" data-target="#review" onclick="review(' . $item->id_barang . ')">' . $item->kode . '</a>
                         </td>
                         <td width="55%" colspan="2">' . $item->nm_barang . '</td>
                         <!-- <td width="15%" class="text-right">' . number_format($item->in - $item->out, 0, ',', '.') . ' ' . $item->nm_satuan . '</td> -->
                         <td width="15%">
                             <button onclick="add(' . $item->id_barang . ');" class="btn btn-white btn-block btn-xs btn-mini" title="Advance Searching"><i class="fa fa-plus"></i></button>
                         </td>
                     </tr>
                 ';
             }
         } else {
             $out = '
                 <tr>
                     <td colspan="4"><div class="well">Tidak ditemukan</div></td>
                 </tr>
             ';
         }
         $result['data'] = $out;
         $result['pagin'] = $items->render();
         return json_encode($result);
     } else {
         return redirect('/pmbumum/selectitems');
     }
 }