"; } if($hasWriteAccess) { $edit_link=""; } $item_desc=""; //$item_qty=""; $sql_req_items="select * from requisition_items where req_id='".$row1['req_id']."'"; $results_req_items = mysqli_query($conn,$sql_req_items); while ($row_req_items= mysqli_fetch_assoc($results_req_items)) { $item_desc = $item_desc.'

'.getTableFieldValue('tbl_items','item_name','item_id',$row_req_items['item_id'])." "; //$item_desc = $item_desc.getTableFieldValue('tbl_items','item_name','item_id',$row_req_items['item_id'])."
"; $item_unit_id=getTableFieldValue('tbl_items','unit_id','item_id',$row_req_items['item_id']); $item_unit =getTableFieldValue(' unit_master','unit_name','unit_id',$item_unit_id); $item_desc=$item_desc.' Qty: '.$row_req_items['qty'].' '.$item_unit.''; $item_desc=$item_desc."

"; } $space="   "; $links =$view_link.$space.$edit_link.$space; $req_ref_no="".$row1['req_ref_no'].""; $data['rows'][] = array( 'id' => $row1['req_id'], 'cell' => array($count++, $req_ref_no,date_format(date_create($row1['req_date']),"d-M-Y "),getTableFieldValue('ohc_type','ohc_type_name','ohc_type_id',$row1['ohc_location_id']),$item_desc,$row1['status']=='N'?' Not Approved':'Rejected',$row1['remarks'],$links) ); } $data['rows'][] = array( 'id' => $row['filterkey'], 'cell' => array('', "", "", '', '','', '', '', '', '', '', '', '','', '', '','', '', '','') ); echo json_encode($data); ?>