PK

ADDRLIN : /home/questend/www/subdomain/trufflenation.questend.com/admin/accounts/
FLL :
Current File : /home/questend/www/subdomain/trufflenation.questend.com/admin/accounts/index.php

<?php
   ob_start();
   //error_reporting(E_ALL ^ E_NOTICE);
   @session_start();
   ini_set('allow_url_include',1);    
   date_default_timezone_set("Asia/Kolkata");
   set_time_limit(600);
   ini_set('max_execution_time',600);
   include '../includes/settings/constant.php';
   require_once '../includes/settings/PDODB.php';
   include '../includes/modules/functions.php';

   $function = new FUNCTIONS();

    if (!empty($_SESSION['adminId']) && !empty($_SESSION['admin_role_id'])) {
        if($_SESSION['admin_role_id']==1){
          //header("Location: index.php");
        }elseif($_SESSION['admin_role_id']==2){
          header("Location: ../dashboard/index.php");
        }
    }else{
        header("Location: ../index.php");
        exit();
    }
   
    $user = $function->getStudent($id=NULL,$isActive=1,$orderBy='DESC');    
    //print_r($account); exit;
    
    if(isset($_POST['acsearch'])){
      //print_r($from_date); exit;
      $from_date = !empty($_POST['from_date'])?$_POST['from_date']:"";
      $to_date = !empty($_POST['to_date'])?$_POST['to_date']:"";

      if(!empty($from_date) && !empty($to_date)){          
          $account = $function->getAllAccountDetails($uid=NULL,$orderid='',$is_adjustment=1,$isactive=1,$from_date=$from_date,$to_date=$to_date,$orderBy='DESC');          
      }else{
          
      }
    }else{
      //echo "else"; //exit;
      $account = $function->getAllAccountDetails($uid=NULL,$orderid='',$is_adjustment=1,$isactive=1,$from_date=NULL,$to_date=NULL,$orderBy='DESC');
    }
   
    if(!empty($_GET['id']) && ($_GET['action']=='Del')) {
      //print_r($_GET['id']); exit;
      $id=$_GET['id'];
      $pdodb = PDODB::getInstance();
      $sql = "UPDATE `tn_accounts` SET isActive=0 WHERE ac_id = '".$id."'";
      $result = $pdodb->query($sql);
      PDODB::closeInstance();
      if(!empty($result)){
        echo '<script type="text/javascript">location.replace("index.php");</script>';
      }
    }
