<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">

<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">
 <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link rel="icon" type="image/png" sizes="16x16" href="{{asset('plugins/images/favicon.png')}}">
    <title>@yield('title')</title>
    <!-- ===== Bootstrap CSS ===== -->
    <link href="{{asset('bootstrap/dist/css/bootstrap.min.css')}}" rel="stylesheet">
    <link href="{{asset('plugins/components/custom-select/custom-select.css')}}" rel="stylesheet">
    <!-- ===== Plugin CSS ===== -->
    <link href="{{asset('plugins/components/datatables/jquery.dataTables.min.css')}}" rel="stylesheet" type="text/css" />
    <!-- ===== Animation CSS ===== -->
    <link href="{{asset('css/animate.css')}}" rel="stylesheet">
    <!-- ===== Custom CSS ===== -->
    <link href="{{asset('css/style.css')}}" rel="stylesheet">
    <link href="{{asset('css/toast.css')}}" rel="stylesheet">
    <!-- ===== Color CSS ===== -->
    <link href="{{asset('css/colors/default.css')}}" id="theme" rel="stylesheet">

    <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> -->
    
    <link href="{{asset('plugins/components/bootstrap-datepicker/bootstrap-datepicker.min.css')}}">

	<?php
  function current_page($uri = "/") {
    return strstr(request()->path(), $uri);
  }

  function home_page() {
      if(request()->path()=="/")
      {
          return true;
      }
      else
          return false;

  }
?>
	@yield('css')
</head>

<body class="mini-sidebar">
    <!-- Preloader -->

    <div id="wrapper">
	<div class="preloader">
            <div class="cssload-speeding-wheel"></div>
        </div>
        <!-- ===== Top-Navigation ===== -->
        <nav class="navbar navbar-default navbar-static-top m-b-0 no-print">
            <div class="navbar-header">
                <a class="navbar-toggle font-20 hidden-sm hidden-md hidden-lg " href="#" data-toggle="collapse" data-target=".navbar-collapse">
                    <i class="fa fa-bars"></i>
                </a>
                <div class="top-left-part" style="text-align: center">
                    <a class="logo" href="{{route('home')}}">
                        <b>
                            <img height="50px" src="{{asset('plugins/images/logo.png')}}" alt="home" />
                        </b>
                        <span style="font-size: 21px;">
                            Hamdard City
                        </span>
                    </a>
                </div>
                <ul class="nav navbar-top-links navbar-left hidden-xs">
                    <li>
                        <a href="#" class="sidebartoggler font-20 waves-effect waves-light"><i class="icon-arrow-left-circle"></i></a>
                    </li>

                </ul>

            </div>
        </nav>
        <!-- ===== Top-Navigation-End ===== -->
         <div class="color-shicher-wraper no-print">
          <div class="setting-button-wrapper">
            <button type="button" class="setting-button"></button>
        </div>
        <div class="swhicher-button">
