added fields in stock module - vadivel J

This commit is contained in:
vadivelJ96 2024-10-17 14:39:48 +05:30
parent 77a69bb11e
commit 894c5083c9
3 changed files with 76 additions and 47 deletions

View File

@ -120,4 +120,7 @@ class StockController extends BaseController
// --------------------------------------------gwm----------------------------------------------
}

View File

@ -74,7 +74,9 @@
<div class="container-fluid">
<!-- start page title -->
<div>
<?php
<!-- flash message is removed -->
<!-- <?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
@ -86,7 +88,7 @@
$type = "success";
echo show_alert($type, $success);
}
?>
?> -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
@ -117,7 +119,7 @@
<thead>
<tr>
<th style="text-align:center !important;">Customer Name</th>
<th style="text-align:center !important;">Date</th>
<th style="text-align:center !important;">Shift</th>
<th style="text-align:center !important;">Machine On Time</th>
@ -127,7 +129,8 @@
<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;">Per Hour Gas Consumption</th>
<th style="text-align:center !important;">Per Hour Coating Sand QTY (kg)</th>
<th style="text-align:center !important;">Per Hour Coating Sand QTY (kg)</th>
<th style="text-align:center !important;">Customer Name</th>
<th style="text-align:center !important;">Action</th>
</tr>
</thead>
@ -139,7 +142,7 @@
foreach ($coatingMachineDetails as $record) {
?>
<tr data-id="<?php echo $record['id']; ?>">
<td align="center"><?php echo $record['customerName']; ?></td>
<td align="center"><?php echo $record['date'] ?></td>
<td align="center"><?php echo $record['shift'] ?></td>
<td align="center"><?php echo $record['machineOnTime'] ?></td>
@ -150,6 +153,7 @@
<td align="center"><?php echo $record['totalGasConsumption'] ?></td>
<td align="center"><?php echo $record['perHourGasConsumption']??'' ?></td>
<td align="center"><?php echo $record['perHourCoatingSandQTY']??'' ?></td>
<td align="center"><?php echo $record['customerName']; ?></td>
<td align="center">
<a data-toggle="tooltip" class="edit-btn" data-target="editCoatingMachineDetailModal" data-toggle="modal"
style="cursor:pointer">
@ -264,10 +268,26 @@
</div>
<!-- hidden input fields -->
<input type="hidden" class="form-control" id="machineRunningInHrsId" name="machineRunningInHrs">
<input type="hidden" class="form-control" id="perHourGasConsumptionId" name="perHourGasConsumption">
<input type="hidden" class="form-control" id="perHourCoatingSandQTYId" name="perHourCoatingSandQTY" >
<div class="form-group col-md-3">
<label for="machineRunningInHrsId"> Machine Running In Hrs</label>
<span class="badge mandatory">*</span>
<input type="text" class="form-control" id="machineRunningInHrsId" name="machineRunningInHrs" required>
</div>
<div class="form-group col-md-3">
<label for="perHourGasConsumptionId">Per Hour Gas Consumption </label>
<span class="badge mandatory">*</span>
<input type="text" class="form-control" id="perHourGasConsumptionId" name="perHourGasConsumption" required>
</div>
<div class="form-group col-md-3">
<label for="perHourCoatingSandQTY">Per Hour Coating Sand QTY</label>
<span class="badge mandatory">*</span>
<input type="text" class="form-control" id="perHourCoatingSandQTYId" name="perHourCoatingSandQTY" required>
</div>
</div>
@ -355,12 +375,28 @@
name="totalGasConsumption" value="" required>
</div>
<!-- hidden input fields -->
<input type="hidden" class="form-control" id="editMachineRunningInHrsId" name="machineRunningInHrs">
<input type="hidden" class="form-control" id="editPerHourGasConsumptionId" name="perHourGasConsumption">
<input type="hidden" class="form-control" id="editPerHourCoatingSandQTYId" name="perHourCoatingSandQTY" >
<div class="form-group col-md-3">
<label for="editMachineRunningInHrsId"> Machine Running In Hrs</label>
<span class="badge mandatory">*</span>
<input type="text" class="form-control" id="editMachineRunningInHrsId" name="machineRunningInHrs" required>
</div>
<div class="form-group col-md-3">
<label for="editPerHourGasConsumptionId">Per Hour Gas Consumption </label>
<span class="badge mandatory">*</span>
<input type="text" class="form-control" id="editPerHourGasConsumptionId" name="perHourGasConsumption" required>
</div>
<div class="form-group col-md-3">
<label for="editPerHourCoatingSandQTYId">Per Hour Coating Sand QTY</label>
<span class="badge mandatory">*</span>
<input type="text" class="form-control" id="editPerHourCoatingSandQTYId" name="perHourCoatingSandQTY" required>
</div>
</div>
</div>
@ -376,24 +412,8 @@
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<!-- <script type="text/javascript">
$(function () {
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100]
});
});
</script> -->
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
@ -405,7 +425,7 @@
var table = $('#datatable').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
'csv', 'excel', 'pdf' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
@ -455,22 +475,24 @@ $(document).ready(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();
var date = row.find('td:eq(0)').text();
var shift = row.find('td:eq(1)').text();
var machineOnTime = row.find('td:eq(2)').text();
var machineOffTime = row.find('td:eq(3)').text();
var machineRunningInHrs= row.find('td:eq(4)').text();
var totalCoating = row.find('td:eq(5)').text();
var totalCoatingSandInKg = row.find('td:eq(6)').text();
var totalGasConsumption = row.find('td:eq(7)').text();
var perHourGasConsumption =row.find('td:eq(8)').text();
var perHourCoatingSandQTY =row.find('td:eq(9)').text();
var customerName = row.find('td:eq(10)').text();
// Fill the modal fields with the values
$('#editCoatingMachineDetailId').val(row.data('id'));
$('#editCustomerNameId').val(customerName);
$('#editDateId').val(date);
$('#editShiftId').val(shift);
@ -479,8 +501,9 @@ $(document).ready(function() {
$('#editTotalCoatingId').val(totalCoating);
$('#editTotalCoatingSandId').val(totalCoatingSandInKg);
$('#editTotalGasConsumptionId').val(totalGasConsumption);
$('#editCoatingMachineDetailId').val(row.data('id'));
$('#editMachineRunningInHrsId').val(machineRunningInHrs);
$('#editPerHourGasConsumptionId').val(perHourGasConsumption);
$('#editPerHourCoatingSandQTYId').val(perHourCoatingSandQTY);
// Show the modal
$('#editCoatingMachineDetailModal').modal('show');

View File

@ -69,6 +69,9 @@
<link href="<?php echo base_url(); ?>public/new_assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>
<style>
.mce-edit-area.mce-container.mce-panel.mce-first.mce-last.mce-stack-layout-item {