Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
7.7 kB
1
Indexable
Never
<!-- JAVASCRIPT -->
<script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/libs/simplebar/simplebar.min.js"></script>
<script src="assets/libs/node-waves/waves.min.js"></script>
<script src="assets/libs/feather-icons/feather.min.js"></script>
<script src="assets/js/pages/plugins/lord-icon-2.1.0.js"></script>
<script src="assets/js/plugins.js"></script>

<!-- apexcharts -->
<script src="assets/libs/apexcharts/apexcharts.min.js"></script>

<!-- Dashboard init -->
<script src="assets/js/pages/dashboard-crm.init.js"></script>

    <!-- prismjs plugin -->
    <script src="assets/libs/prismjs/prism.js"></script>


    <!-- <script src="../../../../code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> -->

    <!--datatable js-->
    <!-- <script src="../../../../cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
    <script src="../../../../cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
    <script src="../../../../cdn.datatables.net/responsive/2.2.9/js/dataTables.responsive.min.js"></script>
    <script src="../../../../cdn.datatables.net/buttons/2.2.2/js/dataTables.buttons.min.js"></script>
    <script src="../../../../cdn.datatables.net/buttons/2.2.2/js/buttons.print.min.js"></script>
    <script src="../../../../cdn.datatables.net/buttons/2.2.2/js/buttons.html5.min.js"></script>
    <script src="../../../../cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
    <script src="../../../../cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
    <script src="../../../../cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> -->

    <script src="assets/js/pages/datatables.init.js"></script>

    <script type="text/javascript" src="assets/libs/flatpickr/flatpickr.min.js"></script>
   

    <!-- Modal Js -->
    <script src="assets/js/pages/modal.init.js"></script>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<!-- App js -->
<script src="assets/js/layout.js"></script>
<script src="assets/js/admin.js"></script>
<script src="assets/js/app.js"></script>
<script src="assets/js/home.js"></script>
<script src="https://kit.fontawesome.com/6593130ea9.js" crossorigin="anonymous"></script>
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>

<script>
const dateInput = document.getElementById('as_on_date');
const currentDate = new Date();
const year = currentDate.getFullYear();
const month = ('0' + (currentDate.getMonth() + 1)).slice(-2); // add leading zero and slice last two characters
const day = ('0' + currentDate.getDate()).slice(-2); // add leading zero and slice last two characters
dateInput.value = `${day}-${month}-${year}`;

function opencalender_as_on_date() {
  let input=document.getElementById('as_on_date');
  input.focus();
  $("#as_on_date_err").html(""); 
}
function opencalender_from_date() {
  let input=document.getElementById('from_date');
  input.focus(); 
  $("#from_date_err").html(""); 
}
function opencalender_to_date() {
  let input=document.getElementById('to_date');
  input.focus();
  $("#to_date_err").html("");   
}
  </script>
  <link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
  <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
   <script>        
    //   $(function(){    
    //      $("#client_code").autocomplete({            
    //      source:function(req,res){            
    //          $.ajax({     
    //              url: 'client-master-search',            
    //              dataType: "jsonp",            
    //              type: 'GET',            
    //              data:req,                  
    //              success: function (data){
    //                  if(data[0].name != undefined && data[0].name){
    //                      res(data)    
    //                  }else{
    //                  $("#client_code").html("")        
    //                  }                      
    //              },            
    //              error: function (err) {            
    //                  console.log(err);            
    //              }
    //          });            
    //      },
    //      minLength:1,            
    //      select:function(event,ui){            
    //          if(ui.item){            
    //              // $("#txt1").text(ui.item.BackOfficeLogin);    
    //              $("#client_code").val(ui.item.name)            
    //          }            
    //      }            
    //      })  
    //  })
    const fromDateInput = document.getElementById("from_date");
    const toDateInput = document.getElementById("to_date");
const fromDateErrorSpan = document.getElementById("from_date_err");
const toDateErrorSpan = document.getElementById("to_date_err");

fromDateInput.addEventListener("click", function() {
  fromDateErrorSpan.innerHTML = "";
});
toDateInput.addEventListener("click", function() {
  toDateErrorSpan.innerHTML = "";
});


     function mode()
     {
        let themecode=sessionStorage.getItem("data-layout-mode");
        if(themecode=="dark"){ 
          sessionStorage.setItem("data-layout-mode", "light");
          sessionStorage.setItem("data-sidebar", "light");  
        }
        else{
          sessionStorage.setItem("data-layout-mode", "dark");
          sessionStorage.setItem("data-sidebar", "dark");
        }
       
     }
    
     </script>
     <script>
      let dateInputBrokerage = document.getElementById('to_date');
      let currentDateBrokerage = new Date();
      let yearBrokerage = currentDate.getFullYear();
      let monthBrokerage = ('0' + (currentDate.getMonth() + 1)).slice(-2); // add leading zero and slice last two characters
      let dayBrokerage = ('0' + currentDate.getDate()).slice(-2); // add leading zero and slice last two characters
      dateInputBrokerage.value = `${day}-${month}-${year}`;
      
  function opencalender_to_date() {
    let input=document.getElementById('to_date');
    input.focus();
  }
     </script>



<script>
  // Initialize flatpickr for the "from_date" input
 

  $( document ).ready(function() {
    let fromDateInput1 = document.getElementById("from_date");
    let toDateInput1 = document.getElementById("to_date");
    let currentDateBrokerage = new Date();
      let yearBrokerage = currentDate.getFullYear();
      let monthBrokerage = ('0' + (currentDate.getMonth() + 1)).slice(-2); // add leading zero and slice last two characters
      let dayBrokerage = ('0' + currentDate.getDate()).slice(-2); // add leading zero and slice last two characters
      toDateInput1.value = `${day}-${month}-${year}`;
      let dateStr=`${day}-${month}-${year}`;
      // console.log(dateStr);
      fromDateInput1._flatpickr.set("maxDate", dateStr);
});
      

let fromDateInput1 = document.getElementById("from_date");
  let toDateInput1 = document.getElementById("to_date");

  flatpickr(fromDateInput1, {
      dateFormat: "d-m-Y",
      onChange: function(selectedDates, dateStr) {
        console.log(dateStr)
          toDateInput1._flatpickr.set("minDate", dateStr);
      }
  });

  flatpickr(toDateInput1, {
      dateFormat: "d-m-Y",
      onChange: function(selectedDates, dateStr) {
        console.log(dateStr)
          fromDateInput1._flatpickr.set("maxDate", dateStr);
      }
  });
</script>