Bug 41705: (follow-up) Hide receipt page buttons when printing

The Print receipt and Close buttons added in the previous patch use
class="no-print", but printreceiptinvoice.css had no @media print rule
for that class — so they appeared in the printed output (e.g. when
saving as PDF or auto-printing in browsers that block popups).

Add a @media print rule so the buttons remain visible on screen but
disappear from the printed receipt.

Test plan:
1. Disable browser popups (Chrome: "Don't allow sites to send pop-ups
   or use redirects").
2. Enable FinePaymentAutoPopup.
3. Complete a POS sale.
4. On the receipt page, choose Print to PDF (or trigger auto-print).
5. Verify the printed/PDF output contains only the receipt body — no
   Print receipt or Close buttons.
6. Verify the buttons remain visible on screen.

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2026-04-30 17:30:31 +01:00 committed by Lucas Gass
parent a5a1eeaa5b
commit 6b45fda621
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 6 additions and 0 deletions

View File

@ -341,3 +341,9 @@ fieldset {
#cataloguing_additem_itemlist {
overflow : visible !important;
}
@media print {
.no-print {
display: none;
}
}