"; $pdf_link = ""; } if ($hasWriteAccess) { $edit_link = ""; } if ($hasExecuteAccess) { $delete_link = ""; } $space = "   "; $links = $space . $view_link . $space . $edit_link . $space . $delete_link . $space . $pdf_link; $discount_voucher = getFieldFromTable('voucher_name', 'voucher_master', 'voucher_id', $row_bill['discount_voucher']); if ($row_bill['amount_pending_company'] == '0' || $row_bill['amount_paid_patient'] == $row_bill['final_bill_amount']) { $bill_status = "PAID"; } else { $bill_status = "PARTIALLY PAID"; } $data['rows'][] = array( 'id' => $row_bill['bill_id'], 'cell' => array($links, $count++, $row_bill['bill_no'], date_format(date_create($row_bill['bill_date']), "d-M-Y "), $row_bill['patient_name'], $row_bill['final_bill_amount']) ); } echo json_encode($data); ?>