IMMREX7
<?php $__env->startSection('content'); ?>
<style>
section.content:before {
height: 86px !important;
}
</style>
<div class="row clearfix" style="margin-top: 20px;">
<div class="col-sm-12">
<p style="font-size:18px;"><b><u>Collection Summary</u></b><br>
<small>* Approx value without fine and based on choosen structure</small>
</p>
</div>
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="card">
<div class="body text-center" style="padding-bottom: 0px;">
<h3 class="m-b-0">₹<?php echo e($data['estimated_fees']); ?></h3>
<p class="displayblock" style="font-weight: bold;">Total Estimated Fees</p>
</div>
<div class="m-t-10 text-center" style="background:#3ba8d5;">
<a href="#" class="displayblock" style="color:white;font-weight: bold;padding:5px;font-size: 13px;">More
Details →</a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="card">
<div class="body text-center" style="padding-bottom: 0px;">
<h3 class="m-b-0">₹<?php echo e($data['total_collection']); ?></h3>
<p class="displayblock" style="font-weight: bold;">Total Collections Till</p>
</div>
<div class="m-t-10 text-center" style="background:green;">
<a href="#" class="displayblock" style="color:white;font-weight: bold;padding:4px;font-size: 13px;">More
Details →</a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="card">
<div class="body text-center" style="padding-bottom: 0px;">
<h3 class="m-b-0">₹<?php echo e($data['estimated_fees'] - $data['total_collection']); ?></h3>
<p class="displayblock" style="font-weight: bold;">Total Outstanding</p>
</div>
<div class="m-t-10 text-center" style="background:orange;">
<a href="#" class="displayblock" style="color:white;font-weight: bold;padding:5px;font-size: 13px;">More
Details →</a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="card">
<div class="body text-center" style="padding-bottom: 0px;">
<h3 class="m-b-0">₹<?php echo e($data['overdue_fees']); ?></h3>
<p class="displayblock" style="font-weight: bold;">Total Overdue</p>
</div>
<div class="m-t-10 text-center" style="background:red;">
<a href="#" class="displayblock" style="color:white;font-weight: bold;padding:5px;font-size: 13px;">More
Details →</a>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-md-12 col-lg-12">
<div class="card">
<div class="header">
<h2><strong>Collection</strong> Chart</h2>
<ul class="header-dropdown">
<li class="remove">
<a role="button" class="boxs-close"><i class="zmdi zmdi-close"></i></a>
</li>
</ul>
</div>
<div class="body">
<div id="m_area_chart2"></div>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<p style="font-size:18px;"><b><u>Collection Details</u></b></p>
</div>
<div class="col-sm-6 row">
<div class="col-md-6 col-sm-12">
<div class="card">
<div class="body text-center" style="padding-bottom: 0px;">
<h3 class="m-b-0">₹<?php echo e($data['cash']); ?></h3>
<p class="displayblock" style="font-weight: bold;">Cash Collection</p>
</div>
<div class="m-t-10 text-center" style="background:#3ba8d5;">
<a href="#" class="displayblock"
style="color:white;font-weight: bold;padding:5px;font-size: 13px;">View All →</a>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="card">
<div class="body text-center" style="padding-bottom: 0px;">
<h3 class="m-b-0">₹<?php echo e($data['online']); ?></h3>
<p class="displayblock" style="font-weight: bold;">Online Collection</p>
</div>
<div class="m-t-10 text-center" style="background:green;">
<a href="#" class="displayblock"
style="color:white;font-weight: bold;padding:5px;font-size: 13px;">View All →</a>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="card">
<div class="body text-center" style="padding-bottom: 0px;">
<h3 class="m-b-0">₹<?php echo e($data['cheque']); ?></h3>
<p class="displayblock" style="font-weight: bold;">Cheque Collection</p>
</div>
<div class="m-t-10 text-center" style="background:orange;">
<a href="#" class="displayblock"
style="color:white;font-weight: bold;padding:5px;font-size: 13px;">View All →</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class="body">
<canvas id="chart-area" height="150"></canvas>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<p style="font-size:18px;"><b><u>Cheque Summary</u></b></p>
</div>
<div class="col-lg-12">
<div class="card">
<div class="header">
<h2><strong>Cheque</strong> Report</h2>
<ul class="header-dropdown">
<li class="remove">
<a role="button" class="boxs-close"><i class="zmdi zmdi-close"></i></a>
</li>
</ul>
</div>
<div class="body">
<div class="row text-center">
<div class="col-sm-3 col-6">
<h4 class="margin-0">₹<?php echo e($data['tcheque']); ?> <i class="zmdi zmdi-trending-up col-blue"></i></h4>
<p class="text-muted">Total Cheque Collection</p>
</div>
<div class="col-sm-3 col-6">
<h4 class="margin-0">₹<?php echo e($data['cheque']); ?> <i class="zmdi zmdi-trending-up col-green"></i></h4>
<p class="text-muted">Inprogress + Cleared</p>
</div>
<div class="col-sm-3 col-6">
<h4 class="margin-0">₹<?php echo e($data['bounced']); ?> <i class="zmdi zmdi-trending-down col-red"></i></h4>
<p class="text-muted">Bounced</p>
</div>
</div>
<div id="area_chart" class="graph"></div>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<p style="font-size:18px;"><b><u>Month Wise Collection</u></b></p>
</div>
<div class="col-sm-12 row">
<?php
$prevDate = \Carbon\Carbon::parse($financialYear->startDate);
$prevDate->subMonth();
$startDate = \Carbon\Carbon::parse($financialYear->startDate);
$endDate = \Carbon\Carbon::parse($financialYear->endDate);
$diff = $startDate->diffInMonths($endDate);
$currentDate = $startDate;
?>
<div class="card col-sm-4">
<div class="header">
<h2><strong>Advance</strong> Collection</h2>
</div>
<div class="body">
<?php
$main = \Carbon\Carbon::parse("01-".$prevDate->format('m')."-".$prevDate->format('Y'))->daysInMonth;
$amount = getAdvanceCollection($prevDate->format('m'),$prevDate->format('Y'),$idSchool,$idFinancialYear);
$avg = round($amount/$main);
$plot = getGraph($prevDate->format('m'),$prevDate->format('Y'),$idSchool,$idFinancialYear);
?>
<h3 class="m-b-0">₹<?php echo e($amount); ?></h3>
<small class="displayblock">₹<?php echo e($avg); ?> Average <i class="zmdi zmdi-trending-up"></i></small>
<div class="sparkline" data-type="line" data-spot-Radius="1"
data-highlight-Spot-Color="rgb(63, 81, 181)" data-highlight-Line-Color="#222"
data-min-Spot-Color="rgb(233, 30, 99)" data-max-Spot-Color="rgb(63, 81, 181)"
data-spot-Color="rgb(63, 81, 181, 0.7)" data-offset="90" data-width="100%" data-height="60px"
data-line-Width="1" data-line-Color="rgb(63, 81, 181, 0.7)" data-fill-Color="rgba(221,94,137, 0.2)">
<?php $__currentLoopData = $plot; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($value); ?>, <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 0 </div>
</div>
</div>
<?php $graphMonth = [] ?>
<?php for($i = 0; $i <= $diff; $i++): ?>
<?php if($i > 0) $currentDate->addMonth(); ?>
<div class="card col-sm-4">
<div class="header">
<h2><strong>Month </strong><?php echo e($currentDate->format('M Y')); ?></h2>
</div>
<div class="body">
<?php
$main = \Carbon\Carbon::parse("01-".$currentDate->format('m')."-".$currentDate->format('Y'))->daysInMonth;
$amount = getMonthCollection($currentDate->format('m'),$currentDate->format('Y'),$idSchool,$idFinancialYear);
$avg = round($amount/$main);
$plot = getGraph($currentDate->format('m'),$currentDate->format('Y'),$idSchool,$idFinancialYear);
$graphMonth[$currentDate->format('M')] = $amount;
?>
<h3 class="m-b-0">₹<?php echo e($amount); ?></h3>
<small class="displayblock">₹<?php echo e($avg); ?> Average <i class="zmdi zmdi-trending-up"></i></small>
<div class="sparkline" data-type="line" data-spot-Radius="1"
data-highlight-Spot-Color="rgb(63, 81, 181)" data-highlight-Line-Color="#222"
data-min-Spot-Color="rgb(233, 30, 99)" data-max-Spot-Color="rgb(120, 184, 62)"
data-spot-Color="rgb(63, 81, 181, 0.7)" data-offset="90" data-width="100%" data-height="60px"
data-line-Width="1" data-line-Color="rgb(63, 81, 181, 0.7)"
data-fill-Color="rgba(128,133,233, 0.2)"> <?php $__currentLoopData = $plot; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($value); ?>, <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 0</div>
</div>
</div>
<?php endfor; ?>
</div>
</div>
<div class="row clearfix">
<div class="col-md-12 col-lg-12">
<div class="card">
<div class="header">
<h2><strong>Month Wise</strong> Chart</h2>
<ul class="header-dropdown">
<li class="remove">
<a role="button" class="boxs-close"><i class="zmdi zmdi-close"></i></a>
</li>
</ul>
</div>
<div class="body">
<canvas id="bar_chart" height="100"></canvas>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<p style="font-size:18px;"><b><u>Class Wise Report</u></b></p>
</div>
<?php $collectionCw = []; ?>
<?php $__currentLoopData = $classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-lg-6 col-md-12">
<div class="card">
<div class="header">
<h2><strong>Class </strong> <?php echo e($var->className); ?></h2>
</div>
<div class="body">
<div class="row">
<div class="col-sm-4 col-4 m-b-10">
<small class="text-muted">Collected</small>
<?php $collectionCw[$var->idClass] = getClassCollection($var->idClass,$idSchool,$idFinancialYear); ?>
<h5 class="m-b-0">₹<?php echo e($collectionCw[$var->idClass]); ?></h5>
</div>
<div class="col-sm-4 col-4 m-b-10">
<small class="text-muted">Due</small>
<h5 class="m-b-0">₹<?php echo e($data['class_'.$var->idClass] - $collectionCw[$var->idClass]); ?></h5>
</div>
<div class="col-sm-4 col-4 m-b-10">
<small class="text-muted">Overdue</small>
<h5 class="m-b-0">₹<?php echo e($data['overdue_class_'.$var->idClass]); ?></h5>
</div>
</div>
<div class="progress">
<div class="progress-bar l-turquoise" role="progressbar" aria-valuenow="87" aria-valuemin="0"
aria-valuemax="100" style="width: 87%;"></div>
</div>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<div class="row clearfix">
<div class="col-lg-12 col-md-12">
<div class="card">
<div class="header">
<h2><strong>Class Wise Graph</strong> </h2>
<ul class="header-dropdown">
<li class="remove">
<a role="button" class="boxs-close"><i class="zmdi zmdi-close"></i></a>
</li>
</ul>
</div>
<div class="body">
<div id="m_bar_chart"></div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(function () {
"use strict";
MorrisArea();
MorrisBarChart();
new Chart(document.getElementById("bar_chart").getContext("2d"), getChartJs());
});
// Morris-chart
function MorrisBarChart() {
Morris.Bar({
element: 'm_bar_chart',
data: [
<?php $__currentLoopData = $classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
{
y: '<?php echo e($var->className); ?>',
collected: <?php echo e($collectionCw[$var->idClass]); ?>,
due: <?php echo e($data['class_'.$var->idClass] - $collectionCw[$var->idClass]); ?>,
overdue: 0
},
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
],
xkey: 'y',
ykeys: ['collected', 'due', 'overdue'],
labels: ['Collected', 'Due', 'OVerdue'],
barColors: ['#238000', '#f40103', '#f5a540'],
hideHover: 'auto',
gridLineColor: '#eef0f2',
resize: true
});
}
<?php
$startDate = \Carbon\Carbon::parse($financialYear->startDate);
$currentDate = $startDate;
?>
function MorrisArea() {
Morris.Area({
element: 'area_chart',
data: [
<?php for($i = 0; $i <= $diff; $i++): ?>
<?php
if($i > 0) $currentDate->addMonth();
$dataCheque = getChequeGraph($currentDate->format('m'),$currentDate->format('Y'),$idSchool,$idFinancialYear);
?>
{
period: '<?php echo e($dataCheque['period']); ?>',
collection: <?php echo e($dataCheque['collection']); ?>,
inprogress: <?php echo e($dataCheque['inprogress']); ?>,
bounced: <?php echo e($dataCheque['collection'] - $dataCheque['inprogress']); ?>
},
<?php endfor; ?>
],
lineColors: ['#3ba8d5', '#238000', '#f40103'],
xkey: 'period',
ykeys: ['collection', 'inprogress', 'bounced'],
labels: ['Total Collection', 'Inprogress + Cleared', 'Bounced'],
pointSize: 0,
lineWidth: 0,
resize: true,
fillOpacity: 0.5,
behaveLikeLine: true,
gridLineColor: '#e0e0e0',
hideHover: 'auto'
});
Morris.Area({
element: 'm_area_chart2',
data: [
{
period: '<?php echo e($financialYear->startDate); ?>',
estimate: 0,
collection: 0,
outstanding: 0,
due: 0,
},
{
period: '<?php echo e($financialYear->endDate); ?>',
estimate: 0,
collection: <?php echo e($data['total_collection']); ?>,
outstanding: 0,
due: 0,
}
],
xkey: 'period',
ykeys: ['estimate', 'collection','outstanding','due'],
labels: ['Estimated Fee', 'Collections','Outstanding','Due'],
pointSize: 0,
fillOpacity: 0.4,
pointStrokeColors: ['#9e9e9e','#238000','#457fca', '#f40103'],
behaveLikeLine: true,
gridLineColor: '#e0e0e0',
lineWidth: 0,
smooth: false,
hideHover: 'auto',
lineColors: ['#9e9e9e','#238000','#457fca', '#f40103'],
resize: true
});
}
var randomScalingFactor = function () {
return Math.round(Math.random() * 100);
};
var chartColors = window.chartColors;
var color = Chart.helpers.color;
var config = {
data: {
datasets: [{
data: [
<?php echo e($data['cash']); ?>,
<?php echo e($data['online']); ?>,
<?php echo e($data['cheque']); ?>,
],
backgroundColor: [
color(chartColors.blue).rgbString(),
color(chartColors.green).rgbString(),
color(chartColors.orange).rgbString(),
],
label: 'My dataset' // for legend
}],
labels: [
"Cash Collection",
"Online Collection",
"Cheque Collection"
]
},
options: {
responsive: true,
legend: {
position: 'right',
},
title: {
display: true,
text: 'Collection Details'
},
scale: {
ticks: {
beginAtZero: true
},
reverse: false
},
animation: {
animateRotate: false,
animateScale: true
}
}
};
window.onload = function () {
var ctx = document.getElementById("chart-area");
window.myPolarArea = Chart.Doughnut(ctx, config);
};
function getChartJs(type) {
<?php
$mn = [];
$mv = [];
foreach($graphMonth as $key => $value){
array_push($mn,$key);
array_push($mv,$value);
}
?>
var config = {
type: 'bar',
data: {
labels: <?php echo json_encode($mn) ?>,
datasets: [{
label: "Month wise collection",
data: <?php echo json_encode($mv)?>,
backgroundColor: '#3ba8d5',
strokeColor: "rgba(255,118,118,0.1)",
}]
},
options: {
responsive: true,
legend: false
}
}
return config;
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -