From fbf70c34b81b07c92376cd4f5417ea1eae9e7524 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Fri, 12 Jun 2026 08:18:44 +0700 Subject: [PATCH] feat: include cash control details in closing receipt and reduce overall font sizes for better layout consistency --- report/pos_closing_summary_report.xml | 16 ++++----- static/src/app/closing_receipt.css | 2 +- static/src/app/closing_receipt.xml | 14 ++++---- static/src/app/closing_receipt_patch.js | 47 ++++++++++++++++++------- 4 files changed, 50 insertions(+), 29 deletions(-) diff --git a/report/pos_closing_summary_report.xml b/report/pos_closing_summary_report.xml index c6d5046..47fcd3f 100644 --- a/report/pos_closing_summary_report.xml +++ b/report/pos_closing_summary_report.xml @@ -45,7 +45,7 @@
-
-
+
SESSION CLOSING SUMMARY
-
+
(REPRINT)
@@ -78,7 +78,7 @@ Date/Time - + @@ -119,8 +119,8 @@ - - + @@ -159,7 +159,7 @@
+ font-size: 21px; letter-spacing: 1px;"> *** Session Closed ***
diff --git a/static/src/app/closing_receipt.css b/static/src/app/closing_receipt.css index 28dbaeb..8493f05 100644 --- a/static/src/app/closing_receipt.css +++ b/static/src/app/closing_receipt.css @@ -1,6 +1,6 @@ .pos-closing-receipt-print { width: 512px; - font-size: 28px; + font-size: 25px; color: #000000; } diff --git a/static/src/app/closing_receipt.xml b/static/src/app/closing_receipt.xml index 0863f6d..ba2c059 100644 --- a/static/src/app/closing_receipt.xml +++ b/static/src/app/closing_receipt.xml @@ -8,14 +8,14 @@ -->
-
+
-
+
-
+
SESSION CLOSING SUMMARY
@@ -32,7 +32,7 @@
- @@ -72,8 +72,8 @@
TOTAL + TOTAL
Date/Time +
- - + @@ -107,7 +107,7 @@
-
+
*** Session Closed ***
diff --git a/static/src/app/closing_receipt_patch.js b/static/src/app/closing_receipt_patch.js index b710d1b..7613b74 100644 --- a/static/src/app/closing_receipt_patch.js +++ b/static/src/app/closing_receipt_patch.js @@ -218,6 +218,26 @@ patch(ClosePosPopup.prototype, { ` ); + let cashControlBlock = ""; + if (receiptData.hasCashControl) { + cashControlBlock = ` +
+
TOTAL + TOTAL
+ + + + + + + + + + + + +
Expected Cash${receiptData.expectedCash}
Counted Cash${receiptData.countedCash}
Cash Difference${receiptData.cashDifference}
`; + } + const html = ` @@ -227,7 +247,7 @@ patch(ClosePosPopup.prototype, { * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Courier New', Courier, monospace; - font-size: 28px; + font-size: 25px; background: #fff; color: #000; } @@ -239,14 +259,14 @@ patch(ClosePosPopup.prototype, { } .center { text-align: center; } .header-title { - font-size: 36px; + font-size: 33px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; } .header-sub { margin-top: 4px; - font-size: 24px; + font-size: 21px; letter-spacing: 2px; } .dashed { border-top: 1px dashed #000; margin: 8px 0; } @@ -255,11 +275,11 @@ patch(ClosePosPopup.prototype, { td { padding: 5px 0; } .right { text-align: right; } .bold { font-weight: bold; } - .total-row td { font-weight: bold; font-size: 32px; padding: 6px 0; } + .total-row td { font-weight: bold; font-size: 29px; padding: 6px 0; } .footer { text-align: center; margin-top: 12px; - font-size: 24px; + font-size: 21px; letter-spacing: 1px; } .feed { margin-top: 28px; } @@ -282,7 +302,7 @@ patch(ClosePosPopup.prototype, { Date/Time - ${receiptData.closingTime} + ${receiptData.closingTime}
@@ -297,6 +317,7 @@ patch(ClosePosPopup.prototype, { ${receiptData.grandTotal} + ${cashControlBlock}
 
@@ -495,7 +516,7 @@ patch(Navbar.prototype, { * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Courier New', Courier, monospace; - font-size: 28px; + font-size: 25px; background: #fff; color: #000; } @@ -507,19 +528,19 @@ patch(Navbar.prototype, { } .center { text-align: center; } .header-title { - font-size: 36px; + font-size: 33px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; } .header-sub { margin-top: 4px; - font-size: 24px; + font-size: 21px; letter-spacing: 2px; } .reprint-label { margin-top: 2px; - font-size: 22px; + font-size: 19px; color: #666; } .dashed { border-top: 1px dashed #000; margin: 8px 0; } @@ -528,11 +549,11 @@ patch(Navbar.prototype, { td { padding: 5px 0; } .right { text-align: right; } .bold { font-weight: bold; } - .total-row td { font-weight: bold; font-size: 32px; padding: 6px 0; } + .total-row td { font-weight: bold; font-size: 29px; padding: 6px 0; } .footer { text-align: center; margin-top: 12px; - font-size: 24px; + font-size: 21px; letter-spacing: 1px; } .feed { margin-top: 28px; } @@ -556,7 +577,7 @@ patch(Navbar.prototype, { Date/Time - ${sessionData.closing_time} + ${sessionData.closing_time}