Update button not function well

I have button update in html but in javaScript I'm using ajax so that I can call my function in it which is function editGroup(). My problem is I want to update the data but here my php update not working well. Is there any code I'm missing something? Just function update only in button update.Here, below my php code and javaScript code for my problem. Really need help here!

PHP update

/** EDIT **/
function editGroup() {
$accountID       = (isset($_POST['accountID']) ? $_POST['accountID'] : '');
$accountLedgerID = (isset($_POST['accountLedgerID']) ? 
$_POST['accountLedgerID'] : '');
$accountNo       = (isset($_POST['accountNo']) ? $_POST['accountNo'] : '');
$accountName     = (isset($_POST['accountName']) ? $_POST['accountName'] : '');
//$accountMain   = (isset($_POST['accountMain']) ? $_POST['accountMain'] : '');
$openingBalance  = (isset($_POST['openingBalance']) ? 
$_POST['openingBalance'] : '');
$openingBalanceDate = (isset($_POST['openingBalanceDate']) ? 
$_POST['openingBalanceDate'] : '');
$selectable      = (isset($_POST['selectable']) ? $_POST['selectable'] : '');
$popUp           = (isset($_POST['popUp']) ? $_POST['popUp'] : '');
$accountChar     = (isset($_POST['accountChar']) ? $_POST['accountChar'] : '');
$active          = (isset($_POST['active']) ? $_POST['active'] : '');
$propertyID      = $_SESSION['propertyID'];
$employeeID      = $_SESSION['employeeID'];
global $ehorsObj;

$sqlCount = "SELECT COUNT(*) AS TOTAL FROM tblAccAccounts 
             WHERE accountID = '". $accountID ."' ";
$GetResult = $ehorsObj->FetchData($sqlCount, $ehorsObj->DEFAULT_PDO_CONNECTIONS);
while ($row = $GetResult->fetch()) {
    $total = $row['TOTAL'];
}   
if ($total > 0) {

$sqlUpdate = " UPDATE tblAccAccounts
                  SET accountLedgerID = '" . $accountLedgerID . "',
                      accountNo = '" . $accountNo . "',
                      accountName = '" . $accountName . "',
                      openingBalance = '" . $openingBalance . "',
                      openingBalanceDate = '" . $openingBalanceDate . "',
                      selectable = '" . $selectable . "',
                      popUp = '" . $popUp . "',
                      accountChar = '" . $accountChar . "',
                      employeeID = '" . $employeeID . "', 
                      propertyID = '" . $propertyID . "', 
                      dateTimeEmployee = NOW(),
                      active = '" . $active . "'
                WHERE accountID = '" . $accountID . "' ";
$ehorsObj->ExecuteData($sqlUpdate, $ehorsObj->DEFAULT_PDO_CONNECTIONS);
}else{
//nothing
}}

JavaScript

//AJAX call for button
$("#btnEdit").kendoButton();
var button = $("#btnEdit").data("kendoButton");
button.bind("click", function(e) {
var accountLedgerID = 
$("#accountLedger").data("kendoDropDownList").value();
var accountID = $("#accountID").val();
var accountName = $('#accountName').val();
var accountNo = $("#accountNo").val();
var openingBalance = $('#openingBalance').val();
var openingBalanceDate = $('#openingBalanceDate').val();
var selectable = $("input[name=selectable]:checked").val(); 
var popUp = $("input[name=popUp]:checked").val();
var accountChar = $("#accountChar").val();

    $.ajax({
        url: "../DesignationProgramTemplate/getCoaGroup.php",
        type: "POST",
        data: {
            method: "editGroup",
            accountID: accountID,
            accountLedgerID: accountLedgerID,
            accountName: accountName,
            accountNo: accountNo,
            openingBalance: openingBalance,
            openingBalanceDate: openingBalanceDate,
            selectable: selectable,
            popUp: popUp,
            accountChar: accountChar
        },
        success: function () {
            KendoAlert("Data updated");
        },
        error: function () {
            KendoAlert("Fail!");
        }   
    });  });

Anyone have opinion on this?