"; } // if($hasWriteAccess) // { // $edit_link=""; // } $fit=""; if($row1['status'] == 'PENDING'){ $fit = "PENDING"; }else{ $fit = "REJECTED"; } $app_rem=$row1['approval_remarks']; $item_desc=""; $item_qty=""; $sql_q="select * from indent_items where indent_id='".$row1['indent_id']."' and ohc_type_id = '" . $_SESSION['current_ohcttype'] . "'"; error_log("indent sql".$sql_q); $result=mysqli_query($conn,$sql_q); while ($row2=mysqli_fetch_assoc($result)){ $item_desc = $item_desc.'

'.getItemWithFormName($row2['item_id']).'

'; $item_unit_id=getTableFieldValue('tbl_items','unit_id','item_id',$row2['item_id']); $item_unit =getTableFieldValue(' unit_master','unit_name','unit_id',$item_unit_id); $item_qty=$item_qty.'

'.$row2['indent_qty'].' '.$item_unit.'

'; } $space="   "; $links =$edit_link.$space; $status=$fit.$space."(".$app_rem.")"; $data['rows'][] = array( 'id' => $row1['indent_id'], 'cell' => array($links,$count++,$item_desc,date_format(date_create($row1['indent_date']),"d-M-Y "),$item_qty,$row1['remarks'],$status) ); } $data['rows'][] = array( 'id' => $row['filterkey'], 'cell' => array('', "", "", '', '','', '', '', '', '', '', '', '','', '', '','', '', '','') ); echo json_encode($data);