?>
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Admin Panel | Account -  Payments List</title>
      <?php include_once '../layout/style.php'; ?>
   </head>
   <body>
      <div id="wrapper">
        <?php $currentPage = 'payments-list'; include_once '../layout/side-bar.php'; ?>
         <div id="page-wrapper" class="gray-bg">
            <?php include_once '../layout/header.php'; ?>
            <div class="row wrapper border-bottom white-bg page-heading">
               <div class="col-sm-6">
                  <h2>Payments History List</h2>                
               </div>
               <div class="col-sm-6">
                <form method="POST" action="" autocomplete="off">
                  <div class="form-group" id="data_5">
                    <label class="font-noraml">Range select</label>
                    <div class="input-daterange input-group" id="datepicker">
                      <input type="text" class="input-sm form-control" id="from_date" name="from_date" value=""/>
                      <span class="input-group-addon">to</span>
                      <input type="text" class="input-sm form-control" id="to_date" name="to_date" value="" />
                    </div>
                    <div class="form-group" style="margin-top: 10px;">
                     <button class="btn btn-sm btn-primary" name="acsearch" id="acsearch">Search</button>
                     <a href="" class="btn btn-sm btn-primary">Clear</a>
                    </div>
                  </div>
                </form>
               </div>               
            </div>           
            <div class="row">
               <div class="col-lg-12">
                  <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered table-hover dataTables-example" id="editable">
                              <thead>
                                <tr>
                                  <th>S.No</th>
                                  <th>Receipt No</th>
                                  <th>GST No</th> 
                                  <th>Name</th>
                                  <th>Taxable Amount</th>
                                  <th>CGST</th>
                                  <th>SGST</th>
                                  <th>IGST</th>
                                  <th>State</th>
                                  <th>Total</th>
                                  <th>Pay Mode</th>
                                  <th>BankName</th>
                                  <th>Chq. no</th>                                  
                                  <th>Date</th>
                                </tr>
                              </thead>
                              <tbody>
                                <?php
                                  $i=0;
                                  $totamt =0;
                                  foreach ($account as $key => $value) {
                                    if (!empty($value['paymentMode'])) {
                                        $totamt += (int)$value['credit'];
                                        /*foreach ($user as $isKey => $isValue) {
                                          if($value['uid']==$isValue['id']){
                                            $name = $isValue['username'];
                                            $mobileno = $isValue['mobileno'];
                                          }
                                        }*/
                                        if (!empty($value['gstNo'])) {
                                            $name =$value['companyName'];
                                            $state =$value['companyState'];

                                            $statename = $function->getStateList($id=$state,$isActive=1);
                                            $statename  = $statename[0]['state'];

                                            $percent = '18';
                                            $amount = $value['credit'];
                                            $gstamt = $amount-($amount*(100/(100+$percent)));
                                            $total = number_format(round($amount-$gstamt));
                                            $amount = number_format($amount);
                                            if ($state==9) {
                                                $cgstamt = number_format(round($gstamt/2));
                                                $sgstamt = number_format(round($gstamt/2));
                                                $igstamt = "";
                                            }else {
                                                $igstamt = number_format(round($gstamt));
                                                $cgstamt = "";
                                                $sgstamt = "";
                                            }
                                        }else {
                                            $name =$value['studentName'];
                                            $state =$value['studentState'];
                                            $statename = $function->getStateList($id=$state,$isActive=1);
                                            $statename  = $statename[0]['state'];

                                            $percent = '18';
                                            $amount = $value['credit'];
                                            $gstamt = $amount-($amount*(100/(100+$percent)));
                                            $total = number_format(round($amount-$gstamt));
                                            $amount = number_format($amount);
                                            if ($state==9) {
                                                $cgstamt = number_format(round($gstamt/2));
                                                $sgstamt = number_format(round($gstamt/2));
                                                $igstamt = "";
                                            }else {
                                                $igstamt = number_format(round($gstamt));
                                                $cgstamt = "";
                                                $sgstamt = "";
                                            }
                                        }
                                  $i++;
                                ?>
                                <tr>
                                   <td><?=$i;?></td>
                                   <td class="center"><?=$value['invoice'];?></td>
                                   <td class="center"><?=$value['gstNo'];?></td>
                                   <td class="center"><?=$name;?></td>

                                   <td class="center"><?=$total;?></td>
                                   <td class="center"><?=$cgstamt;?></td>
                                   <td class="center"><?=$sgstamt;?></td>
                                   <td class="center"><?=$igstamt;?></td>

                                   <td class="center"><?=$statename;?></td>
                                   <td class="center"><?=$value['credit'];?></td>
                                   <td class="center"><?=$value['paymentMode'];?></td>
                                   <td class="center"><?=$value['bankname'];?></td>
                                   <td class="center"><?=$value['chequeno'];?></td>
                                   <td class="center"><?=date('jS M, Y', strtotime($value['date']));?></td>
                                </tr>
                                <?php } }
                                  $chq_totamt = 0;
                                  $cash_totamt = 0;
                                  $online_totamt = 0;
                                  foreach ($account as $key => $value) {
                                    if($value['paymentMode']=='Cheque') {
                                      $chq_totamt += (int)$value['credit'];
                                    }elseif($value['paymentMode']=='Cash'){
                                      $cash_totamt += (int)$value['credit'];
                                    }else{
                                      $online_totamt += (int)$value['credit'];
                                    }                                   
                                  }
                                ?>                                
                             </tbody>
                            </table>
                            <div><b>
                              Total Amount = <?=$totamt;?>
                              <br>
                              Total Cheque Amount = <?=$chq_totamt;?>
                              <br>
                              Total Cash Amount = <?=$cash_totamt;?>
                              <br>
                              Total Online Amount = <?=$online_totamt;?>
                              </b>
                            </div>
                        </div>
                    </div>
                </div>
               </div>
            </div>
         </div>         
      </div>
      <?php include_once '../layout/script.php'; ?>
      <script type="text/javascript">
        $('#data_5 .input-daterange').datepicker({
            keyboardNavigation: false,
            forceParse: false,
            autoclose: true
        });
      </script>
      <script>
         function tossterMsgAlert(msg='Welcome',title='') {
             toastr.options = {
                 closeButton: true,
                 //debug: false,
                 newestOnTop: false,
                 //progressBar: false,
                 positionClass: 'toast-top-center',
                 preventDuplicates: true,
                 //onclick: null,
                 //showDuration: 300,
                 //hideDuration: 1000,
                 timeOut: 2000,
                 //extendedTimeOut: 1000,
                 //showEasing: 'swing',
                 //hideEasing: 'linear',
                 //showMethod: 'fadeIn',
                 hideMethod: 'fadeOut'
             };
             toastr.warning(title,msg);
         }
      </script>
      <!-- Page-Level Scripts -->
      <script>
        $(document).ready(function(){
            $('.dataTables-example').DataTable({
                dom: '<"html5buttons"B>lTfgitp',
                columnDefs: [
                    { type: "num-fmt", symbols:"R$" , targets: 4 }
                ],
                buttons: [
                    { extend: 'copy'},
                    {extend: 'csv'},
                    /*{extend: 'excel', title: 'ExampleFile'},
                    {extend: 'pdf', title: 'ExampleFile'},*/
                    /*{extend: 'print',
                     customize: function (win){
                        $(win.document.body).addClass('white-bg');
                        $(win.document.body).css('font-size', '10px');
                        $(win.document.body).find('table')
                            .addClass('compact')
                            .css('font-size', 'inherit');
                        }
                    }*/
                ]    
            });
            //calender
            $('#data_5 .input-daterange').datepicker({
                keyboardNavigation: false,
                forceParse: false,
                autoclose: true
            });
        });
      </script>
   </body>
</html>


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

It looks like you found a glitch in the matrix...

← Back to Home