finished coating machine details
This commit is contained in:
parent
0d50b646d6
commit
a3275490cd
@ -421,6 +421,7 @@ $routes->post('getSilicaIGR', 'Supplier::getSilicaIGR');
|
|||||||
//Stock Module
|
//Stock Module
|
||||||
|
|
||||||
$routes->get('coatingMachineDetails' , 'StockController::loadView_coatingMachineDetails');
|
$routes->get('coatingMachineDetails' , 'StockController::loadView_coatingMachineDetails');
|
||||||
|
$routes->post('coatingMachineDetails' , 'StockController::loadView_coatingMachineDetails');
|
||||||
$routes->post('addNewCoatingMachineDetails' , 'StockController::addNewCoatingMachineDetails');
|
$routes->post('addNewCoatingMachineDetails' , 'StockController::addNewCoatingMachineDetails');
|
||||||
$routes->post('updateCoatingMachineDetails','StockController::updateCoatingMachineDetails');
|
$routes->post('updateCoatingMachineDetails','StockController::updateCoatingMachineDetails');
|
||||||
$routes->get('deleteCoatingMachineDetails' , 'StockController::deleteCoatingMachineDetails');
|
$routes->get('deleteCoatingMachineDetails' , 'StockController::deleteCoatingMachineDetails');
|
||||||
|
|||||||
@ -37,13 +37,34 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
public function loadView_coatingMachineDetails(){
|
public function loadView_coatingMachineDetails(){
|
||||||
|
|
||||||
|
if ($this->request->getMethod() === 'POST'){
|
||||||
|
$month = $this->request->getPost('month');
|
||||||
|
|
||||||
|
$date = DateTime::createFromFormat('M-Y', $month);
|
||||||
|
|
||||||
|
$formattedDate = $date->format('Y-m');
|
||||||
|
|
||||||
|
$month=$formattedDate;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$month = date('Y-m');
|
||||||
|
// dd($month);
|
||||||
|
}
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Coating Machine Details ';
|
$this->global['pageTitle'] = 'Coating Machine Details ';
|
||||||
|
|
||||||
$data['coatingMachineDetails']= $this->coatingMachineDetails_model
|
$data['coatingMachineDetails']= $this->coatingMachineDetails_model
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->orderBy('created_at','DESC')
|
->orderBy('created_at','DESC')
|
||||||
|
->like('created_at', $month, 'after')
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
|
$date = DateTime::createFromFormat('Y-m', $month);
|
||||||
|
|
||||||
|
$formattedDate = $date->format('M-Y');
|
||||||
|
|
||||||
|
$data['month']=$formattedDate;
|
||||||
|
|
||||||
return $this->loadViews("CoatingMachineDetail", $this->global, $data, NULL);
|
return $this->loadViews("CoatingMachineDetail", $this->global, $data, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,9 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- Include Bootstrap Datepicker CSS and JS -->
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css">
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -113,8 +115,27 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<form method='post' action="<?= base_url('/coatingMachineDetails');?>">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
<div class="card-body">
|
<div class=form-row>
|
||||||
|
<div class="form-group col-md-2 mt-2 ">
|
||||||
|
|
||||||
|
<input type="text"
|
||||||
|
value="<?= $month; ?>" name="month"
|
||||||
|
class="form-control monthpicker" id="monthpicker">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<table id="datatable" class="table table-hover table-bordered"
|
<table id="datatable" class="table table-hover table-bordered"
|
||||||
style="background-color:#fff;">
|
style="background-color:#fff;">
|
||||||
@ -126,12 +147,12 @@
|
|||||||
<th style="text-align:center !important;">Shift</th>
|
<th style="text-align:center !important;">Shift</th>
|
||||||
<th style="text-align:center !important;">Machine On Time</th>
|
<th style="text-align:center !important;">Machine On Time</th>
|
||||||
<th style="text-align:center !important;">Machine Off Time</th>
|
<th style="text-align:center !important;">Machine Off Time</th>
|
||||||
<th style="text-align:center !important;">Machine Running (hr)</th>
|
<th style="text-align:center !important;">Machine Running(hr)</th>
|
||||||
<th style="text-align:center !important;">Total Coating</th>
|
<th style="text-align:center !important;">Total Coating</th>
|
||||||
<th style="text-align:center !important;">Total Coating Sand (kg)</th>
|
<th style="text-align:center !important;">Total Coating Sand(kg)</th>
|
||||||
<th style="text-align:center !important;">Total Gas Consumption</th>
|
<th style="text-align:center !important;">Total Gas Consumption</th>
|
||||||
<th style="text-align:center !important;">Per Hour Gas Consumption</th>
|
<th style="text-align:center !important;">Hour Gas</th>
|
||||||
<th style="text-align:center !important;">Per Hour Coating Sand QTY (kg)
|
<th style="text-align:center !important;">Hour QTY(kg)
|
||||||
</th>
|
</th>
|
||||||
<th style="text-align:center !important;">Customer Name</th>
|
<th style="text-align:center !important;">Customer Name</th>
|
||||||
<th style="text-align:center !important;">Action</th>
|
<th style="text-align:center !important;">Action</th>
|
||||||
@ -569,7 +590,7 @@
|
|||||||
var table = $('#datatable').DataTable({
|
var table = $('#datatable').DataTable({
|
||||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||||
buttons: [
|
buttons: [
|
||||||
'csv', 'excel', 'pdf' // Export buttons
|
'csv', 'excel', 'pdf', // Export buttons
|
||||||
],
|
],
|
||||||
pageLength: 10, // Default rows per page
|
pageLength: 10, // Default rows per page
|
||||||
lengthMenu: [[10, 20, 30, 50, -1], [10, 20, 30, 50, "All"]], // Rows per page options
|
lengthMenu: [[10, 20, 30, 50, -1], [10, 20, 30, 50, "All"]], // Rows per page options
|
||||||
@ -930,4 +951,15 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$('#monthpicker').datepicker({
|
||||||
|
format: 'M-yyyy',
|
||||||
|
viewMode: 'months',
|
||||||
|
minViewMode: 'months',
|
||||||
|
autoclose: true,
|
||||||
|
orientation: 'bottom'
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user