0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.191.171.136


Current Path : /var/www/oasis/js/
Upload File :
Current File : /var/www/oasis/js/affliation_fee.js

var sel_tab = [];
var sel_prev_data = [];
var alldeg = [];
let dollarIndianLocale = Intl.NumberFormat("en-IN");

function CallEnableAffliationFee() {
  sel_tab = [];
  sel_prev_data = [];
  $("#page_main_div").load("../html_modules/affliation_fee.html", function () {
    document.getElementById("display_module_name").innerHTML = "Affilation Fee";
    document.getElementById("module_name_for_save").value = "Affilation Fee";
    getDefaultHeadFooterLinks("Affilation Fee");
    loaddegrep();
  });
}

function loaddegrep() {
  $.ajax({
    type: "GET",
    async: false,
    url: $host_url + "loaddeggrpaff",
    success: loaddegreeviewledgResponseAdm,
  });
}

function loaddegreeviewledgResponseAdm($responceCat) {
  $responceCat = eval("(" + $responceCat + ")");

  console.log($responceCat);
  if ($responceCat.error_code == 0) {
    let fine = $responceCat.data[0].fafffine;
    var optionsAsString = "<option value=''>--Select Degree--</option>";
    for (var i = 0; i < $responceCat.data.length; i++) {
      alldeg[i] = $responceCat.data[i].internal_code;
      optionsAsString +=
        "<option value='" +
        $responceCat.data[i].fdeggrp +
        "'>" +
        $responceCat.data[i].fdeggrp +
        "-" +
        $responceCat.data[i].fdeggrp +
        "</option>";
    }

    $("#fdeggrp").append(optionsAsString);
    $("#fine").val(fine);
  }
}

function getafflidet() {
  $("#tabfees").hide();
  $("#faffopt").val("");
  if (sel_tab.length > 0) {
    $("#tabfees_selected").show();
  } else {
    $("#tabfees_selected").hide();
  }

  var deggrp = $("#fdeggrp").val();
  $.ajax({
    type: "GET",
    async: false,
    url: $host_url + "loadaffoptions" + "&fdeggrp=" + deggrp,
    success: function (response) {
      var response = JSON.parse(response);

      console.log(response);
      var optionsAsString = "";
      // $("#faffopt").append(optionsAsString);
      if (response.error_code == 0) {
        optionsAsString = "<option value=''>--Select Degree--</option>";
        for (var i = 0; i < response.data.length; i++) {
          alldeg[i] = response.data[i].internal_code;
          optionsAsString +=
            "<option value='" +
            response.data[i].faffid +
            "'>" +
            response.data[i].faffihead +
            "</option>";
        }

        $("#faffopt").html(optionsAsString);
      }
    },
  });
}

