972 lines
42 KiB
PHP
972 lines
42 KiB
PHP
|
||
<style type="text/css">
|
||
.num {
|
||
text-align: right;
|
||
}
|
||
|
||
.fht-table,
|
||
.fht-table thead,
|
||
.fht-table tfoot,
|
||
.fht-table tbody,
|
||
.fht-table tr,
|
||
.fht-table th,
|
||
.fht-table td {
|
||
margin: 0;
|
||
}
|
||
|
||
.fht-table td {
|
||
text-align: center;
|
||
}
|
||
|
||
.fht-table td:hover {
|
||
background-color: #00a65a;
|
||
color: #ffffff;
|
||
}
|
||
|
||
.fht-table {
|
||
border: 0 none;
|
||
height: auto;
|
||
width: auto;
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
/*table-layout: fixed; Algoritmo de distribucion fijo */
|
||
white-space:nowrap;
|
||
}
|
||
|
||
.fht-table th,
|
||
.fht-table td {
|
||
overflow: hidden;
|
||
}
|
||
|
||
.fht-table-wrapper,
|
||
.fht-table-wrapper .fht-thead,
|
||
.fht-table-wrapper .fht-tfoot,
|
||
.fht-table-wrapper .fht-fixed-column .fht-tbody,
|
||
.fht-table-wrapper .fht-fixed-body .fht-tbody,
|
||
.fht-table-wrapper .fht-tbody {
|
||
overflow: hidden;
|
||
position: relative;
|
||
}
|
||
|
||
.fht-table-wrapper .fht-fixed-body .fht-tbody,
|
||
.fht-table-wrapper .fht-tbody {
|
||
overflow: auto;
|
||
}
|
||
|
||
.fht-table-wrapper .fht-table .fht-cell {
|
||
overflow: hidden;
|
||
height: 1px;
|
||
}
|
||
|
||
.fht-table-wrapper .fht-fixed-column,
|
||
.fht-table-wrapper .fht-fixed-body {
|
||
top: 0;
|
||
left: 0;
|
||
position: absolute;
|
||
}
|
||
|
||
.fht-table-wrapper .fht-fixed-column {
|
||
z-index: 1;
|
||
}
|
||
|
||
.fht-fixed-body .fht-thead table {
|
||
margin-right: 20px;
|
||
border: 0 none;
|
||
}
|
||
|
||
/*For Examples*/
|
||
|
||
.ContenedorTabla {
|
||
height: 500px;
|
||
margin: 0 auto;
|
||
overflow: auto;
|
||
width: auto;
|
||
position: relative;
|
||
}
|
||
|
||
.header,
|
||
.main {
|
||
display: inline-block;
|
||
height: auto;
|
||
width: 100%;
|
||
}
|
||
|
||
.titulosHeader {
|
||
border-bottom: 1px solid #e8bb25;
|
||
height: auto;
|
||
margin-bottom: 10px;
|
||
padding-bottom: 8px;
|
||
padding-top: 8px;
|
||
width: 100%;
|
||
}
|
||
|
||
|
||
.celda_encabezado_general {
|
||
background-color: #00a65a;
|
||
border: 1px solid #ccc;
|
||
color: #ffffff;
|
||
font-weight: bold;
|
||
padding: 2px 4px;
|
||
text-align: center;
|
||
}
|
||
|
||
._Separador {
|
||
background-color: #fff;
|
||
height: 12px;
|
||
border-left: 1px solid #ccc;
|
||
border-right: 1px solid #ccc;
|
||
width: 7px;
|
||
}
|
||
|
||
._Separador div {
|
||
width: 4px;
|
||
}
|
||
|
||
.celda_normal {
|
||
border: 1px solid #ccc;
|
||
padding: 2px 4px;
|
||
}
|
||
|
||
/*style excel*/
|
||
.excel_cell {
|
||
border: 1px solid #CCC;
|
||
color: #222;
|
||
text-align: center;
|
||
font-size: 13px;
|
||
font-weight: normal;
|
||
padding: 4px;
|
||
white-space: pre-line;
|
||
empty-cells: show;
|
||
}
|
||
|
||
._cell_header {
|
||
background-color: #EEE;
|
||
}
|
||
|
||
._cell_Default {
|
||
background-color: #FFF;
|
||
text-align: left;
|
||
}
|
||
|
||
.excel_cell div {
|
||
width: 30px;
|
||
height: 20px;
|
||
}
|
||
|
||
|
||
|
||
|
||
</style>
|
||
<div class="content-page">
|
||
<div class="content">
|
||
<!-- Start Content-->
|
||
<div class="container-fluid">
|
||
<!-- start page title -->
|
||
<div>
|
||
<div class="row">
|
||
<div class="col-6">
|
||
<div class="page-title-box page-title-box-alt">
|
||
<div class="page-title-right">
|
||
<ol class="breadcrumb m-0">
|
||
<li class="breadcrumb-item"><a href="javascript: void(0);">Stocks</a></li>
|
||
<li class="breadcrumb-item active">
|
||
<h4 class="page-title">Incoming Silica Sand Details
|
||
<?=($remark == "noRemark" ? '': "($remark)");?> </h4>
|
||
</li>
|
||
</ol>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-6 text-right">
|
||
<!-- Right-aligned buttons or links can be added here -->
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<?php
|
||
helper('form');
|
||
$error = session()->getFlashdata('error');
|
||
if ($error) {
|
||
?>
|
||
<div class="alert alert-danger alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo session()->getFlashdata('error'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
<?php
|
||
$success = session()->getFlashdata('success');
|
||
if ($success) {
|
||
?>
|
||
<div class="alert alert-info alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo session()->getFlashdata('success'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
|
||
|
||
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
|
||
|
||
<form action="<?= base_url('incomingSilicaSandDetails'); ?>" method="post">
|
||
<div class="row">
|
||
|
||
<div class="col-3">
|
||
<?php $today = date('M-Y'); ?>
|
||
|
||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>" class="form-control mt-2" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1">
|
||
<input type="hidden" name="remark" id="remark" value="<?php echo $remark ?>">
|
||
</div>
|
||
<div class="form-group col-md-2">
|
||
<button type="submit" class="btn btn-success"> Change Month </button>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!-- Add table-responsive for horizontal scroll -->
|
||
<div class="table-responsive">
|
||
<table id="incomingSilicaSandDetailsTable" class="fht-table table table-striped " >
|
||
<thead>
|
||
<tr>
|
||
|
||
<th class="celda_encabezado_general" style="padding: 10px;">S.NO </th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">IGR No </th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Invoice No</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Invoice Date</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Received Date</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Supplier Name</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Grade </th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Grade Condition</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Vehicle No</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Qty</th>
|
||
<th class="celda_encabezado_general" style="display:none">___10___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___20___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___30___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___40___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___50___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___70___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___100___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___140___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___200___</th>
|
||
<th class="celda_encabezado_general" style="display:none">___300___</th>
|
||
<th class="celda_encabezado_general" style="display:none">PAN</th>
|
||
<th class="celda_encabezado_general" style="display:none">Total</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">AFS Spec</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">AFS Actual</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Plus 20 loss%</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Plus 30 Loss %</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Moisture % Spec</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Moisture Actual</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Moisture Loss</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Moisture loss Qty</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Sieve Loss Qty</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Salable Qty</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Remark</th>
|
||
<th class="celda_encabezado_general" style="display:none;">MaterialCode</th>
|
||
<th class="celda_encabezado_general" style="padding: 10px;">Update Lab Report</th>
|
||
<th class="celda_encabezado_general" style="display:none">id</th>
|
||
|
||
|
||
|
||
</tr>
|
||
|
||
</thead>
|
||
<tbody style="background-color: #fff;">
|
||
|
||
<?php $index = 0;
|
||
$row = 0;
|
||
foreach ($igrDetails as $record) {
|
||
// dd($record);
|
||
$row++;
|
||
$index++; ?>
|
||
|
||
<tr id="<?php echo $row; ?>">
|
||
|
||
<!-- 'td:eq(0)' -->
|
||
<td class="celda_normal"><?php echo $index; ?></td>
|
||
|
||
<!-- 'td:eq(1)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['IGRNO']??''; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(2)' -->
|
||
<td class="celda_normal" >
|
||
<?php echo $record['invoiceNo']??''; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(3)' -->
|
||
<td class="celda_normal" >
|
||
<?php
|
||
$dateString = $record['invoiceDate'];
|
||
$date = new DateTime($dateString);
|
||
$record['invoiceDate'] = $date->format('d-m-Y');
|
||
?>
|
||
<?php echo $record['invoiceDate']??''; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(4)' -->
|
||
<td class="celda_normal" >
|
||
<?php
|
||
$dateString = $record['materialRecievedDate'];
|
||
$date = new DateTime($dateString);
|
||
$record['materialRecievedDate'] = $date->format('d-m-Y');
|
||
?>
|
||
|
||
<?php echo $record['materialRecievedDate']??''; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(5)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['SupplierName']??''; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(6)' -->
|
||
<td class="celda_normal" contenteditable="true" >
|
||
<?php echo $record['grade']??''; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(7)' -->
|
||
<td class="celda_normal" contenteditable="true" >
|
||
<?php echo $record['gradeCondition']??''; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(8)' -->
|
||
<td class="celda_normal" >
|
||
<?php echo $record['VehicleNo']??''; ?>
|
||
</td>
|
||
|
||
<!-- calculateRow() for every td change below -->
|
||
|
||
<!-- 'td:eq(9)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['Qty']??'0'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(10)' -->
|
||
<td style="display:none" >
|
||
<?php echo $record['_10']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(11)' -->
|
||
<td style="display:none" >
|
||
<?php echo $record['_20']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(12)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['_30']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(13)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['_40']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(14)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['_50']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(15)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['_70']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(16)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['_100']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(17)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['_140']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(18)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['_200']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(19)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['_300']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(20)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['pan']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(21)' -->
|
||
<td style="display:none">
|
||
<?php echo $record['total']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(22)' -->
|
||
<td class="celda_normal" contenteditable="true">
|
||
<?php echo $record['afsSpec']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(23)' -->
|
||
<td class="celda_normal" contenteditable="true">
|
||
<?php echo $record['afsActual']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(24)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['plus20Loss']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(25)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['plus30Loss']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(26)' -->
|
||
<td class="celda_normal" contenteditable="true"
|
||
onkeyup="calculateRow(this.parentNode.id);">
|
||
<?php echo $record['moistureSpec']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(27)' -->
|
||
<td class="celda_normal" contenteditable="true"
|
||
onkeyup="calculateRow(this.parentNode.id);">
|
||
<?php echo $record['moistureActual']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(28)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['moistureLoss']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(29)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['moistureLossQty']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(30)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['sieveLossQty']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(31)' -->
|
||
<td class="celda_normal">
|
||
<?php echo $record['salableQty']??'0.00'; ?>
|
||
</td>
|
||
|
||
<!-- need to check the status and select values before hand -->
|
||
|
||
<!-- 'td:eq(32)' -->
|
||
<td class="celda_normal" contenteditable="true">
|
||
<select class="status sand-status" style="width:210px;">
|
||
<option value="noRemark">Select</option>
|
||
<option value="accepted"
|
||
<?php echo ($record['remark'] == 'accepted') ? "selected":''; ?>
|
||
>Accepted</option>
|
||
<option value="conditionallyAccepted"
|
||
<?php echo ($record['remark'] == 'conditionallyAccepted') ? "selected":''; ?>
|
||
>Conditionally Accepted</option>
|
||
<option value="rejected"
|
||
<?php echo ($record['remark'] == 'rejected') ? "selected":''; ?>
|
||
>Rejected</option>
|
||
</select>
|
||
|
||
</td>
|
||
|
||
<!-- 'td:eq(33)' -->
|
||
<td style="display: none;">
|
||
<?php echo $record['MaterialCode'] ?? ''; ?>
|
||
</td>
|
||
|
||
<!-- 'td:eq(34)' -->
|
||
<td class="celda_normal" style="color:#02d0eb; background:white;">
|
||
<i
|
||
class="fas fa-edit edit-lab-report" style="cursor:pointer;"></i>
|
||
</td>
|
||
|
||
<!-- 'td:eq(35)' -->
|
||
<td style="display: none;">
|
||
<?php echo $record['id'] ?? ''; ?>
|
||
</td>
|
||
|
||
</tr>
|
||
<?php } ?>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
|
||
</div><!-- End table-responsive -->
|
||
|
||
<br>
|
||
<?php if(empty($igrDetails)){ ?>
|
||
<h5 align="center" style="color:grey;">
|
||
No Inward Gate Registry created for incoming silica sand in this month
|
||
</h5>
|
||
<?php }?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-12 text-right">
|
||
<input type="button" class="btn btn-success" id="save" value="save">
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div> <!-- End card-body -->
|
||
</div> <!-- End card -->
|
||
</div> <!-- End col -->
|
||
</div> <!-- End row -->
|
||
</div>
|
||
</div> <!-- End container-fluid -->
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<div class="modal fade" id="labReportModel" tabindex="-1" role="dialog" aria-labelledby="labReportModelLabel" aria-hidden="true">
|
||
<div class="modal-dialog modal-xl">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title" id="labReportModelLabel">Sand Lab Report</h5>
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
<span aria-hidden="true">×</span>
|
||
</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<form action="<?php echo base_url('/updateLabReport')?>" method="POST">
|
||
|
||
<div class="row">
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="10Mm">10Mm</label>
|
||
<input type="text" class="form-control" name="10Mm" id="10Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="20Mm">20Mm</label>
|
||
<input type="text" class="form-control" name="20Mm" id="20Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="30Mm">30Mm</label>
|
||
<input type="text" class="form-control" name="30Mm" id="30Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="40Mm">40Mm</label>
|
||
<input type="text" class="form-control" name="40Mm" id="40Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="50Mm">50Mm</label>
|
||
<input type="text" class="form-control" name="50Mm" id="50Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="70Mm">70Mm</label>
|
||
<input type="text" class="form-control" name="70Mm" id="70Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="100Mm">100Mm</label>
|
||
<input type="text" class="form-control" name="100Mm" id="100Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="140Mm">140Mm</label>
|
||
<input type="text" class="form-control" name="140Mm" id="140Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="row">
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="200Mm">200Mm</label>
|
||
<input type="text" class="form-control" name="200Mm" id="200Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="300Mm">300Mm</label>
|
||
<input type="text" class="form-control" name="300Mm" id="300Mm" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="pan">Pan</label>
|
||
<input type="text" class="form-control" name="pan" id="pan" value="0.00" >
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="total">Total</label>
|
||
<input type="text" class="form-control" name="total" id="total" value="0.00" readonly>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="moistureSpec">Moisture % spec</label>
|
||
<input type="text" class="form-control" name="moistureSpec" id="moistureSpec" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="moistureActual">Moisture Actual</label>
|
||
<input type="text" class="form-control" name="moistureActual" id="moistureActual" value="0.00">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="moistureLoss">Moisture Loss </label>
|
||
<input type="text" class="form-control" name="moistureLoss" id="moistureLoss" value="0.00" readonly>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<label for="moistureLossQty">Moisture Loss Qty</label>
|
||
<input type="text" class="form-control" name="moistureLossQty" id="moistureLossQty" value="0.00" readonly>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<!-- hidden fields section -->
|
||
<input type="hidden" name="id" id="issdId" value="">
|
||
<input type="hidden" name="igrNo" id="igrNo" value="">
|
||
<input type="hidden" name="materialCode" id="materialCode" value="">
|
||
<input type="hidden" name="qty" id="qty" value="">
|
||
<input type="hidden" name="plus20Loss" id="plus20Loss" value="">
|
||
<input type="hidden" name="plus30Loss" id="plus30Loss" value="">
|
||
<input type="hidden" name="sieveLossQty" id="sieveLossQty" value="">
|
||
<input type="hidden" name="salableQty" id="salableQty" value="">
|
||
|
||
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<script>
|
||
$(document).ready(function(){
|
||
$('#incomingSilicaSandDetailsTable tbody').on('click', '.edit-lab-report', function () {
|
||
|
||
var row = $(this).closest('tr');
|
||
|
||
// Get values from the row
|
||
|
||
let igrNo = row.find('td:eq(1)').text().trim();
|
||
let qty = row.find('td:eq(9)').text().trim();
|
||
let _10Mm = row.find('td:eq(10)').text().trim();
|
||
let _20Mm = row.find('td:eq(11)').text().trim();
|
||
let _30Mm = row.find('td:eq(12)').text().trim();
|
||
let _40Mm = row.find('td:eq(13)').text().trim();
|
||
let _50Mm = row.find('td:eq(14)').text().trim();
|
||
let _70Mm = row.find('td:eq(15)').text().trim();
|
||
let _100Mm = row.find('td:eq(16)').text().trim();
|
||
let _140Mm = row.find('td:eq(17)').text().trim();
|
||
let _200Mm = row.find('td:eq(18)').text().trim();
|
||
let _300Mm = row.find('td:eq(19)').text().trim();
|
||
let pan = row.find('td:eq(20)').text().trim();
|
||
let total = row.find('td:eq(21)').text().trim();
|
||
let plus20loss = row.find('td:eq(24)').text().trim();
|
||
let plus30Loss = row.find('td:eq(25)').text().trim();
|
||
let moistureSpec = row.find('td:eq(26)').text().trim();
|
||
let moistureActual = row.find('td:eq(27)').text().trim();
|
||
let moistureLoss = row.find('td:eq(28)').text().trim();
|
||
let moistureLossQty = row.find('td:eq(29)').text().trim();
|
||
let sieveLossQty = row.find('td:eq(30)').text().trim();
|
||
let salableQty = row.find('td:eq(31)').text().trim();
|
||
let id = row.find('td:eq(35)').text().trim();
|
||
|
||
let materialCode = row.find('td:eq(33)').text().trim();
|
||
|
||
|
||
|
||
|
||
// Fill the modal fields with the values
|
||
|
||
$('#igrNo').val(igrNo);
|
||
$('#qty').val(qty);
|
||
$('#10Mm').val(_10Mm);
|
||
$('#20Mm').val(_20Mm);
|
||
$('#30Mm').val(_30Mm);
|
||
$('#40Mm').val(_40Mm);
|
||
$('#50Mm').val(_50Mm);
|
||
$('#70Mm').val(_70Mm);
|
||
$('#100Mm').val(_100Mm);
|
||
$('#140Mm').val(_140Mm);
|
||
$('#200Mm').val(_200Mm);
|
||
$('#300Mm').val(_300Mm);
|
||
$('#pan') .val(pan);
|
||
$('#total').val(total);
|
||
$('#plus20loss').val(plus20loss);
|
||
$('#plus30Loss').val(plus30Loss);
|
||
$('#moistureSpec').val(moistureSpec);
|
||
$('#moistureActual').val(moistureActual);
|
||
$('#moistureLoss').val(moistureLoss);
|
||
$('#moistureLossQty').val(moistureLossQty);
|
||
$('#sieveLossQty').val(sieveLossQty);
|
||
$('#salableQty').val(salableQty);
|
||
|
||
|
||
$('#issdId').val(id);
|
||
$('#materialCode').val(materialCode);
|
||
|
||
// Show the modal
|
||
$('#labReportModel').modal('show');
|
||
|
||
})
|
||
})
|
||
</script>
|
||
|
||
<script>
|
||
$(document).ready(function(){
|
||
$('#10Mm , #20Mm, #30Mm, #40Mm, #50Mm, #70Mm, #100Mm, #1400Mm, #200Mm, #300Mm , #pan , #moistureSpec ,#moistureActual').change(function(){
|
||
|
||
let qty = parseFloat( $('#qty').val().trim());
|
||
let _10Mm = parseFloat( $('#10Mm').val().trim());
|
||
let _20Mm = parseFloat($('#20Mm').val().trim());
|
||
let _30Mm = parseFloat($('#30Mm').val().trim());
|
||
let _40Mm = parseFloat($('#40Mm').val().trim());
|
||
let _50Mm = parseFloat($('#50Mm').val().trim());
|
||
let _70Mm = parseFloat($('#70Mm').val().trim());
|
||
let _100Mm = parseFloat($('#100Mm').val().trim());
|
||
let _140Mm = parseFloat($('#140Mm').val().trim());
|
||
let _200Mm = parseFloat($('#200Mm').val().trim());
|
||
let _300Mm = parseFloat($('#300Mm').val().trim());
|
||
let pan = parseFloat($('#pan').val().trim());
|
||
let total = parseFloat($('#total').val().trim());
|
||
let plus20Loss = parseFloat($('#plus20Loss').val().trim());
|
||
let plus30Loss = parseFloat($('#plus30Loss').val().trim());
|
||
let moistureSpec = parseFloat($('#moistureSpec').val().trim());
|
||
let moistureActual = parseFloat($('#moistureActual').val().trim());
|
||
let moistureLoss = parseFloat($('#moistureLoss').val().trim());
|
||
let moistureLossQty = parseFloat($('#moistureLossQty').val().trim());
|
||
let sieveLossQty = parseFloat($('#sieveLossQty').val().trim());
|
||
let salableQty = parseFloat($('#salableQty').val().trim());
|
||
|
||
let newTotal = (_10Mm + _20Mm + _30Mm + _40Mm + _50Mm + _70Mm + _100Mm + _140Mm + _200Mm + _300Mm + pan).toFixed(2);
|
||
|
||
let newPlus20Loss = (_10Mm + _20Mm).toFixed(2) ;
|
||
|
||
|
||
let newPlus30Loss =( _10Mm + _20Mm + _30Mm).toFixed(2) ;
|
||
|
||
|
||
|
||
let newSieveLossQty = ((qty * newPlus30Loss) / 100).toFixed(2);
|
||
|
||
|
||
let newMoistureLoss = (moistureActual - moistureSpec).toFixed(2);
|
||
|
||
|
||
let newMoistureLossQty = ((qty * newMoistureLoss) / 100 ).toFixed(2);
|
||
|
||
|
||
let newSalableQty = (qty - newMoistureLossQty - newSieveLossQty).toFixed(2);
|
||
|
||
|
||
|
||
|
||
$('#total').val(newTotal);
|
||
$('#plus20loss').val(newPlus20Loss);
|
||
$('#plus30Loss').val(newPlus30Loss);
|
||
$('#moistureSpec').val(moistureSpec);
|
||
$('#moistureActual').val(moistureActual);
|
||
$('#moistureLoss').val(newMoistureLoss);
|
||
$('#moistureLossQty').val(newMoistureLossQty);
|
||
$('#sieveLossQty').val(newSieveLossQty);
|
||
$('#salableQty').val(newSalableQty);
|
||
|
||
})
|
||
})
|
||
</script>
|
||
|
||
<script type="text/javascript">
|
||
|
||
|
||
$(document).ready(function()
|
||
{
|
||
|
||
|
||
$('#save').click(function() {
|
||
|
||
var incomingSilicaSandDetailsData = $("#incomingSilicaSandDetailsTable").tableToJSON();
|
||
|
||
|
||
|
||
$('#incomingSilicaSandDetailsTable tbody tr').each(function (index) {
|
||
|
||
let row = incomingSilicaSandDetailsData[index];
|
||
|
||
// Get the selected values from dropdowns
|
||
row['Remark'] = $(this).find('.sand-status').val();
|
||
|
||
});
|
||
|
||
|
||
incomingSilicaSandDetailsData = JSON.stringify(incomingSilicaSandDetailsData);
|
||
|
||
$('#loader').show();
|
||
$.ajax({
|
||
data: {
|
||
incomingSilicaSandDetailsData
|
||
},
|
||
type: "POST",
|
||
url: "<?php echo base_url() ?>updateIncomingSilicaSandDetails",
|
||
|
||
success: function(data) {
|
||
if (data) {
|
||
$('#loader').hide();
|
||
|
||
alert(data);
|
||
|
||
}
|
||
},
|
||
error: function(xhr, status, error) {
|
||
|
||
alert("An error occurred while processing the request. Please try again.");
|
||
console.error("Error Code:", xhr.status);
|
||
console.error("Error Message:", error);
|
||
console.error("Response Text:", xhr.responseText);
|
||
},
|
||
complete: function() {
|
||
$('#loader').hide();
|
||
}
|
||
|
||
|
||
});
|
||
|
||
|
||
});
|
||
|
||
|
||
|
||
|
||
});
|
||
|
||
</script>
|
||
|
||
<script>
|
||
|
||
function calculateRow(rowId){
|
||
var tr=$(`#`+rowId);
|
||
var qty=tr.find('td:eq(9)').text();
|
||
var _10 = tr.find('td:eq(10)').text();
|
||
var _20 = tr.find('td:eq(11)').text();
|
||
var _30 = tr.find('td:eq(12)').text();
|
||
var _40 = tr.find('td:eq(13)').text();
|
||
var _50 = tr.find('td:eq(14)').text();
|
||
var _70 = tr.find('td:eq(15)').text();
|
||
var _100 = tr.find('td:eq(16)').text();
|
||
var _140 = tr.find('td:eq(17)').text();
|
||
var _200 = tr.find('td:eq(18)').text();
|
||
var _300 = tr.find('td:eq(19)').text();
|
||
var pan = tr.find('td:eq(20)').text();
|
||
var total = tr.find('td:eq(21)').text();
|
||
var afsSpec = tr.find('td:eq(22)').text();
|
||
var afsActual = tr.find('td:eq(23)').text();
|
||
var plus20Loss = tr.find('td:eq(24)').text();
|
||
var plus30Loss = tr.find('td:eq(25)').text();
|
||
var moistureSpec = tr.find('td:eq(26)').text();
|
||
var moistureActual = tr.find('td:eq(27)').text();
|
||
var moistureLoss = tr.find('td:eq(28)').text();
|
||
var moistureLossQty = tr.find('td:eq(29)').text();
|
||
var sieveLossQty = tr.find('td:eq(30)').text();
|
||
var salableQty = tr.find('td:eq(31)').text();
|
||
|
||
let newTotal =parseFloat(_10) +parseFloat(_20) +parseFloat(_30) +parseFloat(_40) +parseFloat(_50) +parseFloat(_70) +parseFloat(_100) +
|
||
parseFloat(_140) +parseFloat(_200) +parseFloat(_300) +parseFloat(pan);
|
||
//total td
|
||
tr.find('td:eq(21)').text(newTotal);
|
||
|
||
let newPlus20Loss = parseFloat(_10) +parseFloat(_20) ;
|
||
//plus20Loss td
|
||
tr.find('td:eq(24)').text(newPlus20Loss);
|
||
|
||
let newPlus30Loss = parseFloat(_10) +parseFloat(_20) + parseFloat(_30) ;
|
||
//plus30Loss td
|
||
tr.find('td:eq(25)').text(newPlus30Loss);
|
||
|
||
let newMoistureLoss = parseFloat(moistureActual) - parseFloat(moistureSpec) ;
|
||
//moistureLoss td
|
||
tr.find('td:eq(28)').text(newMoistureLoss);
|
||
|
||
let newMoistureLossQty = Math.round((parseFloat(qty) * newMoistureLoss) / 100 ) ;
|
||
//moistureLossqty td
|
||
tr.find('td:eq(29)').text(newMoistureLossQty.toLocaleString());
|
||
|
||
let newSieveLossQty = Math.floor((parseFloat(qty) * newPlus30Loss) / 100) ;
|
||
//sieveLossQty td
|
||
tr.find('td:eq(30)').text(newSieveLossQty.toLocaleString());
|
||
|
||
let newSalableQty = Math.floor(parseFloat(qty) - newMoistureLossQty - newSieveLossQty) ;
|
||
//salableQty td
|
||
tr.find('td:eq(31)').text(newSalableQty.toLocaleString());
|
||
|
||
|
||
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
</script>
|
||
|
||
|
||
<script>
|
||
|
||
$('.status').select2({
|
||
placeholder: "Select",
|
||
});
|
||
|
||
</script>
|