
<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="ITS Circle LLC">
    <link rel="icon" href="http://localhost/design2/assets/images/favicon.png" type="image/x-icon" />
    <link rel="shortcut icon" href="http://localhost/design2/assets/images/favicon.png" type="image/x-icon" />
    <title>Sub-Page</title>

    <!--JSGrid css-->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/datatables.css" />

    <!--Google font-->
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700" rel="stylesheet">

    <!-- Font Awesome -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/fontawesome.css">

    <!-- ico-font -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/icofont.css">

    <!-- Themify icon -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/themify.css">

    <!-- Flag icon -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/flag-icon.css">

    <!-- prism css -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/prism.css">

    <!-- Tour css -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/tour.css">

    <!-- Owl css -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/owlcarousel.css">

    <!-- Bootstrap css -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/bootstrap.css">

    <!-- App css -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/style.css">

    <!-- Chartist -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/chartist.css">

    <!-- Responsive css -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/responsive.css">

    <!-- DatePicker css -->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/date-picker.css">

    <!--Select2 css-->
    <link rel="stylesheet" type="text/css" href="http://localhost/design2/assets/css/select2.css" />

    <!-- Animate icon -->
    <link rel="stylesheet" href="http://localhost/design2/assets/css/animate.css">

    <style>

        table#invoice {
            table-layout: fixed;
        }

        table#invoice {
            font-size: small;
        }

        .tabbed-card .col-1,
        .col-2,
        .col-3,
        .col-4,
        .col-5,
        .col-6,
        .col-7,
        .col-8,
        .col-9,
        .col-10,
        .col-11,
        .col-12,
        .col,
        .col-auto,
        .col-sm-1,
        .col-sm-2,
        .col-sm-3,
        .col-sm-4,
        .col-sm-5,
        .col-sm-6,
        .col-sm-7,
        .col-sm-8,
        .col-sm-9,
        .col-sm-10,
        .col-sm-11,
        .col-sm-12,
        .col-sm,
        .col-sm-auto,
        .col-md-1,
        .col-md-2,
        .col-md-3,
        .col-md-4,
        .col-md-5,
        .col-md-6,
        .col-md-7,
        .col-md-8,
        .col-md-9,
        .col-md-10,
        .col-md-11,
        .col-md-12,
        .col-md,
        .col-md-auto,
        .col-lg-1,
        .col-lg-2,
        .col-lg-3,
        .col-lg-4,
        .col-lg-5,
        .col-lg-6,
        .col-lg-7,
        .col-lg-8,
        .col-lg-9,
        .col-lg-10,
        .col-lg-11,
        .col-lg-12,
        .col-lg,
        .col-lg-auto,
        .col-xl-1,
        .col-xl-2,
        .col-xl-3,
        .col-xl-4,
        .col-xl-5,
        .col-xl-6,
        .col-xl-7,
        .col-xl-8,
        .col-xl-9,
        .col-xl-10,
        .col-xl-11,
        .col-xl-12,
        .col-xl,
        .col-xl-auto {
            padding-left: 4px !important;
            padding-right: 4px !important;

        }

        #select2-cheque_cboVendor-container {
            font-size: smaller;
        }

        .card.full-card {
            top: 0px !important;
            left: 0px !important;
            right: 0px !important;
            height: 100% !important;
            width: 100% !important;
        }

        .lbl_edit {
            color: blue;
            text-align: center;
            border:gray 1px solid;
            background-image: url('assets/images/details_open.png');
            background-repeat: no-repeat;
        }
    </style>


</head>

