function printDRPO() {
var purchasedby = document.getElementById('purchasedby').innerText;
printerSettingsDR(purchasedby);
}
function printSIPO() {
var purchasedby = document.getElementById('purchasedby').innerText;
printerSettingsSI(purchasedby);
}
function printerSettingsDR(purchaseBy) {
var printContent = document.getElementById('printableSIPO').innerHTML;
var printWindow = window.open('', '_blank', 'width=800,height=600');
if (purchaseBy == 'JEANE MAULAWIN') {
printWindow.document.write(`
Print P.O. DR
${printContent}
`);
} else {
printWindow.document.write(`
Print P.O. DR
${printContent}
`);
}
printWindow.document.close();
printWindow.focus();
setTimeout(function () {
printWindow.print();
printWindow.close();
}, 250);
}
function printerSettingsSI(purchaseBy) {
var printContent = document.getElementById('printableSIPO').innerHTML;
var printWindow = window.open('', '_blank', 'width=800,height=600');
if (purchaseBy == 'JEANE MAULAWIN') {
printWindow.document.write(`
Print P.O. SI
${printContent}
`);
printWindow.document.close();
printWindow.focus();
} else {
printWindow.document.write(`
Print P.O. SI
${printContent}
`);
}
printWindow.document.close();
printWindow.focus();
setTimeout(function () {
printWindow.print();
printWindow.close();
}, 250);
}
function printImportPO() {
var printContent = document.getElementById('printableContent').innerHTML;
var printWindow = window.open('', '', 'width=800,height=600');
printWindow.document.write('Print PO Details');
printWindow.document.write('');
printWindow.document.write('');
printWindow.document.write(printContent);
printWindow.document.write('');
printWindow.document.close();
printWindow.print();
printWindow.close();
}