function loadtabaffli() {
  $("#tabfees").show();
  $("#tabfees_selected").show();

  var faffid = $("#faffopt").val();
  $.ajax({
    type: "GET",
    async: false,
    url: $host_url + "loadtabaffi" + "&faffid=" + faffid,
    success: function (response) {
      var response = JSON.parse(response);

      console.log(response);
      sel_prev_data = response.data;
      collsapn = "7";
      if (
        response.data[0].faffid == "6005" ||
        response.data[0].faffid == "6008"
      ) {
        collsapn = "8";
      }

      $e_data = "";
      $e_data =
        "<table  width='100%' id='clear' class='tr_ventor_row' align='center' cellspacing='0' cellpadding='0' border='0' >";
      $e_data +=
        "<th align='left' colspan='" +
        collsapn +
        "' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:22px;'>" +
        response.data[0].faffihead +
        "</th>";
      $e_data += "<tr  class='ui-state-default ui-jqgrid-hdiv'>";
      $e_data +=
        "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
      $e_data +=
        "<td  align=center style='padding:2px; width:35%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Course</td>";
      if (
        response.data[0].faffid == "6005" ||
        response.data[0].faffid == "6008"
      ) {
        $e_data +=
          "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Intake</td>";
      }
      $e_data +=
        "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Fees</td>";
      $e_data +=
        "<td align=center  style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>GST (18%)</td>";
      $e_data +=
        "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Total</td>";
      $e_data +=
        "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Select</td>";
      $e_data += "</tr>";
      var $edy_data = "";
      var k = 1;
      for (el of response.data) {
        $edy_data += `<tr class='ui-widget-content jqgrow'>`;
        $edy_data += `<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>${k}</td>`;
        $edy_data += `<td class='tbl_row_new' align='left'   style='border-right:1px solid #C5DBEC;  padding:2px;'>${el.ffeehead}</td> `;
        if (el.faffid == "6005" || el.faffid == "6008") {
          $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' > <input  type = 'text' id = 'fintake_${el.ffeeid}' onchange = 'getIntakeFee("${el.ffeeid}","${response.data[0].faffid}"); selectfeehead(this)'/></td>`;
        }
        $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' id = 'ffee_${
          el.ffeeid
        }' > ${dollarIndianLocale.format(el.ffees)}</td>`;
        $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' id = 'ffeegst_${
          el.ffeeid
        }'> ${dollarIndianLocale.format(el.fgst)}</td> `;
        $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' id = 'ftotal_${
          el.ffeeid
        }' > ${dollarIndianLocale.format(el.ftotal)}</td> `;
        $edy_data += `<td class='tbl_row_new' align = 'center' style = 'border-right:1px solid #C5DBEC;  padding:2px;' > <input onchange='selectfeehead(this)' value='${el.ffeeid}' type='checkbox' name='sel_qpcode'></td>`;
        $edy_data += `</tr > `;
        k++;
      }
      $("#tabfees").html($e_data + $edy_data);
    },
  });
}

function getIntakeFee(ffeeid, faffid) {
  //console.log(ffeeid);
  let intake = $(`#fintake_${ffeeid}`).val();
  let intakeval = Math.ceil(intake / 60);
  let ffee = 0;
  let ffee60 = 0;
  if (faffid == "6005") {
    ffee = 39960;
    ffee60 = 16080;
    if (
      ffeeid == "5046" ||
      ffeeid == "5049" ||
      ffeeid == "5050" ||
      ffeeid == "5051"
    ) {
      ffee = 36000;
      ffee60 = 16080;
    } else if (ffeeid == "5052") {
      ffee = 33300;
      ffee60 = 16080;
    } else if (ffeeid == "5053" || ffeeid == "5054") {
      ffee = 104400;
      ffee60 = 0;
    }
  } else if (faffid == "6008") {
    ffee = 120000;
    ffee60 = 32040;
    if (
      ffeeid == "5070" ||
      ffeeid == "5073" ||
      ffeeid == "5074" ||
      ffeeid == "5075"
    ) {
      ffee = 96000;
      ffee60 = 16080;
    } else if (ffeeid == "5076") {
      ffee = 399360;
      ffee60 = 0;
    } else if (ffeeid == "5077") {
      ffee = 240000;
      ffee60 = 0;
    }
  }

  let mGST = 0;
  let mfee = 0;
  let mtot = 0;

  mfee = ffee + (intakeval - 1) * ffee60;
  mGST = mfee * 0.18;
  mtot = mfee + mGST;

  $(`#ffee_${ffeeid}`).html(dollarIndianLocale.format(mfee));
  $(`#ffeegst_${ffeeid}`).html(dollarIndianLocale.format(mGST));
  $(`#ftotal_${ffeeid}`).html(dollarIndianLocale.format(mtot));
}

