stock module latest today vadivel J 22-01-2025
This commit is contained in:
parent
7d4e0aed1c
commit
da5ae63665
@ -115,6 +115,15 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.celda_encabezado_total {
|
||||
background-color:#ffffff;
|
||||
border: 1px solid #ccc;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
padding: 6px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
._Separador {
|
||||
background-color: #fff;
|
||||
height: 12px;
|
||||
@ -303,6 +312,9 @@
|
||||
|
||||
<?php $index = 0;
|
||||
$row = 0;
|
||||
|
||||
$summary = [] ;
|
||||
|
||||
foreach ($igrDetails as $record) {
|
||||
// dd($record);
|
||||
$row++;
|
||||
@ -544,11 +556,109 @@
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
|
||||
//before closing inner loop
|
||||
|
||||
if (!isset($summary['Qty'])) {
|
||||
|
||||
$summary['Qty'] = 0 ;
|
||||
$summary['plus20Loss'] = 0 ;
|
||||
$summary['moistureSpec'] = 0 ;
|
||||
$summary['moistureActual'] = 0 ;
|
||||
$summary['moistureLoss'] = 0 ;
|
||||
$summary['moistureLossQty'] = 0 ;
|
||||
$summary['sieveLossQty'] = 0 ;
|
||||
$summary['salableQty'] = 0 ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
$summary['Qty'] += $record['Qty'] == " " ? 0 : (float) $record['Qty'] ;
|
||||
$summary['plus20Loss'] += $record['plus20Loss'] == " " ? 0 : (float) $record['plus20Loss'] ;
|
||||
$summary['moistureSpec'] += $record['moistureSpec'] == " " ? 0 : (float) $record['moistureSpec'] ;
|
||||
$summary['moistureActual'] += $record['moistureActual'] == " " ? 0 : (float) $record['moistureActual'] ;
|
||||
$summary['moistureLoss'] += $record['moistureLoss'] == " " ? 0 : (float) $record['moistureLoss'] ;
|
||||
$summary['moistureLossQty'] += $record['moistureLossQty'] == " " ? 0 : (float) $record['moistureLossQty'] ;
|
||||
$summary['sieveLossQty'] += $record['sieveLossQty'] == " " ? 0 : (float) $record['sieveLossQty'] ;
|
||||
$summary['salableQty'] += $record['salableQty'] ?? $record['Qty'] ;
|
||||
|
||||
|
||||
} ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="incomingSilicaSandDetailsSummaryTable" class="fht-table table table-striped " >
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">S.NO </th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">IGR No-xxx</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Invoice No-123</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">22-01-2025</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;"> Received Date </th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">MADRAS ENGINEERING INDUSTRIES PRIVATE LIMITED</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;"> Silica Sand </th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Grade Condition</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;"> Tn 25 bb 6988</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Qty</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Lab Report</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">AFS Spec</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">AFS Actual</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Plus 20 loss%</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Plus 30 Loss %</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Moisture % Spec</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Moisture Actual</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Moisture Loss</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Moisture loss Qty</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Sieve Loss Qty</th>
|
||||
<th class="celda_encabezado_total" style="padding: 10px;">Salable Qty</th>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
|
||||
|
||||
<td class="celda_encabezado_normal" ><?=$summary['Qty']?></td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" ><?=$summary['plus20Loss']?></td>
|
||||
<td class="celda_encabezado_normal" > -</td>
|
||||
<td class="celda_encabezado_normal" ><?=$summary['moistureSpec'] ?></td>
|
||||
<td class="celda_encabezado_normal" ><?=$summary['moistureActual']?></td>
|
||||
<td class="celda_encabezado_normal" ><?=$summary['moistureLoss']?></td>
|
||||
<td class="celda_encabezado_normal" ><?=$summary['moistureLossQty']?></td>
|
||||
<td class="celda_encabezado_normal" ><?=$summary['sieveLossQty']?></td>
|
||||
<td class="celda_encabezado_normal" ><?=$summary['salableQty']?></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
@ -1164,6 +1274,9 @@
|
||||
<!-- download pdf punction -->
|
||||
<script>
|
||||
document.getElementById('pdfGenerateId').addEventListener('click', function () {
|
||||
|
||||
let igrNo = document.getElementById('dwnldIgrNoId').innerText;
|
||||
|
||||
const { jsPDF } = window.jspdf;
|
||||
const doc = new jsPDF({
|
||||
orientation: 'portrait',
|
||||
@ -1199,7 +1312,7 @@
|
||||
useCORS: true // Enable cross-origin images
|
||||
},
|
||||
callback: function (doc) {
|
||||
doc.save(`SandLabReport.pdf`);
|
||||
doc.save(`SandLabReport-${igrNo}.pdf`);
|
||||
},
|
||||
x: trimLeft, // Adjust left padding
|
||||
y: centeredY // Keep vertical centering
|
||||
@ -1344,6 +1457,8 @@
|
||||
|
||||
totalWeighOfSand = (totalWeighOfSand).toFixed(2);
|
||||
|
||||
newMoistureLoss = (newMoistureLoss).toFixed(2);
|
||||
|
||||
|
||||
$('#10Mm').val(result[0]['WEIGH OF SAND']);
|
||||
$('#20Mm').val(result[1]['WEIGH OF SAND']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user