fix: receipt uses inline styles for PDF/print compatibility, thermal width
- Replace all Tailwind classes with inline styles (fixes oklch color error in html2pdf) - Narrow receipt to 260px / 10px font for 72mm thermal paper - Print uses hidden iframe instead of window.open (fixes Safari about:blank) - PDF canvas width matches thermal format Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import { Label } from '@/components/ui/label'
|
||||
import { Separator } from '@/components/ui/separator'
|
||||
import { CheckCircle, Printer, Mail } from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import { POSReceipt, downloadReceiptPDF, printReceiptPDF } from './pos-receipt'
|
||||
import { POSReceipt, downloadReceiptPDF, printReceipt } from './pos-receipt'
|
||||
|
||||
interface POSPaymentDialogProps {
|
||||
open: boolean
|
||||
@@ -104,7 +104,7 @@ export function POSPaymentDialog({ open, onOpenChange, paymentMethod, transactio
|
||||
<Button variant="outline" size="sm" onClick={() => downloadReceiptPDF(result.transactionNumber)} className="gap-2">
|
||||
Save PDF
|
||||
</Button>
|
||||
<Button size="sm" onClick={() => printReceiptPDF(result.transactionNumber)} className="gap-2">
|
||||
<Button size="sm" onClick={printReceipt} className="gap-2">
|
||||
<Printer className="h-4 w-4" />Print
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user