function saveAffilationDet() {
  console.log(sel_tab);
  if ($("#principal_name").val() == "") {
    alert("Please Enter Name");
    return;
  }
  if ($("#mobileno").val() == "") {
    alert("Please Enter Mobile No.");
    return;
  }
  if ($("#aisue_code").val() == "") {
    alert("Please Aisue code");
    return;
  }
  if ($("#aisue_user_id").val() == "") {
    alert("Please Enter User Id");
    return;
  }
  let params =
    "&principal_name=" +
    $("#principal_name").val() +
    "&mobileno=" +
    $("#mobileno").val() +
    "&aisue_code=" +
    $("#aisue_code").val() +
    "&aisue_user_id=" +
    $("#aisue_user_id").val();

  $.ajax({
    type: "POST",
    async: false,
    url:
      $host_url +
      "saveafflifee" +
      "&sel_tab=" +
      JSON.stringify(sel_tab) +
      params,
    success: function (response) {
      var response = JSON.parse(response);
      if (response.error_code == 0) {
        var button = "";
        $.ajax({
          type: "POST",
          async: false,
          data: "appno=" + response.data.appno + "&funivcode=" + "026",
          url: "razorpay/pay.php",
          success: function (responce) {
            button = responce;
          },
        });

        var banktable = `
        <table class="payment" width = "70%" cellspacing="0" cellpadding="5" style = "margin:1% auto;">
				  <thead>
            <th style = "text-align: center;">
              Logo
            </th>
            <th style = "text-align: center;">
              Charges
            </th>
            <th style = "text-align: center;">
              Action
            </th>
		  		</thead>
				<tbody>
					<tr>
					 	<td width = "12%;" style = "text-align: center;">
							<img height="60" width="100" src = "img/razorpay.jpg" />
						</td>
						<td width = "40%;" >
							Debit Cards 0%(txn < 2000) per transaction <br>
							Credit Cards 0.9% per transaction <br>
							Net Banking Rs. 10 per transaction <br>
							All Wallet availabel 1.65% per transaction <br>
							UPI 12 per transaction (For any amount).
						</td>
						<td>
							${button}
						</td>
					</tr>
				</tbody>
      </table>`;
        console.log(banktable);
        $("#affilation").hide();
        $("#bankdet").show();
        $("#bankdet").html(banktable);

        // enableAffilationFee();
      } else {
        alert("Error while saving data..!");
      }
    },
  });
}

