@extends('admin.index')
@section('content')
@php
use App\Models\CompanyData;
$Def=CompanyData::orderBy('id','desc')->first();
@endphp
<style>
    .employee{
        border:2px solid gray;padding: 30px;
            background: linear-gradient(45deg, #d9dbec, #0b39cd73);
    color: black;

    }
    .employee-img{border:2px solid #ccc;max-width:100%; height:177px;}
    @media print{
         .employee{
             border:0;
         }
         .employee-img{height:210px;}
         html{
              position:absolute;
      left: 5px;
      right: 5px;
      top: 5px;
      bottom: 5px;
             border:2px solid gray;padding: 8px;
         }
    }
</style>
<title>{{trans('admin.PaySalaryReport')}}</title>
<main id="js-page-content" role="main" class="page-content">
   <ol class="breadcrumb page-breadcrumb">
      <li class="breadcrumb-item"><a href="javascript:void(0);">{{trans('admin.HR_Reports')}}</a></li>
      <li class="breadcrumb-item active"> {{trans('admin.PaySalaryReport')}} </li>
      <li class="position-absolute pos-top pos-right d-none d-sm-block"><span
         class="js-get-date"></span></li>
   </ol>
   <!-- data entry -->
   <div class="row hide-table">
      <div class="col-xl-12">
         <div id="panel-1" class="panel">
            <div class="modal-body">
               <div class="employee" >
                  <div class="row invoive-info">
                     <div style="text-align: center;" class="col-md-4 col-sm-4 col-4 invoice-client-info">
                        <div class="style-info">
                           <h1 style="text-align: center;" class="m-0">
                              @if(!empty($Def->Name))
                      {{app()->getLocale() == 'ar' ?$Def->Name :$Def->NameEn}}
                              @else
                              {{trans('admin.Klar')}}
                              @endif
                           </h1>
                           <h3 style="text-align: center;" class="m-10">
                              @if(!empty($Def->Print_Text))
                                  {{app()->getLocale() == 'ar' ?$Def->Print_Text :$Def->Print_Text_En}}
                              @endif
                           </h3>
                        </div>
                     </div>
                     <div style="text-align: center;" class="col-md-4 col-sm-4 col-4 invoice-client-info">
                        <h1>{{trans('admin.PaySalaryReport')}}</h1>
                     </div>
                     <div style="text-align: center;" class="col-md-4 col-sm-4 col-4 invoice-client-info">
                        <div class="style-info">
                           @if(!empty($Def->Logo))
                           <img style="height: 50px; " class="img-fluid" src="{{URL::to($Def->Logo)}}" alt="Logo" />
                           @else
                           <img style="height: 50px; " class="img-fluid" src="https://klarerp.com/site/img/theme/logo.png" alt="Logo" />
                           @endif
                        </div>
                     </div>
                  </div>
                  <hr />


                         <div class="form-row">
 <div class="form-group col-md-6 col-6-print">
                                                <label class="form-label" for="simpleinput">{{trans('admin.Month')}}</label>
                                                <input onchange="Check()" type="month" id="Month" name="month" value="{{date('Y-m')}}" class="form-control">
                                            </div>
               <div class="form-group col-md-6 col-6-print">
                                                <label class="form-label" for="">  {{trans('admin.Emp')}} </label>
                                                <select onchange="Check()" class="select2 form-control w-100" id="Emp" name="emp">
                                                    <option value=""> {{trans('admin.Emp')}}</option>
                                                @foreach($Employess as $empo)
                        <option value="{{$empo->id}}">

                                                {{app()->getLocale() == 'ar' ?$empo->Name :$empo->NameEn}}
                                                    </option>
                                                    @endforeach
                                                </select>
                                            </div>

       </div>


                 <div id="mobile-overflow">
                <div class="row">
                           <div class="form-group col-lg-3 col-6-print">
                                 <label class="form-label" for="simpleinput">   {{trans('admin.Salary')}}     </label>
                                            <input type="text" id="Salary"  readonly  class="form-control">
                                   <input type="hidden" name="Salary" id="SalaryHide" >
                                        </div>


                                 <div class="form-group col-lg-3 col-4-print">
                                 <label class="form-label" for="simpleinput">   {{trans('admin.Total_Borrow')}}    </label>
                                   <input type="text" id="TotalBorrow"  readonly class="form-control">
                                       <input type="hidden" name="Borrow" id="TotalBorrowHide" >
                                        </div>


                                                        <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Deducation')}}    </label>
                                   <input type="text" id="Deduction"  readonly class="form-control">
                                       <input type="hidden" name="Deduction" id="DeductionHide" >
                                        </div>


                                         <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Entitlements')}}    </label>
                                   <input type="text" id="Entitlement"  readonly class="form-control">
                                       <input type="hidden" name="Entitlement" id="EntitlementHide" >
                                        </div>

                                      <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Loan_Installment')}}    </label>
                                   <input type="text" id="Loan"  readonly class="form-control">
                                       <input type="hidden" name="Loan" id="LoanHide" >
                                        </div>

                                <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Overtime')}}    </label>
                                   <input type="text" id="Overtime"  readonly class="form-control">
                                       <input type="hidden" name="Overtime" id="OvertimeHide" >
                                        </div>

                                   <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Attendence_Hours')}}    </label>
                                   <input type="text" id="Attendence_Hours"  readonly class="form-control">
                                    <input type="hidden" name="Attendence_Hours" id="Attendence_HoursHide" >
                                        </div>

                                <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Attendence')}}    </label>
                                   <input type="text" id="Attendence"  readonly class="form-control">
                                    <input type="hidden" name="Attendence" id="AttendenceHide" >
                                        </div>

                                            <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Attendence_Discount')}}    </label>
                 <input type="number" step="any" onclick="change()" onkeyup="change()" name="Attendence_Discount" id="Attendence_Discount" readonly  class="form-control">
                                 <!--   <input type="hidden" name="Attendence_Discount" id="Attendence_DiscountHide" >  -->
                                        </div>

               <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Holidays_Per_Days')}}    </label>
                                   <input type="text" id="Holidays"  disabled class="form-control">
                                    <input type="hidden" name="Holidays" id="HolidaysHide" >
                                        </div>

                                          <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Holiday_Discount')}}    </label>
                      <input  type="number" step="any" onclick="change()" onkeyup="change()" id="Holiday_Discount" readonly  name="Holiday_Discount"  class="form-control">
                                  <!--  <input type="hidden" name="Holiday_Discount" id="Holiday_DiscountHide" >  -->
                                        </div>


                                            <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Settlements')}}    </label>
      <input type="number" step="any" onclick="change()" onkeyup="change()" id="Settlements"  readonly class="form-control">
                                       <input type="hidden" name="Settlements" id="SettlementsHide" >
                                        </div>

                                               <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Later_Sales_Bill')}}    </label>
                                   <input type="text" id="Later_Sales_Bill"  class="form-control" name="Later_Sales_Bill" readonly>
                                       <input type="hidden"  id="Later_Sales_BillHide" >
                                        </div>


                                             <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Allowances')}}    </label>
                                   <input type="text" id="Allowances" name="Allowances" readonly class="form-control">
                                        </div>


                                                                    <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Discounts')}}    </label>
                                   <input type="text" id="Discounts" name="Discounts" readonly class="form-control">
                                        </div>


                                           <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.ProducationPoints')}}    </label>
                                   <input type="text" id="ProducationPoints" name="ProducationPoints" readonly class="form-control">
                                        </div>

                                                                <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.DiscountLate')}}    </label>
                                   <input type="text" id="DiscountLate" name="DiscountLate" readonly class="form-control">
                                        </div>

                                                                 <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.DiscountDeparture')}}    </label>
                                   <input type="text" id="DiscountDeparture" name="DiscountDeparture" readonly class="form-control">
                                        </div>

                                            <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Hour_Value')}}    </label>
                                   <input type="text" id="HoursValue" name="HoursValue" readonly class="form-control">
                                        </div>

                                                                 <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Financial_Value')}}    </label>
                                   <input type="text" id="FinValue" name="FinValue" readonly class="form-control">
                                        </div>



                            <div class="form-group col-lg-3 col-4-print">
                <label class="form-label" for="simpleinput">   {{trans('admin.Resduial_Salary')}}    </label>
                                   <input type="text" id="Resduial_Salary"  readonly class="form-control">
                                    <input type="hidden" name="Resduial_Salary" id="Resduial_SalaryHide" >
                                        </div>



                   </div>


            </div>

            </div>

            <div class="modal-footer">
               <a href="{{url('KlarAdmin')}}" class="btn btn-secondary" data-dismiss="modal">{{trans('admin.Back')}}</a>
               <button type="button" class="btn btn-default" onclick="window.print()"><i class="fal fa-print"></i></button>
            </div>
         </div>
      </div>
   </div>
    </div>
</main>
@endsection
@push('js')
<link rel="stylesheet" media="screen, print" href="{{asset('Admin/css/datagrid/datatables/datatables.bundle.css')}}">
<link rel="stylesheet" media="screen, print" href="{{asset('Admin/css/formplugins/summernote/summernote.css')}}">
<link rel="stylesheet" media="screen, print" href="{{asset('Admin/css/formplugins/select2/select2.bundle.css')}}">
<style>
   th{
   width:135px!important;
   }
</style>
<script src="{{asset('Admin/js/datagrid/datatables/datatables.export.js')}}"></script>
<script src="{{asset('Admin/js/datagrid/datatables/datatables.bundle.js')}}"></script>
<script src="{{asset('Admin/js/formplugins/summernote/summernote.js')}}"></script>
<script src="{{asset('Admin/js/formplugins/select2/select2.bundle.js')}}"></script>
<script>
   //_fnFeatureHtmlLength();
   $(document).ready(function () {
       // Setup - add a text input to each footer cell
       $('#dt-basic-example thead tr').clone(true).appendTo('#dt-basic-example thead');
       $('#dt-basic-example thead tr:eq(1) th').each(function (i) {
           var title = $(this).text();
           $(this).html('<input type="text" class="form-control form-control-sm" placeholder="Search ' + title + '" />');

           $('input', this).on('keyup change', function () {
               if (table.column(i).search() !== this.value) {
                   table
                       .column(i)
                       .search(this.value)
                       .draw();
               }
           });
       });
       var table = $('#dt-basic-example').DataTable(
           {
               responsive: true,
               orderCellsTop: true,
               fixedHeader: true,
               lengthChange: true,

               dom: "<'row mb-3'<'col-sm-12 col-md-3 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-9 d-flex align-items-center justify-content-end'B>>" +
                   "<'row'<'col-sm-12'tr>>" +
                   "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",

               buttons: [
                   {
                       extend: 'pageLength',
                       className: 'btn-outline-default'
                   },
                   {
                       extend: 'colvis',
                       text: 'Column Visibility',
                       titleAttr: 'Col visibility',
                       className: 'btn-outline-default'
                   },
                   {
                       extend: 'pdfHtml5',
                       text: 'PDF',
                       titleAttr: 'Generate PDF',
                       className: 'btn-outline-danger btn-sm mr-1'
                   },
                   {
                       extend: 'excelHtml5',
                       exportOptions: {
                           format: {
                               body: function ( inner, rowidx, colidx, node ) {
                                   if ($(node).children("select").length > 0) {
                                       // we are in a cell containing a "select" drop-down - so, get it:
                                       var selectNode = node.firstElementChild;
                                       var txt = selectNode.options[selectNode.selectedIndex].text;
                                       //var txt = selectNode.options[selectNode.selectedIndex].text;
                                       return txt;
                                   } else {

                                       if ($(node).children("input").length > 0) {
                                           return $(node).children("input").first().val();
                                       } else {
                                           return inner;
                                       }


                                   }
                               }
                           }
                       },
                       text: 'Excel',
                       titleAttr: 'Generate Excel',
                       className: 'btn-outline-success btn-sm mr-1'
                   },
                   {
                       extend: 'csvHtml5',
                       text: 'CSV',
                       titleAttr: 'Generate CSV',
                       className: 'btn-outline-primary btn-sm mr-1'
                   },
                   {
                       extend: 'copyHtml5',
                       text: 'Copy',
                       titleAttr: 'Copy to clipboard',
                       className: 'btn-outline-primary btn-sm mr-1'
                   },
                   {
                       extend: 'print',
                       text: 'Print',
                       titleAttr: 'Print Table',
                       className: 'btn-outline-primary btn-sm'
                   }
               ],
           });
       $('.js-thead-colors a').on('click', function () {
           var theadColor = $(this).attr("data-bg");
           console.log(theadColor);
           $('#dt-basic-example thead').removeClassPrefix('bg-').addClass(theadColor);
       });

       $('.js-tbody-colors a').on('click', function () {
           var theadColor = $(this).attr("data-bg");
           console.log(theadColor);
           $('#dt-basic-example').removeClassPrefix('bg-').addClass(theadColor);
       });

   });

</script>
<script>
   $(document).ready(function()
   {
       $(function()
       {
           $('.select2').select2();

           $(".select2-placeholder-multiple").select2(
           {
               placeholder: "Select State"
           });
           $(".js-hide-search").select2(
           {
               minimumResultsForSearch: 1 / 0
           });
           $(".js-max-length").select2(
           {
               maximumSelectionLength: 2,
               placeholder: "Select maximum 2 items"
           });
           $(".select2-placeholder").select2(
           {
               placeholder: "Select a state",
               allowClear: true
           });

           $(".js-select2-icons").select2(
           {
               minimumResultsForSearch: 1 / 0,
               templateResult: icon,
               templateSelection: icon,
               escapeMarkup: function(elm)
               {
                   return elm
               }
           });

           function icon(elm)
           {
               elm.element;
               return elm.id ? "<i class='" + $(elm.element).data("icon") + " mr-2'></i>" + elm.text : elm.text
           }

           $(".js-data-example-ajax").select2(
           {
               ajax:
               {
                   url: "https://api.github.com/search/repositories",
                   dataType: 'json',
                   delay: 250,
                   data: function(params)
                   {
                       return {
                           q: params.term, // search term
                           page: params.page
                       };
                   },
                   processResults: function(data, params)
                   {
                       // parse the results into the format expected by Select2
                       // since we are using custom formatting functions we do not need to
                       // alter the remote JSON data, except to indicate that infinite
                       // scrolling can be used
                       params.page = params.page || 1;

                       return {
                           results: data.items,
                           pagination:
                           {
                               more: (params.page * 30) < data.total_count
                           }
                       };
                   },
                   cache: true
               },
               placeholder: 'Search for a repository',
               escapeMarkup: function(markup)
               {
                   return markup;
               }, // let our custom formatter work
               minimumInputLength: 1,
               templateResult: formatRepo,
               templateSelection: formatRepoSelection
           });

           function formatRepo(repo)
           {
               if (repo.loading)
               {
                   return repo.text;
               }

               var markup = "<div class='select2-result-repository clearfix d-flex'>" +
                   "<div class='select2-result-repository__avatar mr-2'><img src='" + repo.owner.avatar_url + "' class='width-2 height-2 mt-1 rounded' /></div>" +
                   "<div class='select2-result-repository__meta'>" +
                   "<div class='select2-result-repository__title fs-lg fw-500'>" + repo.full_name + "</div>";

               if (repo.description)
               {
                   markup += "<div class='select2-result-repository__description fs-xs opacity-80 mb-1'>" + repo.description + "</div>";
               }

               markup += "<div class='select2-result-repository__statistics d-flex fs-sm'>" +
                   "<div class='select2-result-repository__forks mr-2'><i class='fal fa-lightbulb'></i> " + repo.forks_count + " Forks</div>" +
                   "<div class='select2-result-repository__stargazers mr-2'><i class='fal fa-star'></i> " + repo.stargazers_count + " Stars</div>" +
                   "<div class='select2-result-repository__watchers mr-2'><i class='fal fa-eye'></i> " + repo.watchers_count + " Watchers</div>" +
                   "</div>" +
                   "</div></div>";

               return markup;
           }

           function formatRepoSelection(repo)
           {
               return repo.full_name || repo.text;
           }
       });
   });

</script>
<script>
   var autoSave = $('#autoSave');
   var interval;
   var timer = function()
   {
       interval = setInterval(function()
       {
           //start slide...
           if (autoSave.prop('checked'))
               saveToLocal();

           clearInterval(interval);
       }, 3000);
   };

   //save
   var saveToLocal = function()
   {
       localStorage.setItem('summernoteData', $('#saveToLocal').summernote("code"));
       console.log("saved");
   }

   //delete
   var removeFromLocal = function()
   {
       localStorage.removeItem("summernoteData");
       $('#saveToLocal').summernote('reset');
   }

   $(document).ready(function()
   {
       //init default
       $('.js-summernote').summernote(
       {
           height: 200,
           tabsize: 2,
           placeholder: "Type here...",
           dialogsFade: true,
           toolbar: [
               ['style', ['style']],
               ['font', ['strikethrough', 'superscript', 'subscript']],
               ['font', ['bold', 'italic', 'underline', 'clear']],
               ['fontsize', ['fontsize']],
               ['fontname', ['fontname']],
               ['color', ['color']],
               ['para', ['ul', 'ol', 'paragraph']],
               ['height', ['height']]
               ['table', ['table']],
               ['insert', ['link', 'picture', 'video']],
               ['view', ['fullscreen', 'codeview', 'help']]
           ],
           callbacks:
           {
               //restore from localStorage
               onInit: function(e)
               {
                   $('.js-summernote').summernote("code", localStorage.getItem("summernoteData"));
               },
               onChange: function(contents, $editable)
               {
                   clearInterval(interval);
                   timer();
               }
           }
       });

       //load emojis
       $.ajax(
       {
           url: 'https://api.github.com/emojis',
           async: false
       }).then(function(data)
       {
           window.emojis = Object.keys(data);
           window.emojiUrls = data;
       });

       //init emoji example
       $(".js-hint2emoji").summernote(
       {
           height: 100,
           toolbar: false,
           placeholder: 'type starting with : and any alphabet',
           hint:
           {
               match: /:([\-+\w]+)$/,
               search: function(keyword, callback)
               {
                   callback($.grep(emojis, function(item)
                   {
                       return item.indexOf(keyword) === 0;
                   }));
               },
               template: function(item)
               {
                   var content = emojiUrls[item];
                   return '<img src="' + content + '" width="20" /> :' + item + ':';
               },
               content: function(item)
               {
                   var url = emojiUrls[item];
                   if (url)
                   {
                       return $('<img />').attr('src', url).css('width', 20)[0];
                   }
                   return '';
               }
           }
       });

       //init mentions example
       $(".js-hint2mention").summernote(
       {
           height: 100,
           toolbar: false,
           placeholder: "type starting with @",
           hint:
           {
               mentions: ['jayden', 'sam', 'alvin', 'david'],
               match: /\B@(\w*)$/,
               search: function(keyword, callback)
               {
                   callback($.grep(this.mentions, function(item)
                   {
                       return item.indexOf(keyword) == 0;
                   }));
               },
               content: function(item)
               {
                   return '@' + item;
               }
           }
       });

   });

</script>
<script type="text/javascript">
   $(".show-table").click(function(){
       $(".hide-table").show();
   });

</script>
<style>
   @media print {
   body * {
   visibility: hidden;
   }
   .modal-body * {
   visibility: visible;
   overflow: visible;
   }


   }
</style>

<!-- Check Emp -->
<script>

   function  Check(){

   var Emp = $('#Emp').val();
   var Month = $('#Month').val();

                     if(Emp) {
                         $.ajax({
                             url: 'NewEmpCheckSalary/'+Emp+'/'+Month,
                             type:"GET",
                             dataType:"json",
                             beforeSend: function(){
                                 $('#loader').css("visibility", "visible");
                             },

                             success:function(data) {
                                 $.each(data, function(key, value){

                       $('#TotalBorrow').val(data.Total);
                       $('#TotalBorrowHide').val(data.Total);
                       $('#Salary').val(data.Salary);
                       $('#SalaryHide').val(data.Salary);
                       $('#Deduction').val(data.Dedu);
                       $('#DeductionHide').val(data.Dedu);
                       $('#Entitlement').val(data.Entit);
                       $('#EntitlementHide').val(data.Entit);
                       $('#Loan').val(data.Loan);
                       $('#LoanHide').val(data.Loan);
                       $('#Overtime').val(data.Over);
                       $('#OvertimeHide').val(data.Over);
                       $('#Attendence_Hours').val(data.HWork);
                       $('#Attendence_HoursHide').val(data.HWork);
                       $('#Attendence').val(data.Att);
                       $('#AttendenceHide').val(data.Att);
                       $('#Attendence_Discount').val(data.AttDisc);
                       $('#Attendence_DiscountHide').val(data.AttDisc);
                       $('#Holidays').val(data.Holi);
                       $('#HolidaysHide').val(data.Holi);
                       $('#Holiday_Discount').val(data.HoliDisc);
                       $('#Holiday_DiscountHide').val(data.HoliDisc);
                       $('#SettlementsHide').val(data.Settle);
                       $('#Settlements').val(data.Settle);
                       $('#Later_Sales_Bill').val(data.later);
                       $('#Later_Sales_BillHide').val(data.later);
                       $('#Allowances').val(data.Allowances);
                       $('#Discounts').val(data.Discounts);
                       $('#ProducationPoints').val(data.Points);
                       $('#DiscountLate').val(data.DiscountLate);
                       $('#DiscountDeparture').val(data.DiscountDeparture);
          $('#HoursValue').val(data.HoursValue);
                       $('#FinValue').val(data.FinValue);

        var  Borrow=  $('#TotalBorrow').val();
         var  Salary=  $('#Salary').val();
        var  Deduction=  $('#Deduction').val();
        var  Entitlement=  $('#Entitlement').val();
        var  Loan=  $('#Loan').val();
        var  Overtime=  $('#Overtime').val();
       var  Attendence_Discount=  $('#Attendence_Discount').val();
       var  Holiday_Discount=   $('#Holiday_Discount').val();
       var  Settlements=   $('#Settlements').val();
       var  Later_Sales_Bill=   $('#Later_Sales_Bill').val();
       var  Allowances=   $('#Allowances').val();
       var  Discounts=   $('#Discounts').val();
       var  ProducationPoints=   $('#ProducationPoints').val();
       var  DiscountLate=   $('#DiscountLate').val();
       var  DiscountDeparture=   $('#DiscountDeparture').val();



        var result =

   ( parseFloat(Salary) +  parseFloat(Entitlement) + parseFloat(Overtime) + parseFloat(Allowances) + parseFloat(ProducationPoints) )

            -

    ( parseFloat(Borrow) + parseFloat(Deduction) + parseFloat(Loan) + parseFloat(Attendence_Discount) + parseFloat(Holiday_Discount) + parseFloat(Settlements) + parseFloat(Later_Sales_Bill) + parseFloat(Discounts) + parseFloat(DiscountLate) + parseFloat(DiscountDeparture))

        ;

                $('#Resduial_Salary').val(parseFloat(result).toFixed(2));
                $('#Resduial_SalaryHide').val(parseFloat(result).toFixed(2));


                                 });



                             }
                                 });
                     }
   }


</script>

@endpush
