diff --git a/static/src/css/receipt.css b/static/src/css/receipt.css index 0a9a8ed..acf1116 100644 --- a/static/src/css/receipt.css +++ b/static/src/css/receipt.css @@ -24,3 +24,43 @@ padding-bottom: 0 !important; margin: 0 !important; } + +/* Enlarge order lines font size for high legibility (readable by 40+ years old) */ +.pos-receipt .orderlines, +.pos-receipt .orderline, +.pos-receipt .pos-receipt-orderline, +.pos-receipt .orderlines li { + font-size: 135% !important; + font-weight: bold !important; + line-height: 1.3 !important; +} + +.pos-receipt .orderline *, +.pos-receipt .pos-receipt-orderline *, +.pos-receipt .orderlines li * { + font-size: 100% !important; + font-weight: bold !important; +} + +/* Styled notes for readability */ +.pos-receipt .customer-note, +.pos-receipt .internal-note, +.pos-receipt .info-list, +.pos-receipt li.customer-note { + font-size: 110% !important; + font-weight: normal !important; +} + +/* Force bottom padding/margins to 0 to prevent footer white spaces */ +.pos-receipt { + padding-bottom: 0 !important; + margin-bottom: 0 !important; +} + +@media print { + .pos-receipt { + padding-bottom: 0 !important; + margin-bottom: 0 !important; + } +} + diff --git a/static/src/js/orderline.js b/static/src/js/orderline.js index 1c9934d..a8e4240 100644 --- a/static/src/js/orderline.js +++ b/static/src/js/orderline.js @@ -2,6 +2,7 @@ import { patch } from "@web/core/utils/patch"; import { Orderline } from "@point_of_sale/app/components/orderline/orderline"; +import { PosOrder } from "@point_of_sale/app/models/pos_order"; patch(Orderline.prototype, { get lineScreenValues() { @@ -18,3 +19,27 @@ patch(Orderline.prototype, { return res; } }); + +patch(PosOrder.prototype, { + getCashierName() { + const name = super.getCashierName(); + if (!name) { + return name; + } + // Extract prefix if present (e.g. "Served by:", "Order Taker:") + let temp = name.trim(); + let prefix = ""; + const prefixMatch = temp.match(/^(served\s+by:?|order\s+taker:?|kasir:?)\s*/i); + if (prefixMatch) { + prefix = prefixMatch[0]; + temp = temp.substring(prefix.length).trim(); + } + + const parts = temp.split(/\s+/); + if (parts.length <= 2) { + return name; + } + return prefix + parts[0] + " " + parts[parts.length - 1]; + } +}); +