function selectfeehead(obj) {
  console.log(obj);
  var qpobj = [];
  if (obj.checked == true) {
    qpobj = sel_prev_data.filter((el, i) => {
      if (el.ffeeid == obj.value) {
        if (el.faffid == "6005" || el.faffid == "6008") {
          let intake = $(`#fintake_${el.ffeeid}`).val();
          let intakeval = Math.ceil(intake / 60);
          if (intake == "") {
            alert("Enter Intake");
            $(`#fintake_${el.ffeeid}`).focus();
            return;
          }
          let ffee = 0;
          let ffee60 = 0;

          if (el.faffid == "6005") {
            ffee = 39960;
            ffee60 = 16080;
            if (
              el.ffeeid == "5046" ||
              el.ffeeid == "5049" ||
              el.ffeeid == "5050" ||
              el.ffeeid == "5051"
            ) {
              ffee = 36000;
              ffee60 = 16080;
            } else if (el.ffeeid == "5052") {
              ffee = 33300;
              ffee60 = 16080;
            } else if (el.ffeeid == "5053" || el.ffeeid == "5054") {
              ffee = 104400;
              ffee60 = 0;
            }
          } else if (el.faffid == "6008") {
            ffee = 120000;
            ffee60 = 32040;
            if (
              el.ffeeid == "5070" ||
              el.ffeeid == "5073" ||
              el.ffeeid == "5074" ||
              el.ffeeid == "5075"
            ) {
              ffee = 96000;
              ffee60 = 16080;
            } else if (el.ffeeid == "5076") {
              ffee = 399360;
              ffee60 = 0;
            } else if (el.ffeeid == "5077") {
              ffee = 240000;
              ffee60 = 0;
            }
          }

          let mGST = 0;
          let mfee = 0;
          let mtot = 0;

          mfee = ffee + (intakeval - 1) * ffee60;
          mGST = mfee * 0.18;
          mtot = mfee + mGST;
          el.ffees = mfee;
          el.fgst = mGST;
          el.ftotal = mtot;
        }
        return { ...el, fdeleted: false };
      }
    });
    var dup = false;
    sel_tab.filter((el, i) => {
      if (el.ffeeid == obj.value) {
        dup = true;
      }
    });
    // console.log(dup)
    if (dup == false) sel_tab = [...sel_tab, ...qpobj];
  } else {
    qpobj = sel_tab.filter((el, i) => {
      if (el.ffeeid != obj.value) {
        return el;
      }
    });
    sel_tab = [...qpobj];
  }
  buildgrisfortable();
}
function buildgrisfortable() {
  let x = "";
  console.log(sel_tab);

  $e_data = "";
  $e_data =
    "<table  width='100%' id='clear' class='tr_ventor_row' align='center' cellspacing='0' cellpadding='0' border='0' >";
  $e_data +=
    "<th align='left' colspan='7' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:22px;'>Selected Courses</th>";
  $e_data += "<tr  class='ui-state-default ui-jqgrid-hdiv'>";
  $e_data +=
    "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
  $e_data +=
    "<td  align=center style='padding:2px; width:35%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Course</td>";
  $e_data +=
    "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Fees</td>";
  $e_data +=
    "<td align=center  style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>GST (18%)</td>";
  $e_data +=
    "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Total</td>";
  $e_data += "</tr>";
  var $edy_data = "";
  var k = 1;
  for (el of sel_tab) {
    $edy_data += `<tr class='ui-widget-content jqgrow'>`;
    $edy_data += `<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>${k}</td>`;
    $edy_data += `<td class='tbl_row_new' align='left'   style='border-right:1px solid #C5DBEC;  padding:2px;'>${el.ffeehead}</td> `;
    $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' > ${dollarIndianLocale.format(
      el.ffees
    )}</td>`;
    $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' > ${dollarIndianLocale.format(
      el.fgst
    )}</td> `;
    $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' > ${dollarIndianLocale.format(
      el.ftotal
    )}</td> `;
    $edy_data += `</tr > `;
    k++;
  }
  $("#tabfees_selected").html($e_data + $edy_data);
}

function viewAffliationfee() {
  $("#page_main_div").load(
    "../html_modules/affliation_fee_view.html",
    function () {
      document.getElementById("display_module_name").innerHTML =
        "Affilation Fee View";
      document.getElementById("module_name_for_save").value =
        "Affilation Fee View";
      getDefaultHeadFooterLinks("Affilation Fee View");

      $.ajax({
        type: "GET",
        async: false,
        url: $host_url + "viewafflifee",
        success: function (response) {
          var response = JSON.parse(response);
          console.log(response);
          $e_data = "";
          $e_data =
            "<table  width='100%' id='clear' class='tr_ventor_row' align='center' cellspacing='0' cellpadding='0' border='0' style='margin-top: 10px;' >";
          $e_data +=
            "<th align='left' colspan='10' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:22px;'>Affliation Fees Summary</th>";
          $e_data += "<tr  class='ui-state-default ui-jqgrid-hdiv'>";
          $e_data +=
            "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
          $e_data +=
            "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>App. No.</td>";
          $e_data +=
            "<td  align=center style='padding:2px; width:12%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Principal Name</td>";
          $e_data +=
            "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Mobile No.</td>";
          $e_data +=
            "<td align=center  style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Aisue Code</td>";
          $e_data +=
            "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Aisue User ID</td>";
          $e_data +=
            "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Created Date</td>";
          $e_data +=
            "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Total Amount</td>";
          $e_data +=
            "<td  align=center style='padding:2px; width:5%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Status</td>";
          $e_data +=
            "<td  align=center style='padding:2px; width:20%; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Action</td>";
          $e_data += "</tr>";
          if (response.error_code == 0) {
            if (response.data.length > 0) {
              var $edy_data = "";
              var k = 1;
              let but = "";
              let disabled = "disabled";
              let sts = "";
              for (el of response.data) {
                if (el.fpaymentstatus == "success") {
                  sts = "Success";
                  disabled = "disabled";
                } else if (el.last_date == 0) {
                  but = `<button id='{$sl_no}_edit'  type='button' ${disabled}>Last Date is Over</button>&nbsp&nbsp`;
                } else {
                  sts = "";
                  disabled = "";
                  but = `<button id='{$sl_no}_edit' onclick='makePayment(${el.fsaffid})' type='button' ${disabled}>Make Payment</button>&nbsp&nbsp`;
                }
                let totsum = dollarIndianLocale.format(el.ftotalsum);
                $edy_data += `<tr class='ui-widget-content jqgrow'>`;
                $edy_data += `<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>${k}</td>`;
                $edy_data += `<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>${el.fsaffid}</td>`;
                $edy_data += `<td class='tbl_row_new' align='left'   style='border-right:1px solid #C5DBEC;  padding:2px;'>${el.fprincipalname}</td> `;
                $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' > ${el.fmobileno}</td>`;
                $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' > ${el.faisuecode}</td> `;
                $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' > ${el.faisueid}</td> `;
                $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' > ${el.fcreatedate}</td> `;
                $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' >${totsum} </td> `;
                $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' >${sts} </td> `;
                $edy_data += `<td class='tbl_row_new' align = 'center'   style = 'border-right:1px solid #C5DBEC;  padding:2px;' >
              ${but}
              <button id='{$sl_no}_delete' onclick='rptviewaff(${el.fsaffid})' type='button' style='background: #086969;color: #fcfdfd;' target='_blank'>Report</button> </td> `;
                $edy_data += `</tr > `;
                k++;
              }
              $("#view_affliation_fee").html($e_data + $edy_data);
            } else {
              var $edy_data = "";
              var k = 1;
              for (el of response.data) {
                $edy_data += `<tr class='ui-widget-content jqgrow'>`;
                $edy_data += `<td class='tbl_row_new' align='center' colspan="7" style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>No data Found...!</td>`;
                $edy_data += `</tr > `;
                k++;
              }
              $("#view_affliation_fee").html($e_data + $edy_data);
            }
          } else {
            var $edy_data = "";
            $edy_data += `<tr class='ui-widget-content jqgrow'>`;
            $edy_data += `<td class='tbl_row_new' align='center' colspan="7" style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>No data Found...!</td>`;
            $edy_data += `</tr > `;
            $("#view_affliation_fee").html($e_data + $edy_data);
          }
        },
      });
    }
  );
}