<h3><b>Payment Scheduler </b><button onclick="refresh()"><i class="fa fa-refresh fa-sm"></i></button></h3>
            <div style="margin-bottom: 10px;"><label style="width:40%">Plot No</label>
              <select style="margin-bottom: 0px;width:53%;" name="plot_number_app" id="plot_number_app">

                <option value=""></option>
                @foreach($plots as $p)
                <option value="{{$p->id}}">{{$p->plot_number}}</option>
                @endforeach

              </select>
              <!-- <input type="integer" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='total_sqft_app' value=""> -->
            </div>
            <!-- <div style="margin-bottom: 10px;"><label style="width:40%">Type</label>
              <input type="integer" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='rate_sqft_app' value="">
            </div> -->
            <!-- <div style="margin-bottom: 10px;"><label style="width:40%">Status</label>
              <input type="integer" disabled="" readonly="" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='status_app' value="">
            </div> -->
            <div style="margin-bottom: 10px;"><label style="width:40%">Type</label>
              <input type="integer" disabled="" readonly="" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='type_app' value="">
            </div>
            <div style="margin-bottom: 10px;"><label style="width:40%">Size</label>
              <input type="integer" disabled="" readonly="" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='size_app' value="">
            </div>

            <div style="margin-bottom: 10px;"><label style="width:40%">Category</label>
              <textarea disabled="" readonly="" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='category_app'></textarea>

            </div>
            <div style="margin-bottom: 10px;"><label style="width:40%">Total Price</label>
              <input type="integer" disabled="" readonly="" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='total_amount_app' value="">
            </div>
            <div style="margin-bottom: 10px;"><label style="width:40%">Extra Charges</label>
              <input type="integer" disabled="" readonly="" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='extra_charges_app' value="">
            </div>
            <!-- <div style="margin-bottom: 10px;"><label style="width:40%">Discount %</label>
              <input type="integer" style="margin-bottom: 0px;width:53%;" class="form-group" autocomplete="off" id='discount_app' value="">
            </div> -->
            <div style="margin-bottom: 10px;"><label style="width:40%">Net Amount</label>
              <input type="integer" disabled="" readonly="" style="margin-bottom: 0px;width:53%;" autocomplete="off" class="form-group" id='net_amount_app' value="">
            </div>

            <div style="margin-bottom: 10px;">
              <label style="width:40%">Registration</label>
              <input type="integer" style="margin-bottom: 0px;width:53%;" class="form-group" autocomplete="off" id='registration_app' value="">
            </div>
            <div style="margin-bottom: 10px;">
              <label style="width:40%">Down Payment</label>
              <input type="integer" style="margin-bottom: 0px;width:53%;" class="form-group" autocomplete="off" id='down_payment_app' value="">
            </div>
             <div style="margin-bottom: 10px;">
              <label style="width:40%">Montlhy Installment</label>
              <input type="integer" style="margin-bottom: 0px;width:25%;" class="form-group" autocomplete="off" id='monthly_installment_app' value=""> <input readonly="" type="integer" autocomplete="off" disabled="" style="margin-bottom: 0px;width:25%;" class="form-group" id='total_monthly_installment_app' value="">
            </div>
             <div style="margin-bottom: 10px;">
              <label style="width:40%">Anual Installment</label>
              <input type="integer" autocomplete="off" style="margin-bottom: 0px;width:25%;" class="form-group" id='annual_installment_app' value="">
              <input type="integer" autocomplete="off" disabled="" style="margin-bottom: 0px;width:25%;" class="form-group" id='total_annual_installment_app' value="">
            </div>
            <div style="margin-bottom: 10px;">
              <label style="width:40%">Total Months</label>
              <input type="integer" autocomplete="off" style="margin-bottom: 0px;width:53%;" class="form-group" id='total_months_app' value="">
            </div>

        </div>

    </div><!--/.color-shicher-wraper-->
        <!-- ===== Left-Sidebar ===== -->
        <aside class="sidebar no-print" role="navigation">
            <div class="slim-scroll">
                <div class="user-profile">
                    <div class="dropdown user-pro-body">
                        <div class="profile-image">
                            <img src="{{asset('plugins/images/users/admin.png')}}" alt="user-img" class="img-circle">
                            <a href="#" class="dropdown-toggle u-dropdown text-blue" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                <span class="badge badge-danger">
                                    <i class="fa fa-angle-down"></i>
                                </span>
                            </a>
                            <ul class="dropdown-menu animated flipInY">
                                <li><a href="{{route('admin.profile')}}"><i class="fa fa-user"></i> Profile</a></li>

                                <li role="separator" class="divider"></li>

                                <form id='form1' action="{{ route('logout') }}" method="POST">
                            {{ csrf_field() }}
                            </form>
                               <li> <a href='#' onclick="document.getElementById('form1').submit();"><i class="fa fa-power-off"></i> Logout</a></li>

                            </ul>
                        </div>
                        <p class="profile-text m-t-15 font-16"><a href="#"> {{Auth::user()->name}}</a></p>
                    </div>
                </div>
                <nav class="sidebar-nav active">
                    <ul id="side-menu" class="in">
                        <li class="{{home_page() ? 'active' : '' }}">
                     <a href="{{route('home')}}" class="{{home_page() ? 'active' : '' }}" aria-expanded="false"><i class="icon-screen-desktop fa-fw"></i> <span class="hide-menu">Dashboard</span></a>
                    </li>

                    <li >
                        <a class="{{current_page('customer/') ? 'active' : '' }} {{current_page('add/customer') ? 'active' : '' }}  waves-effect" href="javascript:void(0);" aria-expanded="false"><i class="icon-people fa-fw"></i> <span class="hide-menu">Customers</span></a>
                           <ul aria-expanded="false" class="collapse {{current_page('customer/') ? 'in' : '' }} {{current_page('add/customer') ? 'in' : '' }}">
                               <!-- <li class="{{current_page('add/customer') ? 'active' : '' }}"> <a class="{{current_page('add/customer') ? 'active' : '' }}" href="{{route('customer.addView')}}"><i class="icon-check fa-fw"></i> Add Customer</a> </li> -->
                              <li class="{{current_page('customer/') ? 'active' : '' }}"> <a class="{{current_page('customer/') ? 'active' : '' }}" href="{{route('customer.all')}}"><i class="icon-check fa-fw"></i> Customers List</a> </li>
                               <li class="{{current_page('add/customer') ? 'active' : '' }}"> <a class="{{current_page('add/customer') ? 'active' : '' }}" href="{{route('registration.addView')}}"><i class="icon-check fa-fw"></i>New Customer Reg.</a> </li>


                           </ul>

                    </li>
                     <li >
                        <a class="{{current_page('inventory/') ? 'active' : '' }} {{current_page('add/inventory') ? 'active' : '' }} waves-effect" href="javascript:void(0);" aria-expanded="false"><i class="icon-layers fa-fw"></i> <span class="hide-menu">Inventory</span></a>
                           <ul aria-expanded="false" class="collapse {{current_page('inventory/') ? 'in' : '' }} {{current_page('add/inventory') ? 'in' : '' }}">
                               <li class="{{current_page('add/inventory') ? 'active' : '' }}"> <a class="{{current_page('add/inventory') ? 'active' : '' }}" href="{{route('inventory.add')}}">Add Inventory</a> </li>
                              <li class="{{current_page('inventory/') ? 'active' : '' }}"> <a class="{{current_page('inventory/') ? 'active' : '' }}" href="{{route('inventory.all')}}">Inventory List</a> </li>

                           </ul>

                    </li>

                    <li >
                        <a class="{{current_page('statement/') ? 'active' : '' }} {{current_page('pending-statement') ? 'active' : '' }} {{current_page('registrations') ? 'active' : '' }} {{current_page('memberships') ? 'active' : '' }} {{current_page('transfer') ? 'active' : '' }} {{current_page('add/statement') ? 'active' : '' }}  waves-effect" href="javascript:void(0);" aria-expanded="false"><i class="glyphicon glyphicon-th-list fa-fw"></i> <span class="hide-menu"> Sales</span></a>
                           <ul aria-expanded="false" class="collapse {{current_page('statement/') ? 'in' : '' }} {{current_page('pending-statement') ? 'in' : '' }} {{current_page('transfer') ? 'in' : '' }} {{current_page('memberships') ? 'in' : '' }} {{current_page('registrations') ? 'in' : '' }}{{current_page('add/statement') ? 'in' : '' }} ">
                            <li class="{{current_page('registrations') ? 'active' : '' }}"> <a class="{{current_page('registrations') ? 'active' : '' }}" href="{{route('registration.all')}}"><i class="icon-check fa-fw"></i> Registrations</a> </li>
                            <!-- <li class="{{current_page('memberships') ? 'active' : '' }}"> <a class="{{current_page('memberships') ? 'active' : '' }}" href="{{route('membership.all')}}"><i class="icon-check fa-fw"></i> Memberships</a> </li> -->
                               <li class="{{current_page('add/statement') ? 'active' : '' }}"> <a class="{{current_page('add/statement') ? 'active' : '' }}" href="{{route('statement.addView')}}"><i class="icon-check fa-fw"></i> Sale Property</a> </li>
                              <li class="{{current_page('statement/') ? 'active' : '' }}"> <a class="{{current_page('statement/') ? 'active' : '' }}" href="{{route('statement.all')}}"><i class="icon-check fa-fw"></i> Properties List</a> </li>
                              <!--<li class="{{current_page('pending-statement') ? 'active' : '' }}"> <a class="{{current_page('pending-statement') ? 'active' : '' }}" href="{{route('statement.pending')}}"><i class="icon-check fa-fw"></i> Pending Statments</a> </li>-->
                              <!-- <li class="{{current_page('transfer') ? 'active' : '' }}"> <a class="{{current_page('transfer') ? 'active' : '' }}" href="{{route('transfer.all')}}"><i class="icon-check fa-fw"></i> Transfer List</a> </li> -->
                           </ul>

                    </li>
                     <li >
                        <a class="{{current_page('receipt') ? 'active' : '' }}   waves-effect" href="javascript:void(0);" aria-expanded="false"><i class="icon-book-open fa-fw"></i> <span class="hide-menu">Receipts</span></a>
                           <ul aria-expanded="false" class="collapse {{current_page('receipt') ? 'in' : '' }} ">
                               <li class="{{current_page('add/receipt') ? 'active' : '' }}"> <a class="{{current_page('add/receipt') ? 'active' : '' }}" href="{{route('receipt.addView')}}"><i class="icon-check fa-fw"></i> Add Receipt</a> </li>
                              <li class="{{current_page('receipt/') ? 'active' : '' }}"> <a class="{{current_page('receipt/') ? 'active' : '' }}" href="{{route('receipt.all')}}"><i class="icon-check fa-fw"></i> Receipt List</a> </li>

                           </ul>

                    </li>


                    <!--<li >-->
                    <!--    <a class="{{current_page('registration-dealer') ? 'active' : '' }} {{current_page('dealer/') ? 'active' : '' }} {{current_page('add/dealer') ? 'active' : '' }} waves-effect" href="javascript:void(0);" aria-expanded="false"><i class="icon-user-follow fa-fw"></i> <span class="hide-menu">Incentive / Commission</span></a>-->
                    <!--       <ul aria-expanded="false" class="collapse {{current_page('registration-dealer') ? 'in' : '' }} {{current_page('dealer/') ? 'in' : '' }} {{current_page('add/dealer') ? 'in' : '' }} ">-->
                    <!--           <li class="{{current_page('add/dealer') ? 'active' : '' }}"> <a class="{{current_page('add/dealer') ? 'active' : '' }}" href="{{route('dealer.addView')}}"><i class="icon-check fa-fw"></i> Add Network</a> </li>-->
                    <!--          <li class="{{current_page('dealer/') ? 'active' : '' }}"> <a class="{{current_page('dealer/') ? 'active' : '' }}" href="{{route('dealer.all')}}"><i class="icon-check fa-fw"></i> Sale Network List</a> </li>-->
                              <!-- <li class="{{current_page('registration-dealer') ? 'active' : '' }}"> <a class="{{current_page('registration-dealer') ? 'active' : '' }}" href="{{route('dealer.registration.all')}}"><i class="icon-check fa-fw"></i>Dealer Registrations</a> </li> -->

                    <!--       </ul>-->

                    <!--</li>-->




                    <!-- <li >-->
                    <!--    <a class=" waves-effect {{current_page('company-account') ? 'active' : '' }}-->
                    <!--    {{current_page('adjustment') ? 'active' : '' }}-->
                    <!--    {{current_page('project-account') ? 'active' : '' }} {{current_page('purchase') ? 'active' : '' }} {{current_page('dealer-rebate') ? 'active' : '' }} {{current_page('expense') ? 'active' : '' }}  " href="javascript:void(0);" aria-expanded="false"><i class="icon-chart fa-fw"></i> <span class="hide-menu">Transactions</span></a>-->
                    <!--       <ul aria-expanded="false" class="collapse  {{current_page('company-account') ? 'in' : '' }}-->
                    <!--       {{current_page('adjustment') ? 'in' : '' }}-->
                    <!--       {{current_page('project-account') ? 'in' : '' }} {{current_page('purchase') ? 'in' : '' }} {{current_page('dealer-rebate') ? 'in' : '' }} {{current_page('expense') ? 'in' : '' }}">-->
                    <!--          <li class="{{current_page('company-account') ? 'active' : '' }}"> <a class="{{current_page('company-account') ? 'active' : '' }}" href="{{route('bank.all')}}"><i class="icon-check fa-fw"></i> Company Accounts</a> </li>-->
                            <!-- <li class="{{current_page('project-account') ? 'active' : '' }}"> <a class="{{current_page('project-account') ? 'active' : '' }}" href="{{route('account.all')}}"><i class="icon-check fa-fw"></i> Paradigm Account</a> </li> -->
                    <!--           <li class="{{current_page('dealer-rebate') ? 'active' : '' }}"> <a class="{{current_page('dealer-rebate') ? 'active' : '' }}" href="{{route('rebate.all')}}"><i class="icon-check fa-fw"></i> Dealer Rebates</a> </li>-->
                    <!--            <li class="{{current_page('adjustment') ? 'active' : '' }}"> <a class="{{current_page('adjustment') ? 'active' : '' }}" href="{{route('adjustment.all')}}"><i class="icon-check fa-fw"></i> Customer Adjustments</a> </li>-->
                             


                    <!--       </ul>-->

                    <!--</li>-->

                    <!--  <li >-->
                    <!--    <a class=" waves-effect {{current_page('report') ? 'active' : '' }}  {{current_page('BalanceSheet') ? 'active' : '' }} " href="javascript:void(0);" aria-expanded="false"><i class="icon-book-open fa-fw"></i> <span class="hide-menu">Reports</span></a>-->
                    <!--       <ul aria-expanded="false" class="collapse {{current_page('report') ? 'in' : '' }}  {{current_page('BalanceSheet') ? 'in' : '' }} ">-->
                           
                    <!--             <li class="{{current_page('report/account-statement') ? 'active' : '' }} "> <a class="{{current_page('report/account-statement') ? 'active' : '' }}" href="{{route('report.account-statement')}}"><i class="icon-check fa-fw"></i> Recovery Account<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Statement</a> </li>-->

                    <!--           <li class="{{current_page('report/profit-loss-statement') ? 'active' : '' }} "> <a class="{{current_page('report/profit-loss-statement') ? 'active' : '' }}" href="{{route('report.profit-loss-statement')}}"><i class="icon-check fa-fw"></i> Profit & Loss <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Statement</a> </li>-->

                               
                    <!--           <li class="{{current_page('report/paid-rebate') ? 'active' : '' }} "> <a class="{{current_page('report/paid-rebate') ? 'active' : '' }}" href="{{route('report.paid-rebate')}}"><i class="icon-check fa-fw"></i>Paid Rebate</a> </li>-->


                    <!--       </ul>-->

                    <!--</li>-->

                    <li>
                           <a class="{{current_page('plot-size') ? 'active' : '' }} {{current_page('account') ? 'active' : '' }}{{current_page('dealer-type') ? 'active' : '' }} {{current_page('registration-no') ? 'active' : '' }} {{current_page('payment-schedule') ? 'active' : '' }} {{current_page('plot-category') ? 'active' : '' }} {{current_page('plot-type') ? 'active' : '' }}{{current_page('plot-block') ? 'active' : '' }} waves-effect" href="javascript:void(0);" aria-expanded="false"><i class="icon-settings fa-fw"></i> <span class="hide-menu">Settings </span></a>
                           <ul aria-expanded="false" class="collapse {{current_page('plot-size') ? 'in' : '' }} {{current_page('payment-schedule') ? 'in' : '' }} {{current_page('account') ? 'in' : '' }}
                           {{current_page('dealer-type') ? 'in' : '' }} {{current_page('registration-no') ? 'in' : '' }}{{current_page('plot-category') ? 'in' : '' }} {{current_page('plot-type') ? 'in' : '' }}
                           {{current_page('plot-block') ? 'in' : '' }} ">
                           <!--<li class="{{current_page('account') ? 'active' : '' }}"> <a class="{{current_page('account') ? 'active' : '' }}" href="{{route('account.all')}}"><i class="icon-check fa-fw"></i>Accounts</a> </li>-->
                                <li class="{{current_page('dealer-type') ? 'active' : '' }}"> <a class="{{current_page('dealer-type') ? 'active' : '' }}" href="{{route('dealer.type.all')}}"><i class="icon-check fa-fw"></i>Incentive Type</a> </li>
                                <li class="{{current_page('registration-no') ? 'active' : '' }}"> <a class="{{current_page('registration-no') ? 'active' : '' }}" href="{{route('registration_no.all')}}"><i class="icon-check fa-fw"></i>Registation No</a> </li>
                               <li class="{{current_page('plot-category') ? 'active' : '' }}"> <a class="{{current_page('plot-category') ? 'active' : '' }}" href="{{route('plotCategory.all')}}"><i class="icon-check fa-fw"></i>Plot Category</a> </li>
                               <li class="{{current_page('plot-type') ? 'active' : '' }}"> <a class="{{current_page('plot-type') ? 'active' : '' }}" href="{{route('plot.type.all')}}"><i class="icon-check fa-fw"></i>Plot Type</a> </li>
                                <li class="{{current_page('plot-size') ? 'active' : '' }}"> <a class="{{current_page('plot-size') ? 'active' : '' }}" href="{{route('plot.size.all')}}"><i class="icon-check fa-fw"></i>Plot Size</a> </li>
                                <li class="{{current_page('plot-block') ? 'active' : '' }}"> <a class="{{current_page('plot-block') ? 'active' : '' }}" href="{{route('plotBlock.all')}}"><i class="icon-check fa-fw"></i>Plot Block</a> </li>

                                <li class="{{current_page('payment-schedule') ? 'active' : '' }}"> <a class="{{current_page('payment-schedule') ? 'active' : '' }}" href="{{route('schedule.all')}}"><i class="icon-check fa-fw"></i>Schedule Plan</a> </li>

                           </ul>
                       </li>

                    </ul>
                </nav>
            </div>
        </aside>
        <!-- ===== Left-Sidebar-End ===== -->
        <!-- Page Content -->
        <div class="page-wrapper">
            @yield('breadcrumb')
            <div class="clearfix"></div>
                @yield('content')
                <!-- ===== Right-Sidebar ===== -->
                <div class="right-sidebar">
                    <div class="slimsrcollright">
                        <div class="rpanel-title"> Service Panel <span><i class="icon-close right-side-toggler"></i></span> </div>
                        <div class="r-panel-body">



                        </div>
                    </div>
                </div>
                <!-- ===== Right-Sidebar-End ===== -->
            </div>
            <!-- /.container-fluid -->
            <footer class="footer t-a-c no-print"> <div class="bg-white p-20 ">            <center> 2019 © Hamdard City / Design & Developed By <a href="http://exagic.com/" target="_blank">EXAGIC</a> </center>        </div>
            </footer>
        </div>
        <!-- /#page-wrapper -->
    </div>
    <!-- /#wrapper -->
    <!-- ==============================
        Required JS Files
    =============================== -->
    <!-- ===== jQuery ===== -->
    <script src="{{asset('plugins/components/jquery/dist/jquery.min.js')}}"></script>

    <!-- ===== Bootstrap Javasrcipt ===== -->
    <script src="{{asset('bootstrap/dist/js/bootstrap.min.js')}}"></script>

    <script src="{{asset('plugins/components/custom-select/custom-select.min.js')}}"></script>

    <script src="{{asset('plugins/components/bootstrap-datepicker/bootstrap-datepicker.min.js')}}"></script>
    <!-- ===== Slimsrcoll Javasrcipt ===== -->
    <script src="{{asset('js/jquery.slimscroll.js')}}"></script>
    <!-- ===== Wave Effects Javasrcipt ===== -->
    <script src="{{asset('js/waves.js')}}"></script>
    <!-- ===== Menu Plugin Javasrcipt ===== -->
    <script src="{{asset('js/sidebarmenu.js')}}"></script>

    <script src="{{asset('js/jquery.slimscroll.js')}}"></script>
    <!-- ===== Custom Javasrcipt ===== -->
    <script src="{{asset('js/custom.js')}}"></script>
    <script src="{{asset('js/jasny-bootstrap.js')}}"></script>
    <script src="{{asset('plugins/components/datatables/jquery.dataTables.min.js')}}"></script>
    <!-- ===== Plugin JS ===== -->
    <!-- ===== Style Switcher JS ===== -->
    <!--srcipt src="{{asset('plugins/components/styleswitcher/jQuery.style.switcher.js')}}"></srcipt-->
    <script src="{{asset('js/app-toast.js')}}"></script>
	@yield('js')
        <script>
         @if(Session::has('message'))
    var type = "{{ Session::get('alert-type', 'info') }}";
    switch(type){
        case 'info':
            toastr.info("{{ Session::get('message') }}");
            break;

        case 'warning':
            toastr.warning("{{ Session::get('message') }}");
            break;

        case 'success':
            toastr.success("{{ Session::get('message') }}");
            break;

        case 'error':
            toastr.error("{{ Session::get('message') }}");
            break;
    }
    {{Session::forget('message')}}
  @endif

  $('.select2').select2();
  $(".mydatepicker").datepicker();
