From 50530cb86980936016f5e3b25648ed06519f14dc Mon Sep 17 00:00:00 2001 From: velz2020 Date: Tue, 9 Jan 2018 11:20:21 +0530 Subject: [PATCH] NEW MODULE BATCH CARD --- application/controllers/batchcard.php | 672 ++++++++++++++ application/models/batchcard_model.php | 195 ++++ application/views/batchcard_stockdetails.php | 394 ++++++++ application/views/dailyBatchCardListing.php | 923 +++++++++++++++++++ application/views/dailybatchcard.php | 573 ++++++++++++ application/views/editDailyData.php | 581 ++++++++++++ application/views/edit_hourly_batch_card.php | 378 ++++++++ application/views/hourly_batch_card.php | 445 +++++++++ application/views/hourlybatchcardlisting.php | 330 +++++++ application/views/includes/header.php | 20 + 10 files changed, 4511 insertions(+) create mode 100644 application/controllers/batchcard.php create mode 100644 application/models/batchcard_model.php create mode 100644 application/views/batchcard_stockdetails.php create mode 100644 application/views/dailyBatchCardListing.php create mode 100644 application/views/dailybatchcard.php create mode 100644 application/views/editDailyData.php create mode 100644 application/views/edit_hourly_batch_card.php create mode 100644 application/views/hourly_batch_card.php create mode 100644 application/views/hourlybatchcardlisting.php diff --git a/application/controllers/batchcard.php b/application/controllers/batchcard.php new file mode 100644 index 00000000..f34b4566 --- /dev/null +++ b/application/controllers/batchcard.php @@ -0,0 +1,672 @@ +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 ""; + } + else + { + echo ""; + } + } + + 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 ""; + } + else + { + echo ""; + } + } + + + 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 ""; + } + else + { + echo ""; + } + //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 ""; + } + else + { + echo ""; + } + + + } + + 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.'
'; + // echo 'PREVOIUS'.$py[0].'-'.$py[1].'
'; + // 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 '
';die(); + $data['currentmonthstockdetails'] = $this->batchcard_model->currentMonthStockDetails($fm,$fy,$sd1,$sd2); + $data['selmonth'] = $fd; + $data['selstockvalue'] = $snforview; + //print_r($data['currentmonthstockdetails']);echo '
';die(); + + + + } + else + { + + } + $this->global['pageTitle'] = 'Siddharth : Stock Details'; + $this->loadViews("batchcard_stockdetails", $this->global,$data,NULL); + } + +} +?> \ No newline at end of file diff --git a/application/models/batchcard_model.php b/application/models/batchcard_model.php new file mode 100644 index 00000000..9497b3cb --- /dev/null +++ b/application/models/batchcard_model.php @@ -0,0 +1,195 @@ +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(); + } +} + +?> \ No newline at end of file diff --git a/application/views/batchcard_stockdetails.php b/application/views/batchcard_stockdetails.php new file mode 100644 index 00000000..26862cd6 --- /dev/null +++ b/application/views/batchcard_stockdetails.php @@ -0,0 +1,394 @@ + + + + + + + +
+ +
+

+
Batch Card - Stock Details
+

+
+
+ + +
+
+
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + + + + + + $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);} + ?> + + + + + + + + + + $currentclose); + } + + } + + + ?> + + + + +
Date
Open StockReceiptTotalConsumptionClosing Stock
ddate),'d-m-Y');?> ed_receipt;?>ed_issues;?>
+

 

+
+ +
+
+ +
+ + +
+
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/dailyBatchCardListing.php b/application/views/dailyBatchCardListing.php new file mode 100644 index 00000000..5ff82689 --- /dev/null +++ b/application/views/dailyBatchCardListing.php @@ -0,0 +1,923 @@ + + + + + + +"; +// echo count($attendance); +// echo "
"; +// print_r($emppay); +// echo "
"; +// 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 "
------------------------------
"; + +?> + +
+ +
+

+
Daily Batch Card Lisiting -
+