function rptviewaff(fsaffid) {
  console.log(fsaffid);
  window.open($host_url + "affliation_detailed_report" + "&fsaffid=" + fsaffid);
}

function makePayment(appno) {
  $("#page_main_div").load("../html_modules/affliation_fee.html", function () {
    document.getElementById("display_module_name").innerHTML = "Affilation Fee";
    document.getElementById("module_name_for_save").value = "Affilation Fee";
    getDefaultHeadFooterLinks("Affilation Fee");

    var button = "";
    $.ajax({
      type: "POST",
      async: false,
      data: "appno=" + appno + "&funivcode=" + "026",
      url: "razorpay/pay.php",
      success: function (responce) {
        button = responce;
      },
    });

    var banktable = `
        <table class="payment" width = "70%" cellspacing="0" cellpadding="5" style = "margin:1% auto;">
				  <thead>
            <th style = "text-align: center;">
              Logo
            </th>
            <th style = "text-align: center;">
              Charges
            </th>
            <th style = "text-align: center;">
              Action
            </th>
		  		</thead>
				<tbody>
					<tr>
					 	<td width = "12%;" style = "text-align: center;">
							<img height="60" width="100" src = "img/razorpay.jpg" />
						</td>
						<td width = "40%;" >
							Debit Cards 0%(txn < 2000) per transaction <br>
							Credit Cards 0.9% per transaction <br>
							Net Banking Rs. 10 per transaction <br>
							All Wallet availabel 1.65% per transaction <br>
							UPI 12 per transaction (For any amount).
						</td>
						<td>
							${button}
						</td>
					</tr>
				</tbody>
      </table>`;

    $("#affilation").hide();
    $("#bankdet").show();
    $("#bankdet").html(banktable);
  });
}