$('.swhicher-button button').on('click', function(){
    var buttonAttr = $(this).attr('data-att');
    $('link[data-style="color-style"]').attr('href','css/'+buttonAttr+'.css');
        $('.logo a img, .footer-logo a img').attr('src','images/'+buttonAttr+'-logo.png');
  });
  $('.setting-button-wrapper .setting-button').on('click', function(){
    $('.color-shicher-wraper').toggleClass('show-color');
    $('.select2').select2();
  });



$('#plot_number_app').change(function() {
//update the unit information when unit number change
    $('.preloader').fadeIn();
        var data = { 'plot_number': $(this).val() };

        $.get('/getInformationByPlot', data, function (data) {console.log(data);
            if(data) {
            $('#total_amount_app').val(data.info.total_price - data.info.extra_amount);
            $('#net_amount_app').val(data.info.total_price);
            $('#extra_charges_app').val(data.info.extra_amount);
            $('#status_app').val(data.info.status);
             if(data.info.size.name >= 20)
                 $('#size_app').val(data.info.size.name / 20  + ' Kanal');
             else
                 $('#size_app').val(data.info.size.name  + ' Marla');
           // $('#inventory-id').val(data.info.id);
           //  $('#description').val(data.info.description);
             name = '';
             for( i =0 ; i<data.info.categories.length ; i++)
             {
                name += data.info.categories[i].category.name + ' , ';
             }
             $('#category_app').val(name);
           //  $('#category').val(data.info.category.name);
             $('#type_app').val(data.info.type.name);


               $('#down_payment_app').val( Math.round(parseInt(data.schedule.down_payment) / 100 * data.info.total_price));
               $('#registration_app').val( Math.round(data.reg.registration_fee));
                $('#annual_installment_app').val( Math.round(data.schedule.annual_installment / 100 * data.info.total_price / (data.schedule.total_months / 12)));
               $('#total_months_app').val( Math.round(data.schedule.total_months));

               $('#total_annual_installment_app').val( Math.round(data.schedule.annual_installment / 100 * data.info.total_price));

               $('#monthly_installment_app').val( Math.round(data.schedule.monthly_installment / 100 * data.info.total_price / (data.schedule.total_months)));

               $('#total_monthly_installment_app').val( Math.round(data.schedule.monthly_installment / 100 * data.info.total_price));

            }
        });
         $('.preloader').fadeOut();

});


