batchcard issue fixed
This commit is contained in:
parent
92df4b36d1
commit
6a29ca3ab4
@ -10,7 +10,7 @@
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php base_url() ?>batchcard/getMaintListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
<a href="<?php echo base_url() ?>batchcard/getMaintListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
@ -208,9 +208,6 @@ if(stop.length != 5){
|
||||
m+=60;
|
||||
|
||||
|
||||
}
|
||||
if(m < 10){
|
||||
m = "0"+m;
|
||||
}
|
||||
atime = h+':'+m;
|
||||
//console.log(atime);
|
||||
|
||||
@ -43,7 +43,7 @@ if(!empty($MaintEdit))
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php base_url() ?>batchcard/getMaintListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
<a href="<?php echo base_url() ?>batchcard/getMaintListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
@ -257,7 +257,6 @@ if(stop.length != 5){
|
||||
if(h < 0){h=0;}
|
||||
m+=60;
|
||||
|
||||
|
||||
}
|
||||
atime = h+':'+m;
|
||||
//console.log(atime);
|
||||
|
||||
@ -201,7 +201,7 @@ td{ padding:3px;}
|
||||
border-color:#ebebe0;
|
||||
|
||||
}-->
|
||||
|
||||
/**/
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
@ -261,65 +261,70 @@ td{ padding:3px;}
|
||||
<th rowspan="2" > Date </th>
|
||||
<th rowspan="2">Auto Start</th>
|
||||
<th rowspan="2">Auto Stop</th>
|
||||
<th rowspan="2">Total Hrs</th>
|
||||
|
||||
<th rowspan="2">Total Hrs</th>
|
||||
<th rowspan="2">less up to feeding start</th>
|
||||
|
||||
<th rowspan="2">less maintenance</th>
|
||||
<th rowspan="2">Less Break down hours</th>
|
||||
<th rowspan="2">Total burner running time</th>
|
||||
<th rowspan="2">Total Feeding Hours</th>
|
||||
|
||||
<th colspan="3">ED Details</th>
|
||||
|
||||
<th colspan="2">Rotary Dryer</th>
|
||||
<th colspan="2">TRP Rough Sand</th>
|
||||
<th colspan="2">TRP Fine Sand</th>
|
||||
<th colspan="2">Gas for Trip</th>
|
||||
<th colspan="2">Water</th>
|
||||
|
||||
<th colspan="3">Diesel for Bull</th>
|
||||
<th colspan="3">Diesel for Rotary Dryer</th>
|
||||
<th colspan="3">Power Consumption</th>
|
||||
<th colspan="3">No Of Person Worked</th>
|
||||
|
||||
|
||||
<th rowspan="2">Worked Done By</th>
|
||||
|
||||
<th style="width:25px;!important" rowspan="2">Approved By</th>
|
||||
|
||||
<th rowspan="2"> Remarks </th>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<tr> <th >Running Hrs</th>
|
||||
<tr>
|
||||
<th >Running Hrs</th>
|
||||
<th >Receipt</th>
|
||||
<th >Issues</th>
|
||||
|
||||
<th >Input</th>
|
||||
<th >Output</th>
|
||||
<th >Receipt</th>
|
||||
|
||||
<th >Issues</th>
|
||||
<th >Receipt</th>
|
||||
|
||||
<th >Issues</th>
|
||||
<th >Receipt</th>
|
||||
<th >Consumption</th>
|
||||
|
||||
<th >Receipt</th>
|
||||
<th >Consumption</th>
|
||||
|
||||
<th >Receipt</th>
|
||||
<th >Consumption</th>
|
||||
<th >Running Hrs</th>
|
||||
|
||||
<th >Receipt</th>
|
||||
<th >Consumption</th>
|
||||
<th >Running Hrs</th>
|
||||
|
||||
<th >Opening Reading</th>
|
||||
<th >Close Reading</th>
|
||||
|
||||
<th >Total</th>
|
||||
<th >Engineers</th>
|
||||
<th >Operators</th>
|
||||
<th >Helpers</th></tr>
|
||||
|
||||
|
||||
<th >Helpers</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
@ -374,12 +379,10 @@ td{ padding:3px;}
|
||||
$dailydate = date_format(date_create($hdata->ddate),'d-m-Y');
|
||||
$id=$hdata->dailyid;
|
||||
?>
|
||||
<tr title="<?php echo $dailydate;?>">
|
||||
<td><a class="test" href="<?php echo base_url()?>batchcard/editDailyData/<?php echo $id;?>" ><?php echo $dailydate;?></a></td>
|
||||
<tr title="<?php echo $dailydate;?>">
|
||||
<td><a class="test" href="<?php echo base_url()?>batchcard/editDailyData/<?php echo $id;?>" ><?php echo $dailydate;?></a></td>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
//if($d == $dailydate){
|
||||
$auto = explode('-',$hdata->description);
|
||||
$start = explode(':',$auto[0]);
|
||||
@ -416,45 +419,215 @@ td{ padding:3px;}
|
||||
<td ><?php echo $hdata->less_feeding_start; $total_feeding_start += $hdata->less_feeding_start;?></td>
|
||||
<td ><a class="test" href="<?php echo base_url()?>batchcard/editDailyData/<?php echo $id;?>#Mnt_div" >
|
||||
<?php echo $hdata->less_maintenance;
|
||||
$total_less_maintenance+= $hdata->less_maintenance;?></a></td>
|
||||
//$total_less_maintenance+= $hdata->less_maintenance;
|
||||
|
||||
$lm_time = explode('.',$hdata->less_maintenance);
|
||||
$lm_hrs += $lm_time[0];
|
||||
$lm_min += $lm_time[1];
|
||||
|
||||
if ($lm_min >= 60)
|
||||
{
|
||||
$lm_hours = floor($lm_min/60);
|
||||
$lm_minutes = $lm_min % 60;
|
||||
}
|
||||
if($lm_minutes != ''){
|
||||
$final_lm_hrs = $lm_hrs+$lm_hours;
|
||||
$final_lm_mins = round($lm_minutes);
|
||||
}
|
||||
else{
|
||||
$final_lm_hrs = $lm_hrs+$lm_hours;
|
||||
$final_lm_mins = $lm_min;
|
||||
}
|
||||
|
||||
$total_less_maintenance = $final_lm_hrs .'.'. $final_lm_mins;
|
||||
|
||||
?></a></td>
|
||||
|
||||
<td ><a class="test" href="<?php echo base_url()?>batchcard/editDailyData/<?php echo $id;?>#Mnt_div" >
|
||||
<?php echo $hdata->less_break_down_hrs;$total_less_break_down_hrs+=$hdata->less_break_down_hrs;?></a></td>
|
||||
<?php echo $hdata->less_break_down_hrs;
|
||||
//$total_less_break_down_hrs+=$hdata->less_break_down_hrs;
|
||||
|
||||
$lb_time = explode('.',$hdata->less_break_down_hrs);
|
||||
$lb_hrs += $lb_time[0];
|
||||
$lb_min += $lb_time[1];
|
||||
|
||||
<td ><?php echo $hdata->total_burner_running_time;$total_burner_running_time+=$hdata->total_burner_running_time;?></td>
|
||||
<td ><?php echo $hdata->total_feeding_hrs;$total_feeding_hrs+=$hdata->total_feeding_hrs;?></td>
|
||||
if ($lb_min >= 60)
|
||||
{
|
||||
$lb_hours = floor($lb_min/60);
|
||||
$lb_minutes = $lb_min % 60;
|
||||
}
|
||||
if($lb_minutes != ''){
|
||||
$final_lb_hrs = $lb_hrs+$lb_hours;
|
||||
$final_lb_mins = round($lb_minutes);
|
||||
}
|
||||
else{
|
||||
$final_lb_hrs = $lb_hrs+$lb_hours;
|
||||
$final_lb_mins = $lb_min;
|
||||
}
|
||||
|
||||
<td ><?php echo $hdata->ed_running_hrs;$total_ed_rhrs+=$hdata->ed_running_hrs;?></td>
|
||||
$total_less_break_down_hrs = $final_lb_hrs .'.'. $final_lb_mins;
|
||||
|
||||
?></a></td>
|
||||
<td >
|
||||
<?php echo $hdata->total_burner_running_time;
|
||||
|
||||
|
||||
$tbr_time = explode('.',$hdata->total_burner_running_time);
|
||||
$tbr_hrs += $tbr_time[0];
|
||||
$tbr_min += $tbr_time[1];
|
||||
|
||||
if ($tbr_min >= 60)
|
||||
{
|
||||
$tbr_hours = floor($tbr_min/60);
|
||||
$tbr_minutes = $tbr_min % 60;
|
||||
}
|
||||
if($tbr_minutes != ''){
|
||||
$final_tbr_hrs = $tbr_hrs+$tbr_hours;
|
||||
$final_tbr_mins = round($tbr_minutes);
|
||||
}
|
||||
else{
|
||||
$final_tbr_hrs = $tbr_hrs+$tbr_hours;
|
||||
$final_tbr_mins = $tbr_min;
|
||||
}
|
||||
|
||||
$total_burner_running_time = $final_tbr_hrs .'.'. $final_tbr_mins;
|
||||
//$total_burner_running_time+=$hdata->total_burner_running_time;
|
||||
|
||||
?></td>
|
||||
<td >
|
||||
<?php echo $hdata->total_feeding_hrs;
|
||||
|
||||
$tfh_time = explode('.',$hdata->total_feeding_hrs);
|
||||
$tfh_hrs += $tfh_time[0];
|
||||
$tfh_min += $tfh_time[1];
|
||||
|
||||
if ($tfh_min >= 60)
|
||||
{
|
||||
$tfh_hours = floor($tfh_min/60);
|
||||
$tfh_minutes = $tfh_min % 60;
|
||||
}
|
||||
if($tfh_minutes != ''){
|
||||
$final_tfh_hrs = $tfh_hrs+$tfh_hours;
|
||||
$final_tfh_mins = round($tfh_minutes);
|
||||
}
|
||||
else{
|
||||
$final_tfh_hrs = $tfh_hrs+$tfh_hours;
|
||||
$final_tfh_mins = $tfh_min;
|
||||
}
|
||||
|
||||
$total_feeding_hrs = $final_tfh_hrs .'.'. $final_tfh_mins;
|
||||
//$total_feeding_hrs+=$hdata->total_feeding_hrs;
|
||||
|
||||
?></td>
|
||||
<td >
|
||||
<?php echo $hdata->ed_running_hrs;
|
||||
|
||||
$edrh_time = explode('.',$hdata->ed_running_hrs);
|
||||
$edrh_hrs += $edrh_time[0];
|
||||
$edrh_min += $edrh_time[1];
|
||||
|
||||
if ($edrh_min >= 60)
|
||||
{
|
||||
$edrh_hours = floor($edrh_min/60);
|
||||
$edrh_minutes = $edrh_min % 60;
|
||||
}
|
||||
if($edrh_minutes != ''){
|
||||
$final_edrh_hrs = $edrh_hrs+$edrh_hours;
|
||||
$final_edrh_mins = round($edrh_minutes);
|
||||
}
|
||||
else{
|
||||
$final_edrh_hrs = $edrh_hrs+$edrh_hours;
|
||||
$final_edrh_mins = $edrh_min;
|
||||
}
|
||||
|
||||
$total_ed_rhrs = $final_edrh_hrs .'.'. $final_edrh_mins;
|
||||
//$total_ed_rhrs+=$hdata->ed_running_hrs;
|
||||
|
||||
?></td>
|
||||
<td ><?php echo $hdata->ed_receipt;$total_ed_receipt+=$hdata->ed_receipt;?></td>
|
||||
|
||||
<td ><?php echo $hdata->ed_issues;$total_ed_issues+=$hdata->ed_issues;?></td>
|
||||
<td ><?php echo $hdata->rotary_input;$total_rotary_input+=$hdata->rotary_input;?></td>
|
||||
<td ><?php echo $hdata->rotary_output;$total_rotary_output+=$hdata->rotary_output;?></td>
|
||||
<td ><?php echo $hdata->trp_roughsand_receipt;$total_rough_sand_r+=$hdata->trp_roughsand_receipt;?></td>
|
||||
<td ><?php echo $hdata->trp_roughsand_issues;$total_rough_sand_i+=$hdata->trp_roughsand_issues;?></td>
|
||||
|
||||
<td ><?php echo $hdata->trp_finesand_receipt;$total_fine_sand_r+=$hdata->trp_finesand_receipt;?></td>
|
||||
<td ><?php echo $hdata->trp_finesand_issues;$total_fine_sand_i+=$hdata->trp_finesand_issues;?></td>
|
||||
<td ><?php echo $hdata->gas_for_trip_receipt;$total_gas_r+=$hdata->gas_for_trip_receipt;?></td>
|
||||
<td ><?php echo $hdata->gas_for_trip_consumption;$total_gas_c+=$hdata->gas_for_trip_consumption;?></td>
|
||||
<td ><?php echo $hdata->water_receipt;$total_water_r+=$hdata->water_receipt;?></td>
|
||||
|
||||
<td ><?php echo $hdata->water_consumption;$total_water_c+=$hdata->water_consumption;?></td>
|
||||
<td ><?php echo $hdata->diesel_receipt;$total_diesel_bull_r+=$hdata->diesel_receipt;?></td>
|
||||
<td ><?php echo $hdata->diesel_consumption;$total_diesel_bull_c+=$hdata->diesel_consumption;?></td>
|
||||
<td ><?php echo $hdata->diesel_runninig_hrs;$total_diesel_bull_rh+=$hdata->diesel_runninig_hrs;?></td>
|
||||
<td >
|
||||
<?php echo $hdata->diesel_runninig_hrs;
|
||||
|
||||
$drh_time = explode('.',$hdata->diesel_runninig_hrs);
|
||||
$drh_hrs += $drh_time[0];
|
||||
$drh_min += $drh_time[1];
|
||||
|
||||
if ($drh_min >= 60)
|
||||
{
|
||||
$drh_hours = floor($drh_min/60);
|
||||
$drh_minutes = $drh_min % 60;
|
||||
}
|
||||
if($drh_minutes != ''){
|
||||
$final_drh_hrs = $drh_hrs+$drh_hours;
|
||||
$final_drh_mins = round($drh_minutes);
|
||||
}
|
||||
else{
|
||||
$final_drh_hrs = $drh_hrs+$drh_hours;
|
||||
$final_drh_mins = $drh_min;
|
||||
}
|
||||
|
||||
$total_diesel_bull_rh = $final_drh_hrs .'.'. $final_drh_mins;
|
||||
//$total_diesel_bull_rh+=$hdata->diesel_runninig_hrs;
|
||||
|
||||
?></td>
|
||||
<td ><?php echo $hdata->diesel_dryer_receipt;$total_diesel_rotary_bull_r+=$hdata->diesel_dryer_receipt;?></td>
|
||||
|
||||
<td ><?php echo $hdata->diesel_dryer_consumption;$total_diesel_rotary_bull_c+=$hdata->diesel_dryer_consumption;?></td>
|
||||
<td ><?php echo $hdata->diesel_dryer_runninig_hrs;$total_diesel_rotary_bull_rh+=$hdata->diesel_dryer_runninig_hrs;?></td>
|
||||
<td ><?php echo $hdata->diesel_dryer_runninig_hrs;
|
||||
|
||||
$ddrh_time = explode('.',$hdata->diesel_dryer_runninig_hrs);
|
||||
$ddrh_hrs += $ddrh_time[0];
|
||||
$ddrh_min += $ddrh_time[1];
|
||||
|
||||
if ($ddrh_min >= 60)
|
||||
{
|
||||
$ddrh_hours = floor($ddrh_min/60);
|
||||
$ddrh_minutes = $ddrh_min % 60;
|
||||
}
|
||||
if($ddrh_minutes != ''){
|
||||
$final_ddrh_hrs = $ddrh_hrs+$ddrh_hours;
|
||||
$final_ddrh_mins = round($ddrh_minutes);
|
||||
}
|
||||
else{
|
||||
$final_ddrh_hrs = $ddrh_hrs+$ddrh_hours;
|
||||
$final_ddrh_mins = $ddrh_min;
|
||||
}
|
||||
|
||||
$total_diesel_rotary_bull_rh = $final_ddrh_hrs .'.'. $final_ddrh_mins;
|
||||
|
||||
// $total_diesel_rotary_bull_rh = $drr_hr .'.'. $drr_min;
|
||||
|
||||
?></td>
|
||||
<td ><?php echo $hdata->power_open_reading;?></td>
|
||||
<td ><?php echo $hdata->power_close_reading;?></td>
|
||||
<td ><?php $treading = ($hdata->power_close_reading - $hdata->power_open_reading);echo $treading;$total_power_total+=$treading;?></td>
|
||||
|
||||
<td ><?php echo $hdata->engineers;$total_engineers+=$hdata->engineers;?></td>
|
||||
<td ><?php echo $hdata->operators;$total_operators+=$hdata->operators;?></td>
|
||||
<td ><?php echo $hdata->helpers;$total_helpers+=$hdata->helpers;?></td>
|
||||
<td ><?php echo $hdata->FirstName.'-'.$hdata->LastName;?></td>
|
||||
<td style="width:25px;!important"><?php echo $hdata->approvedby;?></td>
|
||||
|
||||
<td ><?php echo $hdata->remarks;?></td>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</tr>
|
||||
|
||||
@ -465,7 +638,7 @@ td{ padding:3px;}
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
<!-- this is table footer part starts here-->
|
||||
<tr>
|
||||
<td>Total</td>
|
||||
<td> </td>
|
||||
@ -486,38 +659,11 @@ td{ padding:3px;}
|
||||
|
||||
echo $total_running_hrs;?></td>
|
||||
<td id="total_feeding_start"><?php echo $total_feeding_start;?></td>
|
||||
<td id="total_less_maintenance"><?php
|
||||
|
||||
$less_mnt = explode('.', $total_less_maintenance);
|
||||
if($less_mnt[1] >= 60 ){
|
||||
$less_mnt_hr = $less_mnt[0]+1;
|
||||
$less_mnt_min = $less_mnt[1]-60;
|
||||
}
|
||||
else{
|
||||
$less_mnt_hr = $less_mnt[0];
|
||||
$less_mnt_min = $less_mnt[1];
|
||||
}
|
||||
echo $less_mnt_hr .'.'. $less_mnt_min;
|
||||
?>
|
||||
</td>
|
||||
<td id="total_less_break_down_hrs">
|
||||
<?php
|
||||
$less_br = explode('.', $total_less_break_down_hrs);
|
||||
if($less_br[1] >= 60 ){
|
||||
$less_br_hr = $less_br[0]+1;
|
||||
$less_br_min = $less_br[1]-60;
|
||||
}
|
||||
else{
|
||||
$less_br_hr = $less_br[0];
|
||||
$less_br_min = $less_br[1];
|
||||
}
|
||||
echo $less_br_hr .'.'. $less_br_min;
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td id="total_less_maintenance"><?php echo $total_less_maintenance;?></td>
|
||||
<td id="total_less_break_down_hrs"><?php echo $total_less_break_down_hrs;?></td>
|
||||
<td id="total_burner_running_time"><?php echo $total_burner_running_time;?></td>
|
||||
<td id="total_feeding_hrs"><?php echo $total_feeding_hrs;?></td>
|
||||
<td id="total_ed_rhrs"><?php echo $total_ed_rhrs;?></td>
|
||||
<td id="total_ed_rhrs"><?php echo $total_ed_rhrs; ?></td>
|
||||
<td id="total_ed_receipt"><?php echo $total_ed_receipt;?></td>
|
||||
<td id="total_ed_issues"><?php echo $total_ed_issues;?></td>
|
||||
<td id="total_rotary_input"><?php echo $total_rotary_input;?></td>
|
||||
@ -533,6 +679,32 @@ td{ padding:3px;}
|
||||
<td id="total_diesel_bull_r"><?php echo $total_diesel_bull_r;?></td>
|
||||
<td id="total_diesel_bull_c"><?php echo $total_diesel_bull_c;?></td>
|
||||
<td id="total_diesel_bull_rh"><?php echo $total_diesel_bull_rh;?></td>
|
||||
<!-- $dr_time = explode('.',$total_diesel_bull_rh);
|
||||
if($dr_time[1] >= 60 ){
|
||||
$dr_hr = $dr_time[0]+1;
|
||||
$dr_min = $dr_time[1]-60;
|
||||
if($dr_min < 10){
|
||||
$dr_min = '0'.$dr_min;
|
||||
if($dr_min == 00){
|
||||
$dr_min = ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$dr_hr = $dr_time[0];
|
||||
$dr_min = $dr_time[1];
|
||||
if($dr_min == 00){
|
||||
$dr_min = ' ';
|
||||
}
|
||||
}
|
||||
if($dr_min == ' '){
|
||||
echo $dr_hr;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $dr_hr .'.'. $dr_min;
|
||||
} -->
|
||||
|
||||
<td id="total_diesel_rotary_bull_r"><?php echo $total_diesel_rotary_bull_r;?></td>
|
||||
<td id="total_diesel_rotary_bull_c"><?php echo $total_diesel_rotary_bull_c;?></td>
|
||||
<td id="total_diesel_rotary_bull_rh"><?php echo $total_diesel_rotary_bull_rh;?></td>
|
||||
|
||||
@ -58,12 +58,12 @@ foreach($emplist as $r)
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total TRP Running Hrs</label>
|
||||
<input type="text" id="trp_running_hrs" name="trp_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
<input type="text" id="trp_running_hrs" name="trp_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Less Up To Feeding Start</label>
|
||||
<input type="text" id="feeding_start" name="feeding_start" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
<input type="text" id="feeding_start" name="feeding_start" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -81,12 +81,12 @@ foreach($emplist as $r)
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total burner running time</label>
|
||||
<input type="text" id="total_burner_running_time" name="total_burner_running_time" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
<input type="text" id="total_burner_running_time" name="total_burner_running_time" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total Feeding Hours</label>
|
||||
<input type="text" id="total_feeding_hrs" name="total_feeding_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
<input type="text" id="total_feeding_hrs" name="total_feeding_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -115,7 +115,7 @@ foreach($emplist as $r)
|
||||
<legend>Ed Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Running Hrs</label>
|
||||
<input type="text" id="ed_running_hrs" name="ed_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
<input type="text" id="ed_running_hrs" name="ed_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" >
|
||||
@ -226,7 +226,7 @@ foreach($emplist as $r)
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Running Hrs</label>
|
||||
<input type="text" id="diesel_running_hrs" name="diesel_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
<input type="text" id="diesel_running_hrs" name="diesel_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
|
||||
@ -246,7 +246,7 @@ foreach($emplist as $r)
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Running Hrs</label>
|
||||
<input type="text" id="diesel_rotary_running_hrs" name="diesel_rotary_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
<input type="text" id="diesel_rotary_running_hrs" name="diesel_rotary_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -512,12 +512,7 @@ function keyValidate(e)
|
||||
}
|
||||
|
||||
}
|
||||
var maint_hr = 0;
|
||||
var maint_min = 0;
|
||||
var breakdown_hr = 0;
|
||||
var breakdown_min = 0;
|
||||
var Type = '';
|
||||
var Index = 1 ;
|
||||
var totalhr = '';
|
||||
function getReading(v)
|
||||
{
|
||||
@ -579,17 +574,23 @@ function keyValidate(e)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#Maint_Append').empty();
|
||||
var Index = 1 ;
|
||||
$.ajax({
|
||||
data:{id1:rd},
|
||||
method:"POST",
|
||||
url:"<?php echo base_url().'batchcard/getMaintenancesDetails'; ?>",
|
||||
success:function(data){
|
||||
|
||||
//alert(data);
|
||||
if(data)
|
||||
{
|
||||
var data = JSON.parse(data);
|
||||
//alert(data.length);
|
||||
var maint_hr = 0;
|
||||
var maint_min = 0;
|
||||
var breakdown_hr = 0;
|
||||
var breakdown_min = 0;
|
||||
|
||||
|
||||
$.each(data,function(i,arr){
|
||||
|
||||
@ -598,40 +599,32 @@ function keyValidate(e)
|
||||
totalhr = totalhr.split(":");
|
||||
maint_hr += parseFloat(totalhr[0]);
|
||||
maint_min += parseFloat(totalhr[1]);
|
||||
if(maint_min > 60 ){
|
||||
|
||||
if(maint_min >= 60 ){
|
||||
maint_hr = maint_hr+1;
|
||||
maint_min = maint_min-60;
|
||||
if(maint_min < 10){
|
||||
maint_min = "0"+maint_min;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#less_maintenance').val(maint_hr+'.'+maint_min);
|
||||
|
||||
//alert(parseFloat(maint_hr)+'.'+parseFloat(maint_min));
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
//alert('alert in else part ');
|
||||
totalhr = arr.Maint_Total_hrs
|
||||
totalhr = totalhr.split(":");
|
||||
breakdown_hr += parseFloat(totalhr[0]);
|
||||
breakdown_min += parseFloat(totalhr[1]);
|
||||
if(breakdown_min > 60 ){
|
||||
//alert(breakdown_min);
|
||||
if(breakdown_min >= 60 ){
|
||||
breakdown_hr = breakdown_hr+1;
|
||||
breakdown_min = breakdown_min-60;
|
||||
if(breakdown_min < 10){
|
||||
|
||||
breakdown_min = "0"+breakdown_min;
|
||||
}
|
||||
}
|
||||
// if(breakdown_min < 10){
|
||||
|
||||
// breakdown_min = "0"+breakdown_min;
|
||||
// }
|
||||
}
|
||||
|
||||
$('#less_break_down_hrs').val(parseFloat(breakdown_hr)+'.'+parseFloat(breakdown_min));
|
||||
|
||||
$('#less_break_down_hrs').val(breakdown_hr+'.'+breakdown_min);
|
||||
//$('#less_break_down_hrs').val(parseFloat(breakdown_hr)+'.'+parseFloat(breakdown_min));
|
||||
|
||||
}
|
||||
|
||||
@ -677,7 +670,25 @@ function keyValidate(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function hour_validation(value,id){
|
||||
|
||||
var getvalue = value.split(".");
|
||||
|
||||
if(parseFloat(getvalue[0]) > 24 || parseFloat(getvalue[1]) > 60)
|
||||
{
|
||||
alert("please Enter Valid Time");
|
||||
|
||||
document.getElementById(id).value="";
|
||||
setTimeout(function(){
|
||||
|
||||
$('#' + id).focus()},0
|
||||
);
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/**function calculateTime()
|
||||
{
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
<style>
|
||||
th{
|
||||
text-align:center ! important;
|
||||
@ -65,7 +64,7 @@ foreach($emplist as $r)
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total TRP Running Hrs</label>
|
||||
<input type="text" id="trp_running_hrs" name="trp_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->total_trp_running_hrs;?>"/>
|
||||
<input type="text" id="trp_running_hrs" name="trp_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->total_trp_running_hrs;?>" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
|
||||
@ -89,7 +88,7 @@ foreach($emplist as $r)
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total burner running time</label>
|
||||
<input type="text" id="total_burner_running_time" name="total_burner_running_time" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->total_burner_running_time;?>"/>
|
||||
<input type="text" id="total_burner_running_time" name="total_burner_running_time" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->total_burner_running_time;?>" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
|
||||
@ -99,7 +98,7 @@ foreach($emplist as $r)
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Total Feeding Hours</label>
|
||||
<input type="text" id="total_feeding_hrs" name="total_feeding_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->total_feeding_hrs;?>"/>
|
||||
<input type="text" id="total_feeding_hrs" name="total_feeding_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->total_feeding_hrs;?>" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-3">
|
||||
@ -125,7 +124,7 @@ foreach($emplist as $r)
|
||||
<legend>Ed Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Running Hrs</label>
|
||||
<input type="text" id="ed_running_hrs" name="ed_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->ed_running_hrs;?>"/>
|
||||
<input type="text" id="ed_running_hrs" name="ed_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->ed_running_hrs;?>" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
@ -236,7 +235,7 @@ foreach($emplist as $r)
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Running Hrs</label>
|
||||
<input type="text" id="diesel_running_hrs" name="diesel_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->diesel_runninig_hrs;?>"/>
|
||||
<input type="text" id="diesel_running_hrs" name="diesel_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->diesel_runninig_hrs;?>" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
|
||||
@ -256,7 +255,7 @@ foreach($emplist as $r)
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Running Hrs</label>
|
||||
<input type="text" id="diesel_rotary_running_hrs" name="diesel_rotary_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->diesel_dryer_runninig_hrs;?>"/>
|
||||
<input type="text" id="diesel_rotary_running_hrs" name="diesel_rotary_running_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->diesel_dryer_runninig_hrs;?>" onchange="hour_validation(this.value,this.id);"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -602,7 +601,29 @@ function keyValidate(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function hour_validation(value,id){
|
||||
//alert("new fun");
|
||||
// alert(value);
|
||||
// alert(id);
|
||||
|
||||
var getvalue = value.split(".");
|
||||
|
||||
if(isNaN(getvalue[0]) || isNaN(getvalue[1]) || parseFloat(getvalue[0]) > 24 || parseFloat(getvalue[1]) > 60)
|
||||
{
|
||||
alert("please Enter Valid Time");
|
||||
|
||||
document.getElementById(id).value="";
|
||||
setTimeout(function(){
|
||||
|
||||
$('#' + id).focus()},0
|
||||
);
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// function calculateTime()
|
||||
// {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user