minor change in stock module -vadivel J
This commit is contained in:
parent
9345220ab7
commit
12b92d4f4c
@ -416,5 +416,6 @@ $routes->post('getSilicaIGR', 'Supplier::getSilicaIGR');
|
||||
|
||||
$routes->get('coatingMachineDetails' , 'StockController::loadView_coatingMachineDetails');
|
||||
$routes->post('addNewCoatingMachineDetails' , 'StockController::addNewCoatingMachineDetails');
|
||||
$routes->post('updateCoatingMachineDetails','StockController::updateCoatingMachineDetails');
|
||||
$routes->get('deleteCoatingMachineDetails' , 'StockController::deleteCoatingMachineDetails');
|
||||
|
||||
|
||||
@ -78,11 +78,12 @@ class StockController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function updateCoatingMachineDetails(){
|
||||
|
||||
$putData=$this->request->getPost();
|
||||
|
||||
$id = $this->request->getGet('id');
|
||||
$id = $putData['editCoatingMachineDetailId'];
|
||||
|
||||
$updated= $this->coatingMachineDetails_model->update($id,$putData);
|
||||
|
||||
|
||||
@ -143,9 +143,8 @@
|
||||
<td align="center"><?php echo $record['perHourGasConsumption']??'' ?></td>
|
||||
<td align="center"><?php echo $record['perHourCoatingSandQTY']??'' ?></td>
|
||||
<td align="center">
|
||||
<a data-toggle="tooltip" class=".edit-btn"
|
||||
href="<?php echo base_url()?>loadView_updateFactoryMachineMasterDetail?id=<?php echo $record['id'] ?>"
|
||||
>
|
||||
<a data-toggle="tooltip" class="edit-btn" data-target="editCoatingMachineDetailModal" data-toggle="modal"
|
||||
style="cursor:pointer">
|
||||
<i class="fa fa-pencil-alt" data-toggle="tooltip"
|
||||
title="Click here to Edit "></i>
|
||||
|
||||
@ -270,6 +269,93 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!-- editCoatingMachineDetailModal -->
|
||||
<div class="modal fade" id="editCoatingMachineDetailModal" tabindex="-1" role="dialog" aria-labelledby="editCoatingMachineDetailModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" style="width:1060px !important ;" role="document">
|
||||
<div class="modal-content" >
|
||||
<div class="modal-header">
|
||||
|
||||
<h5 class="modal-title" id="editCoatingMachineDetailModalLabel">
|
||||
Edit Coating Machine Detail</h5>
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- form -->
|
||||
<form method="post" id="editCoatingMachineDetailModalFormId" action="<?php echo base_url(); ?>updateCoatingMachineDetails">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="dateId">Date</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<input type="date" class="form-control" id="editDateId"
|
||||
name="date" value="">
|
||||
<input type="hidden" name="editCoatingMachineDetailId" id="editCoatingMachineDetailId">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="shiftId">Shift</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<input type="text" class="form-control" id="editShiftId"
|
||||
name="shift" value="">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="machineOnTimeId">Machine On Time</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<input type="time" class="form-control" id="editMachineOnTimeId"
|
||||
name="machineOnTime" value="">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="machineOffTimeId">Machine Off Time</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<input type="time" class="form-control" id="editMachineOffTimeId"
|
||||
name="machineOffTime" value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="customerNameId">Customer Name</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<input type="text" class="form-control" id="editCustomerNameId"
|
||||
name="customerName" value="">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="totalCoatingId">Total Coating</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<input type="text" class="form-control" id="editTotalCoatingId"
|
||||
name="totalCoating" value="">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="totalCoatingSandId">Total Coating Sand (in Kg)</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<input type="text" class="form-control" id="editTotalCoatingSandId"
|
||||
name="totalCoatingSandInKg" value="">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="totalGasConsumptionId">Total Gas Consumption</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<input type="text" class="form-control" id="editTotalGasConsumptionId"
|
||||
name="totalGasConsumption" value="">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Save </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||
<!-- <script type="text/javascript">
|
||||
@ -339,3 +425,52 @@ $(document).ready(function() {
|
||||
$('#exampleSelect2').select2();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<!-- tempchanges -->
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#datatable tbody').on('click', '.edit-btn', function() {
|
||||
|
||||
var row = $(this).closest('tr');
|
||||
|
||||
// Get values from the row
|
||||
var customerName = row.find('td:eq(0)').text();
|
||||
var date = row.find('td:eq(1)').text();
|
||||
var shift = row.find('td:eq(2)').text();
|
||||
var machineOnTime = row.find('td:eq(3)').text();
|
||||
var machineOffTime = row.find('td:eq(4)').text();
|
||||
var machineRunningInHrs= row.find('td:eq(5)').text();
|
||||
var totalCoating = row.find('td:eq(6)').text();
|
||||
var totalCoatingSandInKg = row.find('td:eq(7)').text();
|
||||
var totalGasConsumption = row.find('td:eq(8)').text();
|
||||
var perHourGasConsumption =row.find('td:eq(9)').text();
|
||||
var perHourCoatingSandQTY =row.find('td:eq(10)').text();
|
||||
|
||||
|
||||
|
||||
// Fill the modal fields with the values
|
||||
|
||||
$('#editCustomerNameId').val(customerName);
|
||||
$('#editDateId').val(date);
|
||||
$('#editShiftId').val(shift);
|
||||
$('#editMachineOnTimeId').val(machineOnTime);
|
||||
$('#editMachineOffTimeId').val(machineOffTime);
|
||||
$('#editTotalCoatingId').val(totalCoating);
|
||||
$('#editTotalCoatingSandId').val(totalCoatingSandInKg);
|
||||
$('#editTotalGasConsumptionId').val(totalGasConsumption);
|
||||
$('#editCoatingMachineDetailId').val(row.data('id'));
|
||||
|
||||
|
||||
// Show the modal
|
||||
$('#editCoatingMachineDetailModal').modal('show');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user