policybot/application/views/index.php
2021-11-30 16:26:55 +05:30

243 lines
9.7 KiB
PHP

<?php include('includes/header.php')?>
<?php include('includes/sidebar.php')?>
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
<!-- BEGIN CONTENT BODY -->
<div class="page-content">
<!-- BEGIN PAGE HEADER-->
<!-- BEGIN THEME PANEL -->
<!-- END THEME PANEL -->
<h1 class="page-title"> Negamam CPCL Dashboard
<small>statistics, charts, recent events and reports</small>
</h1>
<div class="page-bar">
<ul class="page-breadcrumb">
<li>
<i class="icon-home"></i>
<a href="index.html">Home</a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<span>Dashboard</span>
</li>
</ul>
</div>
<?php include('includes/msg.php')?>
<!-- END PAGE HEADER-->
<!-- BEGIN DASHBOARD STATS 1-->
<?php if(isset($bus) && $bus->num_rows()>0)
{
$resultbb=$bus->row();
$bus_tot=$resultbb->bus_tot;
}
if(isset($mat) && $mat->num_rows()>0)
{
$resultmm=$mat->row();
$mat_tot=$resultmm->mat_tot;
}
if(isset($emp) && $emp->num_rows()>0)
{
$resultem=$emp->row();
$emp_tot=$resultem->emp_tot;
}
if(isset($prod) && $prod->num_rows()>0)
{
$resultprod=$prod->row();
$prod_tot=$resultprod->prod_tot;
}
?>
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a class="dashboard-stat dashboard-stat-v2 blue" href="#">
<div class="visual">
<i class="fa fa-comments"></i>
</div>
<div class="details">
<div class="number">
<span data-counter="counterup" data-value="<?=$bus_tot;?>"><?=$bus_tot;?></span>
</div>
<div class="desc"> Total Bussiness </div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a class="dashboard-stat dashboard-stat-v2 red" href="#">
<div class="visual">
<i class="fa fa-bar-chart-o"></i>
</div>
<div class="details">
<div class="number">
<span data-counter="counterup" data-value="<?=$mat_tot;?>"><?=$mat_tot;?></span> </div>
<div class="desc"> Total Materials </div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a class="dashboard-stat dashboard-stat-v2 green" href="#">
<div class="visual">
<i class="fa fa-shopping-cart"></i>
</div>
<div class="details">
<div class="number">
<span data-counter="counterup" data-value="<?=$emp_tot;?>"><?=$emp_tot;?></span>
</div>
<div class="desc"> Total Employee </div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a class="dashboard-stat dashboard-stat-v2 purple" href="#">
<div class="visual">
<i class="fa fa-globe"></i>
</div>
<div class="details">
<div class="number">
<span data-counter="counterup" data-value="<?=$prod_tot;?>"></span><?=$prod_tot;?> </div>
<div class="desc"> Completed Productions </div>
</div>
</a>
</div>
</div>
<div class="portlet box green-seagreen">
<div class="portlet-title">
<div class="caption">Daybook details for all bussiness units</div>
</div>
<div class="portlet-body form">
<div class="form-body">
<div class="row">
<div class="col-md-12">
<div class="col-md-12" style="padding-bottom:20px">
<div class="form-group ">
<h3 style="text-align:center">MY DAYBOOK FOR <span style="color:red"><?=date('d-m-Y');?></span></h3>
</div>
</div>
</div>
</div>
<?php
if(isset($day_purchase) && $day_purchase->num_rows()>0)
{
$result=$day_purchase->row();
$pur_tot=$result->pur_tot;
}
if(isset($day_sales) && $day_sales->num_rows()>0)
{
$results=$day_sales->row();
$sal_tot=$results->sal_tot;
}$exp_tots=array();
if(isset($day_exp) && $day_exp->num_rows()>0)
{
foreach($day_exp->result() as $resulte){
$exp_tots[]=$resulte->voucher_amt_dr;
}
}
if(isset($day_inc) && $day_inc->num_rows()>0)
{
$resulti=$day_inc->row();
$inc_tot=$resulti->inc_tot;
}
if(isset($day_ass) && $day_ass->num_rows()>0)
{
$resulta=$day_ass->row();
$ass_tot=$resulta->ass_tot;
}
//$ass_tot=0;
$exp_tot=array_sum($exp_tots);
$left_tot=$exp_tot;
$right_tot=$inc_tot+$ass_tot;
?>
<div class="row">
<div class=" col-md-12" >
<div class="col-md-6" style="font-weight:bold;border-top-left-radius: 30px !important;border-top-right-radius: 15px !important;padding-top:20px;border-left:1px solid #ddd;border-top:1px solid #ddd;border-left-width: thick;">
<div class="form-group col-md-12">
<div class="col-md-5"> Purchase </div>
<div class="col-md-2"> : </div>
<div class="col-md-5" style="text-align:right"> <?=number_format($pur_tot,2);?> </div>
</div>
<div class="form-group col-md-12">
<div class="col-md-5"> Expenses </div>
<div class="col-md-2"> : </div>
<div class="col-md-5" style="text-align:right"> <?=number_format($exp_tot,2);?> </div>
</div>
<div class="form-group col-md-12" style="height:19px">
</div>
</div>
<div class="col-md-6" style="font-weight:bold;border-top-left-radius: 15px !important;border-top-right-radius: 30px !important;padding-top:20px;border-top:1px solid #ddd;border-right:1px solid #ddd;border-right-width: thick;">
<div class="form-group col-md-12">
<div class="col-md-5"> Sales </div>
<div class="col-md-2"> : </div>
<div class="col-md-5" style="text-align:right"> <?=number_format($sal_tot,2);?> </div>
</div>
<div class="form-group col-md-12">
<div class="col-md-5"> Income </div>
<div class="col-md-2"> : </div>
<div class="col-md-5" style="text-align:right"> <?=number_format($inc_tot,2);?> </div>
</div>
<div class="form-group col-md-12">
<div class="col-md-5"> Assets </div>
<div class="col-md-2"> : </div>
<div class="col-md-5" style="text-align:right"> <?=number_format($ass_tot,2);?> </div>
</div>
</div>
</div>
<div class=" col-md-12" style="padding-bottom:30px">
<div class="col-md-6" style="font-weight:bold;color:red;border-bottom-right-radius: 15px !important;border-bottom-left-radius: 30px !important;border-left:1px solid #ddd;border-bottom:1px solid #ddd;border-left-width: thick;">
<div class="form-group col-md-12">
<hr>
</div>
<div class="form-group col-md-12">
<div class="col-md-5">Total </div>
<div class="col-md-2">: </div>
<div class="col-md-5" style="text-align:right"><?=number_format($left_tot,2);?> </div>
</div>
</div>
<div class="col-md-6" style="font-weight:bold;color:red;border-bottom-right-radius: 30px !important; border-bottom-left-radius: 15px !important;border-bottom:1px solid #ddd;border-right:1px solid #ddd;border-right-width: thick;">
<div class="form-group col-md-12">
<hr>
</div>
<div class="form-group col-md-12">
<div class="col-md-5">Total </div>
<div class="col-md-2">: </div>
<div class="col-md-5" style="text-align:right"><?=number_format($right_tot,2);?> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END QUICK SIDEBAR -->
</div>
<!-- END CONTAINER -->
<?php include('includes/footer.php')?>