<body>

    <!-- Loader starts -->
    <div class="loader-wrapper">
        <div class="loader bg-white">
            <div class="line"></div>
            <div class="line"></div>
            <div class="line"></div>
            <div class="line"></div>
            <h4>Have a great day at work today <span>&#x263A;</span></h4>
        </div>
    </div>
    <!-- Loader ends -->

    <!--page-wrapper Start-->
    <div class="page-wrapper">

        <!--Page Body Start-->
        <div class="page-body-wrapper">

            <!--Page Body Start-->
            <div class="page-body" style="margin-top:0!important">

                <!-- Container-fluid starts -->
                <div class="container-fluid">

                    <div class="row">
                        <div class="col-sm-12 col-xl-12 xl-100">
                            <div class="card">
                                <div class="card-header">
                                    <h5>Dealers Visits</h5>
                                    <span>Use this form to define customer Visits.</span>
                                    <div class="card-header-right">
                                        <i class="icofont icofont-maximize full-card"></i>
                                        <i class="icofont icofont-minus minimize-card"></i>
                                    </div>
                                </div>

                                <div class="card-body">
                                    <ul class="nav nav-tabs" id="myTab" role="tablist">
                                        <li class="nav-item">
                                            <a class="nav-link active" id="supplier-tabs" data-toggle="tab"
                                                href="#supplier" role="tab" aria-controls="supplier"
                                                aria-selected="true">Search</a>
                                        </li>

                                        <li class="nav-item">
                                            <a class="nav-link" id="basic-tab" data-toggle="tab" href="#basic"
                                                role="tab" aria-controls="basic" aria-selected="false">Basic</a>
                                        </li>

                                    </ul>
                                    <div class="tab-content" id="myTabContent">

                                        <div class="tab-pane fade" id="basic" role="tabpanel"
                                            aria-labelledby="basic-tab">

                                                                                 <form id="InvoiceForm" method="post">
                                                                                    <input type="hidden" id="visitid" name="visitid" value="">
                                                <div class="row m-20 form-group">
                                                    <h5>
                                                        <span class="lbl_edit" id="RetreiveKeyField"></span>
                                                    </h5>
                                                </div>
    <div class="row m-20 form-group">
                                             <label class="col-sm-12 col-md-12 col-form-label" style="background-color:#ab8ce4;text-align: center;font-weight:bold;">Report Date Information</label>
 
                                                </div>


                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Select Dealer</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                       <select class="col-12 col-md-12 col-sm-6 form-control" name="dealer"  tabindex="-1" aria-hidden="true" id="dealer">
                                                                    <option value="" data-select2-id="2">--Select Customer </option>
                                                                <option value='91'>RENT-A-CAR</option><option value='92'>SERVICE CUSTOMER</option><option value='93'>INDIGO RENT A CAR DMCC</option><option value='94'>SEL RENT A CAR LLC</option><option value='95'>VIP Rent a Car</option><option value='243'>VIP MOTORS LLC</option><option value='244'>AVIS RENT A CAR CO LLC</option><option value='245'>DUBAI RENT A CAR CO. LLC (EUROPCAR)</option><option value='246'>AUTORENT CAR RENTAL LLC</option><option value='247'>ALBA MOTORS LLC</option><option value='248'>CLASS WORLDWIDE CAR RENTALS LLC</option><option value='249'>CAR VAULT NEW AND LUXURY VEHICLES TRADING LLC</option><option value='250'>AL EMAD CAR RENTAL LLC</option><option value='251'>YES SURE CAR RENTAL LLC</option><option value='252'>AL MONSEF RENT A CAR LLC</option><option value='282'>SAEED CUSTOMER</option><option value='284'>Dealer name</option><option value='285'>Dealer name</option>
                                                                </select>
                                                    </div>
                                                </div>

                                                <!-- <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Opening Balance</label>
                                                    <div class="col-12 col-md-4 col-sm-6">   
                                                    <input type="number" name="Attr1" class="form-control" placeholder="Opening Balance" id="attr1">
                                                    </div>
                                                </div> -->

                                                <div class="row m-20 form-group">
                                                    <label for="inputEmail3" class="col-sm-3 col-form-label">Contact Date
                                                        </label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <div class="select2-drpdwn">
                                                            <div class="mb-2">
                                                                <input type="date" name="visitdate" id="visitdate" class="form-control">
                                                                
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>



                                                <div class="row m-20 form-group">
                                                    <label for="inputEmail3" class="col-sm-3 col-form-label">New Appointment Arrange</label>
                                                    <div class="col-2 col-md-2 col-sm-6">
                                                        <div class="select2-drpdwn">
                                                            <div class="mb-2">
                                                                <input type="radio" name="appointarrange" class="form-group" value="1" id="appointarrange1">Yes 
                                                                <input type="radio" name="appointarrange" class="form-group" value="0" id="appointarrange0">No 
                                                                
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row m-20 form-group">
                                                    <label for="inputEmail3" class="col-sm-3 col-form-label">New Appointment 
                                                        Date</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <div class="select2-drpdwn">
                                                            <div class="mb-2">
                                                                        <input type="date" name="appointdate" id="appointdate" class="form-control">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Addition info Appointment</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <input type="text" name="additional_info" id="additional_info" class="form-control" placeholder="Additional Infomration" id="attr6">
                                                    </div>
                                                </div>
                                                <div class="row m-20 form-group">
                                             <label class="col-sm-12 col-md-12 col-form-label" style="background-color:#ab8ce4;text-align: center;font-weight:bold;">Contact Information</label>
 
                                                </div>
                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Contact Person 1</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <input type="text" name="ContactPerson" class="form-control" placeholder="Contact Person 1" id="contactperson1">
                                                    </div>
                                                </div>
                                                                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Contact Type</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                           <select class="col-12 col-md-12 col-sm-6 form-control" name="contactTypeId" id="contactTypeId"  tabindex="-1" aria-hidden="true">
                                                                    <option value="" data-select2-id="2">--Select Contact  Type--</option>
                                                                <option value="9" data-mastervalueid="9" data-mastervalue="CORPORATE">Telephone</option><option value="10" data-mastervalueid="10" data-mastervalue="INDIVIDUALS">Physical</option></select>
                                                    </div>
                                                </div>
                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Type of Contact</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                           <select class="col-12 col-md-12 col-sm-6 form-control" id="TypeContactId" name="TypeContactId"  tabindex="-1" aria-hidden="true">
                                                            <option value="" data-select2-id="2">--Select Type of Contact  --</option>
                                                 <option value='1'>Route Visit</option><option value='2'>Sales Program</option><option value='3'>Dealer Reference</option><option value='4'>Free Field</option>
                                                            </select>
                                                    </div>
                                                </div>

                                                     <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Customer Category</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                           <select class="col-12 col-md-12 col-sm-6 form-control" id="customerCategoryId" name="customerCategoryId"  tabindex="-1" aria-hidden="true">
                                                                    <option value="" data-select2-id="2">--Select Customer Category</option>
                                                                                              <option value='1'>Normal</option><option value='2'>VIP</option><option value='3'>VVIP</option><option value='4'>MVIP</option>
                                                                     </select>
                                                    </div>

                                                </div>
                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">What has been Discuss</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <textarea id="discuss" name="discuss" class="form-control" placeholder="Discuss" id="attr4"></textarea>
                                                    </div>
                                                </div>

                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Feedback</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <textarea  id="feedback" name="feedback" class="form-control" placeholder="Feedback" id="attr9"></textarea>
                                                    </div>
                                                </div>
      <div class="row m-20 form-group">
                                             <label class="col-sm-12 col-md-12 col-form-label" style="background-color:#ab8ce4;text-align: center;font-weight:bold;">Notes</label>
 
                                                </div>
                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Sales Rep Note</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <textarea name="notes" class="form-control" placeholder="Sales Rep Note" id="notes"></textarea>
                                                    </div>
                                                </div>


                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Sales Manager Notes</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <textarea id="managernotes" name="managernotes" class="form-control" placeholder="Sales Manager Notes" id="attr11">
                                                            </textarea>
                                                    </div>
                                                </div>

                                                <div class="row m-20 form-group" style="display: none;">
                                                    <label class="col-sm-3 col-form-label">Contact Person1 Info</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <textarea name="Attr12" class="form-control" placeholder="Contact Person Info" id="attr12" cols="30" rows="3"></textarea>
                                                    </div>
                                                </div>



                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-3 col-form-label">Visit Card Picture</label>
                                                    <div class="col-12 col-md-4 col-sm-6">
                                                        <input type="file" name="ContactDesignation1" class="form-control" placeholder="Contact Designation 1" id="contactdesignation1">
                                                    </div>
                                                </div>



                                                <!--Opening Balance End-->

                                                <div class="card-footer">
                                                    <!-- onclick="javascript:void(0);submitInvoice(this)"-->
                                                    <button class="btn btn-primary" id="submit" name="submit" type="submit" >Submit</button>
                                                    <button class="btn btn-secondary" onclick="javascript:void(0);resetInvoice(this)">Clear</button>
                                                    <button class="btn btn-danger" onclick="javascript:void(0);ClearForm(true)">Cancel</button>
                                                </div>
                                            </form>

                                        </div>

                                        <div class="tab-pane fade  show active" id="supplier" role="tabpanel"
                                            aria-labelledby="supplier-tab">

                                            <!-- <form id="searchForm" onsubmit="return false;">
                                                <div class="row m-20 form-group">
                                                    <label class="col-sm-1 col-12 col-md-1  col-form-label">Account Name</label>
                                                    <div class="col-12 col-md-2 col-sm-2 m-b-20">                                           
                                                        <input type="text"  class="form-control" aria-describedby="basic-addon2" placeholder="Search" id="Search_Account" name="COAName">
                                                    </div>
                                                
                                                    <label class="col-sm-1 col-12 col-md-1  col-form-label">Trade License #</label>
                                                    <div class="col-12 col-md-2 col-sm-2 m-b-20">                                           
                                                        <input type="text"  class="form-control" aria-describedby="basic-addon2" placeholder="Search" id="Search_Attr4" name="Attr4">
                                                    </div>
                                                
                                                    <label class="col-sm-1 col-12 col-md-1  col-form-label">Category</label>
                                                    <div class="col-12 col-md-2 col-sm-2 m-b-20">                                           
                                                        <input type="text"  class="form-control" aria-describedby="basic-addon2" placeholder="Search" id="Search_Category" name="Category">
                                                    </div>
                                                
                                                    <label class="col-sm-1 col-12 col-md-1  col-form-label">Mob</label>
                                                    <div class="col-12 col-md-2 col-sm-2 m-b-20">                                            
                                                        <input type="text"  class="form-control" aria-describedby="basic-addon2" placeholder="Search" id="Search_Attr10" name="Attr10">
                                                    </div>
                                                
                                                    <label class="col-sm-1 col-12 col-md-1  col-form-label">VAT #</label>
                                                    <div class="col-12 col-md-2 col-sm-2 m-b-20">                                            
                                                        <input type="text"  class="form-control" aria-describedby="basic-addon2" placeholder="Search" id="Search_Attr15" name="Attr15">
                                                    </div>

                                                    <button class="btn btn-primary m-b-20"   onclick="javascript:void(0);doPost(this)">Search</button>
                                                </div>
                                            </form> -->
                                            <form id="searchForm" onsubmit="return false;">
                                                <div class="row m-2 m-l-0 form-group">

                                                    <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <!-- <label for="Search_Group" class="col-form-label-xsm">Customer Name</label> -->
                                                        <input type="text" class="form-control form-control-sm"
                                                            placeholder="Customer Name" id="Search_Account"
                                                            name="COAName" />
                                                    </div>

                                                    <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <!-- <label for="Search_Description" class="col-form-label-xsm">Trade Lic #</label> -->
                                                        <input type="text" class="form-control form-control-sm"
                                                            placeholder="Trade License #" id="Search_Attr4"
                                                            name="Attr4" />
                                                    </div>

                                                    <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <!-- <label for="Search_Category" class="col-form-label-xsm">Category</label> -->
                                                        <input type="text" class="form-control form-control-sm"
                                                            placeholder="Category" id="Search_Category"
                                                            name="Category" />
                                                    </div>
                                                    <!-- <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <input type="text" class="form-control form-control-sm"  placeholder="Level3" id="Search_L3" name="L3"/>
                                                    </div>
                                                    <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <input type="text" class="form-control form-control-sm"  placeholder="Level2" id="Search_L2" name="L2"/>
                                                    </div>
                                                    <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <input type="text" class="form-control form-control-sm"  placeholder="Level1" id="Search_L1" name="L1"/>
                                                    </div> -->

                                                    <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <!-- <label for="Search_Code" class="col-form-label-xsm">Mobile</label> -->
                                                        <input type="text" class="form-control form-control-sm"
                                                            placeholder="Mobile" id="Search_Attr10" name="Attr10" />
                                                    </div>
                                                    <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <!-- <label for="Search_Level" class="col-form-label-xsm">VAT REG #</label> -->
                                                        <input type="text" class="form-control form-control-sm"
                                                            placeholder="TRN #" id="Search_Attr15" name="Attr15" />
                                                    </div>

                                                    <div class="col-12 col-sm-2 col-md-2 form-group">
                                                        <!-- <label for="Search_Level" class="col-form-label-xsm"></label> -->
                                                        <button class="btn-primary form-control form-control-sm"
                                                            onclick="javascript:void(0);doPost(this)">Search</button>
                                                    </div>

                                                </div>
                                            </form>

                                            <div class="table-responsive mt-2">
                                    <!-- <table id="example" class="display" style="width:100%">
        <thead class="thead-light">
                                                    <tr>
                                                            <th>Account Name</th>
                                                            <th>Trade License #</th>
                                                            <th>Mobile #</th>
                                                            <th>Email</th>
                                                            <th>TRN #</th>
                                                        </tr>
        </thead>
         <tbody>
                                                        <tr id="invoice-no-data">
                                                                <td colspan="4" style="text-align:center"> 
                                                                    There's no data 
                                                                </td>
                                                            </tr>
                                                    </tbody>
                                                </table> -->

                                                <table
                                                    class="table table-bordered table-hover table-striped table-condensed"
                                                    id="invoice">
                                                    <thead class="thead-light">
                                                        <tr>
                                                            <th>Dealer Id</th>
                                                            <th>Account Name</th>
                                                            <th>Visit Date</th>
                                                            <th>Appointment Date</th>
                                                            <th>Sales Person</th>
                                                            <th>Action</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <!-- <tr id="invoice-no-data">
                                                                <td colspan="7" style="text-align:center"> 
                                                                    There's no data 
                                                                </td>
                                                            </tr> -->
                                                    </tbody>
                                                </table>

                                            </div>

                                        </div>

                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                </div>

                <!-- Container-fluid Ends -->
            </div>
            <!--Page Body Ends-->

        </div>
    </div>

    <!-- latest jquery-->
    <script src="http://localhost/design2/assets/js/jquery-3.2.1.min.js"></script>

    <!-- Bootstrap js-->
    <script src="http://localhost/design2/assets/js/bootstrap/popper.min.js"></script>
    <script src="http://localhost/design2/assets/js/bootstrap/bootstrap.js"></script>

    <!-- Counter js-->
    <script src="http://localhost/design2/assets/js/counter/jquery.waypoints.min.js"></script>
    <script src="http://localhost/design2/assets/js/counter/jquery.counterup.min.js"></script>
    <!-- <script src="http://localhost/design2/assets/js/counter/counter-custom.js"></script> -->

    <!-- owlcarousel js-->
    <script src="http://localhost/design2/assets/js/owlcarousel/owl.carousel.js"></script>

    <!-- prism js -->
    <script src="http://localhost/design2/assets/js/prism/prism.min.js"></script>

    <!-- clipboard js -->
    <script src="http://localhost/design2/assets/js/clipboard/clipboard.min.js"></script>

    <!-- custom card js  -->
    <script src="http://localhost/design2/assets/js/custom-card/custom-card.js"></script>

    <!--Height Equal Js-->
    <script src="http://localhost/design2/assets/js/height-equal.js"></script>

    <!-- Sidebar jquery-->
    <script src="http://localhost/design2/assets/js/sidebar-menu.js"></script>
    <script src="http://localhost/design2/assets/js/compact-small-button.js"></script>

    <!-- Theme js-->
    <script src="http://localhost/design2/assets/js/script.js"></script>

    <!-- tour js -->
    <script src="http://localhost/design2/assets/js/tour/intro.js"></script>
    <script src="http://localhost/design2/assets/js/tour/intro-init.js"></script>

    <!-- Chartist  -->
    <script src="http://localhost/design2/assets/js/chartis/chartist.js"></script>

    <!--Sparkline  Chart JS-->
    <script src="http://localhost/design2/assets/js/sparkline/sparkline.js"></script>

    <!--Dashboard business js-->
    <!-- <script  src="http://localhost/design2/assets/js/dashboard-business.js"></script> -->
    <script src="http://localhost/design2/assets/js/date-picker/datepicker.js"></script>
    <script src="http://localhost/design2/assets/js/date-picker/datepicker.en.js"></script>

    <script src="http://localhost/design2/assets/js/bootbox.min.js"></script>

    <!-- bootstrap notify js -->
    <script src="http://localhost/design2/assets/js/notify/bootstrap-notify.min.js"></script>

    <!-- Select2 js -->
    <script type="text/javascript" src="http://localhost/design2/assets/js/select2/select2.full.min.js"></script>


    <script src="http://localhost/design2/assets/js/datatables/jquery.dataTables.min.js"></script>
    <script src="http://localhost/design2/assets/js/datatables/datatable.custom.js"></script>

    <script>
        var table;
