Role issues fixes : ps

This commit is contained in:
sanjeev.p 2021-09-30 19:47:44 +05:30
parent a81c507839
commit c163b81e30
4 changed files with 1344 additions and 1274 deletions

View File

@ -82,7 +82,7 @@ class Login extends CI_Controller
{ {
log_message('ERROR','#####loggin_name : ' . $res->FirstName); log_message('ERROR','#####loggin_name : ' . $res->FirstName);
$sessionArray = array('userId'=>$res->userId, $sessionArray = array('userId'=>$res->userId,
// 'role'=>$res->roleId, 'role'=>$res->roleId,
'roleText'=>$res->role, 'roleText'=>$res->role,
'name'=>$res->FirstName, 'name'=>$res->FirstName,
// 'Designation'=>$res->Designation, // 'Designation'=>$res->Designation,

View File

@ -40,7 +40,7 @@ class BaseController extends CI_Controller {
if (! isset ( $isLoggedIn ) || $isLoggedIn != TRUE) { if (! isset ( $isLoggedIn ) || $isLoggedIn != TRUE) {
redirect ( 'login' ); redirect ( 'login' );
} else { } else {
//$this->role = $this->session->userdata ( 'role' ); $this->role = $this->session->userdata ( 'role' );
// session_start(); // session_start();
log_message('ERROR','#####In BaseController - isLoggedIn function ci session : ' . $this->session->userdata ( 'name' )); log_message('ERROR','#####In BaseController - isLoggedIn function ci session : ' . $this->session->userdata ( 'name' ));
// log_message('ERR?OR','#####In BaseController - isLoggedIn function session super global methid : ' . $_SESSION['name']); // log_message('ERR?OR','#####In BaseController - isLoggedIn function session super global methid : ' . $_SESSION['name']);

View File

@ -1,32 +1,26 @@
<?php <?php
//print_r($getTotalServicePoCount);
$Empcnt = ''; $Empcnt = '';
//echo $DEPCode; if (!empty($EmpCount)) {
//echo ROLE_MANAGER; foreach ($EmpCount as $Emp) {
if(!empty($EmpCount))
{
foreach ($EmpCount as $Emp)
{
$Empcnt = $Emp->EmpCount; $Empcnt = $Emp->EmpCount;
} }
} }
?> ?>
<style>
.content-wrapper{
margin-left: 112px !important
}
</style>
<div class="content-wrapper"> <div class="content-wrapper">
<section class="content"> <section class="content">
<!-- Dashboard for Account department--> <!-- 1 Dashboard for Account department -->
<?php <?php if ($DEPCode == FINANCE) { ?>
if($DEPCode == FINANCE)
{
?>
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<center><h1> Accounts Department Dashboard</h1> </center> <center>
<h1> Accounts Department Dashboard</h1>
</center>
</section> </section>
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
@ -49,48 +43,39 @@ if(!empty($EmpCount))
</section> </section>
</div> </div>
<?php } ?>
<?php
}
?>
<!-- HR Start part to-->
<!-- 2 Dashboard for HR department -->
<!-- 2.1 Script For Date Picker Ends Here -->
<script> <script>
$( function() $(function() {
{
//$( "#datepick" ).datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).val(); //$( "#datepick" ).datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).val();
//$( "#datepic" ).datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).val(); //$( "#datepic" ).datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).val();
//$("#datepic").datepicker({ defaultDate: '-2m'}); //$("#datepic").datepicker({ defaultDate: '-2m'});
$('#datepick').datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).datepicker('setDate',new Date()); $('#datepick').datepicker({
maxDate: 'Date-1',
dateFormat: 'dd-mm-yy'
}).datepicker('setDate', new Date());
}); });
</script> </script>
<!-- 2.2 Script For Employee Dropdown as Searchable -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() {
$(document).ready(function()
{
//$("#employee").select2(); //$("#employee").select2();
//$("#employeeAttan").select2(); //$("#employeeAttan").select2();
$("#emp").select2(); $("#emp").select2();
}); });
</script> </script>
<!-- 2.3 Style -->
<style> <style>
.small-box .icon .small-box .icon {
{
top: 0px !important; top: 0px !important;
} }
</style> </style>
<?php <?php
if($DEPCode == HR) if ($DEPCode == HR) {
{
?> ?>
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
@ -106,7 +91,9 @@ if(!empty($EmpCount))
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<!-- small box --> <!-- small box -->
<div class="small-box bg-aqua"> <div class="small-box bg-aqua">
<a href="#" class="small-box-footer"><p> <strong>TOTAL NO OF EMPLOYEES</strong> </p> </a> <a href="#" class="small-box-footer">
<p> <strong>TOTAL NO OF EMPLOYEES</strong> </p>
</a>
<div class="inner"> <div class="inner">
<?php <?php
if (!empty($totemp)) { if (!empty($totemp)) {
@ -132,11 +119,12 @@ if(!empty($EmpCount))
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<!-- small box --> <!-- small box -->
<div class="small-box bg-red"> <div class="small-box bg-red">
<a target= "_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer"> <p> <strong>TOTAL LOAN</strong> </p></a> <a target="_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer">
<p> <strong>TOTAL LOAN</strong> </p>
</a>
<div class="inner"> <div class="inner">
<?php if(!empty($totloan)) <?php if (!empty($totloan)) {
{
foreach ($totloan as $req_p) { foreach ($totloan as $req_p) {
?> ?>
@ -155,11 +143,8 @@ if(!empty($EmpCount))
</div> </div>
<a target="_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer"> <a target="_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer">
LOAN TO BE RECOVERED : <?php if(!empty($totrec)) LOAN TO BE RECOVERED : <?php if (!empty($totrec)) {
{ foreach ($totrec as $ordervalue) {
foreach($totrec as $ordervalue)
{
?> ?>
@ -180,11 +165,15 @@ if(!empty($EmpCount))
<!-- small box --> <!-- small box -->
<div class="small-box bg-yellow"> <div class="small-box bg-yellow">
<a class="small-box-footer"> <p><strong>SALARY COST</strong></p></a> <a class="small-box-footer">
<p><strong>SALARY COST</strong></p>
</a>
<div class="inner" style="padding: 14px;"> <div class="inner" style="padding: 14px;">
<h3 ><div class="fa fa-rupee" id="today_salary" style="font-size:bold"> <b><?php echo $employeeSalary;?></b> <h3>
</div></h3> <div class="fa fa-rupee" id="today_salary" style="font-size:bold"> <b><?php echo $employeeSalary; ?></b>
</div>
</h3>
<input type="text" id="datepick" placeholder="Select Date" style="color:#000;width:30%" /> <input type="text" id="datepick" placeholder="Select Date" style="color:#000;width:30%" />
@ -193,7 +182,8 @@ if(!empty($EmpCount))
<i class="ion ion-calculator"></i> <i class="ion ion-calculator"></i>
</div> </div>
<a class="small-box-footer" style="z-index:0; "> THIS MONTH : <i class="fa fa-rupee"></i> <div id="totalSalary"> <?php echo $totalSalary;?> </div> <a class="small-box-footer" style="z-index:0; "> THIS MONTH : <i class="fa fa-rupee"></i>
<div id="totalSalary"> <?php echo $totalSalary; ?> </div>
</a> </a>
</div> </div>
@ -206,7 +196,9 @@ if(!empty($EmpCount))
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<!-- small box --> <!-- small box -->
<div class="small-box bg-green"> <div class="small-box bg-green">
<a href="#" class="small-box-footer"> <p> <strong>TOTAL EMPLOYEES ABSENT</strong> </p></a> <a href="#" class="small-box-footer">
<p> <strong>TOTAL EMPLOYEES ABSENT</strong> </p>
</a>
<h3> <h3>
<div class="inner" id="today_abs"> <div class="inner" id="today_abs">
@ -215,7 +207,8 @@ if(!empty($EmpCount))
</div></h3> </div>
</h3>
<p>ABSENT</p><br> <p>ABSENT</p><br>
<div class="icon"> <div class="icon">
@ -244,8 +237,7 @@ if(!empty($EmpCount))
$options = array("0" => 'Select Employee'); $options = array("0" => 'Select Employee');
//print_r( $options); //print_r( $options);
if(!empty($emplist)) if (!empty($emplist)) {
{
foreach ($emplist as $SID) : foreach ($emplist as $SID) :
@ -274,7 +266,7 @@ if(!empty($EmpCount))
<div class="col-md-6 col-sm-6" style="padding:0px;"> <div class="col-md-6 col-sm-6" style="padding:0px;">
<div class="col-md-7 col-sm-7"> <div class="col-md-7 col-sm-7" style="padding: 0px !important;">
<div id="chart_div"></div> <div id="chart_div"></div>
</div> </div>
@ -300,7 +292,9 @@ if(!empty($EmpCount))
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
google.charts.load('current', {'packages':['gauge']}); google.charts.load('current', {
'packages': ['gauge']
});
google.charts.setOnLoadCallback(drawChart); google.charts.setOnLoadCallback(drawChart);
function drawChart() { function drawChart() {
@ -312,10 +306,14 @@ if(!empty($EmpCount))
]); ]);
var options = { var options = {
width: 600, height: 250, width: 600,
redFrom: 00, redTo: 20, height: 250,
yellowFrom:20, yellowTo: 50, redFrom: 00,
greenFrom:50, greenTo: 100, redTo: 20,
yellowFrom: 20,
yellowTo: 50,
greenFrom: 50,
greenTo: 100,
minorTicks: 5 minorTicks: 5
}; };
@ -328,12 +326,13 @@ if(!empty($EmpCount))
$("#yearabs").val(''); $("#yearabs").val('');
if(id != 0) if (id != 0) {
{
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:id}, data: {
id: id
},
dataType: 'json', dataType: 'json',
type: "POST", type: "POST",
url: "<?php echo base_url(); ?>user/attendanceyear", url: "<?php echo base_url(); ?>user/attendanceyear",
@ -355,9 +354,7 @@ if(!empty($EmpCount))
}); });
//$('#content').loader('hide'); //$('#content').loader('hide');
} } else {
else
{
alert('Please select the Employee'); alert('Please select the Employee');
$('#totaldays').text(0); $('#totaldays').text(0);
$('#worked').text(0); $('#worked').text(0);
@ -370,16 +367,16 @@ if(!empty($EmpCount))
}); });
} }
</script> </script>
<!------ Month------> <!------ Month------>
<div class="col-md-6 col-sm-6" style="padding:0px;"> <div class="col-md-6 col-sm-6" style="padding:0px;">
<div class="col-md-7 col-sm-7"> <div class="col-md-7 col-sm-7" style="padding: 0px !important;">
<div id="chart_divs"></div> <div id="chart_divs"></div>
</div> </div>
<div class="col-md-5 col-sm-5 "> <div class="col-md-5 col-sm-5 ">
<br> <br>
<div class="pad box-pane-right bg-red"> <div class="pad box-pane-right bg-red">
@ -491,11 +488,12 @@ if(!empty($EmpCount))
} }
?> ?>
<script type="text/javascript"> <script type="text/javascript">
google.charts.load('current', {'packages':['gauge']}); google.charts.load('current', {
'packages': ['gauge']
});
google.charts.setOnLoadCallback(drawChart); google.charts.setOnLoadCallback(drawChart);
function drawChart() function drawChart() {
{
var data = google.visualization.arrayToDataTable([ var data = google.visualization.arrayToDataTable([
['Label', 'Value'], ['Label', 'Value'],
@ -504,10 +502,14 @@ if(!empty($EmpCount))
]); ]);
var options = { var options = {
width: 600, height: 250, width: 600,
redFrom: 00, redTo: 20, height: 250,
yellowFrom:20, yellowTo: 50, redFrom: 00,
greenFrom:50, greenTo: 100, redTo: 20,
yellowFrom: 20,
yellowTo: 50,
greenFrom: 50,
greenTo: 100,
minorTicks: 5 minorTicks: 5
}; };
var chart = new google.visualization.Gauge(document.getElementById('chart_divs')); var chart = new google.visualization.Gauge(document.getElementById('chart_divs'));
@ -523,12 +525,13 @@ $('#emp').change(function() {
//alert(datepick); //alert(datepick);
$("#monthabs").val(''); $("#monthabs").val('');
if(id != 0) if (id != 0) {
{
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:id}, data: {
id: id
},
dataType: 'json', dataType: 'json',
type: "POST", type: "POST",
url: "<?php echo base_url(); ?>user/monthattendance", url: "<?php echo base_url(); ?>user/monthattendance",
@ -554,9 +557,7 @@ $("#monthabs").val('');
}); });
//$('#content').loader('hide'); //$('#content').loader('hide');
} } else {
else
{
//alert('Please select the Employee'); //alert('Please select the Employee');
$("#present").text(0); $("#present").text(0);
$("#total_days").text(0); $("#total_days").text(0);
@ -568,14 +569,8 @@ $("#monthabs").val('');
}); });
} }
</script> </script>
<script> <script>
$('#datepick').change(function() { $('#datepick').change(function() {
//var datepick = $('#emp').val(); //var datepick = $('#emp').val();
//alert(); //alert();
@ -586,7 +581,9 @@ $('#datepick').change(function() {
$.ajax({ $.ajax({
data:{id:id}, data: {
id: id
},
dataType: 'json', dataType: 'json',
type: "POST", type: "POST",
url: "<?php echo base_url(); ?>user/dateFunctionChangeVales", url: "<?php echo base_url(); ?>user/dateFunctionChangeVales",
@ -612,17 +609,12 @@ $('#datepick').change(function() {
}); });
}); });
</script> </script>
<!-- \\\\\\\\\\\\\\\ HR END of the part ////////////////////////--> <!-- \\\\\\\\\\\\\\\ HR END of the part ////////////////////////-->
<!-- Dashboard for admin--> <!-- Dashboard for admin-->
<?php <?php
if($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR) if ($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR) {
{
?> ?>
<div class="content"> <div class="content">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
@ -663,13 +655,14 @@ $('#datepick').change(function() {
<!-- Dashboard for Manager department--> <!-- Dashboard for Manager department-->
<?php <?php
if($role == ROLE_MANAGER && $DEPCode != MANAGEMENT) if ($role == ROLE_MANAGER && $DEPCode != MANAGEMENT) {
{
?> ?>
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<center><h1> Manager Department Dashboard</h1> </center> <center>
<h1> Manager Department Dashboard</h1>
</center>
</section> </section>
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
@ -696,8 +689,7 @@ $('#datepick').change(function() {
<?php <?php
} }
if($DEPCode == MANAGEMENT) if ($DEPCode == MANAGEMENT) {
{
?> ?>
<head> <head>
@ -709,14 +701,108 @@ $('#datepick').change(function() {
DataTables Bootstrap 3 integration DataTables Bootstrap 3 integration
©2011-2014 SpryMedia Ltd - datatables.net/license ©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(); (function(l, q) {
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="&hellip;";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+" "+ var e = function(b, c) {
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"}, b.extend(!0, c.defaults, {
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); 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 = "&hellip;";
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> </script>
<style> <style>
table { table {
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%;
@ -727,7 +813,11 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
} }
th, td { white-space: nowrap; } th,
td {
white-space: nowrap;
}
div.dataTables_wrapper { div.dataTables_wrapper {
margin: 0 auto; margin: 0 auto;
@ -743,9 +833,6 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
text-align: right; text-align: right;
left: -20%; left: -20%;
} }
</style> </style>
<div> <div>
<section class="content"> <section class="content">
@ -754,12 +841,12 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<div class="col-md-3 col-sm-6 col-xs-12"> <div class="col-md-3 col-sm-6 col-xs-12">
<a href="<?php echo base_url(); ?>Requisition"> <a href="<?php echo base_url(); ?>Requisition">
<div class="info-box" style="min-height: 105px;"> <div class="info-box" style="min-height: 105px;">
<span class="info-box-icon bg-aqua" style="height: 105px;padding:25px;"><i<i class="fa fa-spinner"></span> <span class="info-box-icon bg-aqua" style="height: 105px;padding:25px;">
<i<i class="fa fa-spinner">
</span>
<?php <?php
if(!empty($details)) if (!empty($details)) {
{ foreach ($details as $req) {
foreach($details as $req)
{
?> ?>
@ -783,8 +870,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<div class="info-box" style="min-height: 105px;"> <div class="info-box" style="min-height: 105px;">
<span class="info-box-icon bg-red" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-end"></i></span> <span class="info-box-icon bg-red" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
<?php if(!empty($pending_details)) <?php if (!empty($pending_details)) {
{
foreach ($pending_details as $req_p) { foreach ($pending_details as $req_p) {
?> ?>
@ -811,11 +897,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<a href="<?php echo base_url(); ?>TotalOrder"> <a href="<?php echo base_url(); ?>TotalOrder">
<div class="info-box" style="min-height: 105px;"> <div class="info-box" style="min-height: 105px;">
<span class="info-box-icon bg-green" style="height: 105px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span> <span class="info-box-icon bg-green" style="height: 105px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
<?php if(!empty($totalpurchaseorder)) <?php if (!empty($totalpurchaseorder)) {
{ foreach ($totalpurchaseorder as $po) {
foreach($totalpurchaseorder as $po)
{
?> ?>
<div class="info-box-content"> <div class="info-box-content">
@ -825,11 +908,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
} }
} }
?> ?>
<?php if(!empty($totalordervalue)) <?php if (!empty($totalordervalue)) {
{ foreach ($totalordervalue as $ordervalue) {
foreach($totalordervalue as $ordervalue)
{
?> ?>
<span class="info-box-text" style="color:#00a65a;"><strong>TOTAL ORDER VALUE</strong></span> <span class="info-box-text" style="color:#00a65a;"><strong>TOTAL ORDER VALUE</strong></span>
@ -852,8 +932,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<a href="<?php echo base_url(); ?>openOrder"> <a href="<?php echo base_url(); ?>openOrder">
<div class="info-box" style="min-height: 105px;"> <div class="info-box" style="min-height: 105px;">
<span class="info-box-icon bg-yellow" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-1 " style="padding: 5px;"></i></span> <span class="info-box-icon bg-yellow" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-1 " style="padding: 5px;"></i></span>
<?php if(!empty($pendingpo)) <?php if (!empty($pendingpo)) {
{
foreach ($pendingpo as $pendingpolist) { foreach ($pendingpo as $pendingpolist) {
?> ?>
@ -933,11 +1012,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<br><br> <br><br>
<div class="progress-group"> <div class="progress-group">
<?php if(!empty($servicebudgt)) <?php if (!empty($servicebudgt)) {
{ foreach ($servicebudgt as $service) {
foreach($servicebudgt as $service)
{
?> ?>
<span class="description-text"><strong style="font-size:16px;">SERVICE &nbsp; :&nbsp;&nbsp;</strong><strong style="color:#00c0ef;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $service->totalservicebudget; ?></strong></span> <span class="description-text"><strong style="font-size:16px;">SERVICE &nbsp; :&nbsp;&nbsp;</strong><strong style="color:#00c0ef;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $service->totalservicebudget; ?></strong></span>
@ -952,11 +1028,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<br> <br>
<!-- /.progress-group --> <!-- /.progress-group -->
<div class="progress-group"> <div class="progress-group">
<?php if(!empty($revenuebudgt)) <?php if (!empty($revenuebudgt)) {
{ foreach ($revenuebudgt as $revenue) {
foreach($revenuebudgt as $revenue)
{
?> ?>
<span class="description-text"><strong style="font-size:16px;">REVENUE :&nbsp;&nbsp;</strong><strong style="color:#dd4b39;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $revenue->totalrevenuebudget; ?></strong></span> <span class="description-text"><strong style="font-size:16px;">REVENUE :&nbsp;&nbsp;</strong><strong style="color:#dd4b39;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $revenue->totalrevenuebudget; ?></strong></span>
@ -971,11 +1044,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<br> <br>
<!-- /.progress-group --> <!-- /.progress-group -->
<div class="progress-group"> <div class="progress-group">
<?php if(!empty($importbudgt)) <?php if (!empty($importbudgt)) {
{ foreach ($importbudgt as $import) {
foreach($importbudgt as $import)
{
?> ?>
<span class="description-text"><strong style="font-size:16px;">IMPORT &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</strong><strong style="color:#00a65a;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $import->totalimportbudget; ?></strong></span> <span class="description-text"><strong style="font-size:16px;">IMPORT &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</strong><strong style="color:#00a65a;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $import->totalimportbudget; ?></strong></span>
@ -989,11 +1059,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<br> <br>
<!-- /.progress-group --> <!-- /.progress-group -->
<div class="progress-group"> <div class="progress-group">
<?php if(!empty($capitalbud)) <?php if (!empty($capitalbud)) {
{ foreach ($capitalbud as $capital) {
foreach($capitalbud as $capital)
{
?> ?>
<span class="description-text"><strong style="font-size:16px;">CAPITAL &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp</strong><strong style="color:#f39c12;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $capital->totalcapitalbudget; ?></strong></span> <span class="description-text"><strong style="font-size:16px;">CAPITAL &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp</strong><strong style="color:#f39c12;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $capital->totalcapitalbudget; ?></strong></span>
@ -1027,11 +1094,9 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<div class="col-xs-6 col-md-3 text-center"> <div class="col-xs-6 col-md-3 text-center">
<div class="description-block border-right"> <div class="description-block border-right">
<?php foreach ($servicebudgt as $service) <?php foreach ($servicebudgt as $service)
if(!empty($typebal)) if (!empty($typebal)) {
{
foreach ($typebal as $serviceb) foreach ($typebal as $serviceb)
$sb=$service->totalservicebudget-$serviceb->sr; $sb = $service->totalservicebudget - $serviceb->sr; {
{
?> ?>
<div class="knob-label"><strong style="color:#00c0ef">SERVICE BUDGET</strong></div> <div class="knob-label"><strong style="color:#00c0ef">SERVICE BUDGET</strong></div>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php <input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php
@ -1051,11 +1116,9 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<?php // if(!empty($totalrevenuepo)) <?php // if(!empty($totalrevenuepo))
// { // {
foreach ($revenuebudgt as $revenue) foreach ($revenuebudgt as $revenue)
if(!empty($typebal)) if (!empty($typebal)) {
{
foreach ($typebal as $revenueb) foreach ($typebal as $revenueb)
$rb=$revenue->totalrevenuebudget-$revenueb->rv; $rb = $revenue->totalrevenuebudget - $revenueb->rv; {
{
?> ?>
<div class="knob-label"><strong style="color:#dd4b39">REVENUE BUDGET</strong></div> <div class="knob-label"><strong style="color:#dd4b39">REVENUE BUDGET</strong></div>
@ -1075,8 +1138,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<?php foreach ($importbudgt as $import) <?php foreach ($importbudgt as $import)
if (!empty($typebal)) { if (!empty($typebal)) {
foreach ($typebal as $importb) foreach ($typebal as $importb)
$im=$import->totalimportbudget-$importb->im; $im = $import->totalimportbudget - $importb->im; {
{
?> ?>
<div class="knob-label"><strong style="color:#00a65a">IMPORT BUDGET</strong></div> <div class="knob-label"><strong style="color:#00a65a">IMPORT BUDGET</strong></div>
@ -1094,8 +1156,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<?php foreach ($capitalbud as $capital) <?php foreach ($capitalbud as $capital)
if (!empty($typebal)) { if (!empty($typebal)) {
foreach ($typebal as $capitalb) foreach ($typebal as $capitalb)
$ca=$capital->totalcapitalbudget-$capitalb->ca; $ca = $capital->totalcapitalbudget - $capitalb->ca; {
{
?> ?>
<div class="knob-label"><strong style="color:#f39c12">CAPITAL BUDGET</strong></div> <div class="knob-label"><strong style="color:#f39c12">CAPITAL BUDGET</strong></div>
@ -1167,10 +1228,10 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="<?php echo base_url(); ?>assets/plugins/morris/morris.min.js"></script> <script src="<?php echo base_url(); ?>assets/plugins/morris/morris.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
/* jQueryKnob */ $(".knob").knob({ /* jQueryKnob */
$(".knob").knob({
/*change : function (value) { /*change : function (value) {
@ -1193,29 +1254,41 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
draw: function() { // "tron" case draw: function() { // "tron" case
if (this.$.data('skin') == 'tron') { var a = this.angle(this.cv) // Angle if (this.$.data('skin') == 'tron') {
var a = this.angle(this.cv) // Angle
, sa = this.startAngle // Previous start angle ,
sa = this.startAngle // Previous start angle
, sat = this.startAngle // Start angle ,
sat = this.startAngle // Start angle
, ea // Previous end angle ,
ea // Previous end angle
, eat = sat + a // End angle , eat = sat + a // End angle
, r = true; this.g.lineWidth = this.lineWidth; this.o.cursor ,
r = true;
this.g.lineWidth = this.lineWidth;
this.o.cursor
&& (sat = eat - 0.3) &&
(sat = eat - 0.3)
&& (eat = eat + 0.3); if (this.o.displayPrevious) { &&
(eat = eat + 0.3);
if (this.o.displayPrevious) {
ea = this.startAngle + this.angle(this.value); ea = this.startAngle + this.angle(this.value);
this.o.cursor this.o.cursor
&& (sa = ea - 0.3) &&
(sa = ea - 0.3)
&& (ea = ea + 0.3); &&
(ea = ea + 0.3);
this.g.beginPath(); this.g.beginPath();
@ -1225,13 +1298,15 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
this.g.stroke(); this.g.stroke();
} this.g.beginPath(); }
this.g.beginPath();
this.g.strokeStyle = r ? this.o.fgColor : this.fgColor; this.g.strokeStyle = r ? this.o.fgColor : this.fgColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false); this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false);
this.g.stroke(); this.g.lineWidth = 2; this.g.stroke();
this.g.lineWidth = 2;
this.g.beginPath(); this.g.beginPath();
@ -1239,7 +1314,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false); this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
this.g.stroke(); return false; this.g.stroke();
return false;
} }
@ -1250,7 +1326,6 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
/* END JQUERY KNOB */ /* END JQUERY KNOB */
}) })
</script> </script>
<!-- Main row --> <!-- Main row -->
@ -1268,7 +1343,6 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script> <script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script>
<script> <script>
/* ChartJS /* ChartJS
* ------- * -------
* Here we will create a few charts using ChartJS * Here we will create a few charts using ChartJS
@ -1419,8 +1493,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
// Get context with jQuery - using jQuery's .get() method. // Get context with jQuery - using jQuery's .get() method.
var pieChartCanvas = $("#pieChart").get(0).getContext("2d"); var pieChartCanvas = $("#pieChart").get(0).getContext("2d");
var pieChart = new Chart(pieChartCanvas); var pieChart = new Chart(pieChartCanvas);
var PieData = [ var PieData = [{
{
value: 700, value: 700,
color: "#f56954", color: "#f56954",
highlight: "#f56954", highlight: "#f56954",
@ -1489,9 +1562,6 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
// //----------------- // //-----------------
// //- END PIE CHART - // //- END PIE CHART -
// //----------------- // //-----------------
</script> </script>

View File

@ -290,7 +290,7 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
<script> <script>
<!-- script for table , It works under the datatable plugin-->
function validate_Vechicle(){ function validate_Vechicle(){
var reg = /^^[A-Z]{2}\s[0-9]{2}\s[A-Z]{2}\s[0-9]{4}$/; var reg = /^^[A-Z]{2}\s[0-9]{2}\s[A-Z]{2}\s[0-9]{4}$/;