File "receipt_preview.html"

Full Path: /home/leadltht/fastlinkinternet.com/administrator/data-provider/admin/receipt_preview.html
File size: 1.1 KB
MIME-type: text/html
Charset: utf-8

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Portable Receipt - Print View</title>
    <style>
        body {
            font-size: 45px;
            padding: 10px;
        }
    </style>
</head>
<body>
    <div id="receipt-content"></div>

    <script>
        // Retrieve the receipt data from sessionStorage
        var portableReceipt = sessionStorage.getItem('portableReceipt');

        // Display the receipt content in the page
        if (portableReceipt) {
            document.getElementById('receipt-content').innerHTML = portableReceipt;
        } else {
            document.getElementById('receipt-content').innerHTML = '<p>Error: Receipt data not found.</p>';
        }

        // Automatically trigger the print dialog when the page loads
        window.onload = function() {
            setTimeout(function() {
                window.print();
            }, 500); // Delay to allow the page to render before printing
        };
    </script>
</body>
</html>