production salary cost
This commit is contained in:
parent
548a8b1e6c
commit
22baedcd9d
@ -55,7 +55,7 @@
|
|||||||
<h4><span class="fa fa-money "> Finance Reports </span></h4>
|
<h4><span class="fa fa-money "> Finance Reports </span></h4>
|
||||||
<a href="<?php echo base_url(); ?>Report_costcenter" target="_blank" > Cost Center <p class="uk-text uk-margin-remove"></p></a>
|
<a href="<?php echo base_url(); ?>Report_costcenter" target="_blank" > Cost Center <p class="uk-text uk-margin-remove"></p></a>
|
||||||
|
|
||||||
<a href="<?php echo base_url(); ?>productionsalary" target="_blank" > SalaryCostforTonProduction <p class="uk-text uk-margin-remove"></p></a>
|
<a href="<?php echo base_url(); ?>productionsalary" target="_blank" > Production Salary Cost <p class="uk-text uk-margin-remove"></p></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-3">
|
<div class="col-xs-3">
|
||||||
<h4><span class="fa fa-inr"> Cashbook </span></h4>
|
<h4><span class="fa fa-inr"> Cashbook </span></h4>
|
||||||
|
|||||||
@ -1,62 +1,12 @@
|
|||||||
<!-- <?php
|
|
||||||
|
|
||||||
$datatablesdate = '';
|
|
||||||
if(!empty($productionsalary))
|
|
||||||
{
|
|
||||||
foreach ($productionsalary as $psc)
|
|
||||||
{
|
|
||||||
$datatablesdate = $psc->date;
|
|
||||||
$date = date("d-m-Y",strtotime($datatablesdate));
|
|
||||||
}
|
|
||||||
//print_r($date);
|
|
||||||
}
|
|
||||||
|
|
||||||
//print_r($date);
|
|
||||||
|
|
||||||
?> -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <script>
|
|
||||||
$('#datepick').datepicker()
|
|
||||||
if('#datepicker' = $datatablesdate){
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// $( function()
|
|
||||||
// {
|
|
||||||
// $('#datepick').datepicker({maxDate: 'Date', dateFormat: 'dd-mm-yy' });
|
|
||||||
// //$('#datepicker').datepicker({maxDate: 'Date', dateFormat: 'dd-mm-yy' });
|
|
||||||
// // $('#todate').datepicker({maxDate: 'Date', dateFormat: 'dd-mm-yy' });
|
|
||||||
// // .datepicker('setDate',new Date())
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// } );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#datepick').datepicker({
|
$('#datepick').datepicker({
|
||||||
dateFormat: "dd-mm-yy",
|
dateFormat: "dd-mm-yy",
|
||||||
maxDate: +0,
|
maxDate: +0,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#datepi').datepicker({
|
$('#datepi').datepicker({
|
||||||
maxDate: +0,
|
maxDate: +0,
|
||||||
@ -65,19 +15,14 @@ $(function() {
|
|||||||
changeYear: true,
|
changeYear: true,
|
||||||
showButtonPanel: false,
|
showButtonPanel: false,
|
||||||
// dateFormat: 'mm-yy',
|
// dateFormat: 'mm-yy',
|
||||||
|
|
||||||
// onClose: function(dateText, inst) {
|
// onClose: function(dateText, inst) {
|
||||||
// $(this).datepicker('setDate', new Date(inst.selectedYear, inst.selectedMonth, 1));
|
// $(this).datepicker('setDate', new Date(inst.selectedYear, inst.selectedMonth, 1));
|
||||||
|
|
||||||
|
|
||||||
onClose: function(dateText, inst) {
|
onClose: function(dateText, inst) {
|
||||||
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
|
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
|
||||||
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
|
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
|
||||||
$(this).val($.datepicker.formatDate('mm-yy', new Date(year, month, 1)));
|
$(this).val($.datepicker.formatDate('mm-yy', new Date(year, month, 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".monthPicker").focus(function () {
|
$(".monthPicker").focus(function () {
|
||||||
$(".ui-datepicker-calendar").hide();
|
$(".ui-datepicker-calendar").hide();
|
||||||
$("#ui-datepicker-div").position({
|
$("#ui-datepicker-div").position({
|
||||||
@ -86,14 +31,7 @@ $(function() {
|
|||||||
of: $(this)
|
of: $(this)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||||
<style>
|
<style>
|
||||||
@ -124,6 +62,9 @@ $(function() {
|
|||||||
{
|
{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
span .hights {
|
||||||
|
background-color: green;
|
||||||
|
}
|
||||||
.edit{
|
.edit{
|
||||||
background-color:#eeffcc ! important;
|
background-color:#eeffcc ! important;
|
||||||
}
|
}
|
||||||
@ -143,7 +84,7 @@ th{
|
|||||||
</br>
|
</br>
|
||||||
<section class="content" id="loadingcontent">
|
<section class="content" id="loadingcontent">
|
||||||
|
|
||||||
|
<h4><span style="background-color: #FFFF00">Make sure attendance entry made before entering data in the screen</span></h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@ -157,9 +98,7 @@ th{
|
|||||||
|
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- <div class="row">
|
|
||||||
</div>
|
|
||||||
<hr> -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -208,25 +147,12 @@ th{
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<form method="post" id="psc" action="<?php echo base_url() ?>monthlypay/salarycost" enctype="multipart/form-data">
|
<form method="post" id="psc" action="<?php echo base_url() ?>monthlypay/salarycost" enctype="multipart/form-data">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-2"><br>
|
<div class="col-md-2"><br>
|
||||||
|
|
||||||
|
|
||||||
<input type="text" class="form-control monthPicker" style="z-index: 100" id="datepi" name="datepi" >
|
<input type="text" class="form-control monthPicker" style="z-index: 100" id="datepi" name="datepi" >
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-2"><br>
|
<div class="col-md-2"><br>
|
||||||
<input type="submit" class="btn btn-success" name="btn_submit"
|
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||||
value="View Report" id= "btn">
|
value="View Report" id= "btn">
|
||||||
@ -235,21 +161,28 @@ th{
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
<!-- <div id="table"> -->
|
||||||
<center>
|
<center ><h5>
|
||||||
<small>
|
|
||||||
<?php
|
<?php
|
||||||
|
if($this->input->post('datepi')){
|
||||||
|
$date = $this->input->post('datepi');
|
||||||
|
$a=substr($date,0,2);
|
||||||
|
$monthName = date('F', mktime(0, 0, 0, $a, 10));
|
||||||
|
|
||||||
if($this->input->post('month')){
|
$year=substr($date,3,6);
|
||||||
$month = $this->input->post('month');
|
|
||||||
echo '('.$month.')';
|
echo 'Production Salary Cost'.'('.$monthName.'-'.$year.')';
|
||||||
|
|
||||||
}
|
}
|
||||||
?></small>
|
?>
|
||||||
|
|
||||||
<!-- </h3> -->
|
</h5>
|
||||||
</center>
|
</center>
|
||||||
<br/>
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
<div id="panel-recent-invoices" class="panel panel-default">
|
||||||
|
<body>
|
||||||
|
|
||||||
<table id="testreport" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align:center;">
|
<table id="testreport" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align:center;">
|
||||||
<thead style="background-color:#ddf;">
|
<thead style="background-color:#ddf;">
|
||||||
<tr>
|
<tr>
|
||||||
@ -274,8 +207,6 @@ th{
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="sno<?php echo $key?>"><?php echo $ps->sno ?></td>
|
<td id="sno<?php echo $key?>"><?php echo $ps->sno ?></td>
|
||||||
|
|
||||||
|
|
||||||
<td id="datepick<?php echo $key?>"><?php
|
<td id="datepick<?php echo $key?>"><?php
|
||||||
if($ps->date !='0000-00-00'){
|
if($ps->date !='0000-00-00'){
|
||||||
$date = date("d-m-Y",strtotime($ps->date));
|
$date = date("d-m-Y",strtotime($ps->date));
|
||||||
@ -293,15 +224,11 @@ th{
|
|||||||
echo number_format($ps->totalsalary , 0, '.', '');
|
echo number_format($ps->totalsalary , 0, '.', '');
|
||||||
?></td>
|
?></td>
|
||||||
<td id="salary<?php echo $key?>"><?php echo number_format($ps->salaryton);?></td>
|
<td id="salary<?php echo $key?>"><?php echo number_format($ps->salaryton);?></td>
|
||||||
<!-- <td ><i class ="glyphicon glyphicon-file id="edit<?php echo $key?>" onclick ="edit(<?php echo $key?>);"></i></td> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td><button type="button" class="btn btn-default" aria-label="Left Align" id="edit<?php echo $key?>" onclick ="edit(<?php echo $key?>);" value=""><u>Save</u>
|
<td><button type="button" class="btn btn-default" aria-label="Left Align" id="edit<?php echo $key?>" onclick ="edit(<?php echo $key?>);" value=""><u>Save</u>
|
||||||
|
|
||||||
</button></td>
|
</button></td>
|
||||||
<!-- class ="glyphicon glyphicon-file" -->
|
<!-- class ="glyphicon glyphicon-file" -->
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -310,6 +237,8 @@ th{
|
|||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</body>
|
||||||
|
</div></div>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@ -317,7 +246,7 @@ th{
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div></b></div></div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||||
@ -327,8 +256,6 @@ th{
|
|||||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
table = $('#testreport').DataTable( {
|
table = $('#testreport').DataTable( {
|
||||||
@ -342,7 +269,7 @@ th{
|
|||||||
extend: 'excelHtml5',
|
extend: 'excelHtml5',
|
||||||
footer: 'true',
|
footer: 'true',
|
||||||
//messageTop: $('h3').text(),
|
//messageTop: $('h3').text(),
|
||||||
title: $('h1').text(),
|
title:$('h5').text(),
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
//columns: ':visible'
|
//columns: ':visible'
|
||||||
columns: ':lt(6)', orthogonal: 'export'
|
columns: ':lt(6)', orthogonal: 'export'
|
||||||
@ -353,12 +280,7 @@ th{
|
|||||||
]
|
]
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
function changeInput(id)
|
function changeInput(id)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -373,18 +295,12 @@ th{
|
|||||||
|
|
||||||
document.getElementById("salary"+id).innerHTML = cals;
|
document.getElementById("salary"+id).innerHTML = cals;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#datepick').change(function() {
|
$('#datepick').change(function() {
|
||||||
// var datepick = $('#emp').val();
|
// var datepick = $('#emp').val();
|
||||||
var lastChoose = localStorage.getItem("lastChoose");
|
var lastChoose = localStorage.getItem("lastChoose");
|
||||||
if(lastChoose === $(this).val() ) {
|
if(lastChoose === $(this).val() ) {
|
||||||
alert('Already Choosen')
|
alert('Already Choosen')
|
||||||
}else {
|
}else {
|
||||||
|
|
||||||
|
|
||||||
localStorage.setItem("lastChoose", $(this).val() );
|
localStorage.setItem("lastChoose", $(this).val() );
|
||||||
var id = $(this).val();
|
var id = $(this).val();
|
||||||
//alert(id);
|
//alert(id);
|
||||||
@ -405,62 +321,6 @@ th{
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//var temparr=[];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $('#btn').click(function() {
|
|
||||||
|
|
||||||
|
|
||||||
// var da = $("#datepi").val();
|
|
||||||
|
|
||||||
// //alert(da);
|
|
||||||
|
|
||||||
// $.ajax({
|
|
||||||
// data:{term:da},
|
|
||||||
// dataType: 'json',
|
|
||||||
// type:"POST",
|
|
||||||
// url:"<?php echo base_url();?>monthlypay/forreport",
|
|
||||||
// success:function(json) {
|
|
||||||
|
|
||||||
// console.log (json);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//$("#databaseAppend").html("");
|
|
||||||
//$("#act").hide();
|
|
||||||
|
|
||||||
// json.forEach(function(obj) {
|
|
||||||
// $('#databaseAppend').append('<tr>'+
|
|
||||||
// '<td>'+obj.sno+'</td>'+
|
|
||||||
|
|
||||||
// // var date = date('Y-m-d',strtotime($date))+
|
|
||||||
// '<td>'+obj.date+'</td>'+
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// // '<td contenteditable="true" onkeyup="changeInput('+obj.sno+')" id="pton'+obj.sno+'">'+obj.production+'</td>'+
|
|
||||||
// '<td>'+obj.production+'</td>'+
|
|
||||||
// '<td>'+obj.emppresent+'</td>'+
|
|
||||||
// '<td>'+obj.totalsalary+'</td>'+
|
|
||||||
|
|
||||||
// // '<td id="today_salary'+obj.sno+'">'+obj.totalsalary+'</td>'+
|
|
||||||
|
|
||||||
|
|
||||||
// // '<td id="salary'+obj.sno+'">'+obj.salaryton+'</td>'+
|
|
||||||
// '<td>'+obj.salaryton+'</td>'+
|
|
||||||
// // '<td ><i class ="glyphicon glyphicon-file" id="edit'+obj.sno+'" onclick ="edit('+obj.sno+');"></i></td>'+
|
|
||||||
// '</tr>');
|
|
||||||
// }); -
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //alert( da);
|
|
||||||
|
|
||||||
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -478,15 +338,13 @@ th{
|
|||||||
// }
|
// }
|
||||||
if($('#pton').val().length < 1)
|
if($('#pton').val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter the Production');
|
alert('Please Enter value in Ton');
|
||||||
$("#pton").focus();
|
$("#pton").focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function cal(){
|
function cal(){
|
||||||
var a= $("#pton").val();
|
var a= $("#pton").val();
|
||||||
var b= $("#today_salary").val();
|
var b= $("#today_salary").val();
|
||||||
@ -494,14 +352,9 @@ th{
|
|||||||
//alert(calc);
|
//alert(calc);
|
||||||
$("#calc").val(calc);
|
$("#calc").val(calc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function edit(id){
|
function edit(id){
|
||||||
|
|
||||||
//alert (id);
|
//alert (id);
|
||||||
var sno =parseFloat(document.getElementById('sno'+id).textContent);
|
var sno =parseFloat(document.getElementById('sno'+id).textContent);
|
||||||
|
|
||||||
var date =document.getElementById('datepick'+id).innerText;
|
var date =document.getElementById('datepick'+id).innerText;
|
||||||
var prod=parseFloat(document.getElementById('pton'+id).textContent);
|
var prod=parseFloat(document.getElementById('pton'+id).textContent);
|
||||||
var pra =parseFloat(document.getElementById('today_abs'+id).textContent);
|
var pra =parseFloat(document.getElementById('today_abs'+id).textContent);
|
||||||
@ -518,7 +371,6 @@ th{
|
|||||||
alert(data);
|
alert(data);
|
||||||
// window.location.href="monthlypay/productionsalary";
|
// window.location.href="monthlypay/productionsalary";
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|
||||||
}//success function closed
|
}//success function closed
|
||||||
|
|
||||||
});//ajax function closed
|
});//ajax function closed
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user