fixing bugs on custom PO
This commit is contained in:
parent
199c1271a0
commit
1b06999f15
@ -167,7 +167,7 @@
|
||||
</div>
|
||||
<input hidden id="poTypeId"/>
|
||||
<link href="~/css/po/CustomPOV2.css" rel="stylesheet" />
|
||||
<script src="~/JsFunctions/PO/CustomPOV6.js"></script>
|
||||
<script src="~/JsFunctions/PO/CustomPOV7.js"></script>
|
||||
@await Html.PartialAsync("PagesView/PR/_PRWOCanvass")
|
||||
@await Html.PartialAsync("PagesView/PO/_POScripts")
|
||||
</body>
|
||||
@ -47,7 +47,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<link href="~/css/pr/receiving.css" rel="stylesheet" />
|
||||
<link href="~/css/Receiving/Receiving.css" rel="stylesheet" />
|
||||
@await Html.PartialAsync("PagesView/Receiving/_Receiving")
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<script src="~/jsfunctions/po/POVarV6.js"></script>
|
||||
<script src="~/jsfunctions/po/POViewV4.js"></script>
|
||||
<script src="~/jsfunctions/po/PopulateDopdownV4.js"></script>
|
||||
<script src="~/jsfunctions/po/POPutPostV3.js"></script>
|
||||
<script src="~/jsfunctions/po/POPutPostV4.js"></script>
|
||||
<script src="~/jsfunctions/po/rowCallBackV5.js"></script>
|
||||
|
||||
<script src="~/jsfunctions/utilities/NewStyle.js"></script>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<link href="~/css/pr/receiving.css" rel="stylesheet" />
|
||||
<link href="~/css/Receiving/Receiving.css" rel="stylesheet" />
|
||||
<!-- Modal viewPRItemDetails -->
|
||||
<div class="modal fade custom-modal-backdrop" id="viewPRItemDetails"
|
||||
tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true" data-bs-backdrop="static">
|
||||
@ -126,7 +126,7 @@
|
||||
<!-- Modal viewRRDetailByPO -->
|
||||
<div class="modal fade custom-modal-backdrop" id="viewRRDetailByPO"
|
||||
tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true" data-bs-backdrop="static">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-dialog custom-modal-receiving">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="display: flex; flex-direction: column; align-items: center;">
|
||||
<h2 class="modal-title" id="ModalLabel">Receiving Report</h2>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
</div>
|
||||
<script src="~/jsfunctions/receiving/receivingvar.js"></script>
|
||||
<script src="~/jsfunctions/receiving/ReceivingColumnV2.js"></script>
|
||||
<script src="~/jsfunctions/receiving/ReceivingViewV4.js"></script>
|
||||
<script src="~/jsfunctions/receiving/ReceivingViewV5.js"></script>
|
||||
<script src="~/jsfunctions/receiving/receivingcallback.js"></script>
|
||||
<script src="~/jsfunctions/receiving/receivingbutton.js"></script>
|
||||
<script src="~/jsfunctions/receiving/ReceivingPostPutV3.js"></script>
|
||||
|
||||
@ -76,8 +76,7 @@ async function fetchAndPopulatePOFormData(poType, poId = null) {
|
||||
$('#finalAmount').val(d.header.finalAmountPHP || 0);
|
||||
$('#grossAmount').val(d.header.grossAmountPHP || 0);
|
||||
|
||||
$('#incoTermsId').val(d.header.incotermsId);
|
||||
|
||||
$('#incoTermsId').val(d.header.incoTermsId);
|
||||
$('#incotermsName').val(d.header.incotermsName || '');
|
||||
}
|
||||
|
||||
@ -94,7 +94,6 @@ function rrInitializeDatatable(loader) {
|
||||
data: { PONo, POTypeId },
|
||||
}, beforeComplete(loader)),
|
||||
searching: false,
|
||||
responsive: true,
|
||||
language: {
|
||||
emptyTable: "No record available"
|
||||
},
|
||||
@ -190,413 +189,6 @@ function initializeRRDetailTable(RRNo, POTypeId) {
|
||||
return rrDetailTable;
|
||||
}
|
||||
//End viewRRDetail
|
||||
function printRRSIBackup() {
|
||||
// Create a hidden iframe to handle printing without affecting the main page
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.style.position = 'fixed';
|
||||
iframe.style.right = '0';
|
||||
iframe.style.bottom = '0';
|
||||
iframe.style.width = '0';
|
||||
iframe.style.height = '0';
|
||||
iframe.style.border = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
// Get the iframe's document
|
||||
const doc = iframe.contentWindow.document;
|
||||
|
||||
// Open the document and write the HTML header
|
||||
doc.open();
|
||||
doc.write('<html><head><title>Print</title>');
|
||||
|
||||
// Copy all stylesheets from the main page to ensure consistent styling
|
||||
const stylesheets = document.querySelectorAll('link[rel="stylesheet"]');
|
||||
stylesheets.forEach(sheet => {
|
||||
doc.write(sheet.outerHTML);
|
||||
});
|
||||
|
||||
// Add print-specific styles
|
||||
doc.write(`
|
||||
<style>
|
||||
@page {
|
||||
size: 8.5in 11in;
|
||||
margin: 0.25in;
|
||||
}
|
||||
body {
|
||||
font-family: Roman, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0px;
|
||||
box-sizing: border-box;
|
||||
font-size: 12pt;
|
||||
line-height: normal;
|
||||
width: 8.5in;
|
||||
margin: 0.25in auto;
|
||||
height: 11in;
|
||||
position: relative;
|
||||
page-break-after: avoid !important;
|
||||
page-break-before: avoid !important;
|
||||
}
|
||||
.print-area {
|
||||
width: 7.5in;
|
||||
margin: 0 auto;
|
||||
height: calc(11in - 0.5in);
|
||||
position: relative;
|
||||
page-break-after: avoid !important;
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
/* Specifically optimized for dot matrix printing */
|
||||
table {
|
||||
width: 100%;
|
||||
top: 1.4in;
|
||||
position: fixed !important;
|
||||
border: none !important;
|
||||
row-border: none !important;
|
||||
border-collapse: collapse;
|
||||
line-height: normal;
|
||||
font-size: 12px;
|
||||
font-family: Roman, sans-serif !important;
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
height: calc(100% - 0.5in);
|
||||
overflow: hidden;
|
||||
}
|
||||
.header {
|
||||
font-family: Roman, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.rowSupplier {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
top: .2in;
|
||||
flex-direction: column;
|
||||
margin-left: 60px;
|
||||
}
|
||||
#address {
|
||||
font-size: 10pt; /* Reduced from your default 10pt */
|
||||
line-height: 1.1; /* Tighter line height */
|
||||
display: block; /* Ensure it's a block element */
|
||||
}
|
||||
table th,
|
||||
table td {
|
||||
padding: 1px 2px;
|
||||
line-height: .9;
|
||||
vertical-align: top;
|
||||
}
|
||||
th.itemNo, td.itemNo {
|
||||
width: 15%; text-align: right !important;
|
||||
}
|
||||
th.itemDescription, td.itemDescription {
|
||||
width: 50% !important;
|
||||
text-align: left;
|
||||
padding-left: 30px !important;
|
||||
font-size: 10pt !important;
|
||||
max-width: 50%;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
th.qty, td.qty {
|
||||
width: 10%;
|
||||
text-align: right!important;
|
||||
padding-left:40px !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
th.uomName, td.uomName {
|
||||
width: 10%;
|
||||
text-align: right !important;
|
||||
padding-right: 0 !important;*/
|
||||
font-size: 8pt !important;
|
||||
word-wrap: break-word; /* Enable word wrapping */
|
||||
word-break: break-word; /* Allow breaking at appropriate points */
|
||||
}
|
||||
th.remarks, td.remarks {
|
||||
width: 15%; text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.pr-info-section {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.footer-row {
|
||||
position: fixed;
|
||||
bottom: 6in;
|
||||
left : 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
line-height: normal;
|
||||
background-color: white;
|
||||
margin: 0 5px; /* Add small margin to match body padding */
|
||||
}
|
||||
.footer-column {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 5px;
|
||||
line-height: normal;
|
||||
margin-right:15px;
|
||||
}
|
||||
.pr-info-section label,
|
||||
.pr-info-section strong {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
/* Hide DataTables controls */
|
||||
.dataTables_length,
|
||||
.dataTables_filter,
|
||||
.dataTables_info,
|
||||
.dataTables_paginate {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Additional style to ensure proper width for dot matrix printing */
|
||||
@media print {
|
||||
body, .print-area {
|
||||
width: 8in !important; /* Specific width for Epson FX-2175II */
|
||||
}
|
||||
|
||||
/* Force actual size printing */
|
||||
html {
|
||||
zoom: 100% !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
`);
|
||||
|
||||
|
||||
// Close the head and start the body
|
||||
doc.write('</head><body>');
|
||||
|
||||
// Get the printable content
|
||||
const printContent = document.getElementById('printableSIDR').cloneNode(true);
|
||||
|
||||
|
||||
// Remove DataTables controls
|
||||
const dataTableControls = printContent.querySelectorAll('.dataTables_length, .dataTables_filter, .dataTables_info, .dataTables_paginate');
|
||||
dataTableControls.forEach(control => {
|
||||
if (control && control.parentNode) {
|
||||
control.parentNode.removeChild(control);
|
||||
}
|
||||
});
|
||||
|
||||
// Write the modified content to the iframe
|
||||
doc.write(printContent.innerHTML);
|
||||
|
||||
// Close the document
|
||||
doc.write('</body></html>');
|
||||
doc.close();
|
||||
|
||||
// Wait for the iframe to load before printing
|
||||
iframe.onload = function () {
|
||||
// Print the iframe content
|
||||
iframe.contentWindow.print();
|
||||
|
||||
// Remove the iframe after printing
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(iframe);
|
||||
}, 1000);
|
||||
};
|
||||
}
|
||||
function printRRDRBackup() {
|
||||
// Create a hidden iframe to handle printing without affecting the main page
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.style.position = 'fixed';
|
||||
iframe.style.right = '0';
|
||||
iframe.style.bottom = '0';
|
||||
iframe.style.width = '0';
|
||||
iframe.style.height = '0';
|
||||
iframe.style.border = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
// Get the iframe's document
|
||||
const doc = iframe.contentWindow.document;
|
||||
|
||||
// Open the document and write the HTML header
|
||||
doc.open();
|
||||
doc.write('<html><head><title>Print</title>');
|
||||
|
||||
// Copy all stylesheets from the main page to ensure consistent styling
|
||||
const stylesheets = document.querySelectorAll('link[rel="stylesheet"]');
|
||||
stylesheets.forEach(sheet => {
|
||||
doc.write(sheet.outerHTML);
|
||||
});
|
||||
|
||||
// Add print-specific styles
|
||||
doc.write(`
|
||||
<style>
|
||||
body {
|
||||
font-family: Roman, sans-serif;
|
||||
font-size: 9px;
|
||||
margin: 0;
|
||||
padding: 0px;
|
||||
box-sizing: border-box;
|
||||
font-family: Roman, sans-serif;
|
||||
font-size: 10pt; /* Ensure consistent font size */
|
||||
line-height: normal; /* Avoid font clipping */
|
||||
width: 8.5in;
|
||||
height: 7in;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
page-break-after: avoid !important;
|
||||
page-break-before: avoid !important;
|
||||
}
|
||||
.print-area {
|
||||
width: 100%;
|
||||
height: calc(11in - 0.5in);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
page-break-after: avoid !important;
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
height: calc(100% - 0.5in);
|
||||
overflow: hidden;
|
||||
}
|
||||
.header {
|
||||
font-family: Roman, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.clientSupplier {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
top: 2.1in;
|
||||
}
|
||||
/* Reduce vertical padding inside table rows */
|
||||
table {
|
||||
width: 100%;
|
||||
top: 2.4in !important;
|
||||
position: fixed !important;
|
||||
border: none !important;
|
||||
row-border: none !important;
|
||||
border-collapse: collapse;
|
||||
line-height: normal;
|
||||
font-size: 10px;
|
||||
font-family: Roman, sans-serif !important;
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
table th,
|
||||
table td {
|
||||
padding: 1px 2px;
|
||||
line-height: .9;
|
||||
vertical-align: top;
|
||||
}
|
||||
th.itemNo, td.itemNo {
|
||||
width: 15%; text-align: right !important;
|
||||
}
|
||||
th.itemDescription, td.itemDescription {
|
||||
width: 50% !important;
|
||||
text-align: left;
|
||||
padding-left: 30px !important;
|
||||
font-size: 10pt !important;
|
||||
max-width: 50%;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
th.qty, td.qty {
|
||||
width: 10%;
|
||||
text-align: right!important;
|
||||
padding-left:40px !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
th.uomName, td.uomName {
|
||||
width: 10%;
|
||||
text-align: right !important;
|
||||
padding-right: 0 !important;*/
|
||||
font-size: 8pt !important;
|
||||
word-wrap: break-word; /* Enable word wrapping */
|
||||
word-break: break-word; /* Allow breaking at appropriate points */
|
||||
}
|
||||
th.remarks, td.remarks {
|
||||
width: 15%; text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.pr-info-section {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
.footer-row {
|
||||
position: fixed;
|
||||
bottom: 1.5in !important;
|
||||
left : 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
line-height: normal;
|
||||
background-color: white;
|
||||
margin: 0 5px; /* Add small margin to match body padding */
|
||||
}
|
||||
.footer-column {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 5px;
|
||||
line-height: normal;
|
||||
margin-right:15px;
|
||||
}
|
||||
.pr-info-section label,
|
||||
.pr-info-section strong {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
/* Hide DataTables controls */
|
||||
.dataTables_length,
|
||||
.dataTables_filter,
|
||||
.dataTables_info,
|
||||
.dataTables_paginate {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
`);
|
||||
|
||||
|
||||
// Close the head and start the body
|
||||
doc.write('</head><body>');
|
||||
|
||||
// Get the printable content
|
||||
const printContent = document.getElementById('printableSIDR').cloneNode(true);
|
||||
|
||||
|
||||
// Remove DataTables controls
|
||||
const dataTableControls = printContent.querySelectorAll('.dataTables_length, .dataTables_filter, .dataTables_info, .dataTables_paginate');
|
||||
dataTableControls.forEach(control => {
|
||||
if (control && control.parentNode) {
|
||||
control.parentNode.removeChild(control);
|
||||
}
|
||||
});
|
||||
|
||||
// Write the modified content to the iframe
|
||||
doc.write(printContent.innerHTML);
|
||||
|
||||
// Close the document
|
||||
doc.write('</body></html>');
|
||||
doc.close();
|
||||
|
||||
// Wait for the iframe to load before printing
|
||||
iframe.onload = function () {
|
||||
// Print the iframe content
|
||||
iframe.contentWindow.print();
|
||||
|
||||
// Remove the iframe after printing
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(iframe);
|
||||
}, 1000);
|
||||
};
|
||||
}
|
||||
function populateRRNo() {
|
||||
loader = $('#overlay, #loader').css('z-index', 1060);
|
||||
$.ajax($.extend({
|
||||
@ -81,7 +81,7 @@
|
||||
.custom-modal-tracker {
|
||||
max-width: 1320px !important;
|
||||
margin: 0 auto;
|
||||
overflow-x: hidden; /* Prevents horizontal overflow in the modal */
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.completed {
|
||||
|
||||
@ -30,3 +30,8 @@ textarea {
|
||||
height: 100px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.custom-modal-receiving {
|
||||
max-width: 1320px !important;
|
||||
margin: 0 auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user