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>
|
||||
<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 class="col-xs-3">
|
||||
<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.min.js"></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() {
|
||||
$('#datepick').datepicker({
|
||||
dateFormat: "dd-mm-yy",
|
||||
maxDate: +0,
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$('#datepi').datepicker({
|
||||
maxDate: +0,
|
||||
@ -65,19 +15,14 @@ $(function() {
|
||||
changeYear: true,
|
||||
showButtonPanel: false,
|
||||
// dateFormat: 'mm-yy',
|
||||
|
||||
// onClose: function(dateText, inst) {
|
||||
// $(this).datepicker('setDate', new Date(inst.selectedYear, inst.selectedMonth, 1));
|
||||
|
||||
|
||||
onClose: function(dateText, inst) {
|
||||
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
|
||||
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
|
||||
$(this).val($.datepicker.formatDate('mm-yy', new Date(year, month, 1)));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(".monthPicker").focus(function () {
|
||||
$(".ui-datepicker-calendar").hide();
|
||||
$("#ui-datepicker-div").position({
|
||||
@ -86,14 +31,7 @@ $(function() {
|
||||
of: $(this)
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
@ -124,6 +62,9 @@ $(function() {
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
span .hights {
|
||||
background-color: green;
|
||||
}
|
||||
.edit{
|
||||
background-color:#eeffcc ! important;
|
||||
}
|
||||
@ -143,7 +84,7 @@ th{
|
||||
</br>
|
||||
<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="col-xs-12">
|
||||
<div class="box">
|
||||
@ -157,9 +98,7 @@ th{
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<!-- <div class="row">
|
||||
</div>
|
||||
<hr> -->
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
@ -208,25 +147,12 @@ th{
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
|
||||
<form method="post" id="psc" action="<?php echo base_url() ?>monthlypay/salarycost" enctype="multipart/form-data">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-2"><br>
|
||||
|
||||
|
||||
<input type="text" class="form-control monthPicker" style="z-index: 100" id="datepi" name="datepi" >
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-2"><br>
|
||||
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||
value="View Report" id= "btn">
|
||||
@ -235,21 +161,28 @@ th{
|
||||
</form>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<center>
|
||||
<small>
|
||||
<!-- <div id="table"> -->
|
||||
<center ><h5>
|
||||
<?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')){
|
||||
$month = $this->input->post('month');
|
||||
echo '('.$month.')';
|
||||
$year=substr($date,3,6);
|
||||
|
||||
echo 'Production Salary Cost'.'('.$monthName.'-'.$year.')';
|
||||
|
||||
}
|
||||
?></small>
|
||||
?>
|
||||
|
||||
<!-- </h3> -->
|
||||
</h5>
|
||||
</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;">
|
||||
<thead style="background-color:#ddf;">
|
||||
<tr>
|
||||
@ -274,8 +207,6 @@ th{
|
||||
?>
|
||||
<tr>
|
||||
<td id="sno<?php echo $key?>"><?php echo $ps->sno ?></td>
|
||||
|
||||
|
||||
<td id="datepick<?php echo $key?>"><?php
|
||||
if($ps->date !='0000-00-00'){
|
||||
$date = date("d-m-Y",strtotime($ps->date));
|
||||
@ -293,15 +224,11 @@ th{
|
||||
echo number_format($ps->totalsalary , 0, '.', '');
|
||||
?></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>
|
||||
|
||||
</button></td>
|
||||
<!-- class ="glyphicon glyphicon-file" -->
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -310,6 +237,8 @@ th{
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</div></div>
|
||||
<p> </p>
|
||||
<hr>
|
||||
|
||||
@ -317,7 +246,7 @@ th{
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div></b></div></div>
|
||||
</section>
|
||||
</div>
|
||||
<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.colVis.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
table = $('#testreport').DataTable( {
|
||||
@ -342,7 +269,7 @@ th{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title: $('h1').text(),
|
||||
title:$('h5').text(),
|
||||
exportOptions: {
|
||||
//columns: ':visible'
|
||||
columns: ':lt(6)', orthogonal: 'export'
|
||||
@ -353,12 +280,7 @@ th{
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
//
|
||||
|
||||
|
||||
function changeInput(id)
|
||||
{
|
||||
|
||||
@ -373,18 +295,12 @@ th{
|
||||
|
||||
document.getElementById("salary"+id).innerHTML = cals;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$('#datepick').change(function() {
|
||||
// var datepick = $('#emp').val();
|
||||
var lastChoose = localStorage.getItem("lastChoose");
|
||||
if(lastChoose === $(this).val() ) {
|
||||
alert('Already Choosen')
|
||||
}else {
|
||||
|
||||
|
||||
localStorage.setItem("lastChoose", $(this).val() );
|
||||
var id = $(this).val();
|
||||
//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>
|
||||
@ -478,15 +338,13 @@ th{
|
||||
// }
|
||||
if($('#pton').val().length < 1)
|
||||
{
|
||||
alert('Please Enter the Production');
|
||||
alert('Please Enter value in Ton');
|
||||
$("#pton").focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function cal(){
|
||||
var a= $("#pton").val();
|
||||
var b= $("#today_salary").val();
|
||||
@ -494,14 +352,9 @@ th{
|
||||
//alert(calc);
|
||||
$("#calc").val(calc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function edit(id){
|
||||
|
||||
//alert (id);
|
||||
var sno =parseFloat(document.getElementById('sno'+id).textContent);
|
||||
|
||||
var date =document.getElementById('datepick'+id).innerText;
|
||||
var prod=parseFloat(document.getElementById('pton'+id).textContent);
|
||||
var pra =parseFloat(document.getElementById('today_abs'+id).textContent);
|
||||
@ -518,7 +371,6 @@ th{
|
||||
alert(data);
|
||||
// window.location.href="monthlypay/productionsalary";
|
||||
window.location.reload();
|
||||
|
||||
}//success function closed
|
||||
|
||||
});//ajax function closed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user