+
+
+ + +
+
+
+
+
+
+ '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);?> +
+
+ +
+ +
+ +
+ + + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ddate),'d-m-Y'); + $id=$hdata->dailyid; + ?> + + + 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; + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       Date           Auto StartAuto StopTotal Hrsless up to feeding startless maintenanceLess Break down hoursTotal burner running timeTotal Feeding HoursTotal gas consumptionED DetailsRotary DryerTRP Rough SandTRP Fine SandGas for TripWaterDiesel for BullDiesel for Rotary DryerPower ConsumptionNo Of Persion WorkedMaintenance DetailsTime Taken for MaintenanceWorked Done ByApproved ByCost            Remarks            
Running HrsReceiptIssuesInputOutputReceiptIssuesReceiptIssuesReceiptConsumptionReceiptConsumptionReceiptConsumptionRunning HrsReceiptConsumptionRunning HrsOpening ReadingClose ReadingTotalEngineersOperatorsHelpersNature of maintenance            Location                        Description                        Reason            FromToTotal HrsMaterialLabour
less_feeding_start; $total_feeding_start += $hdata->less_feeding_start;?>less_maintenance; $total_less_maintenance+= $hdata->less_maintenance;?>less_break_down_hrs;$total_less_break_down_hrs+=$hdata->less_break_down_hrs;?>total_burner_running_time;$total_burner_running_time+=$hdata->total_burner_running_time;?>total_feeding_hrs;$total_feeding_hrs+=$hdata->total_feeding_hrs;?>total_gas_consumption;$total_gas_consumption+=$hdata->total_gas_consumption;?>ed_running_hrs;$total_ed_rhrs+=$hdata->ed_running_hrs;?>ed_receipt;$total_ed_receipt+=$hdata->ed_receipt;?>ed_issues;$total_ed_issues+=$hdata->ed_issues;?>rotary_input;$total_rotary_input+=$hdata->rotary_input;?>rotary_output;$total_rotary_output+=$hdata->rotary_output;?>trp_roughsand_receipt;$total_rough_sand_r+=$hdata->trp_roughsand_receipt;?>trp_roughsand_issues;$total_rough_sand_i+=$hdata->trp_roughsand_issues;?>trp_finesand_receipt;$total_fine_sand_r+=$hdata->trp_finesand_receipt;?>trp_finesand_issues;$total_fine_sand_i+=$hdata->trp_finesand_issues;?>gas_for_trip_receipt;$total_gas_r+=$hdata->gas_for_trip_receipt;?>gas_for_trip_consumption;$total_gas_c+=$hdata->gas_for_trip_consumption;?>water_receipt;$total_water_r+=$hdata->water_receipt;?>water_consumption;$total_water_c+=$hdata->water_consumption;?>diesel_receipt;$total_diesel_bull_r+=$hdata->diesel_receipt;?>diesel_consumption;$total_diesel_bull_c+=$hdata->diesel_consumption;?>diesel_runninig_hrs;$total_diesel_bull_rh+=$hdata->diesel_runninig_hrs;?>diesel_dryer_receipt;$total_diesel_rotary_bull_r+=$hdata->diesel_dryer_receipt;?>diesel_dryer_consumption;$total_diesel_rotary_bull_c+=$hdata->diesel_dryer_consumption;?>diesel_dryer_runninig_hrs;$total_diesel_rotary_bull_rh+=$hdata->diesel_dryer_runninig_hrs;?>power_open_reading;?>power_close_reading;?>power_close_reading - $hdata->power_open_reading);echo $treading;$total_power_total+=$treading;?>engineers;$total_engineers+=$hdata->engineers;?>operators;$total_operators+=$hdata->operators;?>helpers;$total_helpers+=$hdata->helpers;?>maintenance_breakdown;?>maintenance_location;?>maintenance_description;?>maintenance_reason;?>maintenance_from_hrs;?>maintenance_to_hrs;?>maintenance_total_hrs;$total_maintenance_thrs+=$hdata->maintenance_total_hrs;?>createdby;?>approvedby;?>cost_material;$total_cost_material+=$hdata->cost_material;?>cost_labour;$total_cost_labour+=$hdata->cost_labour;?>remarks;?>
Total   = 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;?>           
+ + +
+ +
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/application/views/dailybatchcard.php b/application/views/dailybatchcard.php new file mode 100644 index 00000000..91280274 --- /dev/null +++ b/application/views/dailybatchcard.php @@ -0,0 +1,573 @@ + + +'Select Approver Name'); +foreach($emplist as $r) +{ + $approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName; +} + + +?> + + +
+ + +
+ + +
+
+
+
+ +
+ + + + +
+ +
+ + +
+
+
+ Daily Batch Card Details +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
 
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
 
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
 
+
+
+ Ed Details +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ Rotary Details +
+ + +
+ +
+ + +
+ + +
+
+ +
 
+
+
+ TRP Rough Sand +
+ + +
+ +
+ + +
+ + +
+
+ + TRP Fine Sand +
+ + +
+ +
+ + +
+ + +
+
+ +
 
+
+
+ Gas for Trip +
+ + +
+ +
+ + +
+ + +
+
+ + Water +
+ + +
+ +
+ + +
+ + +
+
+ +
 
+
+
+ Diesel for Bull +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+ + Diesel for Rotary Dryer +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
 
+
+
+ Power Consumption Details +
+ + +
+ +
+ + +
+ + + +
+
+ + No of Persons Working +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
 
+
+
+ + Maintenance Details +
+ + +
+ +
+ + +
+
+ + +
+ +
+ + +
+ + + +
+ + +
+ +
 
+
+
+ + + + Time Taken for Maintenance +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+
+ + Cost +
+ + +
+ +
+ + +
+ + +
+
+ + + + Remarks + + + + +
+
+ +
 
+
+
+ + +
+
+ + +
+
+
+
 
+
+
+ +
+
+
 