$('#down_payment_app').keyup(function() {

  total_price = parseInt($('#net_amount_app').val());
  if(!total_price)
  total_price = 0;

  down_payment = parseInt($('#down_payment_app').val());
  if(!down_payment)
    down_payment = 0;

  total_monthly_installment_app = parseInt($('#total_monthly_installment_app').val());
  if(!total_monthly_installment_app)
    total_monthly_installment_app = 0;

  total_annual_installment_app = parseInt($('#total_annual_installment_app').val());
  if(!total_annual_installment_app)
    total_annual_installment_app = 0;

  remaining_amount = total_price - down_payment - total_monthly_installment_app - total_annual_installment_app;
  //alert(remaining_amount);

  $('#total_monthly_installment_app').val(parseInt(total_monthly_installment_app + remaining_amount));

  $('#monthly_installment_app').val(parseInt((total_monthly_installment_app + remaining_amount) / 60));


});


$('#monthly_installment_app').keyup(function() {

  monthly_installment_app = parseInt($('#monthly_installment_app').val());
  if(!monthly_installment_app)
    monthly_installment_app = 0;

  $('#total_monthly_installment_app').val(monthly_installment_app * 60);
  if(!total_monthly_installment_app)
    total_monthly_installment_app = 0;

  total_price = parseInt($('#net_amount_app').val());
  if(!total_price)
  total_price = 0;

  down_payment = parseInt($('#down_payment_app').val());
  if(!down_payment)
    down_payment = 0;

  total_monthly_installment_app = parseInt($('#total_monthly_installment_app').val());
  if(!total_monthly_installment_app)
    total_monthly_installment_app = 0;

  total_annual_installment_app = parseInt($('#total_annual_installment_app').val());
  if(!total_annual_installment_app)
    total_annual_installment_app = 0;

  remaining_amount = total_price - down_payment - total_monthly_installment_app - total_annual_installment_app;
  //alert(remaining_amount);

  $('#total_annual_installment_app').val(parseInt(total_annual_installment_app + remaining_amount));

  $('#annual_installment_app').val(parseInt((total_annual_installment_app + remaining_amount) / 5));


});


