473 lines
16 KiB
PHP
473 lines
16 KiB
PHP
|
|
|
|
<?php
|
|
$today_in='';
|
|
$today_ex='';
|
|
$month_in='';
|
|
$month_ex='';
|
|
$year_in='';
|
|
$year_ex='';
|
|
if(!empty($cashbook))
|
|
{
|
|
|
|
}
|
|
if(!empty($monthlyreport))
|
|
{
|
|
|
|
}
|
|
|
|
if(!empty($todayincome))
|
|
{
|
|
foreach ($todayincome as $ti)
|
|
{
|
|
$today_in=$ti->todaydata;
|
|
}}
|
|
|
|
if(!empty($todayexpense))
|
|
{
|
|
foreach ($todayexpense as $te)
|
|
{
|
|
$today_ex=$te->todaydata;
|
|
}}
|
|
|
|
if(!empty($monthlywiseincome))
|
|
{
|
|
foreach ($monthlywiseincome as $mi)
|
|
{
|
|
$month_in = $mi->monthlydata;
|
|
}}
|
|
|
|
if(!empty($monthlywiseexpense))
|
|
{
|
|
foreach ($monthlywiseexpense as $me)
|
|
{
|
|
$month_ex = $me->monthlydata;
|
|
}}
|
|
if(!empty($yearexpense))
|
|
{
|
|
foreach ($yearexpense as $ye)
|
|
{
|
|
$year_ex=$ye->yearlydata;
|
|
}}
|
|
|
|
if(!empty($yearincome))
|
|
{
|
|
foreach ($yearincome as $yi)
|
|
{
|
|
$year_in = $yi->yearlydata;
|
|
}}
|
|
|
|
$inrsymbol='';
|
|
if(!empty($Indiancurrency))
|
|
{
|
|
foreach ($Indiancurrency as $inr)
|
|
{
|
|
$inrsymbol = $inr->FontCode2000;
|
|
}}
|
|
|
|
|
|
?>
|
|
<head>
|
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
|
|
|
<link href="<?php echo base_url();?>assets/plugins/morris/morris.css" rel="stylesheet" type="text/css" />
|
|
|
|
</head>
|
|
<script>
|
|
/*!
|
|
DataTables Bootstrap 3 integration
|
|
©2011-2014 SpryMedia Ltd - datatables.net/license
|
|
*/
|
|
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-9'i><'col-sm-3'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
|
|
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="…";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
|
|
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
|
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
|
|
|
</script>
|
|
<style>
|
|
|
|
.dataTables_filter {
|
|
width: 50%;
|
|
float: right;
|
|
text-align: right;
|
|
}
|
|
.dataTables_paginate {
|
|
width: 50%;
|
|
float: right;
|
|
text-align: right;
|
|
}
|
|
div.dt-buttons {
|
|
position: relative;
|
|
float: right;
|
|
|
|
}
|
|
table{
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
clear: both;
|
|
border-collapse: collapse;
|
|
table-layout: fixed;
|
|
word-wrap:break-word;
|
|
|
|
}
|
|
|
|
th, td { white-space: nowrap; }
|
|
div.dataTables_wrapper {
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
div.container {
|
|
width: 100%;
|
|
}
|
|
|
|
.dataTables_paginate {
|
|
margin-top: -25px;
|
|
position: absolute;
|
|
text-align: right;
|
|
left: -20%;
|
|
}
|
|
|
|
#container {
|
|
min-width: 310px;
|
|
max-width: 800px;
|
|
height: 400px;
|
|
margin: 0 auto
|
|
}
|
|
|
|
|
|
</style>
|
|
<div>
|
|
<section class="content-header">
|
|
|
|
|
|
<!-- Main content -->
|
|
<section>
|
|
<!-- Info boxes -->
|
|
<center>
|
|
<div class="col-md-12">
|
|
|
|
<!-- fix for small devices only -->
|
|
<div class="clearfix visible-sm-block"></div>
|
|
<div class="col-md-4">
|
|
<div class="info-box">
|
|
<span class="info-box-icon bg-red" style="height: 90px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
|
|
<div class="info-box-content">
|
|
<span class="info-box-number"><a href="<?php echo base_url().'report/Viewtoday' ?>" data-toggle="tooltip" title="Click here to View Today's payments"><?php echo "Today's Payments" ?></a></span>
|
|
|
|
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($today_in,2,'.',''); ?> </span>
|
|
<span class="info-box-text text-center"><strong>Payments :</strong><?php echo $inrsymbol.number_format($today_ex,2,'.',''); ?> </span>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- fix for small devices only -->
|
|
<div class="clearfix visible-sm-block"></div>
|
|
<div class="col-md-4">
|
|
<div class="info-box">
|
|
<span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span>
|
|
<div class="info-box-content">
|
|
<span class="info-box-number"><a href="<?php echo base_url().'report/monthexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly payments"><?php echo "Monthly Payments" ?></a></span>
|
|
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($month_in,2,'.',''); ?></span>
|
|
<span class="info-box-text text-center"><strong>Payments :</strong><?php echo $inrsymbol.number_format($month_ex,2,'.',''); ?></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- fix for small devices only -->
|
|
<div class="clearfix visible-sm-block"></div>
|
|
<div class="col-md-4">
|
|
<div class="info-box">
|
|
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
|
|
<div class="info-box-content">
|
|
<span class="info-box-number"><a href="<?php echo base_url().'report/yearexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly payments"><?php echo "year Payments" ?></a></span>
|
|
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
|
|
<span class="info-box-text text-center"><strong>Payments :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</center>
|
|
|
|
</div>
|
|
|
|
|
|
<!--<div class="row">
|
|
<div class="col-md-12">
|
|
<div id="container"></div>
|
|
|
|
</div>
|
|
</div>-->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Left col -->
|
|
<div class="col-md-12">
|
|
<!-- TABLE: LATEST ORDERS -->
|
|
<div class="box box-info">
|
|
<!--<div class="box-header with-border">-->
|
|
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
|
|
<!--</div>-->
|
|
<!-- /.box-header -->
|
|
|
|
|
|
|
|
<CENTER><h3 class="box-title"><strong>Day Wise Payments</strong></h3></CENTER>
|
|
<div class="box-body">
|
|
<div>
|
|
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Date</th>
|
|
<!--<th>Account Code</th>-->
|
|
<th>Account Name</th>
|
|
<th>Paid To</th>
|
|
<th>Paid Type</th>
|
|
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
|
|
|
<th>Description</th>
|
|
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if(!empty($cashbook)){
|
|
foreach($cashbook as $cash)
|
|
{
|
|
?>
|
|
<tr>
|
|
|
|
<td><span><?php echo $cash->date?></span></td>
|
|
<td align="left"><span><?php echo $cash->name?></span></td>
|
|
<td align="left"><span><?php echo $cash->towhom?></span></td>
|
|
<td align="left"><span><?php echo $cash->type?></span></td>
|
|
<td align="right"><span><?php echo number_format($cash->total,2,'.','');?></span></td>
|
|
|
|
<td align="left"><span><?php echo $cash->description?></span></td>
|
|
|
|
|
|
|
|
</tr>
|
|
<?php
|
|
}
|
|
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
<!-- /.col -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
|
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
|
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
|
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
|
<script src="https://code.highcharts.com/highcharts.js"></script>
|
|
<script src="https://code.highcharts.com/modules/series-label.js"></script>
|
|
<script src="https://code.highcharts.com/modules/exporting.js"></script>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
table = $('#req').DataTable( {
|
|
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
|
buttons: [
|
|
{
|
|
extend: 'collection',
|
|
text: 'Export Cashbook Reports',
|
|
buttons: [
|
|
'excel'
|
|
]
|
|
}
|
|
]
|
|
} );
|
|
} );
|
|
</script>
|
|
<script src="<?php echo base_url();?>assets/plugins/chartjs/Chart.min.js"></script>
|
|
<script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script>
|
|
|
|
<script>
|
|
|
|
/* ChartJS
|
|
* -------
|
|
* Here we will create a few charts using ChartJS
|
|
*/
|
|
|
|
//-----------------------
|
|
//- MONTHLY SALES CHART -
|
|
//-----------------------
|
|
|
|
// Get context with jQuery - using jQuery's .get() method.
|
|
|
|
|
|
/* ChartJS
|
|
* -------
|
|
* Here we will create a few charts using ChartJS
|
|
*/
|
|
|
|
//-----------------------
|
|
//- MONTHLY SALES CHART -
|
|
//-----------------------
|
|
|
|
// Get context with jQuery - using jQuery's .get() method.
|
|
var salesChartCanvas = $("#salesChart").get(0).getContext("2d");
|
|
// This will get the first returned node in the jQuery collection.
|
|
|
|
var salesChart = new Chart(salesChartCanvas);
|
|
|
|
|
|
var service = <?php echo JSON_encode($gettoptotal1)?>;
|
|
|
|
//var service = <?php echo JSON_encode($getTotalServicePoCount)?>;
|
|
// alert(service+'hai');
|
|
//print_r($gettoptotal1);
|
|
var Import = <?php echo JSON_encode($getTotalimportPoCount)?>;
|
|
var capital = <?php echo JSON_encode($getTotalcapitalPoCount)?>;
|
|
var revenue = <?php echo JSON_encode($getTotalrevenuePoCount)?>;
|
|
|
|
//alert(service.PONO);
|
|
var serviceValues = [];
|
|
// var arr = new Array();
|
|
$.each (service,function(idx,obj){
|
|
serviceValues.push(obj[0].tot);
|
|
});
|
|
var ImportValues = [];
|
|
// var arr = new Array();
|
|
$.each (Import,function(idx,obj){
|
|
ImportValues.push(obj[0].totalImport);
|
|
});
|
|
var capitalValues = [];
|
|
// var arr = new Array();
|
|
$.each (capital,function(idx,obj){
|
|
capitalValues.push(obj[0].totalcapital);
|
|
});
|
|
var revenueValues = [];
|
|
// var arr = new Array();
|
|
$.each (revenue,function(idx,obj){
|
|
revenueValues.push(obj[0].totalrevenue);
|
|
});
|
|
|
|
|
|
//alert(arr.total2);
|
|
var salesChartData = {
|
|
labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
|
|
|
datasets: [
|
|
|
|
{
|
|
label: "Electronics",
|
|
fillColor: "rgba(0, 192, 239, 0.2)",
|
|
strokeColor: "rgba(0, 192, 239,0.6)",
|
|
pointColor: "#00c0ef ",
|
|
pointStrokeColor: "rgba(60,141,188,1)",
|
|
pointHighlightFill: "#fff",
|
|
pointHighlightStroke: "rgba(60,141,188,1)",
|
|
data:serviceValues
|
|
|
|
},
|
|
|
|
{
|
|
label: "Digital Goods",
|
|
fillColor: "rgba(221, 75, 57,0.2)",
|
|
strokeColor: "rgba(221, 75, 57,0.8)",
|
|
pointColor: "#dd4b39 ",
|
|
pointStrokeColor: "rgba(60,141,188,1)",
|
|
pointHighlightFill: "#fff",
|
|
pointHighlightStroke: "rgba(60,141,188,1)",
|
|
data:revenueValues
|
|
},
|
|
{
|
|
label: "Food",
|
|
fillColor: "rgba(0, 166, 90, 0.2)",
|
|
strokeColor: "rgba(0, 166, 90,0.8)",
|
|
pointColor: "#00a65a ",
|
|
pointStrokeColor: "rgba(60,141,188,1)",
|
|
pointHighlightFill: "#fff",
|
|
pointHighlightStroke: "rgba(60,141,188,1",
|
|
data:ImportValues
|
|
},
|
|
{
|
|
label: "Food",
|
|
fillColor: "rgba(243, 156, 18, 0.2)",
|
|
strokeColor: "rgba(243, 156, 18,0.8)",
|
|
pointColor: "#f39c12 ",
|
|
pointStrokeColor: "rgba(60,141,188,1)",
|
|
pointHighlightFill: "#fff",
|
|
pointHighlightStroke: "rgba(60,141,188,1",
|
|
data:capitalValues
|
|
}
|
|
|
|
]
|
|
};
|
|
|
|
|
|
var salesChartOptions = {
|
|
//Boolean - If we should show the scale at all
|
|
showScale: true,
|
|
//Boolean - Whether grid lines are shown across the chart
|
|
scaleShowGridLines: false,
|
|
//String - Colour of the grid lines
|
|
scaleGridLineColor: "rgba(0,0,0,.05)",
|
|
//Number - Width of the grid lines
|
|
scaleGridLineWidth: 1,
|
|
//Boolean - Whether to show horizontal lines (except X axis)
|
|
scaleShowHorizontalLines: true,
|
|
//Boolean - Whether to show vertical lines (except Y axis)
|
|
scaleShowVerticalLines: true,
|
|
//Boolean - Whether the line is curved between points
|
|
bezierCurve: true,
|
|
//Number - Tension of the bezier curve between points
|
|
bezierCurveTension: 0.3,
|
|
//Boolean - Whether to show a dot for each point
|
|
pointDot: true,
|
|
//Number - Radius of each point dot in pixels
|
|
pointDotRadius: 4,
|
|
//Number - Pixel width of point dot stroke
|
|
pointDotStrokeWidth: 1,
|
|
//Number - amount extra to add to the radius to cater for hit detection outside the drawn point
|
|
pointHitDetectionRadius: 20,
|
|
//Boolean - Whether to show a stroke for datasets
|
|
datasetStroke: true,
|
|
//Number - Pixel width of dataset stroke
|
|
datasetStrokeWidth: 5,
|
|
//Boolean - Whether to fill the dataset with a color
|
|
datasetFill: true,
|
|
//String - A legend template
|
|
legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].lineColor%>\"></span><%=datasets[i].label%></li><%}%></ul>",
|
|
//Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
|
|
maintainAspectRatio: false,
|
|
//Boolean - whether to make the chart responsive to window resizing
|
|
responsive: true
|
|
};
|
|
|
|
// alert(salesChartData);
|
|
|
|
//Create the line chart
|
|
salesChart.Line(salesChartData, salesChartOptions);
|
|
|
|
//---------------------------
|
|
//- END MONTHLY SALES CHART -
|
|
//- PIE CHART -
|
|
//-------------
|
|
// Get context with jQuery - using jQuery's .get() method.
|
|
|
|
|
|
</script>
|
|
|