NEW MODULE BATCH CARD
This commit is contained in:
parent
d9ab6b471f
commit
50530cb869
672
application/controllers/batchcard.php
Normal file
672
application/controllers/batchcard.php
Normal file
@ -0,0 +1,672 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
require APPPATH . '/third_party/mpdf/mpdf.php';
|
||||
/**
|
||||
* Class : cash Book Controller (cash Book)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Gandhimathi
|
||||
* @version : 1.1
|
||||
* @since : 13 Nov 2017
|
||||
*/
|
||||
class batchcard extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('batchcard_model');
|
||||
$this->isLoggedIn();
|
||||
$this->load->helper(array('form','url'));
|
||||
date_default_timezone_set('Asia/Kolkata');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
$data['emplist'] = $this->batchcard_model->getEmplistforReport();
|
||||
$this->global['pageTitle'] = 'Siddharth : Hourly Batch Card';
|
||||
$this->loadViews("hourly_batch_card", $this->global,$data,NULL);
|
||||
}
|
||||
|
||||
function saveHourlyBatchCard()
|
||||
{
|
||||
//echo "done";
|
||||
$data = $this->input->post('myData');
|
||||
// print_r($data);
|
||||
//echo "*********************";
|
||||
|
||||
$reportdate = $data['curdate'];
|
||||
$reporttime = $data['usr_time'];
|
||||
$reportdate = date_format(date_create($reportdate),'Y-m-d');
|
||||
$open_trp_reading = $data['open_trp_reading'];
|
||||
$close_trp_reading = $data['close_trp_reading'];
|
||||
$total_trp_reading = $data['total_trp_reading'];
|
||||
$auto_start = $data['auto_start'];
|
||||
$auto_stop = $data['auto_stop'];
|
||||
$atime = $data['atime'];
|
||||
|
||||
$feed30sec = $data['feed30sec'];
|
||||
$feed1hr = $data['feed1hr'];
|
||||
$inlet_temp = $data['inlet_temp'];
|
||||
$outlet_temp = $data['outlet_temp'];
|
||||
$output_feed_30 = $data['output_feed_30'];
|
||||
$output_feed_1 = $data['output_feed_1'];
|
||||
$weight_rough = $data['weight_rough'];
|
||||
$weight_fine = $data['weight_fine'];
|
||||
$total = $data['total'];
|
||||
$cyclone = $data['cyclone'];
|
||||
$remarks = $data['remarks'];
|
||||
$cby = $data['cby'];
|
||||
$approvedby = $data['approvedby'];
|
||||
//echo "******************************";
|
||||
$datatostore = array('report_date'=>$reportdate,'report_time'=>$reporttime,'opening_trp_reading'=>$open_trp_reading,'close_trp_reading'=>$close_trp_reading,'total_trp_reading'=>$total_trp_reading,'auto_start'=>$auto_start,'auto_stop'=>$auto_stop,'time'=>$atime,'feed30sec'=>$feed30sec,'feed1hr'=>$feed1hr,'inlet_temp'=>$inlet_temp,'outlet_temp'=>$outlet_temp,'output_feed_30'=>$output_feed_30,'output_feed_1'=>$output_feed_1,'weight_rough'=>$weight_rough,'weight_fine'=>$weight_fine,'total'=>$total,'cyclone'=>$cyclone,'remarks'=>$remarks,'checkedby'=>$cby,'approvedby'=>$approvedby);
|
||||
//print_r($datatostore);die();
|
||||
|
||||
$res = $this->batchcard_model->saveHourlyBatchInfo($datatostore);
|
||||
if($res == 1)
|
||||
{
|
||||
echo "<script>alert('Data Saved Successfully!');window.location.href='HourlyListing';</script>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script>alert('Something Went Wrong..!!');window.location.href='HourlyListing';</script>";
|
||||
}
|
||||
}
|
||||
|
||||
function HourlyListing()
|
||||
{
|
||||
|
||||
$data['allhourdata'] = $this->batchcard_model->getAllHourlyData();
|
||||
//print_r($data['allhourdata']);die();
|
||||
$this->global['pageTitle'] = 'Siddharth : Hourly Batch CardListing';
|
||||
$this->loadViews("hourlybatchcardlisting", $this->global,$data,NULL);
|
||||
}
|
||||
|
||||
function checkExistHour()
|
||||
{
|
||||
$bdate = $this->input->post('param1');
|
||||
$btime = $this->input->post('param2');
|
||||
//echo $bdate."-".$btime;
|
||||
$bdate = date_format(date_create($bdate),'Y-m-d');
|
||||
//echo $bdate."-".$btime;
|
||||
$res = $this->batchcard_model->checkExistHourlyData($bdate,$btime);
|
||||
if($res[0]->count == 1)
|
||||
{
|
||||
echo "Duplicate Entry...!Data Exist for Same Time Information";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function filterHourlyBatchData()
|
||||
{
|
||||
$hid='';
|
||||
$from = $this->input->post('fromdate');
|
||||
$to = $this->input->post('todate');
|
||||
|
||||
$from = date_format(date_create($from),'Y-m-d');
|
||||
$to = date_format(date_create($to),'Y-m-d');
|
||||
//echo $from.'-'.$to;exit();
|
||||
$data['allhourdata'] = $this->batchcard_model->getAllHourlyData($hid,$from,$to);
|
||||
$this->global['pageTitle'] = 'Siddharth : Hourly Batch CardListing';
|
||||
$this->loadViews("hourlybatchcardlisting", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
function editHourly()
|
||||
{
|
||||
$hid = $this->uri->segment(3);
|
||||
|
||||
$data['emplist'] = $this->batchcard_model->getEmplistforReport();
|
||||
$data['batchdata'] = $this->batchcard_model->getAllHourlyData($hid);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Hourly Batch Card';
|
||||
$this->loadViews("edit_hourly_batch_card", $this->global,$data,NULL);
|
||||
}
|
||||
|
||||
|
||||
function updateHourlyBatchCard()
|
||||
{
|
||||
$data = $this->input->post('myData');
|
||||
// print_r($data);
|
||||
//echo "*********************";
|
||||
$hid = $data['hid'];
|
||||
$reportdate = $data['curdate'];
|
||||
$reporttime = $data['usr_time'];
|
||||
$reportdate = date_format(date_create($reportdate),'Y-m-d');
|
||||
$open_trp_reading = $data['open_trp_reading'];
|
||||
$close_trp_reading = $data['close_trp_reading'];
|
||||
$total_trp_reading = $data['total_trp_reading'];
|
||||
$auto_start = $data['auto_start'];
|
||||
$auto_stop = $data['auto_stop'];
|
||||
$atime = $data['atime'];
|
||||
$feed30sec = $data['feed30sec'];
|
||||
$feed1hr = $data['feed1hr'];
|
||||
$inlet_temp = $data['inlet_temp'];
|
||||
$outlet_temp = $data['outlet_temp'];
|
||||
$output_feed_30 = $data['output_feed_30'];
|
||||
$output_feed_1 = $data['output_feed_1'];
|
||||
$weight_rough = $data['weight_rough'];
|
||||
$weight_fine = $data['weight_fine'];
|
||||
$total = $data['total'];
|
||||
$cyclone = $data['cyclone'];
|
||||
$remarks = $data['remarks'];
|
||||
$cby = $data['cby'];
|
||||
$approvedby = $data['approvedby'];
|
||||
|
||||
$datatostore = array('report_date'=>$reportdate,'report_time'=>$reporttime,'opening_trp_reading'=>$open_trp_reading,'close_trp_reading'=>$close_trp_reading,'total_trp_reading'=>$total_trp_reading,'auto_start'=>$auto_start,'auto_stop'=>$auto_stop,'time'=>$atime,'feed30sec'=>$feed30sec,'feed1hr'=>$feed1hr,'inlet_temp'=>$inlet_temp,'outlet_temp'=>$outlet_temp,'output_feed_30'=>$output_feed_30,'output_feed_1'=>$output_feed_1,'weight_rough'=>$weight_rough,'weight_fine'=>$weight_fine,'total'=>$total,'cyclone'=>$cyclone,'remarks'=>$remarks,'checkedby'=>$cby,'approvedby'=>$approvedby,'updatedby'=>$cby);
|
||||
//print_r($datatostore);die();
|
||||
|
||||
$res = $this->batchcard_model->updateHourlyBatchInfo($datatostore,$hid);
|
||||
if($res == 1)
|
||||
{
|
||||
echo "<script>alert('Data Saved Successfully!');window.location.href='HourlyListing';</script>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script>alert('Something Went Wrong..!!');window.location.href='HourlyListing';</script>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function loadDailyBatchCard()
|
||||
{
|
||||
$data['emplist'] = $this->batchcard_model->getEmplistforReport();
|
||||
$this->global['pageTitle'] = 'Siddharth : Daily Batch Card';
|
||||
$this->loadViews("dailybatchcard", $this->global,$data,NULL);
|
||||
}
|
||||
|
||||
|
||||
function dailyListing()
|
||||
{
|
||||
$data = array();
|
||||
if(empty($this->uri->segment(3)))
|
||||
{
|
||||
|
||||
$year = date("Y");
|
||||
$month = date("m");
|
||||
// $current = $current."-01";
|
||||
$data['month'] = $month.'-'.$year;
|
||||
$data['monthdays'] = cal_days_in_month(CAL_GREGORIAN,$month,$year);
|
||||
$data['hourdata'] = $this->batchcard_model->getDailyBatchCardData($month);
|
||||
$data['datefordisplay'] = date('M-Y');
|
||||
}
|
||||
else
|
||||
{
|
||||
$fromview = $this->uri->segment(3);
|
||||
$dmy = explode('-',$fromview);
|
||||
|
||||
$fromview_month = date('m', strtotime($dmy[0]));
|
||||
$fromview_year = $dmy[1];
|
||||
$data['month'] = $fromview_month.'-'.$fromview_year;
|
||||
$data['monthdays'] = cal_days_in_month(CAL_GREGORIAN,$fromview_month,$fromview_year);
|
||||
$data['hourdata'] = $this->batchcard_model->getDailyBatchCardData($fromview_month);
|
||||
$data['datefordisplay'] = $fromview;
|
||||
|
||||
|
||||
}
|
||||
//print_r($data['hourdata']);exit();
|
||||
$this->global['pageTitle'] = 'Siddharth : Daily Batch Card Listing';
|
||||
$this->loadViews("dailyBatchCardListing", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function saveDailyBatchCardData()//T_daily_batchcard_data
|
||||
{
|
||||
$ddate = $this->input->post('rdate');
|
||||
$ddate = date_format(date_create($ddate),'y-m-d');
|
||||
$description = $this->input->post('description');
|
||||
$trp_running_hrs = $this->input->post('trp_running_hrs');
|
||||
$feeding_start = $this->input->post('feeding_start');
|
||||
$less_maintenance = $this->input->post('less_maintenance');
|
||||
$less_break_down_hrs = $this->input->post('less_break_down_hrs');
|
||||
$total_burner_running_time = $this->input->post('total_burner_running_time');
|
||||
$total_feeding_hrs = $this->input->post('total_feeding_hrs');
|
||||
$gas_consumption_per_hour = $this->input->post('gas_consumption_per_hour');
|
||||
$gas_consumption_per_ton = $this->input->post('gas_consumption_per_ton');
|
||||
$total_gas_consumption = $this->input->post('total_gas_consumption');
|
||||
$ed_running_hrs = $this->input->post('ed_running_hrs');
|
||||
$ed_receipt = $this->input->post('ed_receipt');
|
||||
$ed_issues = $this->input->post('ed_issues');
|
||||
$rotatry_input = $this->input->post('rotary_input');
|
||||
$rotatry_output = $this->input->post('rotatry_output');
|
||||
$roughsand_receipt = $this->input->post('roughsand_receipt');
|
||||
$roughsand_issues = $this->input->post('roughsand_issues');
|
||||
$finesand_receipt = $this->input->post('finesand_receipt');
|
||||
$finesand_issues = $this->input->post('finesand_issues');
|
||||
$gastrip_receipt = $this->input->post('gastrip_receipt');
|
||||
$gastrip_consumption = $this->input->post('gastrip_consumption');
|
||||
$water_receipt = $this->input->post('water_receipt');
|
||||
$water_consumpiton = $this->input->post('water_consumpiton');
|
||||
$diesel_receipt = $this->input->post('diesel_receipt');
|
||||
$diesel_consumption = $this->input->post('diesel_consumption');
|
||||
$diesel_running_hrs = $this->input->post('diesel_running_hrs');
|
||||
$diesel_rotary_receipt = $this->input->post('diesel_rotary_receipt');
|
||||
$diesel_rotary_consumption = $this->input->post('diesel_rotary_consumption');
|
||||
$diesel_rotary_running_hrs = $this->input->post('diesel_rotary_running_hrs');
|
||||
$open_reading = $this->input->post('open_reading');
|
||||
$close_reading = $this->input->post('close_reading');
|
||||
$engineers = $this->input->post('engineers');
|
||||
$operators = $this->input->post('operators');
|
||||
$helpers = $this->input->post('helpers');
|
||||
$breakdown = $this->input->post('breakdown');
|
||||
$location = $this->input->post('location');
|
||||
$maintenance_description = $this->input->post('maintenance_description');
|
||||
$maintenance_reason = $this->input->post('maintenance_reason');
|
||||
$maintenance_time_from = $this->input->post('maintenance_time_from');
|
||||
$maintenance_time_to = $this->input->post('maintenance_time_to');
|
||||
$maintenance_total_hrs = $this->input->post('maintenance_total_hrs');
|
||||
$cost_material = $this->input->post('cost_material');
|
||||
$cost_labour = $this->input->post('cost_labour');
|
||||
$remarks = $this->input->post('remarks');
|
||||
$createdby = $this->session->userdata ( 'userId' );
|
||||
$createdtime = date('y-m-d');
|
||||
$approvedby = $this->input->post('approvedby');
|
||||
|
||||
$datatostore = array('ddate'=>$ddate,'description'=>$description,'total_trp_running_hrs'=>$trp_running_hrs,'less_feeding_start'=>$feeding_start,'less_maintenance'=>$less_maintenance,'less_break_down_hrs'=>$less_break_down_hrs,'total_burner_running_time'=>$total_burner_running_time,'total_feeding_hrs'=>$total_feeding_hrs,'gas_consumption_hr'=>$gas_consumption_per_hour,'gas_consumption_ton'=>$gas_consumption_per_ton,'total_gas_consumption'=>$total_gas_consumption,'ed_running_hrs'=>$ed_running_hrs,'ed_receipt'=>$ed_receipt,'ed_issues'=>$ed_issues,'rotary_input'=>$rotatry_input,'rotary_output'=>$rotatry_output,'trp_roughsand_receipt'=>$roughsand_receipt,'trp_roughsand_issues'=>$roughsand_issues,'trp_finesand_receipt'=>$finesand_receipt,'trp_finesand_issues'=>$finesand_issues,'gas_for_trip_receipt'=>$gastrip_receipt,'gas_for_trip_consumption'=>$gastrip_consumption,'water_receipt'=>$water_receipt,'water_consumption'=>$water_consumpiton,'diesel_receipt'=>$diesel_receipt,'diesel_consumption'=>$diesel_consumption,'diesel_runninig_hrs'=>$diesel_running_hrs,'diesel_dryer_receipt'=>$diesel_rotary_receipt,'diesel_dryer_consumption'=>$diesel_rotary_consumption,'diesel_dryer_runninig_hrs'=>$diesel_rotary_running_hrs,'power_open_reading'=>$open_reading,'power_close_reading'=>$close_reading,'engineers'=>$engineers,'operators'=>$operators,'helpers'=>$helpers,'maintenance_breakdown'=>$breakdown,'maintenance_location'=>$location,'maintenance_description'=>$maintenance_description,'maintenance_reason'=>$maintenance_reason,'maintenance_from_hrs'=>$maintenance_time_from,'maintenance_to_hrs'=>$maintenance_time_to,'maintenance_total_hrs'=>$maintenance_total_hrs,'cost_material'=>$cost_material,'cost_labour'=>$cost_labour,'remarks'=>$remarks,'createdby'=>$createdby,'createdon'=>$createdtime,'approvedby'=>$approvedby);
|
||||
//print_r($datatostore);
|
||||
$res = $this->batchcard_model->saveDailyBatchCardData($datatostore);
|
||||
if($res == 1)
|
||||
{
|
||||
echo "<script>alert('Data Saved Successfully..!');window.location.href='dailyListing';</script>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script>alert('Something Went Wrong. Try Again Later..!);window.location.href='dailyListing';</script>";
|
||||
}
|
||||
//exit();
|
||||
}
|
||||
|
||||
function checkExistDaily()
|
||||
{
|
||||
$rdate = $this->input->post('param1');
|
||||
$rdate = date_format(date_create($rdate),'Y-m-d');
|
||||
$res = $this->batchcard_model->checkExistDaily($rdate);
|
||||
echo $res[0]->count;
|
||||
}
|
||||
|
||||
|
||||
function getPowerConsumptionDetails()
|
||||
{
|
||||
|
||||
$rdate = $this->input->post('param1');
|
||||
$rdate = date_format(date_create($rdate),'Y-m-d');
|
||||
$res = $this->batchcard_model->getPowerConsumptionDetails($rdate);
|
||||
//print_r($res);exit();
|
||||
$counut = count($res);
|
||||
|
||||
$data[open] = '';
|
||||
$data[close] = '';
|
||||
$data[start] = '';
|
||||
$data[stop] = '';
|
||||
for($i=0; $i<=$counut; $i++)
|
||||
{
|
||||
if($i == 0)
|
||||
{
|
||||
$data[open] = $res[$i]->opening_trp_reading;
|
||||
$data[start] = $res[$i]->auto_start;
|
||||
}
|
||||
if($i == ($counut-1))
|
||||
{
|
||||
$data[close] = $res[$i]->close_trp_reading;
|
||||
$data[stop] = $res[$i]->auto_stop;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo json_encode($data);
|
||||
|
||||
}
|
||||
|
||||
function saveBatchCardtoExcel()
|
||||
{
|
||||
|
||||
|
||||
$abstractjsondata = $this->input->post('param1');
|
||||
$month = $this->input->post('param2');
|
||||
$abstractphpdata = json_decode($abstractjsondata,true);
|
||||
//print_r($abstractphpdata);
|
||||
|
||||
|
||||
$this->load->library('excel');
|
||||
|
||||
$this->excel->setActiveSheetIndex(0);
|
||||
$this->excel->getActiveSheet()->setTitle('Abstract Report for ' . $month);
|
||||
$this->excel->getActiveSheet()->setCellValue('A1', 'Abstrct Report for ' . $month);
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('A3', 'S.No.');
|
||||
$this->excel->getActiveSheet()->setCellValue('B3', 'Description');
|
||||
$this->excel->getActiveSheet()->setCellValue('C3', 'Running Hrs');
|
||||
$this->excel->getActiveSheet()->setCellValue('D3', 'Per Hour');
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('E3', 'Open Stock');
|
||||
$this->excel->getActiveSheet()->setCellValue('F3', 'Receipt');
|
||||
$this->excel->getActiveSheet()->setCellValue('G3', 'Total');
|
||||
$this->excel->getActiveSheet()->setCellValue('H3', 'Consumption');
|
||||
$this->excel->getActiveSheet()->setCellValue('I3', 'Closing Stock');
|
||||
$this->excel->getActiveSheet()->setCellValue('J3', 'Physical Stock');
|
||||
$this->excel->getActiveSheet()->setCellValue('K3', 'Difference');
|
||||
$this->excel->getActiveSheet()->mergeCells('A1:K1');
|
||||
$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
|
||||
$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);
|
||||
$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(16);
|
||||
$this->excel->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->setARGB('#333');
|
||||
|
||||
for($col = ord('A'); $col <= ord('K'); $col++){
|
||||
|
||||
$this->excel->getActiveSheet()->getColumnDimension(chr($col))->setAutoSize(true);
|
||||
$this->excel->getActiveSheet()->getStyle(chr($col))->getFont()->setSize(12);
|
||||
$this->excel->getActiveSheet()->getStyle(chr($col))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
|
||||
|
||||
}
|
||||
|
||||
$this->excel->getActiveSheet()
|
||||
->getStyle('A3:K3')
|
||||
->getFill()
|
||||
->setFillType(PHPExcel_Style_Fill::FILL_SOLID)
|
||||
->getStartColor()
|
||||
->setARGB('FF808080');
|
||||
|
||||
$this->excel->getActiveSheet()
|
||||
->getStyle('A3:K3')->
|
||||
getFont()->setBold(true);
|
||||
|
||||
$i = 5;
|
||||
$j = 1;
|
||||
//print_r($abstractphpdata);die();
|
||||
|
||||
foreach($abstractphpdata as $row){
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('A' . (string)($i),$j);
|
||||
$this->excel->getActiveSheet()->setCellValue('B' . (string)($i),$row['Particulars']);
|
||||
$this->excel->getActiveSheet()->setCellValue('C' . (string)($i),$row['Running Hrs']);
|
||||
$this->excel->getActiveSheet()->setCellValue('D' . (string)($i),$row['Per Hour']);
|
||||
$this->excel->getActiveSheet()->getStyle('D'.(string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('E' . (string)($i),$row['Open Stock']);
|
||||
$this->excel->getActiveSheet()->getStyle('E'.(string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
|
||||
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('F' . (string)($i),$row['Receipt']);
|
||||
$this->excel->getActiveSheet()->getStyle('F'.(string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
|
||||
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('G' . (string)($i),$row['Total']);
|
||||
$this->excel->getActiveSheet()->getStyle('G'.(string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('H' . (string)($i),$row['Consumption']);
|
||||
$this->excel->getActiveSheet()->getStyle('H'.(string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
|
||||
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('I' . (string)($i),$row['Closing Stock']);
|
||||
$this->excel->getActiveSheet()->getStyle('I'.(string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
|
||||
$this->excel->getActiveSheet()->setCellValue('J' . (string)($i),$row['Physical Stock']);
|
||||
$this->excel->getActiveSheet()->getStyle('J'.(string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
|
||||
|
||||
|
||||
|
||||
//$this->excel->getActiveSheet()->setCellValue('A6','HI');
|
||||
$i++;
|
||||
$j++;
|
||||
}
|
||||
$this->excel->getActiveSheet()->getProtection()->setSheet(true);
|
||||
$this->excel->getActiveSheet()->getProtection()->setSort(true);
|
||||
$this->excel->getActiveSheet()->getProtection()->setInsertRows(true);
|
||||
$this->excel->getActiveSheet()->getProtection()->setFormatCells(true);
|
||||
|
||||
$filename='Abstrct Report for'.$month.'.xls';
|
||||
header('Content-Type: application/vnd.ms-excel');
|
||||
header('Content-Disposition: attachment;filename="'.$filename.'"');
|
||||
header('Cache-Control: max-age=0');
|
||||
$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
|
||||
$objWriter->save('php://output');
|
||||
|
||||
|
||||
}
|
||||
|
||||
function editDailyData()
|
||||
{
|
||||
|
||||
$did = $this->uri->segment(3);
|
||||
$data['emplist'] = $this->batchcard_model->getEmplistforReport();
|
||||
$data['dailydata'] = $this->batchcard_model->getIndividualDailyData($did);
|
||||
$this->global['pageTitle'] = 'Siddharth : Daily Batch Card Edit';
|
||||
$this->loadViews("editDailyData", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function updateDailyBatchCardData()
|
||||
{
|
||||
$did = $this->input->post('did');
|
||||
$ddate = $this->input->post('rdate');
|
||||
$ddate = date_format(date_create($ddate),'y-m-d');
|
||||
$description = $this->input->post('description');
|
||||
$trp_running_hrs = $this->input->post('trp_running_hrs');
|
||||
$feeding_start = $this->input->post('feeding_start');
|
||||
$less_maintenance = $this->input->post('less_maintenance');
|
||||
$less_break_down_hrs = $this->input->post('less_break_down_hrs');
|
||||
$total_burner_running_time = $this->input->post('total_burner_running_time');
|
||||
$total_feeding_hrs = $this->input->post('total_feeding_hrs');
|
||||
$gas_consumption_per_hour = $this->input->post('gas_consumption_per_hour');
|
||||
$gas_consumption_per_ton = $this->input->post('gas_consumption_per_ton');
|
||||
$total_gas_consumption = $this->input->post('total_gas_consumption');
|
||||
$ed_running_hrs = $this->input->post('ed_running_hrs');
|
||||
$ed_receipt = $this->input->post('ed_receipt');
|
||||
$ed_issues = $this->input->post('ed_issues');
|
||||
$rotatry_input = $this->input->post('rotary_input');
|
||||
$rotatry_output = $this->input->post('rotatry_output');
|
||||
$roughsand_receipt = $this->input->post('roughsand_receipt');
|
||||
$roughsand_issues = $this->input->post('roughsand_issues');
|
||||
$finesand_receipt = $this->input->post('finesand_receipt');
|
||||
$finesand_issues = $this->input->post('finesand_issues');
|
||||
$gastrip_receipt = $this->input->post('gastrip_receipt');
|
||||
$gastrip_consumption = $this->input->post('gastrip_consumption');
|
||||
$water_receipt = $this->input->post('water_receipt');
|
||||
$water_consumpiton = $this->input->post('water_consumpiton');
|
||||
$diesel_receipt = $this->input->post('diesel_receipt');
|
||||
$diesel_consumption = $this->input->post('diesel_consumption');
|
||||
$diesel_running_hrs = $this->input->post('diesel_running_hrs');
|
||||
$diesel_rotary_receipt = $this->input->post('diesel_rotary_receipt');
|
||||
$diesel_rotary_consumption = $this->input->post('diesel_rotary_consumption');
|
||||
$diesel_rotary_running_hrs = $this->input->post('diesel_rotary_running_hrs');
|
||||
$open_reading = $this->input->post('open_reading');
|
||||
$close_reading = $this->input->post('close_reading');
|
||||
$engineers = $this->input->post('engineers');
|
||||
$operators = $this->input->post('operators');
|
||||
$helpers = $this->input->post('helpers');
|
||||
$breakdown = $this->input->post('breakdown');
|
||||
$location = $this->input->post('location');
|
||||
$maintenance_description = $this->input->post('maintenance_description');
|
||||
$maintenance_reason = $this->input->post('maintenance_reason');
|
||||
$maintenance_time_from = $this->input->post('maintenance_time_from');
|
||||
$maintenance_time_to = $this->input->post('maintenance_time_to');
|
||||
$maintenance_total_hrs = $this->input->post('maintenance_total_hrs');
|
||||
$cost_material = $this->input->post('cost_material');
|
||||
$cost_labour = $this->input->post('cost_labour');
|
||||
$remarks = $this->input->post('remarks');
|
||||
$createdby = $this->session->userdata ( 'userId' );
|
||||
$createdtime = date('y-m-d');
|
||||
$approvedby = $this->input->post('approvedby');
|
||||
|
||||
$datatostore = array('ddate'=>$ddate,'description'=>$description,'total_trp_running_hrs'=>$trp_running_hrs,'less_feeding_start'=>$feeding_start,'less_maintenance'=>$less_maintenance,'less_break_down_hrs'=>$less_break_down_hrs,'total_burner_running_time'=>$total_burner_running_time,'total_feeding_hrs'=>$total_feeding_hrs,'gas_consumption_hr'=>$gas_consumption_per_hour,'gas_consumption_ton'=>$gas_consumption_per_ton,'total_gas_consumption'=>$total_gas_consumption,'ed_running_hrs'=>$ed_running_hrs,'ed_receipt'=>$ed_receipt,'ed_issues'=>$ed_issues,'rotary_input'=>$rotatry_input,'rotary_output'=>$rotatry_output,'trp_roughsand_receipt'=>$roughsand_receipt,'trp_roughsand_issues'=>$roughsand_issues,'trp_finesand_receipt'=>$finesand_receipt,'trp_finesand_issues'=>$finesand_issues,'gas_for_trip_receipt'=>$gastrip_receipt,'gas_for_trip_consumption'=>$gastrip_consumption,'water_receipt'=>$water_receipt,'water_consumption'=>$water_consumpiton,'diesel_receipt'=>$diesel_receipt,'diesel_consumption'=>$diesel_consumption,'diesel_runninig_hrs'=>$diesel_running_hrs,'diesel_dryer_receipt'=>$diesel_rotary_receipt,'diesel_dryer_consumption'=>$diesel_rotary_consumption,'diesel_dryer_runninig_hrs'=>$diesel_rotary_running_hrs,'power_open_reading'=>$open_reading,'power_close_reading'=>$close_reading,'engineers'=>$engineers,'operators'=>$operators,'helpers'=>$helpers,'maintenance_breakdown'=>$breakdown,'maintenance_location'=>$location,'maintenance_description'=>$maintenance_description,'maintenance_reason'=>$maintenance_reason,'maintenance_from_hrs'=>$maintenance_time_from,'maintenance_to_hrs'=>$maintenance_time_to,'maintenance_total_hrs'=>$maintenance_total_hrs,'cost_material'=>$cost_material,'cost_labour'=>$cost_labour,'remarks'=>$remarks,'updatedby'=>$createdby,'approvedby'=>$approvedby);
|
||||
//print_r($datatostore);
|
||||
$res = $this->batchcard_model->updateDailyBatchCardData($datatostore,$did);
|
||||
if($res == 1)
|
||||
{
|
||||
echo "<script>alert('Data Saved Successfully..!');window.location.href='dailyListing';</script>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script>alert('Something Went Wrong. Try Again Later..!);window.location.href='dailyListing';</script>";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function saveAbstractReport()
|
||||
{
|
||||
//echo "working";
|
||||
$overalltotal = 0;
|
||||
$date = $this->input->post('param1');
|
||||
//echo $date;
|
||||
$jsondata = $this->input->post('param2');
|
||||
$phpdata = json_decode($jsondata,TRUE);
|
||||
//print_r($phpdata);
|
||||
//die();
|
||||
$isExist = $this->batchcard_model->checkAbstractReport($date);
|
||||
$c = $isExist[0]->count;
|
||||
if($c == 0){
|
||||
foreach($phpdata as $d)
|
||||
{
|
||||
$abstract_report_date = $date;
|
||||
$abstract_details = $d['Particulars'];
|
||||
$running_hrs = $d['Running Hrs'];
|
||||
$per_hr = $d['Per Hour'];
|
||||
$open_stock = $d['Open Stock'];
|
||||
$receipt = $d['Receipt'];
|
||||
$total = $d['Total'];
|
||||
$consumption = $d['Consumption'];
|
||||
$close_stock = $d['Closing Stock'];
|
||||
$physical_stock = $d['Physical Stock'];
|
||||
$difference = $d['Difference'];
|
||||
$createdby = $this->session->userdata ( 'userId' );
|
||||
|
||||
$datatostore = array('abstract_report_date'=>$abstract_report_date,'abstract_details'=>$abstract_details,'running_hrs'=>$running_hrs,'per_hr'=>$per_hr,'open_stock'=>$open_stock,'receipt'=>$receipt,'total'=>$total,'consumption'=>$consumption,'close_stock'=>$close_stock,'physical_stock'=>$physical_stock,'difference'=>$difference,'createdby'=>$createdby);
|
||||
|
||||
$res = $this->batchcard_model->saveAbstractReport($datatostore);
|
||||
|
||||
$overalltotal += $res;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
foreach($phpdata as $d)
|
||||
{
|
||||
$abstract_report_date = $date;
|
||||
$abstract_details = $d['Particulars'];
|
||||
$running_hrs = $d['Running Hrs'];
|
||||
$per_hr = $d['Per Hour'];
|
||||
$open_stock = $d['Open Stock'];
|
||||
$receipt = $d['Receipt'];
|
||||
$total = $d['Total'];
|
||||
$consumption = $d['Consumption'];
|
||||
$close_stock = $d['Closing Stock'];
|
||||
$physical_stock = $d['Physical Stock'];
|
||||
$difference = $d['Difference'];
|
||||
$createdby = $this->session->userdata ( 'userId' );
|
||||
|
||||
$datatostore = array('abstract_details'=>$abstract_details,'running_hrs'=>$running_hrs,'per_hr'=>$per_hr,'open_stock'=>$open_stock,'receipt'=>$receipt,'total'=>$total,'consumption'=>$consumption,'close_stock'=>$close_stock,'physical_stock'=>$physical_stock,'difference'=>$difference,'updatedby'=>$createdby);
|
||||
|
||||
$res = $this->batchcard_model->updateAbstractReport($datatostore,$date,$abstract_details);
|
||||
|
||||
$overalltotal += $res;
|
||||
}
|
||||
}
|
||||
|
||||
echo $overalltotal.' - Details Saved Successfully..!';
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getPreviousMonthAbstractDetails()
|
||||
{
|
||||
$month = $this->input->post('param1');
|
||||
$year = $this->input->post('param2');
|
||||
|
||||
$res = $this->batchcard_model->getPreviousMonthAbstractDetails($month,$year);
|
||||
echo json_encode($res);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getStockDetails()
|
||||
{
|
||||
//echo "hi";
|
||||
|
||||
if(!empty($this->input->post('fromdate')) && $this->input->post('stockname'))
|
||||
{
|
||||
$sn = $this->input->post('stockname');
|
||||
$snforview = $sn;
|
||||
$fd = $this->input->post('fromdate');
|
||||
$fm = date_format(date_create($fd),'m');
|
||||
$fy = date_format(date_create($fd),'Y');
|
||||
$string = $fy.$fm.'01'.'last month';
|
||||
$py = date_format(date_create($string),'Y-m');
|
||||
$py = explode('-',$py);
|
||||
|
||||
// echo 'CURRENT'.$fm.'-'.$fy.'<br>';
|
||||
// echo 'PREVOIUS'.$py[0].'-'.$py[1].'<br>';
|
||||
// echo $sn;
|
||||
switch($sn)
|
||||
{
|
||||
case 1:
|
||||
|
||||
$sn = '(ed_receipt - ed_issues) as lastmonthclosinged';
|
||||
$sd1 = 'ed_receipt';
|
||||
$sd2 = 'ed_issues';
|
||||
break;
|
||||
case 2:
|
||||
|
||||
$sn = '(rotary_input - rotary_output) as lastmonthclosingrotary';
|
||||
$sd1 = 'rotary_input as ed_receipt';
|
||||
$sd2 = 'rotary_output as ed_issues';
|
||||
break;
|
||||
case 3:
|
||||
$sn = '(diesel_dryer_receipt - diesel_dryer_consumption) as lastmonthclosingdryerdiesel';
|
||||
$sd1 = 'diesel_dryer_receipt as ed_receipt';
|
||||
$sd2 = 'diesel_dryer_consumption as ed_issues';
|
||||
break;
|
||||
case 4:
|
||||
$sn = '(diesel_receipt - diesel_consumption) as lastmonthclosingbull';
|
||||
$sd1 = 'diesel_receipt as ed_receipt';
|
||||
$sd2 = 'diesel_consumption as ed_issues';
|
||||
break;
|
||||
case 5:
|
||||
$sn = '(trp_roughsand_receipt - trp_roughsand_issues) as lastmonthclosingrough';
|
||||
$sd1 = 'trp_roughsand_receipt as ed_receipt';
|
||||
$sd2 = 'trp_roughsand_issues as ed_issues';
|
||||
break;
|
||||
|
||||
case 6:
|
||||
$sn = '(trp_finesand_receipt - trp_finesand_issues) as lastmonthclosingfine';
|
||||
$sd1 = 'trp_finesand_receipt as ed_receipt';
|
||||
$sd2 = 'trp_finesand_issues as ed_issues';
|
||||
break;
|
||||
case 7:
|
||||
$sn = '(gas_for_trip_receipt - gas_for_trip_consumption) as lastmonthclosinggas';
|
||||
$sd1 = 'gas_for_trip_receipt as ed_receipt';
|
||||
$sd2 = 'gas_for_trip_consumption as ed_issues';
|
||||
break;
|
||||
case 8:
|
||||
$sn = '(water_receipt - water_consumption) as lastmonthclosingewater';
|
||||
$sd1 = 'water_receipt as ed_receipt';
|
||||
$sd2 = 'water_consumption as ed_issues';
|
||||
break;
|
||||
}
|
||||
|
||||
$data['previousmonthclosingstock'] = $this->batchcard_model->getPreviousMonthClosedStockDetails($py[0],$py[1],$sn);
|
||||
//print_r($data['previousmonthclosingstock']);echo '<br>';die();
|
||||
$data['currentmonthstockdetails'] = $this->batchcard_model->currentMonthStockDetails($fm,$fy,$sd1,$sd2);
|
||||
$data['selmonth'] = $fd;
|
||||
$data['selstockvalue'] = $snforview;
|
||||
//print_r($data['currentmonthstockdetails']);echo '<br>';die();
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
$this->global['pageTitle'] = 'Siddharth : Stock Details';
|
||||
$this->loadViews("batchcard_stockdetails", $this->global,$data,NULL);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
195
application/models/batchcard_model.php
Normal file
195
application/models/batchcard_model.php
Normal file
@ -0,0 +1,195 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class batchcard_model extends CI_Model
|
||||
{
|
||||
|
||||
function getEmplistforReport()
|
||||
{
|
||||
$this->db->select('T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.Departmentcode,T_DepartmentDetails.shortName,');
|
||||
$this->db->from('T_Employee_Details');
|
||||
$this->db->join('T_DepartmentDetails','T_Employee_Details.Departmentcode=T_DepartmentDetails.DEPCode');
|
||||
//$this->db->join('ip_invoice_items','ip_invoices.invoice_number=ip_invoice_items.invoice_number');
|
||||
//$this->db->join('ip_products','ip_invoice_items.item_product_id=ip_products.product_id');
|
||||
//$this->db->join('ip_invoice_custom','ip_invoices.invoice_number=ip_invoice_custom.invoice_number and invoice_custom_fieldid=62');
|
||||
$this->db->order_by('T_Employee_Details.EmpID');
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
|
||||
}
|
||||
|
||||
function saveHourlyBatchInfo($datatostore)
|
||||
{
|
||||
$this->db->insert('T_hourly_batch_info',$datatostore);
|
||||
$res = $this->db->affected_rows();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function saveDailyBatchCardData($datatostore)
|
||||
{
|
||||
$this->db->insert('T_daily_batchcard_data',$datatostore);
|
||||
$res = $this->db->affected_rows();
|
||||
return $res;
|
||||
}
|
||||
|
||||
function updateHourlyBatchInfo($datatostore,$hid)
|
||||
{
|
||||
$this->db->where('hourlyid',$hid);
|
||||
$this->db->update('T_hourly_batch_info',$datatostore);
|
||||
$res = $this->db->affected_rows();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function getAllHourlyData($hid='',$from='',$to='')
|
||||
{
|
||||
//echo "Model".$from.'-'.$to;
|
||||
|
||||
$this->db->select('T_hourly_batch_info.*,T_Employee_Details.FirstName as F,T_Employee_Details.LastName as L');
|
||||
$this->db->from('T_hourly_batch_info');
|
||||
$this->db->join('tbl_users','T_hourly_batch_info.checkedby=tbl_users.userId');
|
||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID');
|
||||
if(!empty($hid))
|
||||
{
|
||||
$this->db->where('hourlyid',$hid);
|
||||
}
|
||||
if(!empty($from) && !empty($to))
|
||||
{
|
||||
$this->db->where('T_hourly_batch_info.report_date <=',$to);
|
||||
$this->db->where('T_hourly_batch_info.report_date >=',$from);
|
||||
}
|
||||
$this->db->order_by('hourlyid','desc');
|
||||
$res = $this->db->get();
|
||||
//print_r($res->result());die();
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
|
||||
function checkExistHourlyData($bdate,$btime)
|
||||
{
|
||||
//echo 'Model'.$bdate.'-'.$btime;
|
||||
$this->db->select('count(*) as count');
|
||||
$this->db->from('T_hourly_batch_info');
|
||||
$this->db->where('report_date',$bdate);
|
||||
$this->db->where('report_time',$btime);
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
|
||||
function getPowerConsumptionDetails($rdate)
|
||||
{
|
||||
|
||||
$this->db->select('hourlyid,report_time,opening_trp_reading,close_trp_reading,auto_start,auto_stop');
|
||||
$this->db->from('T_hourly_batch_info');
|
||||
$this->db->where('report_date',$rdate);
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
function getDailyBatchCardData($month)
|
||||
{
|
||||
// $this->db->select('*');
|
||||
// $this->db->from('T_daily_batchcard_data');
|
||||
// $this->db->where('month(ddate)',$month);
|
||||
$sql = 'select * from T_daily_batchcard_data where month(ddate) = ?';
|
||||
$res = $this->db->query($sql,array($month));
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
function getIndividualDailyData($did)
|
||||
{
|
||||
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_daily_batchcard_data');
|
||||
$this->db->where('dailyid',$did);
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
|
||||
}
|
||||
|
||||
function checkExistDaily($rdate)
|
||||
{
|
||||
$this->db->select('count(*) as count');
|
||||
$this->db->from('T_daily_batchcard_data');
|
||||
$this->db->where('ddate',$rdate);
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
function updateDailyBatchCardData($datatostore,$did)
|
||||
{
|
||||
$this->db->where('dailyid',$did);
|
||||
$this->db->update('T_daily_batchcard_data',$datatostore);
|
||||
$res = $this->db->affected_rows();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function checkAbstractReport($date)
|
||||
{
|
||||
$this->db->select('count(*) as count');
|
||||
$this->db->from('T_abstract_report');
|
||||
$this->db->where('abstract_report_date',$date);
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
function saveAbstractReport($datatostore)
|
||||
{
|
||||
$this->db->insert('T_abstract_report',$datatostore);
|
||||
$res = $this->db->affected_rows();
|
||||
return $res;
|
||||
}
|
||||
|
||||
function updateAbstractReport($datatostore,$date,$abstract_details)
|
||||
{
|
||||
$this->db->where('abstract_report_date',$date);
|
||||
$this->db->where('abstract_details',$abstract_details);
|
||||
$this->db->update('T_abstract_report',$datatostore);
|
||||
$res = $this->db->affected_rows();
|
||||
|
||||
return $res;
|
||||
|
||||
}
|
||||
|
||||
function getPreviousMonthAbstractDetails($month,$year)
|
||||
{
|
||||
$sql = "select abstract_details,close_stock from T_abstract_report where month(abstract_report_date) =? and year(abstract_report_date) =? ";
|
||||
$res = $this->db->query($sql,array($month,$year));
|
||||
return $res->result();
|
||||
|
||||
}
|
||||
|
||||
function getPreviousMonthClosedStockDetails($y,$m,$sn)
|
||||
{
|
||||
$month = 'month(ddate)';
|
||||
$year = 'year(ddate)';
|
||||
$this->db->select($sn);
|
||||
$this->db->from('T_daily_batchcard_data');
|
||||
$this->db->where($month,$m);
|
||||
$this->db->where($year,$y);
|
||||
$this->db->order_by('ddate','desc');
|
||||
$this->db->limit(1);
|
||||
$res = $this->db->get();
|
||||
//print_r($res->result());
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
function currentMonthStockDetails($m,$y,$sd1,$sd2)
|
||||
{
|
||||
$month = 'month(ddate)';
|
||||
$year = 'year(ddate)';
|
||||
$list = array('ddate',$sd1,$sd2);
|
||||
$this->db->select($list);
|
||||
$this->db->from('T_daily_batchcard_data');
|
||||
$this->db->where($month,$m);
|
||||
$this->db->where($year,$y);
|
||||
$this->db->order_by('ddate','asc');
|
||||
$res = $this->db->get();
|
||||
//print_r($res->result());
|
||||
return $res->result();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
394
application/views/batchcard_stockdetails.php
Normal file
394
application/views/batchcard_stockdetails.php
Normal file
@ -0,0 +1,394 @@
|
||||
<?php
|
||||
if(!empty($data['previousmonthclosingstock']))
|
||||
{
|
||||
$premonopen = $data['previousmonthclosingstock'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$premonopen = 0;
|
||||
}
|
||||
|
||||
;?>
|
||||
<script src="<?php echo base_url()?>assets/js/jquery.CongelarFilaColumna.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fht-table,
|
||||
.fht-table thead,
|
||||
.fht-table tfoot,
|
||||
.fht-table tbody,
|
||||
.fht-table tr,
|
||||
.fht-table th,
|
||||
.fht-table td {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.fht-table td {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.fht-table td:hover {
|
||||
background-color: #3c8dbc;
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
.fht-table{
|
||||
border: 0 none;
|
||||
height: auto;
|
||||
width: auto;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
/*table-layout: fixed; Algoritmo de distribucion fijo */
|
||||
/*white-space:nowrap; Impide los saltos de línea automáticos */
|
||||
}
|
||||
|
||||
.fht-table th,.fht-table td {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fht-table-wrapper,
|
||||
.fht-table-wrapper .fht-thead,
|
||||
.fht-table-wrapper .fht-tfoot,
|
||||
.fht-table-wrapper .fht-fixed-column .fht-tbody,
|
||||
.fht-table-wrapper .fht-fixed-body .fht-tbody,
|
||||
.fht-table-wrapper .fht-tbody {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-body .fht-tbody,
|
||||
.fht-table-wrapper .fht-tbody {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-table .fht-cell {
|
||||
overflow: hidden;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-column,
|
||||
.fht-table-wrapper .fht-fixed-body {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-column {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.fht-fixed-body .fht-thead table {
|
||||
margin-right: 20px;
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
/*For Examples*/
|
||||
|
||||
.ContenedorTabla {
|
||||
height: 500px;
|
||||
margin: 0 auto;
|
||||
overflow: auto;
|
||||
width: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.header, .main {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
.titulosHeader {
|
||||
border-bottom: 1px solid #e8bb25;
|
||||
height: auto;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 8px;
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.celda_encabezado_general {
|
||||
background-color: #3c8dbc;
|
||||
border: 1px solid #ccc;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
padding: 2px 4px;
|
||||
text-align: center;
|
||||
}
|
||||
._Separador{
|
||||
background-color: #fff;
|
||||
height: 12px;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
width: 7px;
|
||||
}
|
||||
._Separador div{
|
||||
width: 4px;
|
||||
}
|
||||
.celda_normal {
|
||||
/*background-color: #fff;*/
|
||||
border: 1px solid #ccc;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
/*style excel*/
|
||||
.excel_cell{
|
||||
border: 1px solid #CCC;
|
||||
color: #222;
|
||||
text-align: center;
|
||||
font-size: 13px
|
||||
font-weight: normal;
|
||||
padding: 4px;
|
||||
white-space: pre-line;
|
||||
empty-cells: show;
|
||||
}
|
||||
._cell_header{
|
||||
background-color: #EEE;
|
||||
}
|
||||
._cell_Default{
|
||||
background-color: #FFF;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.excel_cell div{
|
||||
width: 30px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<?php
|
||||
|
||||
//print_r($allhourdata);
|
||||
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Batch Card - Stock Details</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
|
||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||
<form id="filter" name="filter" method="POST" action="<?php echo base_url().'batchcard/getStockDetails'?>">
|
||||
<div class="col-md-2">
|
||||
<input type="text" id="fromdate" class="form-control" name="fromdate">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select id="stockname" name="stockname" class="form-control select2">
|
||||
|
||||
<option value="-1">Select Stock Name</option>
|
||||
<option value="1">ED Details</option>
|
||||
<option value="2">Rotary Dryer</option>
|
||||
<option value="3">Diesel/Ton-Rotary Dryer</option>
|
||||
<option value="4">Diesel/bull</option>
|
||||
<option value="5">TRP Rough sand </option>
|
||||
<option value="6">TRP Fine sand</option>
|
||||
<option value="7">Gas for Trip</option>
|
||||
<option value="8">Water</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="button" id="click" class="btn btn-primary" value="click">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<br/>
|
||||
<main class="main">
|
||||
<div class="ContenedorTabla">
|
||||
|
||||
<table id="batchcardlisting" class="table table-hover table-bordered ">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
<th class="" style="width:35px;">Date</br></th> <th class="">Open Stock</th><th class="">Receipt</th><th class="">Total</th><th class="">Consumption</th><th class="">Closing Stock</th>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="specAppend">
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
if(!empty($currentmonthstockdetails))
|
||||
{
|
||||
$currentclose = 0;
|
||||
$pre = null;
|
||||
foreach($currentmonthstockdetails as $key=>$data)
|
||||
{
|
||||
$total = 0;
|
||||
|
||||
if($key == 0){
|
||||
$total = $total + $data->ed_receipt;
|
||||
}
|
||||
else
|
||||
{
|
||||
$total = $data->ed_receipt + $pre['preclose'];
|
||||
}
|
||||
|
||||
$close = ($total - $data->ed_issues);
|
||||
$currentclose = ($total - $data->ed_issues);
|
||||
//if($pre){ //echo $key; print_r($pre);}
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:right;"><?= date_format(date_create($data->ddate),'d-m-Y');?></td>
|
||||
|
||||
<td style="text-align:right;"><?php if($key == 0){echo $premonopen; } else {echo $pre['preclose'];}?> </td>
|
||||
<td style="text-align:right;"><?= $data->ed_receipt;?></td>
|
||||
<td style="text-align:right;"><?= $total;?></td>
|
||||
<td style="text-align:right;"><?= $data->ed_issues;?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
|
||||
echo $currentclose;
|
||||
|
||||
?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$pre = array('preclose'=>$currentclose);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
<!-- <div class="box-footer clearfix">
|
||||
|
||||
</div> -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script src="<?php echo base_url()?>assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
|
||||
|
||||
$('#batchcardlisting').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": false,
|
||||
"aaSorting": [[ 0, "asc" ]],
|
||||
"info": true,
|
||||
"autoWidth": true,
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
var name = "Stock Report for" +
|
||||
|
||||
$("#stockname option:selected").text()+'-'+$('#fromdate').val();
|
||||
$("#batchcardlisting").tableExport({
|
||||
bootstrap: true,
|
||||
separator: ",",
|
||||
headings: true,
|
||||
buttonContent: "Export",
|
||||
addClass: "",
|
||||
defaultClass: "btn",
|
||||
defaultTheme: "btn-default",
|
||||
type: "csv",
|
||||
fileName: name,
|
||||
position: "bottom",
|
||||
stripQuotes: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#fromdate').val("<?php print_r($selmonth);?>");
|
||||
//alert("<?php print_r($selstockvalue);?>");
|
||||
$('#stockname').val("<?php echo $selstockvalue;?>");
|
||||
$('#fromdate').datepicker({
|
||||
minViewMode: 1,
|
||||
//defaultdate:new Date(),
|
||||
format: 'M-yyyy'
|
||||
|
||||
});
|
||||
|
||||
$('#todate').datepicker({
|
||||
//minDate : 'year+16',
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
|
||||
$('#stockname').select2();
|
||||
|
||||
//$('#batchcardlisting').CongelarFilaColumna({lboHoverTr:true});
|
||||
});
|
||||
|
||||
$('#click').click(function(){
|
||||
|
||||
var fd = $('#fromdate').val() ;
|
||||
var sn = $('#stockname').val();
|
||||
if(fd != '' && sn != -1)
|
||||
{
|
||||
$('#filter').submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Need Date and Stock Name");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
923
application/views/dailyBatchCardListing.php
Normal file
923
application/views/dailyBatchCardListing.php
Normal file
@ -0,0 +1,923 @@
|
||||
<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/js/jquery.CongelarFilaColumna.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
||||
|
||||
<?php
|
||||
// print_r($hourdata);
|
||||
// die();
|
||||
// echo "<br>";
|
||||
// echo count($attendance);
|
||||
// echo "<br>";
|
||||
// print_r($emppay);
|
||||
// echo "<br>";
|
||||
// echo count($emppay);
|
||||
//print_r($datefordropdown);
|
||||
//print_r($noofpublicholidays);print_r($publicholidaysarray);
|
||||
date_default_timezone_set('Asia/Kolkata');
|
||||
$currentday = date('d');
|
||||
// print_r($attendance);
|
||||
// echo "<br>------------------------------<br>";
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fht-table,
|
||||
.fht-table thead,
|
||||
.fht-table tfoot,
|
||||
.fht-table tbody,
|
||||
.fht-table tr,
|
||||
.fht-table th,
|
||||
.fht-table td {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.fht-table td {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.fht-table td:contenteditable {
|
||||
text-align:center;
|
||||
background-color:red;
|
||||
}
|
||||
|
||||
.fht-table tr:hover {
|
||||
background-color: #3c8dbc;
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
.fht-table{
|
||||
border: 0 none;
|
||||
height: auto;
|
||||
width: auto;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
/*table-layout: fixed; Algoritmo de distribucion fijo */
|
||||
/*white-space:nowrap; Impide los saltos de línea automáticos */
|
||||
}
|
||||
|
||||
.fht-table th,.fht-table td {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fht-table-wrapper,
|
||||
.fht-table-wrapper .fht-thead,
|
||||
.fht-table-wrapper .fht-tfoot,
|
||||
.fht-table-wrapper .fht-fixed-column .fht-tbody,
|
||||
.fht-table-wrapper .fht-fixed-body .fht-tbody,
|
||||
.fht-table-wrapper .fht-tbody {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-body .fht-tbody,
|
||||
.fht-table-wrapper .fht-tbody {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-table .fht-cell {
|
||||
overflow: hidden;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-column,
|
||||
.fht-table-wrapper .fht-fixed-body {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-column {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.fht-fixed-body .fht-thead table {
|
||||
margin-right: 20px;
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
/*For Examples*/
|
||||
|
||||
.ContenedorTabla {
|
||||
height: 500px;
|
||||
margin: 0 auto;
|
||||
overflow: auto;
|
||||
width: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.header, .main {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
.titulosHeader {
|
||||
border-bottom: 1px solid #e8bb25;
|
||||
height: auto;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 8px;
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.celda_encabezado_general {
|
||||
background-color: #3c8dbc;
|
||||
border: 1px solid #ccc;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
padding: 2px 4px;
|
||||
text-align: center;
|
||||
}
|
||||
._Separador{
|
||||
background-color: #fff;
|
||||
height: 12px;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
width: 7px;
|
||||
}
|
||||
._Separador div{
|
||||
width: 4px;
|
||||
}
|
||||
.celda_normal {
|
||||
/*background-color: #fff;*/
|
||||
border: 1px solid #ccc;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
/*style excel*/
|
||||
.excel_cell{
|
||||
border: 1px solid #CCC;
|
||||
color: #222;
|
||||
text-align: center;
|
||||
font-size: 13px
|
||||
font-weight: normal;
|
||||
padding: 4px;
|
||||
white-space: pre-line;
|
||||
empty-cells: show;
|
||||
}
|
||||
._cell_header{
|
||||
background-color: #EEE;
|
||||
}
|
||||
._cell_Default{
|
||||
background-color: #FFF;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.excel_cell div{
|
||||
width: 30px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.modal
|
||||
{
|
||||
|
||||
padding-right:250px ! important;
|
||||
}
|
||||
.edit{
|
||||
background-color:#c6ffb3;
|
||||
}
|
||||
|
||||
.test{
|
||||
color:#000 ! important;
|
||||
text-decoration:underline;
|
||||
}
|
||||
<!--table{
|
||||
border:2px;
|
||||
text-align:center;
|
||||
}
|
||||
td{ padding:3px;}
|
||||
|
||||
th{
|
||||
background-color:#3c8dbc !important;
|
||||
color:#000;
|
||||
text-align:center;
|
||||
border-color:#ebebe0;
|
||||
|
||||
}-->
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Daily Batch Card Lisiting - <?php echo $datefordisplay;?> </center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<?php
|
||||
|
||||
$attributes = array('id' => 'att');
|
||||
echo form_open('dailyListing', $attributes);
|
||||
$today = date('M-Y');
|
||||
$data = array('type' => 'text','name' => 'month','id' => 'month','class' => 'form-control select2');
|
||||
echo form_input($data);?>
|
||||
</div>
|
||||
<div class="col-md-1" style="padding-left:3px;">
|
||||
<input type="button" value="Change Month" id="atten" class="btn btn-primary" title='click here for load Daily Bath Card Records for specified month'>
|
||||
</div>
|
||||
<?php echo form_close();?>
|
||||
<div class="col-md-1">
|
||||
<input type="button" value="Abstract Report" id="abstract" class="btn btn-primary">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <main class="main">
|
||||
<div class="ContenedorTabla"> -->
|
||||
|
||||
<table id="dailylisting" border="2" class="fht-table" style="width:700px;">
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<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">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 rowspan="2">Total gas consumption</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 Persion Worked</th>
|
||||
<th colspan="4">Maintenance Details</th>
|
||||
<th colspan="3">Time Taken for Maintenance</th>
|
||||
<th rowspan="2">Worked Done By</th>
|
||||
<th style="width:25px;!important" rowspan="2">Approved By</th>
|
||||
<th colspan="2">Cost</th>
|
||||
<th rowspan="2"> Remarks </th>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<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><th >Nature of maintenance</th><th > Location </th><th > Description </th><th> Reason </th><th >From</th><th >To</th><th >Total Hrs</th><th >Material</th><th >Labour</th></tr>
|
||||
|
||||
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$total_running_hrs = 0.00;
|
||||
$total_running_hrs_hrs = 0.00;
|
||||
$total_running_hrs_min = 0.00;
|
||||
$total_feeding_start = 0.00;
|
||||
$total_less_maintenance = 0.00;
|
||||
$total_less_break_down_hrs = 0.00;
|
||||
$total_burner_running_time = 0.00;
|
||||
$total_feeding_hrs = 0.00;
|
||||
$total_gas_consumption = 0.00;
|
||||
$total_ed_rhrs = 0.00;
|
||||
$total_ed_receipt = 0.00;
|
||||
$total_ed_issues = 0.00;
|
||||
$total_rotary_input = 0.00;
|
||||
$total_rotary_output = 0.00;
|
||||
$total_rough_sand_r = 0.00;
|
||||
$total_rough_sand_i = 0.00;
|
||||
$total_fine_sand_r = 0.00;
|
||||
$total_fine_sand_i = 0.00;
|
||||
$total_gas_c = 0.00;
|
||||
$total_gas_r = 0.00;
|
||||
$total_water_r = 0.00;
|
||||
$total_water_c = 0.00;
|
||||
$total_diesel_bull_r = 0.00;
|
||||
$total_diesel_bull_c = 0.00;
|
||||
$total_diesel_bull_rh = 0.00;
|
||||
$total_diesel_rotary_bull_r = 0.00;
|
||||
$total_diesel_rotary_bull_c = 0.00;
|
||||
$total_diesel_rotary_bull_rh = 0.00;
|
||||
$total_power_total = 0.00;
|
||||
$total_engineers = 0.00;
|
||||
$total_operators = 0.00;
|
||||
$total_helpers = 0.00;
|
||||
$total_maintenance_thrs = 0.00;
|
||||
$total_cost_material = 0.00;
|
||||
$total_cost_labour = 0.00;
|
||||
|
||||
|
||||
|
||||
// for ($col = 1; $col <= $monthdays;$col++){
|
||||
|
||||
|
||||
// $d = $col.'-'.$month;
|
||||
//echo $d;
|
||||
foreach($hourdata as $hdata)
|
||||
{
|
||||
$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>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
//if($d == $dailydate){
|
||||
$auto = explode('-',$hdata->description);
|
||||
$start = explode(':',$auto[0]);
|
||||
$stop = explode(':',$auto[1]);
|
||||
|
||||
$h = $stop[0] - $start[0];
|
||||
$m = $stop[1] - $start[1];
|
||||
if($m > 60)
|
||||
{
|
||||
$h+=1;
|
||||
$m-=60;
|
||||
}
|
||||
else if($m < 0)
|
||||
{
|
||||
$h-=1;
|
||||
if($h < 0 ){$h = 0;}
|
||||
$m+=60;
|
||||
|
||||
}
|
||||
|
||||
$total_running_hrs_hrs = $total_running_hrs_hrs + $h;
|
||||
$total_running_hrs_min = $total_running_hrs_min + $m;
|
||||
// }
|
||||
// else {$auto[0] = '-';$auto[1]="-" ;}
|
||||
//echo $hdata->description;
|
||||
|
||||
?>
|
||||
|
||||
<td><?php
|
||||
|
||||
echo $auto[0];
|
||||
|
||||
|
||||
|
||||
?></td>
|
||||
<td ><?php echo $auto[1];?></td>
|
||||
<td ><?php $tthrs = $h.':'.$m;echo $tthrs;?></td>
|
||||
<td ><?php echo $hdata->less_feeding_start; $total_feeding_start += $hdata->less_feeding_start;?></td>
|
||||
<td ><?php echo $hdata->less_maintenance; $total_less_maintenance+= $hdata->less_maintenance;?></td>
|
||||
<td ><?php echo $hdata->less_break_down_hrs;$total_less_break_down_hrs+=$hdata->less_break_down_hrs;?></td>
|
||||
<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>
|
||||
<td ><?php echo $hdata->total_gas_consumption;$total_gas_consumption+=$hdata->total_gas_consumption;?></td>
|
||||
<td ><?php echo $hdata->ed_running_hrs;$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_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->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->maintenance_breakdown;?></td>
|
||||
<td ><?php echo $hdata->maintenance_location;?></td>
|
||||
<td ><?php echo $hdata->maintenance_description;?></td>
|
||||
<td ><?php echo $hdata->maintenance_reason;?></td>
|
||||
<td ><?php echo $hdata->maintenance_from_hrs;?></td>
|
||||
<td ><?php echo $hdata->maintenance_to_hrs;?></td>
|
||||
<td ><?php echo $hdata->maintenance_total_hrs;$total_maintenance_thrs+=$hdata->maintenance_total_hrs;?></td>
|
||||
|
||||
<td ><?php echo $hdata->createdby;?></td>
|
||||
<td style="width:25px;!important"><?php echo $hdata->approvedby;?></td>
|
||||
<td ><?php echo $hdata->cost_material;$total_cost_material+=$hdata->cost_material;?></td>
|
||||
<td ><?php echo $hdata->cost_labour;$total_cost_labour+=$hdata->cost_labour;?></td>
|
||||
<td ><?php echo $hdata->remarks;?></td>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
// } ?>
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
<tr> <td>Total</td> <td> </td><td> </td><td id="total_running_hrs"><?php
|
||||
if($total_running_hrs_min >= 60)
|
||||
{
|
||||
$lh = $total_running_hrs_min / 60;
|
||||
$lh = explode('.',$lh);
|
||||
// echo $lh[0];
|
||||
$total_running_hrs_hrs += $lh[0];
|
||||
$lm = fmod($total_running_hrs_min , 60);
|
||||
//echo $lm;
|
||||
$total_running_hrs_min = $lm;
|
||||
}
|
||||
$total_running_hrs = $total_running_hrs_hrs.'.'.$total_running_hrs_min;
|
||||
|
||||
|
||||
echo $total_running_hrs;?></td><td id="total_feeding_start"><?php echo $total_feeding_start;?></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_gas_consumption"><?php echo $total_gas_consumption;?></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><td id="total_rotary_output"><?php echo $total_rotary_output;?></td><td id="total_rough_sand_r"><?php echo $total_rough_sand_r;?></td><td id="total_rough_sand_i"><?php echo $total_rough_sand_i;?></td><td id="total_fine_sand_r"><?php echo $total_fine_sand_r;?></td><td id="total_fine_sand_i"><?php echo $total_fine_sand_i;?></td><td id="total_gas_r"><?php echo $total_gas_r;?></td><td id="total_gas_c"><?php echo $total_gas_c;?></td><td id="total_water_r"><?php echo $total_water_r;?></td><td id="total_water_c"><?php echo $total_water_c;?></td><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><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><td> </td><td> </td><td id="total_power_total"><?php echo $total_power_total;?></td><td id="total_engineers"><?php echo $total_engineers;?></td><td id="total_operators"><?php echo $total_operators;?></td><td id="total_helpers"><?php echo $total_helpers;?></td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td id="total_maintenance_thrs"><?php echo $total_maintenance_thrs;?></td><td> </td><td> </td><td id="total_cost_material"><?php echo $total_cost_material;?></td><td id="total_cost_labour"><?php echo $total_cost_labour;?></td><td> </td></tr>
|
||||
|
||||
</table>
|
||||
<!-- </div>
|
||||
</main> -->
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
<div class="box-footer ">
|
||||
<!--*********************************************************************************************************** -->
|
||||
<div id="specmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><center>Abstract Report for Month of - <span id="absdate"> </span><center></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<center>
|
||||
<form id="abstractform">
|
||||
<table border="2" class="" id="abstracttable">
|
||||
<thead style="text-align:center;">
|
||||
<tr> <th class="">S.NO</th> <th class="">Particulars</th> <th class="">Running Hrs</th> <th class="">Per Hour</th> <th class="">Open Stock</th><th class="">Receipt</th><th class="">Total</th><th class="">Consumption</th><th class="">Closing Stock</th><th class="">Physical Stock</th><th class="">Difference</th></tr>
|
||||
</thead>
|
||||
<tbody id="modelid">
|
||||
<tr><td>1</td><td>ED Details</td><td id="RHRS1"></td><td id="PH1"></td><td onkeyup="abstractCalculation(this.id);" class="edit" contenteditable="true" id="OS1"></td><td id="R1"></td><td id="T1"></td><td id="C1"></td><td id="CS1"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="PS1"></td><td id="D1"></td></tr>
|
||||
<tr><td>2</td><td>Rotary Dryer</td><td id="RHRS2"></td><td id="PH2"></td><td onkeyup="abstractCalculation(this.id);" class="edit" contenteditable="true" id="OS2"></td><td id="R2"></td><td id="T2"></td><td id="C2"></td><td id="CS2"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" class="edit" id="PS2"></td><td id="D2"></td></tr>
|
||||
<tr><td>3</td><td>Diesel/Ton-Rotary Dryer</td><td id="RHRS3"></td><td id="PH3"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="OS3"></td><td id="R3"></td><td id="T3"></td><td id="C3"></td><td id="CS3"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="PS3"></td><td id="D3"></td></tr>
|
||||
<tr><td>4</td><td>Diesel/bull</td><td id="RHRS4"></td><td id="PH4"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="OS4"></td><td id="R4"></td><td id="T4"></td><td id="C4"></td><td id="CS4"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="PS4"></td><td id="D4"></td></tr>
|
||||
<tr><td>5</td><td>TRP Rough sand </td><td id="RHRS5"></td><td id="PH5"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="OS5"></td><td id="R5"></td><td id="T5"></td><td id="C5"></td><td id="CS5"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="PS5"></td><td id="D5"></td></tr>
|
||||
<tr><td>6</td><td>TRP Fine sand</td><td id="RHRS6"></td><td id="PH6"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="OS6"></td><td id="R6"></td><td id="T6"></td><td id="C6"></td><td id="CS6"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="PS6"></td><td id="D6"></td></tr>
|
||||
<tr><td>7</td><td>TRP Total Sand</td><td id="RHRS7"></td><td id="PH7"></td><td class="" onkeyup="abstractCalculation(this.id);" contenteditable="false" id="OS7"></td><td id="R7"></td><td id="T7" ></td><td id="C7"></td><td id="CS7"></td><td class="" onkeyup="abstractCalculation(this.id);" contenteditable="false" id="PS7"></td><td id="D7"></td></tr>
|
||||
<tr><td>8</td><td>Gas for Trip</td><td id="RHRS8">-</td><td id="PH8"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="OS8"></td><td id="R8"></td><td id="T8"></td><td id="C8"></td><td id="CS8"></td><td class="edit" onkeyup="abstractCalculation(this.id);" contenteditable="true" id="PS8"></td><td id="D8"></td></tr>
|
||||
<tr><td>9</td><td>Water</td><td id="RHRS9">-</td><td id="PH9"></td><td class="edit" contenteditable="true" onkeyup="abstractCalculation(this.id);" id="OS9"></td><td id="R9"></td><td id="T9"></td><td id="C9"></td><td id="CS9"></td><td class="edit" contenteditable="true" onkeyup="abstractCalculation(this.id);" id="PS9"></td><td id="D9"></td></tr>
|
||||
<tr><td>10</td><td>Power</td><td id="RHRS10">-</td><td id="PH10">-</td><td class="" onkeyup="abstractCalculation(this.id);" contenteditable="false" id="OS10">-</td><td id="R10">-</td><td id="T10">-</td><td id="C10"></td><td id="CS10">-</td><td class="" onkeyup="abstractCalculation(this.id);" contenteditable="false" id="PS10">-</td><td id="D10">-</td></tr>
|
||||
|
||||
<tr><td>11</td><td>Engineers</td><td id="engineers"></td></tr>
|
||||
<tr><td>12</td><td>Operators</td><td id="operators"></td></tr>
|
||||
<tr><td>13</td><td>Helpers</td><td id="helpers"></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
<input type="hidden" name="param1" id="jsonodata">
|
||||
<input type="hidden" name="param2" id="monthhidden">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<input type="button" class="btn btn-primary" onclick="saveToDB()" value="Save"/>
|
||||
<input type="button" class="btn btn-primary" onclick="saveExcel()" value="Excel"/>
|
||||
<input type="button" class="btn btn-primary" data-dismiss="modal" value="Cancel"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--*********************************************************************************************************** -->
|
||||
</div> <!-- /.box footer -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script src="<?php echo base_url()?>assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function(){
|
||||
//alert($('#month').val());
|
||||
var name = "Daily Batch Card Listing for" +'-'+ $('#month').val();
|
||||
$("#dailylistings").tableExport({
|
||||
bootstrap: true,
|
||||
separator: ",",
|
||||
headings: true,
|
||||
buttonContent: "Export",
|
||||
addClass: "",
|
||||
defaultClass: "btn",
|
||||
defaultTheme: "btn-default",
|
||||
type: "csv",
|
||||
fileName: name,
|
||||
position: "bottom",
|
||||
stripQuotes: true
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
$('#dailylisting').DataTable( {
|
||||
"scrollY": 500,
|
||||
"scrollX": true,
|
||||
"ordering": false,
|
||||
"info": false,
|
||||
"paging": true,
|
||||
"searching": false
|
||||
} );
|
||||
|
||||
|
||||
|
||||
|
||||
$('.edit').bind('keypress', function(e)
|
||||
{
|
||||
|
||||
|
||||
if(((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 46) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 39))
|
||||
{
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
if(e.keyCode == 13)
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
if(((e.which || e.keyCode) < 48) || ((e.which || e.keyCode) > 57))
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$("#month").val('<?php echo $datefordisplay;?>');
|
||||
$("#month").datepicker({
|
||||
minViewMode: 1,
|
||||
//defaultdate:new Date(),
|
||||
format: 'M-yyyy'
|
||||
});
|
||||
|
||||
|
||||
$('#abstract').click(function(){
|
||||
var d = $('#month').val();
|
||||
|
||||
$('#absdate').text(d);
|
||||
$('#specmodel').modal('show');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function saveExcel()
|
||||
{
|
||||
|
||||
var alldata = $("#abstracttable").tableToJSON();
|
||||
alldata = JSON.stringify(alldata);
|
||||
// alert(alldata);
|
||||
|
||||
var month = $("#month").val();
|
||||
$('#jsonodata').val(alldata);
|
||||
$('#monthhidden').val(month);
|
||||
|
||||
|
||||
$('#abstractform').attr('method','POST');
|
||||
$('#abstractform').attr('action','saveBatchCardtoExcel');
|
||||
|
||||
$('#abstractform').submit();
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function whileModalShow()
|
||||
{
|
||||
|
||||
var os1 = $('#OS1').text() == '' ? '0' : parseFloat($('#OS1').text());
|
||||
|
||||
document.getElementById('RHRS1').textContent = parseFloat($('#total_running_hrs').text());
|
||||
document.getElementById('R1').textContent = parseFloat($('#total_ed_receipt').text());
|
||||
document.getElementById('C1').textContent = parseFloat($('#total_ed_issues').text());
|
||||
var PH1 = (parseFloat($('#total_ed_receipt').text()) / parseFloat($('#total_running_hrs').text())).toFixed(3);
|
||||
if(isNaN(PH1)){PH1 = '0';}
|
||||
document.getElementById('PH1').textContent = PH1;
|
||||
document.getElementById('T1').textContent = (parseFloat($('#total_ed_receipt').text()) + parseFloat(os1));
|
||||
document.getElementById('CS1').textContent = parseFloat($('#T1').text()) - parseFloat($('#C1').text());
|
||||
|
||||
//Rotary Details diesel
|
||||
var os2 = $('#OS2').text() == '' ? '0' : parseFloat($('#OS2').text());
|
||||
document.getElementById('RHRS2').textContent = parseFloat($('#total_diesel_rotary_bull_rh').text());
|
||||
document.getElementById('R2').textContent = parseFloat($('#total_rotary_output').text());
|
||||
document.getElementById('C2').textContent = parseFloat($('#total_rotary_input').text());
|
||||
var PH2 = (parseFloat($('#total_diesel_rotary_bull_r').text()) / parseFloat($('#total_diesel_rotary_bull_rh').text())).toFixed(3);
|
||||
if(isNaN(PH2)){PH2 = '0';}
|
||||
document.getElementById('PH2').textContent = PH2;
|
||||
document.getElementById('T2').textContent = (parseFloat($('#total_ed_receipt').text()) + parseFloat(os2));
|
||||
document.getElementById('CS2').textContent = parseFloat($('#T2').text()) - parseFloat($('#C2').text());
|
||||
|
||||
//Rotary Details diesel/ton
|
||||
var os3 = $('#OS3').text() == '' ? '0' : parseFloat($('#OS3').text());
|
||||
document.getElementById('RHRS3').textContent = parseFloat($('#RHRS2').text());
|
||||
document.getElementById('R3').textContent = parseFloat($('#total_diesel_rotary_bull_r').text());
|
||||
document.getElementById('C3').textContent = parseFloat($('#total_diesel_rotary_bull_c').text());
|
||||
var PH3 = (parseFloat($('#total_diesel_rotary_bull_c').text()) / (parseFloat($('#total_rotary_input').text())/1000)).toFixed(3);
|
||||
if(isNaN(PH3)){PH3 = '0';}
|
||||
document.getElementById('PH3').textContent = PH3;
|
||||
document.getElementById('T3').textContent = (parseFloat($('#total_diesel_rotary_bull_r').text()) + parseFloat(os3));
|
||||
document.getElementById('CS3').textContent = parseFloat($('#T3').text()) - parseFloat($('#C3').text());
|
||||
|
||||
|
||||
//Diesel/Bull
|
||||
var os4 = $('#OS4').text() == '' ? '0' : parseFloat($('#OS4').text());
|
||||
document.getElementById('RHRS4').textContent = parseFloat($('#total_diesel_bull_rh').text());
|
||||
document.getElementById('R4').textContent = parseFloat($('#total_diesel_bull_r').text());
|
||||
document.getElementById('C4').textContent = parseFloat($('#total_diesel_bull_c').text());
|
||||
var PH4 = (parseFloat($('#total_diesel_bull_c').text()) / (parseFloat($('#total_diesel_bull_rh').text()))).toFixed(3);
|
||||
if(isNaN(PH4)){PH4 = '0';}
|
||||
document.getElementById('PH4').textContent = PH4;
|
||||
document.getElementById('T4').textContent = (parseFloat($('#total_diesel_bull_r').text()) + parseFloat(os4));
|
||||
document.getElementById('CS4').textContent = parseFloat($('#T4').text()) - parseFloat($('#C4').text());
|
||||
|
||||
//Rough Sand
|
||||
var os5 = $('#OS5').text() == '' ? '0' : parseFloat($('#OS5').text());
|
||||
document.getElementById('RHRS5').textContent = parseFloat($('#total_feeding_hrs').text());
|
||||
document.getElementById('R5').textContent = parseFloat($('#total_rough_sand_r').text());
|
||||
document.getElementById('C5').textContent = parseFloat($('#total_rough_sand_i').text());
|
||||
var PH5 = (parseFloat($('#total_rough_sand_i').text()) / (parseFloat($('#total_feeding_hrs').text()))).toFixed(3);
|
||||
if(isNaN(PH5)){PH5 = '0';}
|
||||
document.getElementById('PH5').textContent = PH5;
|
||||
document.getElementById('T5').textContent = (parseFloat($('#total_rough_sand_r').text()) + parseFloat(os5));
|
||||
document.getElementById('CS5').textContent = parseFloat($('#T5').text()) - parseFloat($('#C5').text());
|
||||
|
||||
|
||||
//Fine Sand
|
||||
var os6 = $('#OS6').text() == '' ? '0' : parseFloat($('#OS6').text());
|
||||
document.getElementById('RHRS6').textContent = parseFloat($('#total_feeding_hrs').text());
|
||||
document.getElementById('R6').textContent = parseFloat($('#total_fine_sand_r').text());
|
||||
document.getElementById('C6').textContent = parseFloat($('#total_fine_sand_i').text());
|
||||
var PH6 = (parseFloat($('#total_rough_sand_i').text()) / (parseFloat($('#total_feeding_hrs').text()))).toFixed(3);
|
||||
if(isNaN(PH6)){PH6 = '0';}
|
||||
document.getElementById('PH6').textContent = PH6;
|
||||
document.getElementById('T6').textContent = (parseFloat($('#total_fine_sand_r').text()) + parseFloat(os6));
|
||||
document.getElementById('CS6').textContent = parseFloat($('#T6').text()) - parseFloat($('#C6').text());
|
||||
|
||||
//TRP total Sand
|
||||
|
||||
document.getElementById('OS7').textContent = (os5 == ''?'0':parseFloat(os5)) + (os6 == ''?'0':parseFloat(os6));
|
||||
document.getElementById('RHRS7').textContent = parseFloat($('#total_feeding_hrs').text());
|
||||
document.getElementById('R7').textContent = parseFloat($('#R5').text()) + parseFloat($('#R6').text());
|
||||
document.getElementById('C7').textContent = parseFloat($('#C5').text()) + parseFloat($('#C6').text());
|
||||
var PH7 = (parseFloat($('#total_rough_sand_i').text()) / (parseFloat($('#total_feeding_hrs').text()))).toFixed(3);
|
||||
if(isNaN(PH7)){PH7 = '0';}
|
||||
document.getElementById('PH7').textContent = PH7;
|
||||
document.getElementById('T7').textContent = parseFloat($('#T5').text()) + parseFloat($('#T6').text());
|
||||
document.getElementById('CS7').textContent = parseFloat($('#CS5').text()) + parseFloat($('#CS6').text());
|
||||
document.getElementById('PS7').textContent = $('#PS5').text() == ''?'0':parseFloat($('#PS5').text()) + $('#PS6').text()==''?'0':parseFloat($('#PS6').text());
|
||||
document.getElementById('D7').textContent = parseFloat($('#PS7').text()) + parseFloat($('#CS7').text());
|
||||
|
||||
//Gas for Trip
|
||||
var os8 = $('#OS8').text() == '' ? '0' : parseFloat($('#OS8').text());
|
||||
//document.getElementById('RHRS8').textContent = parseFloat($('#total_running_hrs').text());
|
||||
document.getElementById('R8').textContent = parseFloat($('#total_gas_r').text());
|
||||
document.getElementById('C8').textContent = parseFloat($('#total_gas_c').text());
|
||||
var PH8 = (parseFloat($('#total_gas_c').text()) / (parseFloat($('#R7').text())/1000)).toFixed(3);
|
||||
if(isNaN(PH8)){PH8 = '0';}
|
||||
document.getElementById('PH8').textContent = PH8;
|
||||
document.getElementById('T8').textContent = (parseFloat($('#total_gas_r').text()) + parseFloat(os8));
|
||||
document.getElementById('CS8').textContent = parseFloat($('#T8').text()) - parseFloat($('#C8').text());
|
||||
|
||||
//WATER
|
||||
var os9 = $('#OS9').text() == '' ? '0' : parseFloat($('#OS9').text());
|
||||
//document.getElementById('RHRS8').textContent = parseFloat($('#total_running_hrs').text());
|
||||
document.getElementById('R9').textContent = parseFloat($('#total_water_r').text());
|
||||
document.getElementById('C9').textContent = parseFloat($('#total_water_c').text());
|
||||
var PH9 = (parseFloat($('#OS7').text()) / (parseFloat($('#total_water_c').text()))).toFixed(3);
|
||||
|
||||
if((isNaN(PH9)) || (isFinite(PH9))){PH9 = '0';}
|
||||
document.getElementById('PH9').textContent = PH9;
|
||||
document.getElementById('T9').textContent = (parseFloat($('#total_water_r').text()) + parseFloat(os9));
|
||||
document.getElementById('CS9').textContent = parseFloat($('#T9').text()) - parseFloat($('#C9').text());
|
||||
|
||||
//POWER
|
||||
document.getElementById('C10').textContent = parseFloat($('#total_power_total').text());
|
||||
//Man POWER Details
|
||||
document.getElementById('engineers').textContent = parseFloat($('#total_engineers').text());
|
||||
document.getElementById('operators').textContent = parseFloat($('#total_operators').text());
|
||||
document.getElementById('helpers').textContent = parseFloat($('#total_helpers').text());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$("#specmodel").on("shown.bs.modal", function(e) {
|
||||
|
||||
|
||||
var currentmonth = $('#month').val();
|
||||
currentmonth = currentmonth.split("-");
|
||||
var monthnumber = new Date(Date.parse(currentmonth[0] +" 1, 2018")).getMonth()+1;
|
||||
//alert(monthnumber);
|
||||
//alert(currentmonth[1]);
|
||||
if(monthnumber == 1)
|
||||
{
|
||||
monthnumber = 12;
|
||||
currentmonth[1] -=1;
|
||||
}
|
||||
else{
|
||||
monthnumber--;}
|
||||
//alert(monthnumber);
|
||||
//alert(currentmonth[1]);
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:monthnumber,param2:currentmonth[1]},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url().'batchcard/getPreviousMonthAbstractDetails'?>",
|
||||
success:function(data){
|
||||
//alert(data);
|
||||
var data = JSON.parse(data);
|
||||
$('.content').loader('hide');
|
||||
//alert(data.length);
|
||||
|
||||
if(data.length != 0){
|
||||
$.each(data,function(index,value){
|
||||
index++;
|
||||
// if(index == 7)
|
||||
// {
|
||||
// alert(value.abstract_details);
|
||||
// alert(value.close_stock);
|
||||
// }
|
||||
if(index < 10)
|
||||
{
|
||||
//if(index != 7){
|
||||
var id = 'OS'+index;
|
||||
|
||||
document.getElementById(id).textContent = value.close_stock;
|
||||
//}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
else{alert('Open Stock Not Available..!');}
|
||||
|
||||
}
|
||||
});
|
||||
setTimeout(function(){ whileModalShow(); }, 2000);
|
||||
|
||||
//ED Details
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
function abstractCalculation(a)
|
||||
{
|
||||
var id = a;
|
||||
// alert(id);
|
||||
var num = id.substr(-1);
|
||||
if(num == '0'){num == '10';}
|
||||
var text = id.substr(0,2);
|
||||
// console.log(num+'-'+text);
|
||||
|
||||
if( num == 5 || num == 6)
|
||||
{
|
||||
var os5 = $('#OS5').text() == ''?'0':parseFloat($('#OS5').text());
|
||||
var os6 = $('#OS6').text() == ''?'0':parseFloat($('#OS6').text());
|
||||
document.getElementById('OS7').textContent = parseFloat(os5) + parseFloat(os6);
|
||||
var t5 = $('#T5').text() == ''?'0':parseFloat($('#T5').text());
|
||||
var t6 = $('#T6').text() == ''?'0':parseFloat($('#T6').text());
|
||||
document.getElementById('T7').textContent = parseFloat(t5) + parseFloat(t6);
|
||||
|
||||
var cs5 = $('#CS5').text() == ''?'0':parseFloat($('#CS5').text());
|
||||
var cs6 = $('#CS6').text() == ''?'0':parseFloat($('#CS6').text());
|
||||
document.getElementById('CS7').textContent = parseFloat(cs5) + parseFloat(cs6);
|
||||
|
||||
var ps5 = $('#PS5').text() == ''?'0':parseFloat($('#PS5').text());
|
||||
var ps6 = $('#PS6').text() == ''?'0':parseFloat($('#PS6').text());
|
||||
document.getElementById('PS7').textContent = parseFloat(ps5) + parseFloat(ps6);
|
||||
document.getElementById('D7').textContent = parseFloat($('#PS7').text()) + parseFloat($('#CS7').text());
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(text == 'OS')
|
||||
{
|
||||
|
||||
var r = '';
|
||||
var os = '';
|
||||
if($('#R'+ num).text() != ''){ r = parseFloat($('#R'+ num).text());} else { r = "0";}
|
||||
if($('#'+id).text() != ''){ os = parseFloat($('#'+id).text());} else { os = '0';}
|
||||
document.getElementById('T'+num).textContent = parseFloat(r) + parseFloat(os);
|
||||
|
||||
document.getElementById('CS'+num).textContent = parseFloat(parseFloat($('#T'+ num).text()) - parseFloat($('#C'+num).text()));
|
||||
}
|
||||
else if(text == 'PS')
|
||||
{
|
||||
var cs = '';var ps = '';
|
||||
if($('#CS'+ num).text() != ''){ cs = parseFloat($('#CS'+ num).text());}else {cs = '0';}
|
||||
if($('#PS'+ num).text() != ''){ ps = parseFloat($('#PS'+ num).text());}else {ps = '0';}
|
||||
document.getElementById('D'+num).textContent = parseFloat(cs) - parseFloat(ps);
|
||||
}
|
||||
|
||||
var os7 = $('#OS7').text() == ''?'0':parseFloat($('#OS7').text());
|
||||
var c9 = $('#C9').text() == ''?'0':parseFloat($('#C9').text());
|
||||
var PH9 = (parseFloat(os7)/parseFloat(c9)).toFixed(3);
|
||||
if(isNaN(PH9)){ PH9 = '0';}
|
||||
document.getElementById('PH9').textContent = PH9;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$('#atten').click(function(){
|
||||
|
||||
var mon = $('#month').val();
|
||||
//alert(mon);
|
||||
$('#att').attr('action','<?php echo base_url().'batchcard/dailyListing/'?>'+mon);
|
||||
$('#att').submit();
|
||||
});
|
||||
|
||||
function saveToDB()
|
||||
{
|
||||
|
||||
var currentmonth = $('#month').val();
|
||||
currentmonth = currentmonth.split("-");
|
||||
var monthnumber = new Date(Date.parse(currentmonth[0] +" 1, 2018")).getMonth()+1;
|
||||
//alert(monthnumber);
|
||||
//alert(currentmonth[1]);
|
||||
|
||||
var date = new Date();
|
||||
var d = date.getDate();
|
||||
|
||||
|
||||
date = currentmonth[1]+'-'+monthnumber+'-'+d;
|
||||
var jsondata = $('#abstracttable').tableToJSON();
|
||||
jsondata = JSON.stringify(jsondata);
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:date,param2:jsondata},
|
||||
type:'POST',
|
||||
url:"<?php echo base_url().'batchcard/saveAbstractReport'?>",
|
||||
success:function(data){
|
||||
$('.content').loader('hide');
|
||||
if(data){
|
||||
alert(data)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
573
application/views/dailybatchcard.php
Normal file
573
application/views/dailybatchcard.php
Normal file
@ -0,0 +1,573 @@
|
||||
|
||||
<style>
|
||||
th{
|
||||
text-align:center ! important;
|
||||
}
|
||||
|
||||
input.text{
|
||||
text-align:right ! important;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
//print_r($products);
|
||||
|
||||
$approvedby = array(-1=>'Select Approver Name');
|
||||
foreach($emplist as $r)
|
||||
{
|
||||
$approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<script src="<?php echo base_url().'assets/jquery.plugin.js'?>"></script>
|
||||
<script src="<?php echo base_url().'assets/jquery.timeentry.js'?>"></script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||
|
||||
|
||||
</form>
|
||||
</div><!--</h3></center>-->
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<form id="dailyform" method="POST" action="<?php echo base_url().'batchcard/saveDailyBatchCardData'?>">
|
||||
<div class="col-md-12" >
|
||||
<legend>Daily Batch Card Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Date</label>
|
||||
<input type="text" id="rdate" name="rdate" onchange="getReading(this.value);" class="form-control" style="text-align:right;"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Auto Start - Auto Stop</label>
|
||||
<input type="text" id="description" name="description" class="form-control" style="text-align:right;" readonly />
|
||||
</div>
|
||||
|
||||
<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);"/>
|
||||
</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);"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Less Maintenance</label>
|
||||
<input type="text" id="less_maintenance" name="less_maintenance" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Less Break down hours</label>
|
||||
<input type="text" id="less_break_down_hrs" name="less_break_down_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<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);"/>
|
||||
</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);"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Gas Consumption Per Hour</label>
|
||||
<input type="text" id="gas_consumption_per_hour" name="gas_consumption_per_hour" class="form-control" style="text-align:right;"onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Gas Consumption Per Ton</label>
|
||||
<input type="text" id="gas_consumption_per_ton" name="gas_consumption_per_ton" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total Gas Consumption</label>
|
||||
<input type="text" id="total_gas_consumption" name="total_gas_consumption" class="form-control" style="text-align:right;"onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6" style="background-color:#669999;">
|
||||
<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);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" >
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="ed_receipt" name="ed_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Issues</label>
|
||||
<input type="text" id="ed_issues" name="ed_issues" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" style="background-color:#669999;">
|
||||
<legend>Rotary Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Input</label>
|
||||
<input type="text" id="rotary_input" name="rotary_input" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Output</label>
|
||||
<input type="text" id="rotatry_output" name="rotatry_output" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6" style="background-color:#669999;">
|
||||
<legend>TRP Rough Sand</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="roughsand_receipt" name="roughsand_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Issues</label>
|
||||
<input type="text" id="roughsand_issues" name="roughsand_issues" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>TRP Fine Sand</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="finesand_receipt" name="finesand_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Issues</label>
|
||||
<input type="text" id="finesand_issues" name="finesand_issues" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<legend>Gas for Trip</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="gastrip_receipt" name="gastrip_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Consumption</label>
|
||||
<input type="text" id="gastrip_consumption" name="gastrip_consumption" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>Water</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="water_receipt" name="water_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Consumption</label>
|
||||
<input type="text" id="water_consumpiton" name="water_consumpiton" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<legend>Diesel for Bull</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="diesel_receipt" name="diesel_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Consumption</label>
|
||||
<input type="text" id="diesel_consumption" name="diesel_consumption" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<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);"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>Diesel for Rotary Dryer</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="diesel_rotary_receipt" name="diesel_rotary_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Consumption</label>
|
||||
<input type="text" id="diesel_rotary_consumption" name="diesel_rotary_consumption" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<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);"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<legend>Power Consumption Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Open Reading</label>
|
||||
<input type="text" id="open_reading" name="open_reading" class="form-control" style="text-align:right;" readonly />
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Close Reading</label>
|
||||
<input type="text" id="close_reading" name="close_reading" class="form-control" style="text-align:right;" readonly />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>No of Persons Working</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Engineers</label>
|
||||
<input type="text" id="engineers" name="engineers" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Operators</label>
|
||||
<input type="text" id="operators" name="operators" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Helpers</label>
|
||||
<input type="text" id="helpers" name="helpers" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
|
||||
<legend>Maintenance Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Breakdown/Prevention</label>
|
||||
<input type="text" id="breakdown" name="breakdown" class="form-control" style="text-align:right;"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Location</label>
|
||||
<input type="text" id="location" name="location" class="form-control" style="text-align:right;"/>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Description</label>
|
||||
<textarea id="maintenance_description" name="maintenance_description" class="form-control" col="100"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Reason for Maintenance</label>
|
||||
<textarea id="maintenance_reason" name="maintenance_reason" class="form-control" col="100"></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
|
||||
<legend>Time Taken for Maintenance</legend>
|
||||
<div class="col-md-3">
|
||||
<label>From</label>
|
||||
<input type="text" id="maintenance_time_from" name="maintenance_time_from" class="form-control" style="text-align:right;" onchange="calculateTime();" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>To</label>
|
||||
<input type="text" id="maintenance_time_to" name="maintenance_time_to" class="form-control" style="text-align:right;" onchange="calculateTime();" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total Hrs</label>
|
||||
<input type="text" id="maintenance_total_hrs" name="maintenance_total_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" readonly />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>Cost</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Material</label>
|
||||
<input type="text" id="cost_material" name="cost_material" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Labour</label>
|
||||
<input type="text" id="cost_labour" name="cost_labour" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
|
||||
<legend>Remarks</legend>
|
||||
<textarea id="remarks" name="remarks" class="form-control" col="100"></textarea>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Work Done By:</label>
|
||||
<input type="text" name="work_done_by" id="work_done_by" value="<?php echo $this->session->userdata ( 'name' );?>" readonly class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3 col-md-offset-6">
|
||||
<label>Approved By:</label>
|
||||
<?php echo form_dropdown('approvedby',$approvedby,set_value('approvedby',$approvedby[-1]),'id="approvedby"' ,'class="form-control select2', 'style="text-align:center;"');?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<input type="button" value="Save" id="save" onclick="getAllData();" class="btn btn-primary" >
|
||||
</div>
|
||||
</div>
|
||||
<div> </div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
<!-- <div class="box-footer clearfix">
|
||||
|
||||
</div> -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
//alert();
|
||||
$('#rdate').datepicker({
|
||||
//minDate : 'year+16',
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
|
||||
});
|
||||
$('#maintenance_time_from').timeEntry({show24Hours: true});
|
||||
$('#maintenance_time_to').timeEntry({show24Hours: true});
|
||||
$('#total_burner_running_time').timeEntry({show24Hours: true});
|
||||
$('#total_feeding_hrs').timeEntry({show24Hours: true});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
function keyValidate(e)
|
||||
{
|
||||
// alert(e.which);
|
||||
if(((e.which || e.keyCode) == 46) ||((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 38)|| ((e.which || e.keyCode) == 39)|| ((e.which || e.keyCode) == 40))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( ((e.which || e.keyCode) < 48) || ((e.which || e.keyCode) > 57) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getAllData()
|
||||
{
|
||||
|
||||
|
||||
var d = $('#rdate').val();
|
||||
var a = $('#approvedby').val();
|
||||
|
||||
if(d == '' || a == -1)
|
||||
{
|
||||
alert('Please Enter Date and Approved by');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#dailyform').submit();
|
||||
}
|
||||
}
|
||||
|
||||
function getReading(v)
|
||||
{
|
||||
$('#save').show();
|
||||
var rd = v;
|
||||
if(rd != '')
|
||||
{
|
||||
$('.content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
data:{param1:rd},
|
||||
method:"POST",
|
||||
url:"<?php echo base_url().'batchcard/checkExistDaily'; ?>",
|
||||
success:function(data){
|
||||
//alert(data);
|
||||
if(data == 0)
|
||||
{
|
||||
|
||||
$.ajax({
|
||||
data:{param1:rd},
|
||||
method:"POST",
|
||||
url:"<?php echo base_url().'batchcard/getPowerConsumptionDetails'; ?>",
|
||||
success:function(data){
|
||||
if(data)
|
||||
{
|
||||
var data = JSON.parse(data);
|
||||
$('#open_reading').val(data.open);
|
||||
$('#close_reading').val(data.close);
|
||||
$('#description').val(data.start+'-'+data.stop);
|
||||
$('.content').loader('hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('No Power Consumption OR Start and Stop Data Available');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
else{
|
||||
alert('Already Data Existed for This Date');
|
||||
$('.content').loader('hide');
|
||||
$('#save').hide();
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function calculateTime()
|
||||
{
|
||||
|
||||
var start = $('#maintenance_time_from').val();
|
||||
var stop = $('#maintenance_time_to').val();
|
||||
|
||||
|
||||
//alert(start+'-'+stop);
|
||||
if(start != '' && stop != '')
|
||||
{
|
||||
var atime = '';
|
||||
start = start.split(":");
|
||||
stop = stop.split(":");
|
||||
//console.log(stop);
|
||||
if((start[0] > stop[0]))
|
||||
{
|
||||
alert('Enter Valid Time');
|
||||
document.getElementById('maintenance_time_to').value = start;
|
||||
return false;
|
||||
}
|
||||
|
||||
var h = parseFloat(stop[0]) - parseFloat(start[0]);
|
||||
var m = parseFloat(stop[1]) - parseFloat(start[1]);
|
||||
//console.log(h+'-'+m);
|
||||
if(parseFloat(m) > 60 )
|
||||
{
|
||||
h+=1;
|
||||
m -= 60;
|
||||
}
|
||||
else if(parseFloat(m) < 0)
|
||||
{
|
||||
h-=1;
|
||||
if(h < 0){h=0;}
|
||||
m+=60;
|
||||
|
||||
|
||||
}
|
||||
atime = h+':'+m;
|
||||
//console.log(atime);
|
||||
$('#maintenance_total_hrs').val((atime));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
581
application/views/editDailyData.php
Normal file
581
application/views/editDailyData.php
Normal file
@ -0,0 +1,581 @@
|
||||
|
||||
<style>
|
||||
th{
|
||||
text-align:center ! important;
|
||||
}
|
||||
|
||||
input.text{
|
||||
text-align:right ! important;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
//print_r($dailydata);
|
||||
|
||||
$approvedby = array(-1=>'Select Approver Name');
|
||||
foreach($emplist as $r)
|
||||
{
|
||||
$approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<script src="<?php echo base_url().'assets/jquery.plugin.js'?>"></script>
|
||||
<script src="<?php echo base_url().'assets/jquery.timeentry.js'?>"></script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||
|
||||
|
||||
</form>
|
||||
</div><!--</h3></center>-->
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<form id="dailyform" method="POST" action="<?php echo base_url().'batchcard/updateDailyBatchCardData'?>">
|
||||
<div class="col-md-12">
|
||||
<legend>Daily Batch Card Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Batch No</label>
|
||||
<input type="text" id="did" name="did" onchange="getReading(this.value);" class="form-control" style="text-align:right;" value="<?php echo $dailydata[0]->dailyid;?>" readonly />
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Date</label>
|
||||
<input type="text" id="rdate" name="rdate" onchange="getReading(this.value);" class="form-control" style="text-align:right;" value="<?php echo date_format(date_create($dailydata[0]->ddate),'d-m-Y');?>" readonly />
|
||||
<input type="hidden" name="did" id="did" value="<?php echo $dailydata[0]->dailyid;?>">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Auto Start - Auto Stop</label>
|
||||
<input type="text" id="description" name="description" class="form-control" style="text-align:right;" readonly value="<?php echo $dailydata[0]->description;?>"/>
|
||||
</div>
|
||||
|
||||
<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;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<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);" value="<?php echo $dailydata[0]->less_feeding_start;?>"/>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Less Maintenance</label>
|
||||
<input type="text" id="less_maintenance" name="less_maintenance" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->less_maintenance;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Less Break down hours</label>
|
||||
<input type="text" id="less_break_down_hrs" name="less_break_down_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->less_break_down_hrs;?>"/>
|
||||
</div>
|
||||
|
||||
<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;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div> </div>
|
||||
<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;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Gas Consumption Per Hour</label>
|
||||
<input type="text" id="gas_consumption_per_hour" name="gas_consumption_per_hour" class="form-control" style="text-align:right;"onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->gas_consumption_hr;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Gas Consumption Per Ton</label>
|
||||
<input type="text" id="gas_consumption_per_ton" name="gas_consumption_per_ton" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->gas_consumption_ton;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total Gas Consumption</label>
|
||||
<input type="text" id="total_gas_consumption" name="total_gas_consumption" class="form-control" style="text-align:right;"onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->total_gas_consumption;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<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;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="ed_receipt" name="ed_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->ed_receipt;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Issues</label>
|
||||
<input type="text" id="ed_issues" name="ed_issues" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->ed_issues;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<legend>Rotary Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Input</label>
|
||||
<input type="text" id="rotary_input" name="rotary_input" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->rotary_input;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Output</label>
|
||||
<input type="text" id="rotatry_output" name="rotatry_output" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->rotary_output;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<legend>TRP Rough Sand</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="roughsand_receipt" name="roughsand_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->trp_roughsand_receipt;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Issues</label>
|
||||
<input type="text" id="roughsand_issues" name="roughsand_issues" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->trp_roughsand_issues;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>TRP Fine Sand</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="finesand_receipt" name="finesand_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->trp_finesand_receipt;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Issues</label>
|
||||
<input type="text" id="finesand_issues" name="finesand_issues" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->trp_finesand_issues;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<legend>Gas for Trip</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="gastrip_receipt" name="gastrip_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->gas_for_trip_receipt;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Consumption</label>
|
||||
<input type="text" id="gastrip_consumption" name="gastrip_consumption" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->gas_for_trip_consumption;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>Water</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="water_receipt" name="water_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->water_receipt;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Consumption</label>
|
||||
<input type="text" id="water_consumpiton" name="water_consumpiton" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->water_consumption;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<legend>Diesel for Bull</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="diesel_receipt" name="diesel_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->diesel_receipt;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Consumption</label>
|
||||
<input type="text" id="diesel_consumption" name="diesel_consumption" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->diesel_consumption;?>"/>
|
||||
</div>
|
||||
|
||||
<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;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>Diesel for Rotary Dryer</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Receipt</label>
|
||||
<input type="text" id="diesel_rotary_receipt" name="diesel_rotary_receipt" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->diesel_dryer_receipt;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Consumption</label>
|
||||
<input type="text" id="diesel_rotary_consumption" name="diesel_rotary_consumption" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->diesel_dryer_consumption;?>"/>
|
||||
</div>
|
||||
|
||||
<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;?>"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<legend>Power Consumption Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Open Reading</label>
|
||||
<input type="text" id="open_reading" name="open_reading" class="form-control" style="text-align:right;" readonly value="<?php echo $dailydata[0]->power_open_reading;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Close Reading</label>
|
||||
<input type="text" id="close_reading" name="close_reading" class="form-control" style="text-align:right;" readonly value="<?php echo $dailydata[0]->power_close_reading;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>No of Persons Working</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Engineers</label>
|
||||
<input type="text" id="engineers" name="engineers" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->engineers;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Operators</label>
|
||||
<input type="text" id="operators" name="operators" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->operators;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Helpers</label>
|
||||
<input type="text" id="helpers" name="helpers" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->helpers;?>"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
|
||||
<legend>Maintenance Details</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Breakdown/Prevention</label>
|
||||
<input type="text" id="breakdown" name="breakdown" class="form-control" style="text-align:right;" value="<?php echo $dailydata[0]->maintenance_breakdown;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Location</label>
|
||||
<input type="text" id="location" name="location" class="form-control" style="text-align:right;" value="<?php echo $dailydata[0]->maintenance_location;?>"/>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Description</label>
|
||||
<textarea id="maintenance_description" name="maintenance_description" class="form-control" col="100"><?php echo $dailydata[0]->maintenance_description;?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Reason for Maintenance</label>
|
||||
<textarea id="maintenance_reason" name="maintenance_reason" class="form-control" col="100"><?php echo $dailydata[0]->maintenance_reason;?></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
|
||||
<legend>Time Taken for Maintenance</legend>
|
||||
<div class="col-md-3">
|
||||
<label>From</label>
|
||||
<input type="text" id="maintenance_time_from" name="maintenance_time_from" class="form-control" style="text-align:right;" onchange="calculateTime();" value="<?php echo $dailydata[0]->maintenance_from_hrs;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>To</label>
|
||||
<input type="text" id="maintenance_time_to" name="maintenance_time_to" class="form-control" style="text-align:right;" onchange="calculateTime();" value="<?php echo $dailydata[0]->maintenance_to_hrs;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Total Hrs</label>
|
||||
<input type="text" id="maintenance_total_hrs" name="maintenance_total_hrs" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" readonly value="<?php echo $dailydata[0]->maintenance_total_hrs;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<legend>Cost</legend>
|
||||
<div class="col-md-3">
|
||||
<label>Material</label>
|
||||
<input type="text" id="cost_material" name="cost_material" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->cost_material;?>"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Labour</label>
|
||||
<input type="text" id="cost_labour" name="cost_labour" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" value="<?php echo $dailydata[0]->cost_labour;?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
|
||||
<legend>Remarks</legend>
|
||||
<textarea id="remarks" name="remarks" class="form-control" col="100"><?php echo $dailydata[0]->remarks;?></textarea>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Work Done By:</label>
|
||||
<input type="text" name="work_done_by" id="work_done_by" value="<?php echo $this->session->userdata ( 'name' );?>" readonly class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3 col-md-offset-6">
|
||||
<label>Approved By:</label>
|
||||
<?php echo form_dropdown('approvedby',$approvedby,set_value('approvedby',$approvedby[-1]),'id="approvedby"' ,'class="form-control select2', 'style="text-align:center;"');?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div> </div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<input type="button" value="Save" id="save" onclick="getAllData();" class="btn btn-primary" >
|
||||
</div>
|
||||
</div>
|
||||
<div> </div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
<!-- <div class="box-footer clearfix">
|
||||
|
||||
</div> -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
//alert();
|
||||
$('#rdate').datepicker({
|
||||
//minDate : 'year+16',
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
|
||||
});
|
||||
$('#maintenance_time_from').timeEntry({show24Hours: true});
|
||||
$('#maintenance_time_to').timeEntry({show24Hours: true});
|
||||
$('#total_burner_running_time').timeEntry({show24Hours: true});
|
||||
$('#total_feeding_hrs').timeEntry({show24Hours: true});
|
||||
$('#approvedby').val('<?php echo $dailydata[0]->approvedby?>') ;
|
||||
|
||||
|
||||
});
|
||||
|
||||
function keyValidate(e)
|
||||
{
|
||||
// alert(e.which);
|
||||
if(((e.which || e.keyCode) == 46) ||((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 38)|| ((e.which || e.keyCode) == 39)|| ((e.which || e.keyCode) == 40))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( ((e.which || e.keyCode) < 48) || ((e.which || e.keyCode) > 57) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getAllData()
|
||||
{
|
||||
|
||||
|
||||
var d = $('#rdate').val();
|
||||
var a = $('#approvedby').val();
|
||||
|
||||
if(d == '' || a == -1)
|
||||
{
|
||||
alert('Please Enter Date and Approved by');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#dailyform').submit();
|
||||
}
|
||||
}
|
||||
|
||||
function getReading(v)
|
||||
{
|
||||
$('#save').show();
|
||||
var rd = v;
|
||||
if(rd != '')
|
||||
{
|
||||
$('.content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
data:{param1:rd},
|
||||
method:"POST",
|
||||
url:"<?php echo base_url().'batchcard/checkExistDaily'; ?>",
|
||||
success:function(data){
|
||||
//alert(data);
|
||||
if(data == 0)
|
||||
{
|
||||
|
||||
$.ajax({
|
||||
data:{param1:rd},
|
||||
method:"POST",
|
||||
url:"<?php echo base_url().'batchcard/getPowerConsumptionDetails'; ?>",
|
||||
success:function(data){
|
||||
if(data)
|
||||
{
|
||||
var data = JSON.parse(data);
|
||||
$('#open_reading').val(data.open);
|
||||
$('#close_reading').val(data.close);
|
||||
$('#description').val(data.start+'-'+data.stop);
|
||||
$('.content').loader('hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('No Power Consumption OR Start and Stop Data Available');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
else{
|
||||
alert('Already Data Existed for This Date');
|
||||
$('.content').loader('hide');
|
||||
$('#save').hide();
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function calculateTime()
|
||||
{
|
||||
|
||||
var start = $('#maintenance_time_from').val();
|
||||
var stop = $('#maintenance_time_to').val();
|
||||
|
||||
|
||||
//alert(start+'-'+stop);
|
||||
if(start != '' && stop != '')
|
||||
{
|
||||
var atime = '';
|
||||
start = start.split(":");
|
||||
stop = stop.split(":");
|
||||
//console.log(stop);
|
||||
if((start[0] > stop[0]))
|
||||
{
|
||||
alert('Enter Valid Time');
|
||||
document.getElementById('maintenance_time_to').value = start;
|
||||
return false;
|
||||
}
|
||||
|
||||
var h = parseFloat(stop[0]) - parseFloat(start[0]);
|
||||
var m = parseFloat(stop[1]) - parseFloat(start[1]);
|
||||
//console.log(h+'-'+m);
|
||||
if(parseFloat(m) > 60 )
|
||||
{
|
||||
h+=1;
|
||||
m -= 60;
|
||||
}
|
||||
else if(parseFloat(m) < 0)
|
||||
{
|
||||
h-=1;
|
||||
if(h < 0){h=0;}
|
||||
m+=60;
|
||||
|
||||
|
||||
}
|
||||
atime = h+':'+m;
|
||||
//console.log(atime);
|
||||
$('#maintenance_total_hrs').val((atime));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
378
application/views/edit_hourly_batch_card.php
Normal file
378
application/views/edit_hourly_batch_card.php
Normal file
@ -0,0 +1,378 @@
|
||||
<!-- ************************************************************************* -->
|
||||
<?php
|
||||
|
||||
$approvedby = array(-1=>'Select Approver Name');
|
||||
foreach($emplist as $r)
|
||||
{
|
||||
$approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName;
|
||||
}
|
||||
//print_r($batchdata);
|
||||
|
||||
?>
|
||||
|
||||
<!-- <link rel="stylesheet" href="<?php echo base_url().'assets/wickedpicker.css'?>" > -->
|
||||
<script src="<?php echo base_url().'assets/jquery.plugin.js'?>"></script>
|
||||
<script src="<?php echo base_url().'assets/jquery.timeentry.js'?>"></script>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Edit Hourly Batch Card Information</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!--</h3></center>-->
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<form action="<?php echo base_url() ?>batchcard/updateHourlyBatchCard" method="POST" id="myForm">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
<center>
|
||||
<div class="col-md-2">
|
||||
<label>Batch Date</label>
|
||||
<input type="text" id="curdate" name="myData[curdate]" class="form-control" style="text-align:right;" value="<?php echo date_format(date_create($batchdata[0]->report_date),'d-m-Y');?>" onchange="checkExist();">
|
||||
<input type="hidden" id="hid" name="myData[hid]" value="<?php echo $batchdata[0]->hourlyid;?>">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<label>Batch Time</label></br>
|
||||
<input type="text" name="myData[usr_time]" id="usr_time" class="form-control" style="text-align:right;" value="<?php echo $batchdata[0]->report_time?>"" onblur="checkExist();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Opening TRP Reading</label>
|
||||
<input type="text" id="open_trp_reading" value="<?php echo $batchdata[0]->opening_trp_reading?>" name="myData[open_trp_reading]" class="form-control" style="text-align:right;" onchange="calculateTotalTRP();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Closing TRP Reading</label>
|
||||
<input type="text" id="close_trp_reading" value="<?php echo $batchdata[0]->close_trp_reading?>" name="myData[close_trp_reading]" class="form-control"style="text-align:right;" onchange="calculateTotalTRP();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Total TRP Reading</label>
|
||||
<input type="text" id="total_trp_reading" value="<?php echo $batchdata[0]->total_trp_reading?>" name="myData[total_trp_reading]" class="form-control" style="text-align:right;" readonly>
|
||||
</div>
|
||||
|
||||
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Auto Start</label>
|
||||
<input type="text" id="auto_start" value="<?php echo $batchdata[0]->auto_start?>" name="myData[auto_start]" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Auto Stop</label>
|
||||
<input type="text" id="auto_stop" value="<?php echo $batchdata[0]->auto_stop?>" name="myData[auto_stop]" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Time</label>
|
||||
<input type="text" id="atime" value="<?php echo $batchdata[0]->time?>" name="myData[atime]" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Inlet Feeding (Qty for 30 Sec)</label>
|
||||
<input type="text" id="feed30sec" name="myData[feed30sec]" value="<?php echo $batchdata[0]->feed30sec?>" class="form-control ;" style="text-align:right;" onchange="calculateFeeding1HR();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Inlet Feeding (Qty for 1 Hr)</label>
|
||||
<input type="text" id="feed1hr" name="myData[feed1hr]" value="<?php echo $batchdata[0]->feed1hr?>" class="form-control ;" style="text-align:right;" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Inlet Temp</label>
|
||||
<input type="text" id="inlet_temp" name="myData[inlet_temp]" value="<?php echo $batchdata[0]->inlet_temp?>" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Outlet Temp</label>
|
||||
<input type="text" id="outlet_temp" name="myData[outlet_temp]" value="<?php echo $batchdata[0]->outlet_temp?>" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Output Feeding(Qty for 30 Sec)</label>
|
||||
<input type="text" id="output_feed_30" name="myData[output_feed_30]" value="<?php echo $batchdata[0]->output_feed_30?>" class="form-control" style="text-align:right;" onchange="calculateOPR();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Output Received (Qty for 1 Hr)</label>
|
||||
<input type="text" id="output_feed_1" name="myData[output_feed_1]" value="<?php echo $batchdata[0]->output_feed_1?>" class="form-control ;" style="text-align:right;" readonly>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Actual Weight Rough</label>
|
||||
<input type="text" id="weight_rough" value="<?php echo $batchdata[0]->weight_rough?>" name="myData[weight_rough]" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Actual Weight Fine</label>
|
||||
<input type="text" id="weight_fine" value="<?php echo $batchdata[0]->weight_fine?>" name="myData[weight_fine]" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Total</label>
|
||||
<input type="text" id="total" name="myData[total]" value="<?php echo $batchdata[0]->total?>" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Multi Cyclone Sand </label>
|
||||
<input type="text" id="cyclone" name="myData[cyclone]" value="<?php echo $batchdata[0]->cyclone?>" class="form-control" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>Remarks</label>
|
||||
<textarea id="remarks" name="myData[remarks]" class="form-control" ><?php echo $batchdata[0]->remarks?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Created By :</label>
|
||||
<input type="text" id="inspector" class="form-control" value="<?php echo $this->session->userdata ( 'name' );?>" readonly>
|
||||
<input type="hidden" name="myData[cby]" value="<?php echo $this->session->userdata ( 'userId' );?>">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 col-md-offset-6 ">
|
||||
<label>Checked By :</label>
|
||||
<?php echo form_dropdown('myData[approvedby]',$approvedby,set_value('approvedby',$approvedby[-1]),'id="approvedby"' ,'class="form-control select2', 'style="text-align:center;"');?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<div class="row"> </div>
|
||||
<div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="col-md-3" id="savebutton">
|
||||
<input type="button" id="save" value ="Save" class="btn btn-primary" onclick="getAllData();">
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
<!-- <div class="box-footer clearfix">
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#curdate').datepicker({
|
||||
//minDate : 'year+16',
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
|
||||
});
|
||||
|
||||
|
||||
//$('#usr_time').val('sdkjjdskbk');
|
||||
// $('#usr_time').timepicker({
|
||||
// timeFormat: 'h:mm p',
|
||||
// interval: 30,
|
||||
// // minTime: '10',
|
||||
// //maxTime: '6:00pm',
|
||||
// //defaultTime: '11',
|
||||
// //startTime: '10:00',
|
||||
// dynamic: false,
|
||||
// dropdown: true,
|
||||
// scrollbar: true
|
||||
// });
|
||||
|
||||
$('#usr_time').timeEntry({show24Hours: true});
|
||||
|
||||
$('#approvedby').val('<?php echo $batchdata[0]->approvedby;?>')
|
||||
|
||||
|
||||
$('.edit').bind('keypress', function(e)
|
||||
{
|
||||
|
||||
|
||||
if(((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 46) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 39))
|
||||
{
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
if(e.keyCode == 13)
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
if(((e.which || e.keyCode) < 48) || ((e.which || e.keyCode) > 57))
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
}); // End of document on ready funciton
|
||||
|
||||
function calculateTotalTRP()
|
||||
{
|
||||
var open = parseFloat($('#open_trp_reading').val());
|
||||
var close = parseFloat($('#close_trp_reading').val());
|
||||
//alert(open+'-'+close);
|
||||
if(open == '' && close == '' && isNaN(open) && isNaN(close))
|
||||
{
|
||||
alert("Enter OPen and Close TRP Reading Properly...!");
|
||||
}
|
||||
else if(close < open)
|
||||
{
|
||||
alert("Close TRP Reading is smaller than Open TRP Reading...!");
|
||||
$('#close_trp_reading').val('0');
|
||||
window.setTimeout(function ()
|
||||
{
|
||||
document.getElementById('close_trp_reading').focus();
|
||||
}, 0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var total = close - open;
|
||||
if(total == '' || isNaN(total))
|
||||
{
|
||||
total = 0.00;
|
||||
}
|
||||
$("#total_trp_reading").val(total);
|
||||
}
|
||||
}
|
||||
|
||||
function calculateFeeding1HR()
|
||||
{
|
||||
var val = parseFloat($('#feed30sec').val());
|
||||
if(val == '' || isNaN(val) )
|
||||
{
|
||||
alert("Enter Inlet Feeding Data Properly...!");
|
||||
$('#feed30sec').val('');
|
||||
window.setTimeout(function ()
|
||||
{
|
||||
document.getElementById('feed30sec').focus();
|
||||
}, 0);
|
||||
$('#feed1hr').val('');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = (val*2*60);
|
||||
}
|
||||
|
||||
if(val == '' || isNaN(val))
|
||||
{
|
||||
val = 0.00;
|
||||
}
|
||||
$('#feed1hr').val(val);
|
||||
}
|
||||
|
||||
function calculateOPR()
|
||||
{
|
||||
var val = parseFloat($('#output_feed_30').val());
|
||||
if(val == '' || isNaN(val) )
|
||||
{
|
||||
alert("Enter Inlet Feeding Data Properly...!");
|
||||
$('#output_feed_30').val('');
|
||||
window.setTimeout(function ()
|
||||
{
|
||||
document.getElementById('output_feed_30').focus();
|
||||
}, 0);
|
||||
$('#feed1hr').val('');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = (val*2*60);
|
||||
}
|
||||
|
||||
if(val == '' || isNaN(val))
|
||||
{
|
||||
val = 0.00;
|
||||
}
|
||||
$('#output_feed_1').val(val);
|
||||
}
|
||||
|
||||
function getAllData()
|
||||
{
|
||||
|
||||
$('#myForm').submit();
|
||||
}
|
||||
|
||||
|
||||
function checkExist()
|
||||
{
|
||||
//alert();
|
||||
var bdate = $('#curdate').val();
|
||||
var btime = $('#usr_time').val();
|
||||
//var j = 0;
|
||||
if(bdate != '' && btime != '')
|
||||
{
|
||||
$('#save').show();
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:bdate,param2:btime},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url()?>batchcard/checkExistHour",
|
||||
success:function(data)
|
||||
{
|
||||
if(data){
|
||||
alert(data);
|
||||
$('#save').hide();
|
||||
|
||||
//return j;
|
||||
}
|
||||
$('.content').loader('hide');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
445
application/views/hourly_batch_card.php
Normal file
445
application/views/hourly_batch_card.php
Normal file
@ -0,0 +1,445 @@
|
||||
<!-- ************************************************************************* -->
|
||||
<?php
|
||||
|
||||
$approvedby = array(-1=>'Select Approver Name');
|
||||
foreach($emplist as $r)
|
||||
{
|
||||
$approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!-- <link rel="stylesheet" href="<?php echo base_url().'assets/wickedpicker.css'?>" > -->
|
||||
<script src="<?php echo base_url().'assets/jquery.plugin.js'?>"></script>
|
||||
<script src="<?php echo base_url().'assets/jquery.timeentry.js'?>"></script>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Hourly Batch Card Information</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!--</h3></center>-->
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<form action="<?php echo base_url() ?>batchcard/saveHourlyBatchCard" method="POST" id="myForm">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Batch Date</label>
|
||||
<input type="text" id="curdate" name="myData[curdate]" class="form-control" style="text-align:right;" onchange="checkExist();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<label>Batch Time</label></br>
|
||||
<input type="text" name="myData[usr_time]" id="usr_time" class="form-control" style="text-align:right;" onblur="checkExist();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Opening TRP Reading</label>
|
||||
<input type="text" id="open_trp_reading" name="myData[open_trp_reading]" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="calculateTotalTRP();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Closing TRP Reading</label>
|
||||
<input type="text" id="close_trp_reading" name="myData[close_trp_reading]" class="form-control"style="text-align:right;" onkeypress="return keyValidate(event);" onchange="calculateTotalTRP();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Total TRP Reading</label>
|
||||
<input type="text" id="total_trp_reading" name="myData[total_trp_reading]" class="form-control" style="text-align:right;" readonly>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Auto Start</label>
|
||||
<input type="text" id="auto_start" name="myData[auto_start]" class="form-control" style="text-align:right;" onkeypress=" return keyValidate(event);" onchange="calculateTime();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Auto Stop</label>
|
||||
<input type="text" id="auto_stop" name="myData[auto_stop]" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="calculateTime();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Time</label>
|
||||
<input type="text" id="atime" name="myData[atime]" class="form-control" style="text-align:right;" readonly>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Inlet Feeding (Qty for 30 Sec)</label>
|
||||
<input type="text" id="feed30sec" name="myData[feed30sec]" class="form-control ;" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="calculateFeeding1HR();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Inlet Feeding (Qty for 1 Hr)</label>
|
||||
<input type="text" id="feed1hr" name="myData[feed1hr]" class="form-control ;" style="text-align:right;" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Inlet Temp</label>
|
||||
<input type="text" id="inlet_temp" name="myData[inlet_temp]" class="form-control" onkeypress="return keyValidate(event);" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Outlet Temp</label>
|
||||
<input type="text" id="outlet_temp" name="myData[outlet_temp]" class="form-control" onkeypress="return keyValidate(event);" style="text-align:right;">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Output Feeding(Qty for 30 Sec)</label>
|
||||
<input type="text" id="output_feed_30" name="myData[output_feed_30]" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="calculateOPR();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Output Received (Qty for 1 Hr)</label>
|
||||
<input type="text" id="output_feed_1" name="myData[output_feed_1]" class="form-control ;" style="text-align:right;" readonly>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Actual Weight Rough</label>
|
||||
<input type="text" id="weight_rough" name="myData[weight_rough]" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="calculateWeight();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Actual Weight Fine</label>
|
||||
<input type="text" id="weight_fine" name="myData[weight_fine]" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);" onchange="calculateWeight();">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Total</label>
|
||||
<input type="text" id="total" name="myData[total]" class="form-control" style="text-align:right;" readonly>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Multi Cyclone Sand </label>
|
||||
<input type="text" id="cyclone" name="myData[cyclone]" class="form-control" style="text-align:right;" onkeypress="return keyValidate(event);">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>Remarks</label>
|
||||
<textarea id="remarks" name="myData[remarks]" class="form-control" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Created By :</label>
|
||||
<input type="text" id="inspector" class="form-control" value="<?php echo $this->session->userdata ( 'name' );?>" readonly>
|
||||
<input type="hidden" name="myData[cby]" value="<?php echo $this->session->userdata ( 'userId' );?>">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 col-md-offset-6 ">
|
||||
<label>Checked By :</label>
|
||||
<?php echo form_dropdown('myData[approvedby]',$approvedby,set_value('approvedby',$approvedby[-1]),'id="approvedby"' ,'class="form-control select2', 'style="text-align:center;"');?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<div class="row"> </div>
|
||||
<div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="col-md-3" id="savebutton">
|
||||
<input type="button" id="save" value ="Save" class="btn btn-primary" onclick="getAllData();">
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
<!-- <div class="box-footer clearfix">
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#curdate').datepicker({
|
||||
//minDate : 'year+16',
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
|
||||
});
|
||||
|
||||
|
||||
//$('#usr_time').val('sdkjjdskbk');
|
||||
// $('#usr_time').timepicker({
|
||||
// timeFormat: 'h:mm p',
|
||||
// interval: 30,
|
||||
// // minTime: '10',
|
||||
// //maxTime: '6:00pm',
|
||||
// //defaultTime: '11',
|
||||
// //startTime: '10:00',
|
||||
// dynamic: false,
|
||||
// dropdown: true,
|
||||
// scrollbar: true
|
||||
// });
|
||||
|
||||
$('#usr_time').timeEntry({show24Hours: true});
|
||||
$('#auto_start').timeEntry({show24Hours: true});
|
||||
$('#auto_stop').timeEntry({show24Hours: true});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}); // End of document on ready funciton
|
||||
|
||||
function calculateTotalTRP()
|
||||
{
|
||||
var open = parseFloat($('#open_trp_reading').val());
|
||||
var close = parseFloat($('#close_trp_reading').val());
|
||||
//alert(open+'-'+close);
|
||||
if(open == '' && close == '' && isNaN(open) && isNaN(close))
|
||||
{
|
||||
alert("Enter Open and Close TRP Reading Properly...!");
|
||||
}
|
||||
else if(close < open)
|
||||
{
|
||||
alert("Close TRP Reading is smaller than Open TRP Reading...!");
|
||||
$('#close_trp_reading').val('0');
|
||||
window.setTimeout(function ()
|
||||
{
|
||||
document.getElementById('close_trp_reading').focus();
|
||||
}, 0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var total = close - open;
|
||||
if(total == '' || isNaN(total))
|
||||
{
|
||||
total = 0.00;
|
||||
}
|
||||
$("#total_trp_reading").val(total);
|
||||
}
|
||||
}
|
||||
|
||||
function calculateFeeding1HR()
|
||||
{
|
||||
var val = parseFloat($('#feed30sec').val());
|
||||
if(val == '' || isNaN(val) )
|
||||
{
|
||||
alert("Enter Inlet Feeding Data Properly...!");
|
||||
$('#feed30sec').val('');
|
||||
window.setTimeout(function ()
|
||||
{
|
||||
document.getElementById('feed30sec').focus();
|
||||
}, 0);
|
||||
$('#feed1hr').val('');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = (val*2*60);
|
||||
}
|
||||
|
||||
if(val == '' || isNaN(val))
|
||||
{
|
||||
val = 0.00;
|
||||
}
|
||||
$('#feed1hr').val(val);
|
||||
}
|
||||
|
||||
function calculateOPR()
|
||||
{
|
||||
var val = parseFloat($('#output_feed_30').val());
|
||||
if(val == '' || isNaN(val) )
|
||||
{
|
||||
alert("Enter Inlet Feeding Data Properly...!");
|
||||
$('#output_feed_30').val('');
|
||||
window.setTimeout(function ()
|
||||
{
|
||||
document.getElementById('output_feed_30').focus();
|
||||
}, 0);
|
||||
$('#feed1hr').val('');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = (val*2*60);
|
||||
}
|
||||
|
||||
if(val == '' || isNaN(val))
|
||||
{
|
||||
val = 0.00;
|
||||
}
|
||||
$('#output_feed_1').val(val);
|
||||
}
|
||||
|
||||
function getAllData()
|
||||
{
|
||||
|
||||
var d = $('#curdate').val();
|
||||
var t = $('#usr_time').val();
|
||||
var a = $('#approvedby').val();
|
||||
//alert(d+t+a);
|
||||
if(d == '' || t =='' || a ==-1)
|
||||
{
|
||||
alert('Please Select Date, Time, and Checked By');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#myForm').submit();
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
function checkExist()
|
||||
{
|
||||
//alert();
|
||||
var bdate = $('#curdate').val();
|
||||
var btime = $('#usr_time').val();
|
||||
//var j = 0;
|
||||
if(bdate != '' && btime != '')
|
||||
{
|
||||
$('#save').show();
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:bdate,param2:btime},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url()?>batchcard/checkExistHour",
|
||||
success:function(data)
|
||||
{
|
||||
if(data){
|
||||
alert(data);
|
||||
$('#save').hide();
|
||||
|
||||
//return j;
|
||||
}
|
||||
$('.content').loader('hide');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function calculateTime()
|
||||
{
|
||||
|
||||
var start = $('#auto_start').val();
|
||||
var stop = $('#auto_stop').val();
|
||||
|
||||
|
||||
//alert(start+'-'+stop);
|
||||
if(start != '' && stop != '')
|
||||
{
|
||||
var atime = '';
|
||||
start = start.split(":");
|
||||
stop = stop.split(":");
|
||||
//console.log(stop);
|
||||
if((start[0] > stop[0]))
|
||||
{
|
||||
alert('Enter Valid Time');
|
||||
document.getElementById('auto_stop').value = start;
|
||||
return false;
|
||||
}
|
||||
|
||||
var h = parseFloat(stop[0]) - parseFloat(start[0]);
|
||||
var m = parseFloat(stop[1]) - parseFloat(start[1]);
|
||||
//console.log(h+'-'+m);
|
||||
if(parseFloat(m) > 60 )
|
||||
{
|
||||
h+=1;
|
||||
m -= 60;
|
||||
}
|
||||
else if(parseFloat(m) < 0)
|
||||
{
|
||||
h-=1;
|
||||
if(h < 0){h=0;}
|
||||
m+=60;
|
||||
|
||||
|
||||
}
|
||||
atime = h+':'+m;
|
||||
//console.log(atime);
|
||||
$('#atime').val((atime));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function calculateWeight()
|
||||
{
|
||||
var rough = $('#weight_rough').val();
|
||||
var fine = $('#weight_fine').val();
|
||||
|
||||
if(rough != '' && fine != '')
|
||||
{
|
||||
$('#total').val((parseFloat(rough)+parseFloat(fine)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function keyValidate(e)
|
||||
{
|
||||
//(e.which);
|
||||
if(((e.which || e.keyCode) == 46) ||((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 38)|| ((e.which || e.keyCode) == 39)|| ((e.which || e.keyCode) == 40))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( ((e.which || e.keyCode) < 48) || ((e.which || e.keyCode) > 57) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
330
application/views/hourlybatchcardlisting.php
Normal file
330
application/views/hourlybatchcardlisting.php
Normal file
@ -0,0 +1,330 @@
|
||||
<script src="<?php echo base_url()?>assets/js/jquery.CongelarFilaColumna.js"></script>
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fht-table,
|
||||
.fht-table thead,
|
||||
.fht-table tfoot,
|
||||
.fht-table tbody,
|
||||
.fht-table tr,
|
||||
.fht-table th,
|
||||
.fht-table td {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.fht-table td {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.fht-table td:hover {
|
||||
background-color: #3c8dbc;
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
.fht-table{
|
||||
border: 0 none;
|
||||
height: auto;
|
||||
width: auto;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
/*table-layout: fixed; Algoritmo de distribucion fijo */
|
||||
/*white-space:nowrap; Impide los saltos de línea automáticos */
|
||||
}
|
||||
|
||||
.fht-table th,.fht-table td {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fht-table-wrapper,
|
||||
.fht-table-wrapper .fht-thead,
|
||||
.fht-table-wrapper .fht-tfoot,
|
||||
.fht-table-wrapper .fht-fixed-column .fht-tbody,
|
||||
.fht-table-wrapper .fht-fixed-body .fht-tbody,
|
||||
.fht-table-wrapper .fht-tbody {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-body .fht-tbody,
|
||||
.fht-table-wrapper .fht-tbody {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-table .fht-cell {
|
||||
overflow: hidden;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-column,
|
||||
.fht-table-wrapper .fht-fixed-body {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.fht-table-wrapper .fht-fixed-column {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.fht-fixed-body .fht-thead table {
|
||||
margin-right: 20px;
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
/*For Examples*/
|
||||
|
||||
.ContenedorTabla {
|
||||
height: 500px;
|
||||
margin: 0 auto;
|
||||
overflow: auto;
|
||||
width: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.header, .main {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
.titulosHeader {
|
||||
border-bottom: 1px solid #e8bb25;
|
||||
height: auto;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 8px;
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.celda_encabezado_general {
|
||||
background-color: #3c8dbc;
|
||||
border: 1px solid #ccc;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
padding: 2px 4px;
|
||||
text-align: center;
|
||||
}
|
||||
._Separador{
|
||||
background-color: #fff;
|
||||
height: 12px;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
width: 7px;
|
||||
}
|
||||
._Separador div{
|
||||
width: 4px;
|
||||
}
|
||||
.celda_normal {
|
||||
/*background-color: #fff;*/
|
||||
border: 1px solid #ccc;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
/*style excel*/
|
||||
.excel_cell{
|
||||
border: 1px solid #CCC;
|
||||
color: #222;
|
||||
text-align: center;
|
||||
font-size: 13px
|
||||
font-weight: normal;
|
||||
padding: 4px;
|
||||
white-space: pre-line;
|
||||
empty-cells: show;
|
||||
}
|
||||
._cell_header{
|
||||
background-color: #EEE;
|
||||
}
|
||||
._cell_Default{
|
||||
background-color: #FFF;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.excel_cell div{
|
||||
width: 30px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<?php
|
||||
|
||||
//print_r($allhourdata);
|
||||
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Hourly Batch Card Info List</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
|
||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||
<form id="filter" name="filter" method="POST" action="<?php echo base_url().'batchcard/filterHourlyBatchData'?>">
|
||||
<div class="col-md-2">
|
||||
<input type="text" id="fromdate" class="form-control" name="fromdate">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="text" id="todate" class="form-control" name="todate">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" id="click" class="btn btn-primary" value="click">
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-md-2 col-md-offset-4">
|
||||
<a href=" <?php echo base_url().'batchcard';?> " type="button" class="btn btn-primary">Add New</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<br/>
|
||||
<main class="main">
|
||||
<div class="ContenedorTabla">
|
||||
|
||||
<table id="batchcardlisting" class="fht-table">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
<th class="celda_encabezado_general" style="width:35px;">Report Date</br> </th> <th class="celda_encabezado_general">Report Time</th><th class="celda_encabezado_general">Open TRP Reading</th><th class="celda_encabezado_general">Close TRP Reading</th><th class="celda_encabezado_general">Total TRP Reading</th><th class="celda_encabezado_general">Auto Start</th><th class="celda_encabezado_general">Auto Stop</th><th class="celda_encabezado_general">Time</th><th class="celda_encabezado_general">Inlet Feeding Qty for 30 Sec</th><th class="celda_encabezado_general">Inlet Feeding Qty for 1 hour</th><th class="celda_encabezado_general">Inlet Tem</th><th class="celda_encabezado_general">Outlet Tem</th><th class="celda_encabezado_general">Output Feeding Qty for 30 Sec</th><th class="celda_encabezado_general">Output received Qty for 1 hour</th><th class="celda_encabezado_general">Actual Weight Rough</th><th class="celda_encabezado_general">Actual Weight Fine</th><th class="celda_encabezado_general">Total</th><th class="celda_encabezado_general">Multi Cyclone Sand</th><th class="celda_encabezado_general">Remarks</th><th class="celda_encabezado_general">Checked by</th><th class="celda_encabezado_general">Action</th>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="specAppend">
|
||||
<?php
|
||||
if(!empty($allhourdata))
|
||||
{
|
||||
foreach($allhourdata as $data)
|
||||
{
|
||||
|
||||
//print_r($data);echo "</br></br>";
|
||||
?>
|
||||
<tr> <td class="celda_normal" style="width:35px;"><?php echo date_format(date_create($data->report_date),'d-m-Y');?></td>
|
||||
<td class="celda_normal"><?php echo $data->report_time?></td>
|
||||
<td class="celda_normal"><?php echo $data->opening_trp_reading?></td>
|
||||
<td class="celda_normal"><?php echo $data->close_trp_reading?></td>
|
||||
<td class="celda_normal"><?php echo $data->total_trp_reading?></td>
|
||||
<td class="celda_normal"><?php echo $data->auto_start?></td>
|
||||
<td class="celda_normal"><?php echo $data->auto_stop?></td>
|
||||
<td class="celda_normal"><?php echo $data->time?></td>
|
||||
<td class="celda_normal"><?php echo $data->feed30sec?></td>
|
||||
<td class="celda_normal"><?php echo $data->feed1hr?></td>
|
||||
<td class="celda_normal"><?php echo $data->inlet_temp?></td>
|
||||
<td class="celda_normal"><?php echo $data->outlet_temp?></td>
|
||||
<td class="celda_normal"><?php echo $data->output_feed_30?></td>
|
||||
<td class="celda_normal"><?php echo $data->output_feed_1?></td>
|
||||
<td class="celda_normal"><?php echo $data->weight_rough?></td>
|
||||
<td class="celda_normal"><?php echo $data->weight_fine?></td>
|
||||
<td class="celda_normal"><?php echo $data->total?></td>
|
||||
<td class="celda_normal"><?php echo $data->cyclone?></td>
|
||||
<td class="celda_normal"><?php echo $data->remarks?></td>
|
||||
<td class="celda_normal"><?php echo $data->F.'-'.$data->L;?></td>
|
||||
<td class="celda_normal"><a type="button" href="<?php echo base_url().'batchcard/editHourly/'.$data->hourlyid; ?> "><i class="fa fa-pencil"></i></a></td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
<!-- <div class="box-footer clearfix">
|
||||
|
||||
</div> -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
$('#batchcardlisting').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": false,
|
||||
"aaSorting": [[ 0, "asc" ]],
|
||||
"info": true,
|
||||
"autoWidth": true,
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#fromdate').datepicker({
|
||||
//minDate : 'year+16',
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
|
||||
});
|
||||
|
||||
$('#todate').datepicker({
|
||||
//minDate : 'year+16',
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
|
||||
|
||||
//$('#batchcardlisting').CongelarFilaColumna({lboHoverTr:true});
|
||||
});
|
||||
|
||||
// $('#click').click(function(){
|
||||
|
||||
// alert("dskjjn") ;
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -427,6 +427,26 @@ $(function() {
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Store Requisition</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>batchcard/HourlyListing">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Batchcard - HourlyListing</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>batchcard/dailyListing">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Batchcard - DailyListing</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>batchcard/getStockDetails">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Batchcard - StockDetails</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
if($role == ROLE_MANAGER ) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user