stock module changes-2 vadivel J 16-12-2024
This commit is contained in:
parent
1d75c8d8cc
commit
a7346e793e
@ -52,6 +52,13 @@
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.print.min.js"></script>
|
||||
|
||||
<!-- cdn for pdf download -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.4.0/jspdf.umd.min.js"></script>
|
||||
|
||||
<!-- !-- cdn for pdf download -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.4.3/purify.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>
|
||||
|
||||
|
||||
<!-- JSZip for Excel export -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
@ -155,15 +155,13 @@
|
||||
|
||||
|
||||
#invoice-logo {
|
||||
max-width: 14em !important;
|
||||
max-height: 10em !important;
|
||||
margin-bottom: 1em;
|
||||
max-width: 10em !important;
|
||||
max-height: 8em !important;
|
||||
margin-top: 1em;
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.border-color{
|
||||
border:1.5px solid maroon;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -719,100 +717,110 @@
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="<?php echo base_url('/downloadLabReportModel')?>" method="POST">
|
||||
|
||||
<div class="modal-body p-4" id="content">
|
||||
<div style="text-align: right;"><small>REF:RIPL/DAD/R02</small></div>
|
||||
<form>
|
||||
<header class="clearfix">
|
||||
<div style="text-align: right;"><small>RI/PUR/R 02</small></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-5" width="100px;">
|
||||
<div id="logo" ><?php echo invoice_logo_pdf(); ?></div>
|
||||
<div class="col-3" width="100px;">
|
||||
<div id="logo" style="margin:0 !important;"><?php echo invoice_logo_pdf(); ?></div>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<h2>Resico India Pvt ltd</h2>
|
||||
<div class="col-9">
|
||||
<h1 style="font-family: 'Times New Roman', Georgia, serif; color:maroon;">RESICO (INDIA) PVT.LTD.</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3" width="100px;">
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<h4 style="margin-left: 75px; text-decoration:underline;">INCOMING TEST REPORT</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<br><br>
|
||||
<br>
|
||||
|
||||
|
||||
<main>
|
||||
|
||||
<table class="side-table " width="100%">
|
||||
<table class="side-table" border="1" width="100%">
|
||||
<thead>
|
||||
|
||||
</thead>
|
||||
<tbody >
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Supplier Name</th>
|
||||
<td class="border-color" id="dwnldSupplierNameId"></td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Supplier Name</b></td>
|
||||
<td id="dwnldSupplierNameId"></td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Invoice No</th>
|
||||
<td class="border-color" id="dwnldInvoiceNoId">8946551665</td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Invoice No</b></td>
|
||||
<td id="dwnldInvoiceNoId">8946551665</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Invoice Date</th>
|
||||
<td class="border-color" id="dwnldInvoiceDateId">2/12/1996</td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Invoice Date</b></td>
|
||||
<td id="dwnldInvoiceDateId">2/12/1996</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Vehicle No</th>
|
||||
<td class="border-color" id="dwnldVehicleNoId">Tn 25 bb 6919</td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Vehicle No</b></td>
|
||||
<td id="dwnldVehicleNoId">Tn 25 bb 6919</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">IGR No</th>
|
||||
<td class="border-color" id="dwnldIgrNoId">25126919</td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>IGR No</b></td>
|
||||
<td id="dwnldIgrNoId">25126919</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Igr Date</th>
|
||||
<td class="border-color" id="dwnldIgrDateId">10/12/2024</td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Igr Date</b></td>
|
||||
<td id="dwnldIgrDateId">10/12/2024</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Quantity</th>
|
||||
<td class="border-color" id="dwnldQtyId">69199</td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Quantity</b></td>
|
||||
<td id="dwnldQtyId">69199</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Time</th>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Time</b></td>
|
||||
<td contenteditable="true"
|
||||
class="border-color" id="dwnldTimeId"></td>
|
||||
id="dwnldTimeId"></td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Grade</th>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Grade</b></td>
|
||||
<td contenteditable="true"
|
||||
class="border-color" id="dwnldGradeId">50-60</td>
|
||||
id="dwnldGradeId">50-60</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Clay %</th>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Clay %</b></td>
|
||||
<td contenteditable="true"
|
||||
class="border-color" id="dwnldClayId">20</td>
|
||||
id="dwnldClayId">20</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Moisture %</th>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Moisture %</b></td>
|
||||
<td contenteditable="true"
|
||||
class="border-color" id="dwnldMoistureId">10</td>
|
||||
id="dwnldMoistureId">10</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="border-color" id="meshTableId" style="border-collapse: collapse;" border="1" width="100%">
|
||||
<table id="meshTableId" border="1" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" >
|
||||
<th>
|
||||
<center><?php _trans('MESH SIZE'); ?></center>
|
||||
</th>
|
||||
<th rowspan="2" >
|
||||
<th>
|
||||
<center><?php _trans('SIZE IN M.M'); ?><br /></center>
|
||||
</th>
|
||||
<th rowspan="2">
|
||||
<th >
|
||||
<center><?php _trans('SIZE IN MICRANS'); ?></center>
|
||||
</th>
|
||||
|
||||
<th rowspan="2" >
|
||||
<th>
|
||||
<center><?php _trans('WEIGH OF SAND'); ?></center>
|
||||
</th>
|
||||
<th rowspan="2" >
|
||||
<th>
|
||||
<center><?php _trans('FACTOR'); ?><br /></center>
|
||||
</th>
|
||||
<th rowspan="2" >
|
||||
<th>
|
||||
<center><?php _trans('TOTAL'); ?><br /></center>
|
||||
</th>
|
||||
|
||||
@ -928,41 +936,41 @@
|
||||
|
||||
<br><br>
|
||||
|
||||
<table class="side-table " width="100%">
|
||||
<table class="side-table " border="1" width="100%">
|
||||
<tbody >
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important; width:25%;">Accepted</th>
|
||||
<td class="border-color" id="dwnldAcceptedId">OK</td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; width:25%;"><b>Accepted</b></td>
|
||||
<td id="dwnldAcceptedId">OK</td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important;">Accepted Under Deviation</th>
|
||||
<td class="border-color" id="dwnldAcceptedUnderDeviationId"></td>
|
||||
<tr>
|
||||
<td style="text-align: left !important;"><b>Accepted Under Deviation</b></td>
|
||||
<td id="dwnldAcceptedUnderDeviationId"></td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important;">Rejected</th>
|
||||
<td class="border-color" id="dwnldRejectedId"></td>
|
||||
<tr>
|
||||
<td style="text-align: left !important;"><b>Rejected</b></td>
|
||||
<td id="dwnldRejectedId"></td>
|
||||
</tr>
|
||||
<tr class="border-color">
|
||||
<th style="text-align: left !important;">Remarks</th>
|
||||
<td class="border-color"></td>
|
||||
<tr>
|
||||
<td style="text-align: left !important; height: 50px;"><b>Remarks</b></td>
|
||||
<td contenteditable="true"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table class="side-table " width="100%">
|
||||
<table class="side-table " border="1" width="100%">
|
||||
<tbody >
|
||||
|
||||
<tr class="border-color" rowspan="2">
|
||||
<tr >
|
||||
<th contenteditable="true"
|
||||
style="text-align: center !important;"> </th>
|
||||
style="text-align: center !important; height: 50px;"> </th>
|
||||
<th contenteditable="true"
|
||||
class="border-color" style="text-align: center !important;"> </th>
|
||||
style="text-align: center !important; height: 50px;"> </th>
|
||||
</tr>
|
||||
<tr class="border-color" >
|
||||
<tr >
|
||||
<th style="text-align: center !important;">Tested By</th>
|
||||
<th class="border-color"style="text-align: center !important;">Approved By</th>
|
||||
<th style="text-align: center !important;">Approved By</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -975,64 +983,10 @@
|
||||
</tr>
|
||||
</table>
|
||||
</main>
|
||||
|
||||
<!-- hidden fields section -->
|
||||
|
||||
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
|
||||
|
||||
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
|
||||
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
|
||||
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" value="">
|
||||
<input type="hidden" id="" 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>
|
||||
<button type="button" id="pdfGenerateId" class="btn btn-primary">Download</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -1042,6 +996,35 @@
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
document.getElementById('pdfGenerateId').addEventListener('click', function () {
|
||||
// Get the content
|
||||
const content = document.getElementById("content").innerHTML;
|
||||
|
||||
// Sanitize with DOMPurify
|
||||
const cleanContent = DOMPurify.sanitize(content);
|
||||
|
||||
// Convert to PDF
|
||||
const element = document.createElement('div');
|
||||
element.innerHTML = cleanContent;
|
||||
|
||||
const opt = {
|
||||
margin: 1,
|
||||
filename: 'report.pdf',
|
||||
image: { type: 'jpeg', quality: 1 },
|
||||
html2canvas: { scale: 2 },
|
||||
jsPDF: { unit: 'in', format: 'A4', orientation: 'portrait' }
|
||||
};
|
||||
|
||||
html2pdf().from(element).set(opt).save();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
@ -1185,7 +1168,7 @@
|
||||
|
||||
let dwnld70MmFId = parseFloat(_70Mm * 50).toFixed(2);
|
||||
$('#dwnld70MmId').text(_70Mm);
|
||||
$('#dwnld70MmFId').text(_70Mm * 50);
|
||||
$('#dwnld70MmFId').text(dwnld70MmFId);
|
||||
|
||||
let dwnld100MmFId = parseFloat(_100Mm * 70).toFixed(2);
|
||||
$('#dwnld100MmId').text(_100Mm);
|
||||
@ -1218,9 +1201,16 @@
|
||||
parseFloat(dwnld140MmFId) +
|
||||
parseFloat(dwnld200MmFId) +
|
||||
parseFloat(dwnld300MmFId)+
|
||||
parseFloat(dwnldPanFId) );
|
||||
parseFloat(dwnldPanFId) ).toFixed(2);
|
||||
|
||||
let dwnldAfsId;
|
||||
|
||||
if(total == 0){
|
||||
dwnldAfsId = "0.00";
|
||||
}else{
|
||||
dwnldAfsId = parseFloat(fTotal/total).toFixed(2);
|
||||
}
|
||||
|
||||
let dwnldAfsId = parseFloat(fTotal/total).toFixed(2);
|
||||
|
||||
$('#dwnldWeighOfSand').text(total);
|
||||
$('#dwnldMoistureId').text(moistureLoss);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user