$(document).ready(function (data) {
    table=$('#invoice').dataTable( {
  "sAjaxDataProp":"",
             "stateSave": false,
                    "bProcessing": false,
                    "autoWidth": false,
                    "bServerSide": false,
                    "sAjaxSource": "addDealers.php?viewVisit=dealers",
         "columns": [
            { "data": "id" },
            { "data": "COAName" },
            { "data": "visitdate" },
            { "data": "appointdate" },
            { "data": "salesrepid" },
            {
                "className":      'edit',
                "orderable":      false,
                "data":           null,
                "defaultContent": "<span><a href='#' class='edit1'>Edit</a></span>"
            }
        ]

        

    } );
          $("#searchForm input").keyup( function () {
            var index = $(this).attr('index');
            table.fnFilter(this.value, index);
        });


    /* dataTable.fnSetColumnVis(0,false);
     dataTable.fnSetColumnVis(3,false);
     dataTable.fnSetColumnVis(9,false);
*/


   /*  $('#example').DataTable( {
"bProcessing": true,
"sAjaxDataProp":"",
"bServerSide": true,
        "ajax": 'addDealers.php?view=dealers',
        "columns": [
            { "data": "COAName" },
            { "data": "Attr4" },
            { "data": "Attr10" },
            { "data": "Attr11" },
            { "data": "Attr15" }
        ]
    } );*/


} );
$(document).on("click",".edit1",function(){
    //alert('call');
//table.ajax.reload();
var data=$(this).parent().parent().parent().find("td").eq(0).html();
//alert('called edit'+data);
data='id='+data;
$.ajax({
            type:'GET',
            url:'ajaxdata.php',
            data:data,
            success: function(data)
            {
            //alert(data);
            var myObj = JSON.parse(data);
    $("#dealer").val(myObj[0].COAID);
    $("#visitdate").val(myObj[0].visitdate);
          //  alert(myObj[0].newappoint);
    if(myObj[0].newappoint==1)
    {
        $("#appointarrange1").attr("checked",true);
            }
            else
            {
         $("#appointarrange0").attr("checked",true);      
            }
    
    $("#appointdate").val(myObj[0].appointdate);
    $("#additional_info").val(myObj[0].additional_info);
    $("#contactperson1").val(myObj[0].contact_person);
    $("#contactTypeId").val(myObj[0].contactTypeId);
    $("#TypeContactId").val(myObj[0].TypeContactId);
    $("#customerCategoryId").val(myObj[0].customerCategoryId);
    $("#discuss").val(myObj[0].discuss);
    $("#feedback").val(myObj[0].feedback);
    $("#notes").val(myObj[0].notes);
    $("#managernotes").val(myObj[0].managernotes);
$("#visitid").val(myObj[0].id);
$("#submit").html("update");
$("#submit").attr('name',"update");
$("#basic-tab").click();
}
});

});
$(document).on("click","#supplier-tabs",function(){
    //alert('call');
//table.ajax.reload();
});
    </script>
</body>

</html>
