delete route in stock module -vadivel J

This commit is contained in:
vadivel J 2024-10-09 08:28:35 +05:30
parent 04093c9342
commit 9345220ab7
3 changed files with 11 additions and 9 deletions

View File

@ -416,5 +416,5 @@ $routes->post('getSilicaIGR', 'Supplier::getSilicaIGR');
$routes->get('coatingMachineDetails' , 'StockController::loadView_coatingMachineDetails');
$routes->post('addNewCoatingMachineDetails' , 'StockController::addNewCoatingMachineDetails');
$routes->get('deleteCoatingMachineDetails' , 'StockController::deleteCoatingMachineDetails');

View File

@ -60,8 +60,9 @@ class StockController extends BaseController
$machineRunningInHrs = $timeDifference->h ;
$postData['machineRunningInHrs'] = $machineRunningInHrs;
$postData['perHourGasConsumption']= (float)$postData['totalGasConsumption']/$machineRunningInHrs;
$postData['perHourCoatingSandQTY']= (float)$postData['totalCoatingSandInKg']/$machineRunningInHrs;
$postData['perHourGasConsumption'] = number_format((float)$postData['totalGasConsumption'] / $machineRunningInHrs, 2, '.', '');
$postData['perHourCoatingSandQTY'] = number_format((float)$postData['totalCoatingSandInKg'] / $machineRunningInHrs, 2, '.', '');
//dd( $postData['perHourCoatingSandQTY']);

View File

@ -114,12 +114,12 @@
<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 Off Time</th>
<th style="text-align:center !important;">Machine Running (hrs)</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 Sand (kgs)</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;">Per Hour Gas Consumption</th>
<th style="text-align:center !important;">Per Hour Coating Sand QTY</th>
<th style="text-align:center !important;">Per Hour Coating Sand QTY (kg)</th>
<th style="text-align:center !important;">Action</th>
</tr>
</thead>
@ -130,6 +130,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>
@ -142,7 +143,7 @@
<td align="center"><?php echo $record['perHourGasConsumption']??'' ?></td>
<td align="center"><?php echo $record['perHourCoatingSandQTY']??'' ?></td>
<td align="center">
<a data-toggle="tooltip"
<a data-toggle="tooltip" class=".edit-btn"
href="<?php echo base_url()?>loadView_updateFactoryMachineMasterDetail?id=<?php echo $record['id'] ?>"
>
<i class="fa fa-pencil-alt" data-toggle="tooltip"
@ -153,7 +154,7 @@
<a data-toggle="tooltip" onclick="confirmDelete(event)"
href="<?php echo base_url(); ?>deleteFactoryMachineMasterDetails?id=<?php echo $record['id'] ?>"
href="<?php echo base_url(); ?>deleteCoatingMachineDetails?id=<?php echo $record['id'] ?>"
>
<i class="fa fa-trash" data-toggle="tooltip"
title="Click here to Delete "></i>
@ -326,7 +327,7 @@
<script>
function confirmDelete(event){
let result= confirm(` Do you Confirm to Delete the Factory Machine?`);
let result= confirm(` Do you Confirm to Delete the Coating Machine Detail?`);
if(result){return result; }else{event.preventDefault();}
}