$('#annual_installment_app').keyup(function() {

  annual_installment_app = parseInt($('#annual_installment_app').val());
  if(!annual_installment_app)
    annual_installment_app = 0;

  $('#total_annual_installment_app').val(annual_installment_app * 5);
  if(!total_annual_installment_app)
    total_annual_installment_app = 0;

  total_price = parseInt($('#net_amount_app').val());
  if(!total_price)
  total_price = 0;

  down_payment = parseInt($('#down_payment_app').val());
  if(!down_payment)
    down_payment = 0;

  total_monthly_installment_app = parseInt($('#total_monthly_installment_app').val());
  if(!total_monthly_installment_app)
    total_monthly_installment_app = 0;

  total_annual_installment_app = parseInt($('#total_annual_installment_app').val());
  if(!total_annual_installment_app)
    total_annual_installment_app = 0;

  remaining_amount = total_price - down_payment - total_monthly_installment_app - total_annual_installment_app;
  //alert(remaining_amount);

  $('#total_monthly_installment_app').val(parseInt(total_monthly_installment_app + remaining_amount));

  $('#monthly_installment_app').val(parseInt((total_monthly_installment_app + remaining_amount) / 60));


});

//update_schedule//update the total months label
    $("#total_sqft_app").keyup(function(){

      $('#total_price_app').val(parseInt($('#total_sqft_app').val()) * parseInt($('#rate_sqft_app').val()));
      $('#net_amount').val(parseInt($('#total_sqft_app').val()) * parseInt($('#rate_sqft_app').val()));

      price = parseInt($('#total_price_app').val());
      schedule = {!! json_encode($schedule->toArray()) !!};
      if(price)
      {

              $('#registration_app').val( Math.round(parseInt(schedule.registration) / 100 * price));
               $('#down_payment_app').val( Math.round(schedule.down_payment / 100 * price));
                $('#annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price / (schedule.total_months / 12)));
               $('#total_months_app').val( Math.round(schedule.total_months));

               $('#total_annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price));

               $('#monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price / (schedule.total_months)));

               $('#total_monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price));

             }
    });

    $("#rate_sqft_app").keyup(function(){

      $('#total_price_app').val(parseInt($('#total_sqft_app').val()) * parseInt($('#rate_sqft_app').val()));
      $('#net_amount').val(parseInt($('#total_sqft_app').val()) * parseInt($('#rate_sqft_app').val()));

      price = parseInt($('#total_price_app').val());
      schedule = {!! json_encode($schedule->toArray()) !!};
      if(price)
      {

               $('#registration_app').val( Math.round(parseInt(schedule.registration) / 100 * price));
               $('#booking_app').val( Math.round(schedule.booking / 100 * price));
                $('#annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price / (schedule.total_months / 12)));
               $('#total_months_app').val( Math.round(schedule.total_months));

               $('#total_annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price));

               $('#monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price / (schedule.total_months)));

               $('#total_monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price));

             }
    });

    $("#total_months_app").keyup(function(){

      price = parseInt($('#total_price_app').val());
      schedule = {!! json_encode($schedule->toArray()) !!};
      if(price)
      {

               $('#registration_app').val( Math.round(parseInt(schedule.registration) / 100 * price));
               $('#booking_app').val( Math.round(schedule.booking / 100 * price));
                $('#annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price / (parseInt($('#total_months_app').val()) / 12)));
               $('#total_months_app').val( parseInt($('#total_months_app').val()));

               $('#total_annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price));

               $('#monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price / (parseInt($('#total_months_app').val()))));

               $('#total_monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price));

             }
    });

    $("#discount").keyup(function(){

      if($('#discount').val())
      {
        price = Math.round(parseInt($('#total_price_app').val()) - (parseFloat($('#discount_app').val()) / 100 * parseInt($('#total_price_app').val())));
        $('#net_amount_app').val(price);

               $('#registration_app').val( Math.round(parseInt(schedule.registration) / 100 * price));
               $('#booking_app').val( Math.round(schedule.booking / 100 * price));
                $('#annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price / (parseInt($('#total_months_app').val()) / 12)));
               $('#total_months_app').val( parseInt($('#total_months_app').val()));

               $('#total_annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price));

               $('#monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price / (parseInt($('#total_months_app').val()))));

               $('#total_monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price));

             }
             else {

              price = parseInt($('#total_price_app').val());

              $('#net_amount_app').val(price);

               $('#registration_app').val( Math.round(parseInt(schedule.registration) / 100 * price));
               $('#booking_app').val( Math.round(schedule.booking / 100 * price));
                $('#annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price / (parseInt($('#total_months_app').val()) / 12)));
               $('#total_months_app').val( parseInt($('#total_months_app').val()));

               $('#total_annual_installment_app').val( Math.round(schedule.annual_installment / 100 * price));

               $('#monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price / (parseInt($('#total_months_app').val()))));

               $('#total_monthly_installment_app').val( Math.round(schedule.monthly_installment / 100 * price));

             }

    });

    function refresh() {

      $('#total_amount_app').val('');
      $('#discount_app').val('');
      $('#net_amount_app').val('');
      $('#type_app').val('');
      $('#size_app').val('');
      $('#registration_app').val('');
      $('#down_payment_app').val('');
      $('#extra_charges_app').val('');
      $('#category_app').val('');
      $('#annual_installment_app').val('');
      $('#total_months_app').val('');
      $('#total_annual_installment_app').val('');
      $('#monthly_installment_app').val('');
      $('#total_monthly_installment_app').val('');

    }



    </script>
</body>



</html>
