ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/lilyexpresslive/expense-invoice/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/lilyexpresslive/expense-invoice/index.php

<?php  include "header.php";?>
<div class="content-wrapper">
        <section class="content-header">
            <h1>Dashboard</h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                <li class="active">Dashboard</li>            </ol>
        </section>        

<!--SELECT sum(amount) as total_cash,(select sum(amount) from tbl_expense) as total_expense,sum(amount)-(select sum(amount) from tbl_expense) as total_balance FROM `tbl_cash`-->
<!--SELECT sum(amount) as total_cash,(select sum(amount) from tbl_expense) as total_expense,sum(amount)-(select sum(amount) from tbl_expense) as total_balance 
,(select sum(amount) from tbl_expense where payment_method='Cash') as expense_cash
,(select sum(amount) from tbl_expense where payment_method!='Cash') as expense_online
,(select sum(amount) from tbl_cash where type=1) as cash_credit
,(select sum(amount) from tbl_cash where type!=1) as online_credit
FROM `tbl_cash`-->

<?php 
    $statement = $pdo->prepare("SELECT COALESCE(SUM(amount),0) as total_cash,(select COALESCE(SUM(amount),0) from tbl_expense) as total_expense,COALESCE(SUM(amount),0)-(select COALESCE(SUM(amount),0) from tbl_expense) as total_balance 
,(select COALESCE(SUM(amount),0) from tbl_expense where payment_method='Cash') as expense_cash
,(select COALESCE(SUM(amount),0) from tbl_expense where payment_method!='Cash') as expense_online
,(select COALESCE(SUM(amount),0) from tbl_cash where type=1) as cash_credit
,(select COALESCE(SUM(amount),0) from tbl_cash where type!=1) as online_credit
FROM `tbl_cash`");
    $statement->execute();
    $home_expense_data = $statement->fetchAll(PDO::FETCH_ASSOC);
    
    $statement = $pdo->prepare("SELECT sum(final_amount) as total,(select sum(amount) from tbl_invoice_payment WHERE type=1) as paid,(select sum(amount) from tbl_invoice_payment WHERE type=2) as reduction FROM `tbl_invoice`");
    $statement->execute();
    $home_invoice_data = $statement->fetchAll(PDO::FETCH_ASSOC);
    
     $statement = $pdo->prepare("SELECT sum(final_amount) as total,(select sum(amount) from tbl_vendor_invoice_payment WHERE type=1) as paid,(select sum(amount) from tbl_vendor_invoice_payment WHERE type=2) as reduction FROM `tbl_vendor_invoice`");
    $statement->execute();
    $home_vendor_invoice_data = $statement->fetchAll(PDO::FETCH_ASSOC);
?>

        <div class="box-body">
                    <?php if($allPermissions['expense']['read']=="1"){ ?> <div class="col-sm-6" style="padding:2px;">
                            
                            <center><b style="font-size:20px;">Expense Details</b></center>
                             <div class="col-sm-12" style="border: 2px solid cyan;padding: 5px;border-radius: 10px">
                                 <!--<center><b style="font-size:18px;">Today</b></center>-->
                                <div class="col-sm-4 col-xl-3" >
                                    <div style="background-color: #26195a;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_expense_data[0]['total_cash'], 2, '.', '');?><br>
                                    Total Credit Amt
                                    </div>
                                    <!--<b>Cash Credit &nbsp;&nbsp;: 1500.00<br>
                                    Card Credit &nbsp;&nbsp;: 1500.00<br>
                                    UPI Transfer : 1500.00<br>
                                    Acc Transfer  : 1500.00</b>-->
                                </div>
                                
                                <div class="col-sm-4 col-xl-3" >
                                    <div style="background-color: #971c55;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_expense_data[0]['total_expense'], 2, '.', '');?><br>
                                    Total Expense
                                    </div>
                                    <!-- <b>Cash Credit &nbsp;&nbsp;: 1500.00<br>
                                    Card Credit &nbsp;&nbsp;: 1500.00<br>
                                    UPI Transfer : 1500.00<br>
                                    Acc Transfer  : 1500.00</b>-->
                                </div>
                                
                                <div class="col-sm-4 col-xl-3" >
                                    <div style="background-color: #f67529;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_expense_data[0]['total_balance'], 2, '.', '');?><br>
                                    Total Balance
                                    </div>
                                    
                                </div>
                                <div class="col-sm-12 col-xl-12" style="margin-top:5px;">
                                    <div style="background-color: #782e2e;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    <b>Cash Balance &nbsp;&nbsp;: ₹ <?=number_format((float)$home_expense_data[0]['cash_credit']-$home_expense_data[0]['expense_cash'], 2, '.', '');?><br>
                                    Acc Balance &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: ₹ <?=number_format((float)$home_expense_data[0]['online_credit']-$home_expense_data[0]['expense_online'], 2, '.', '');?>
                                    </b>
                                    </div>
                                    
                                </div>
                                 
                            </div>

                 </div><?php } ?>
                    <?php if($allPermissions['invoice']['read']=="1"){ ?><div class="col-sm-6" style="padding:2px;">
                      
                           <center><b style="font-size:20px;">Invoice Payment Deatils</b></center>
                             <div class="col-sm-12" style="border: 2px solid cyan;padding: 5px;border-radius: 10px">
                                 <!--<center><b style="font-size:18px;">This Month</b></center>-->
                                <div class="col-sm-6 col-xl-3" >
                                    <div style="background-color: #29b6f6;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_invoice_data[0]['total'], 2, '.', '');?><br>
                                    Total Amount
                                    </div>
                                </div>
                                
                                <div class="col-sm-6 col-xl-3" >
                                    <div style="background-color: #f62988;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_invoice_data[0]['paid'], 2, '.', '');?><br>
                                    Total Received
                                    </div>
                                </div>
                                
                                <div class="col-sm-6 col-xl-3" style="margin-top:5px;">
                                    <div style="background-color: #f67529;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)($home_invoice_data[0]['total']-($home_invoice_data[0]['paid']+$home_invoice_data[0]['reduction'])), 2, '.', '');?><br>
                                    Total Balance
                                    </div>
                                </div>
                                <div class="col-sm-6 col-xl-3" style="margin-top:5px;">
                                    <div style="background-color: #483866;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_invoice_data[0]['reduction'], 2, '.', '');?><br>
                                    Total Reduction
                                    </div>
                                </div>
                            </div>
   
                        
                    </div><?php } ?>
                    
                    <?php if($allPermissions['vendor_invoice']['read']=="1"){ ?><div class="col-sm-6" style="padding:2px;" hidden>
                      
                           <center><b style="font-size:20px;">Vendor Invoice Payment Deatils</b></center>
                             <div class="col-sm-12" style="border: 2px solid cyan;padding: 5px;border-radius: 10px">
                                 <!--<center><b style="font-size:18px;">This Month</b></center>-->
                                <div class="col-sm-6 col-xl-3" >
                                    <div style="background-color: #29b6f6;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_vendor_invoice_data[0]['total'], 2, '.', '');?><br>
                                    Total Amount
                                    </div>
                                </div>
                                
                                <div class="col-sm-6 col-xl-3" >
                                    <div style="background-color: #f62988;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_vendor_invoice_data[0]['paid'], 2, '.', '');?><br>
                                    Total Paid
                                    </div>
                                </div>
                                
                                <div class="col-sm-6 col-xl-3" style="margin-top:5px;">
                                    <div style="background-color: #f67529;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)($home_vendor_invoice_data[0]['total']-($home_vendor_invoice_data[0]['paid']+$home_vendor_invoice_data[0]['reduction'])), 2, '.', '');?><br>
                                    Total Balance
                                    </div>
                                </div>
                                <div class="col-sm-6 col-xl-3" style="margin-top:5px;">
                                    <div style="background-color: #483866;padding:2px;text-align:center;font-size:16px;color:white;font-weight:900;border-radius: 5px;">
                                    ₹  <?=number_format((float)$home_vendor_invoice_data[0]['reduction'], 2, '.', '');?><br>
                                    Total Reduction
                                    </div>
                                </div>
                            </div>
   
                        
                    </div><?php } ?>
               
       </div>
        

<?php include "footer.php";?>

Zerion Mini Shell 1.0