+ + + + +
+ +
+ + +
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/editDailyData.php b/application/views/editDailyData.php new file mode 100644 index 00000000..4d3760e2 --- /dev/null +++ b/application/views/editDailyData.php @@ -0,0 +1,581 @@ + + +'Select Approver Name'); +foreach($emplist as $r) +{ + $approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName; +} + + +?> + + +
+ + +
+ + +
+
+
+
+ +
+ + + + +
+ +
+ + +
+
+
+ Daily Batch Card Details +
+ + + +
+
+ + + +
+ +
+ + +
+ +
+ + +
+ + + +
+
 
+
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+
 
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
 
+
+
+ Ed Details +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ Rotary Details +
+ + +
+ +
+ + +
+ + +
+
+ +
 
+
+
+ TRP Rough Sand +
+ + +
+ +
+ + +
+ + +
+
+ + TRP Fine Sand +
+ + +
+ +
+ + +
+ + +
+
+ +
 
+
+
+ Gas for Trip +
+ + +
+ +
+ + +
+ + +
+
+ + Water +
+ + +
+ +
+ + +
+ + +
+
+ +
 
+
+
+ Diesel for Bull +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+ + Diesel for Rotary Dryer +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
 
+
+
+ Power Consumption Details +
+ + +
+ +
+ + +
+ + + +
+
+ + No of Persons Working +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
 
+
+
+ + Maintenance Details +
+ + +
+ +
+ + +
+
+ + +
+ +
+ + +
+ + + +
+ + +
+ +
 
+
+
+ + + + Time Taken for Maintenance +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+
+ + Cost +
+ + +
+ +
+ + +
+ + +
+
+ + + + Remarks + + + + +
+
+ +
 
+
+
+ + +
+
+ + +
+
+
+
 
+
+
+ +
+
+
 
+ + + + +
+ +
+ + +
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/edit_hourly_batch_card.php b/application/views/edit_hourly_batch_card.php new file mode 100644 index 00000000..0e41791f --- /dev/null +++ b/application/views/edit_hourly_batch_card.php @@ -0,0 +1,378 @@ + +'Select Approver Name'); +foreach($emplist as $r) +{ + $approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName; +} +//print_r($batchdata); + +?> + + + + + +
+ +
+

+
Edit Hourly Batch Card Information
+

+
+
+ + +
+
+
+
+ +
+ + + + +
+ +
+ +
+
+ +
+
+
+ + + +
+ +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+ +
+
+ + +
+
+ + + + +
 
+
+ +
+ + + +
+ +
+ + + +
+ +
+ +
 
+
+
 
+
+
+ +
+
+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/application/views/hourly_batch_card.php b/application/views/hourly_batch_card.php new file mode 100644 index 00000000..df561364 --- /dev/null +++ b/application/views/hourly_batch_card.php @@ -0,0 +1,445 @@ + +'Select Approver Name'); +foreach($emplist as $r) +{ + $approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName; +} + +?> + + + + + +
+ +
+

+
Hourly Batch Card Information
+

+
+
+ + +
+
+
+
+ +
+ + + + +
+ +
+ +
+
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+ +
+
+ + +
+
+ + + + +
 
+
+ +
+ + + +
+ +
+ + + +
+ +
+ +
 
+
+
 
+
+
+ +
+
+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/application/views/hourlybatchcardlisting.php b/application/views/hourlybatchcardlisting.php new file mode 100644 index 00000000..ccadbf21 --- /dev/null +++ b/application/views/hourlybatchcardlisting.php @@ -0,0 +1,330 @@ + + + + +
+ +
+

+
Hourly Batch Card Info List
+

+
+
+ + +
+
+
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+
+ Add New +
+ + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + + + + +
"; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Report Date
                      
Report TimeOpen TRP ReadingClose TRP ReadingTotal TRP ReadingAuto StartAuto StopTimeInlet Feeding Qty for 30 SecInlet Feeding Qty for 1 hourInlet TemOutlet TemOutput Feeding Qty for 30 SecOutput received Qty for 1 hourActual Weight RoughActual Weight FineTotalMulti Cyclone SandRemarksChecked byAction
report_date),'d-m-Y');?>report_time?>opening_trp_reading?>close_trp_reading?>total_trp_reading?>auto_start?>auto_stop?>time?>feed30sec?>feed1hr?>inlet_temp?>outlet_temp?>output_feed_30?>output_feed_1?>weight_rough?>weight_fine?>total?>cyclone?>remarks?>F.'-'.$data->L;?>
+

 

+
+ +
+
+ +
+ + +
+
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/includes/header.php b/application/views/includes/header.php index 5f3e4fa5..99e823d4 100755 --- a/application/views/includes/header.php +++ b/application/views/includes/header.php @@ -427,6 +427,26 @@ $(function() { Store Requisition + +
  • + + + Batchcard - HourlyListing + +
  • + +
  • + + + Batchcard - DailyListing + +
  • + +
  • + + + Batchcard - StockDetails +