'.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.'
'; $item_qty=$row2['indent_qty']; $item_id=$row2['item_id']; $rate=getTableFieldValue('item_rate','item_rate','item_id',$item_id); $unit=getTableFieldValue('item_rate','unit','item_id',$item_id); if($unit==0 || $unit==''){ $ratePerUnit=0; } else{ $ratePerUnit=round($rate/$unit,2);} //error_log($ratePerUnit); $total_price+=($ratePerUnit*$item_qty); } $space=" "; $links =$edit_link.$space; $status=$fit; $data['rows'][] = array( 'id' => $row1['indent_id'], 'cell' => array($links,$count++,date_format(date_create($row1['indent_date']),"d-M-Y "),$indent_ref_no,round($total_price,2),$row1['remarks'],$status) ); } $data['rows'][] = array( 'id' => $row['filterkey'], 'cell' => array('', "", "", '', '','', '', '', '', '', '', '', '','', '', '','', '', '','') ); echo json_encode($data);