fix(pos): print tickets via iframe with measured height and configurable paper width
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled

This commit is contained in:
2026-07-02 23:11:55 +00:00
parent 31b533f9f9
commit 1ff4d80277
4 changed files with 76 additions and 13 deletions

View File

@@ -1044,6 +1044,7 @@ RECEIPT_CONFIG_KEYS = [
'receipt_show_iva_breakdown',
'receipt_show_payment_details',
'receipt_show_employee',
'receipt_paper_width',
]
@@ -1081,6 +1082,7 @@ def get_receipt_config():
'show_iva_breakdown': _bool('receipt_show_iva_breakdown', True),
'show_payment_details': _bool('receipt_show_payment_details', True),
'show_employee': _bool('receipt_show_employee', False),
'paper_width': rows.get('receipt_paper_width', '80') or '80',
})
@@ -1108,6 +1110,7 @@ def update_receipt_config():
'receipt_show_iva_breakdown': 'true' if data.get('show_iva_breakdown') else 'false',
'receipt_show_payment_details': 'true' if data.get('show_payment_details') else 'false',
'receipt_show_employee': 'true' if data.get('show_employee') else 'false',
'receipt_paper_width': str(data.get('paper_width', '80') or '80'),
}
for key, value in settings.items():